summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-27 12:48:20 +0000
committerrsc <rsc>2007-08-27 12:48:20 +0000
commit7bb73cdbc78a1f0df07539125e681c084b66d876 (patch)
treefe81a7404feba32d384dff35c83d9662af018dd1 /x86.h
parent8e67005320c56cac63654bcf61a8128bd89e4ff9 (diff)
downloadxv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.tar.gz
xv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.tar.bz2
xv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.zip
nits
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/x86.h b/x86.h
index 009fa33..1ef79cb 100644
--- a/x86.h
+++ b/x86.h
@@ -5,6 +5,7 @@ static inline uchar
inb(ushort port)
{
uchar data;
+
asm volatile("in %1,%0" : "=a" (data) : "d" (port));
return data;
}
@@ -91,6 +92,7 @@ static inline void
cpuid(uint info, uint *eaxp, uint *ebxp, uint *ecxp, uint *edxp)
{
uint eax, ebx, ecx, edx;
+
asm volatile("cpuid" :
"=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) :
"a" (info));