提交 37939f24 创建 作者: Frans Kaashoek's avatar Frans Kaashoek

better comment

上级 27ff70dc
......@@ -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");
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论