summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 16:55:52 +0000
committerrsc <rsc>2006-07-16 16:55:52 +0000
commit564f787e916392af7b1960d079abf110234305d4 (patch)
treead3095388d6723fdb177303a25de38477571c33b /proc.c
parent6e6a1dd7d717246f58bc3bbdf2a32e7e3f901cf3 (diff)
downloadxv6-labs-564f787e916392af7b1960d079abf110234305d4.tar.gz
xv6-labs-564f787e916392af7b1960d079abf110234305d4.tar.bz2
xv6-labs-564f787e916392af7b1960d079abf110234305d4.zip
Eliminate annoying Pseudodesc structure.
Eliminate unnecessary parts of mmu.h.
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c7
1 files changed, 3 insertions, 4 deletions
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