diff options
author | Frans Kaashoek <[email protected]> | 2016-08-26 08:46:13 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2016-08-26 08:46:13 -0400 |
commit | 37939f24c2fbb12a57a628fedd024a4865741e74 (patch) | |
tree | 60693dc51ec3d332b09fd19840b467d7b2cca283 /vm.c | |
parent | 27ff70dc083b650c5c44d5145c2991f32d8ff547 (diff) | |
download | xv6-labs-37939f24c2fbb12a57a628fedd024a4865741e74.tar.gz xv6-labs-37939f24c2fbb12a57a628fedd024a4865741e74.tar.bz2 xv6-labs-37939f24c2fbb12a57a628fedd024a4865741e74.zip |
better comment
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -168,7 +168,9 @@ switchuvm(struct proc *p) cpu->gdt[SEG_TSS].s = 0; cpu->ts.ss0 = SEG_KDATA << 3; cpu->ts.esp0 = (uint)proc->kstack + KSTACKSIZE; - cpu->ts.iomb = (ushort) 0xFFFF; // forbid I/O instructions from user space + // setting IOPL=0 in eflags *and* iomb beyond the tss segment limit + // forbids I/O instructions (e.g., inb and outb) from user space + cpu->ts.iomb = (ushort) 0xFFFF; ltr(SEG_TSS << 3); if(p->pgdir == 0) panic("switchuvm: no pgdir"); |