From 564f787e916392af7b1960d079abf110234305d4 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 16 Jul 2006 16:55:52 +0000 Subject: Eliminate annoying Pseudodesc structure. Eliminate unnecessary parts of mmu.h. --- proc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index f24f4f8..4bcd4ab 100644 --- a/proc.c +++ b/proc.c @@ -38,9 +38,6 @@ setupsegs(struct proc *p) p->gdt[SEG_TSS].s = 0; p->gdt[SEG_UCODE] = SEG(STA_X|STA_R, (unsigned)p->mem, p->sz, 3); p->gdt[SEG_UDATA] = SEG(STA_W, (unsigned)p->mem, p->sz, 3); - p->gdt_pd._garbage = 0; - p->gdt_pd.lim = sizeof(p->gdt) - 1; - p->gdt_pd.base = (unsigned) p->gdt; } // Look in the process table for an UNUSED proc. @@ -159,7 +156,9 @@ scheduler(void) // to confine all the inline assembly. // XXX probably ought to lgdt on trap return too, in case // a system call has moved a program or changed its size. - asm volatile("lgdt %0" : : "g" (p->gdt_pd.lim)); + lgdt(p->gdt, sizeof p->gdt); + // asm volatile("lgdt %0" : : "g" (p->gdt_pd.lim)); + ltr(SEG_TSS << 3); // Switch to chosen process. It is the process's job -- cgit v1.2.3