diff options
author | rsc <rsc> | 2007-08-27 12:48:20 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-27 12:48:20 +0000 |
commit | 7bb73cdbc78a1f0df07539125e681c084b66d876 (patch) | |
tree | fe81a7404feba32d384dff35c83d9662af018dd1 | |
parent | 8e67005320c56cac63654bcf61a8128bd89e4ff9 (diff) | |
download | xv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.tar.gz xv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.tar.bz2 xv6-labs-7bb73cdbc78a1f0df07539125e681c084b66d876.zip |
nits
-rw-r--r-- | bootother.S | 4 | ||||
-rw-r--r-- | defs.h | 2 | ||||
-rw-r--r-- | x86.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/bootother.S b/bootother.S index 5e8348e..f243f41 100644 --- a/bootother.S +++ b/bootother.S @@ -15,8 +15,8 @@ # # This code is identical to bootasm.S except: # - it does not need to enable A20 -# - it uses 0(start-4) for the %esp -# - it jumps to 0(start-8) instead of calling cmain +# - it uses the address at start-4 for the %esp +# - it jumps to the address at start-8 instead of calling cmain .set PROT_MODE_CSEG, 0x8 # kernel code segment selector .set PROT_MODE_DSEG, 0x10 # kernel data segment selector @@ -23,7 +23,7 @@ void kbd_intr(void); void panic(char*) __attribute__((noreturn)); // exec.c -int exec(char*, char**); +int exec(char*, char**); // file.c struct file* filealloc(void); @@ -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)); |