tiny clarifications to some gdt code.

This commit is contained in:
Robert Morris 2016-08-10 10:51:14 -04:00
parent 0a4a4230a3
commit 858475e4df
3 changed files with 5 additions and 5 deletions

3
vm.c
View file

@ -9,7 +9,6 @@
extern char data[]; // defined by kernel.ld
pde_t *kpgdir; // for use in scheduler()
struct segdesc gdt[NSEGS];
// Set up CPU's kernel segment descriptors.
// Run once on entry on each CPU.
@ -28,7 +27,7 @@ seginit(void)
c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, 0, 0xffffffff, DPL_USER);
c->gdt[SEG_UDATA] = SEG(STA_W, 0, 0xffffffff, DPL_USER);
// Map cpu, and curproc
// Map cpu and curproc -- these are private per cpu.
c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0);
lgdt(c->gdt, sizeof(c->gdt));