From ac090078c63c9b467fd723f6bb7f949c05e9b04b Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Mon, 30 Aug 2010 10:13:49 -0400 Subject: [PATCH] xx --- defs.h | 2 +- main.c | 2 +- vm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/defs.h b/defs.h index 0197e70..02da96f 100644 --- a/defs.h +++ b/defs.h @@ -155,7 +155,7 @@ void uartputc(int); void pminit(void); void ksegment(void); void kvmalloc(void); -void vminit(void); +void vmenable(void); pde_t* setupkvm(void); char* uva2ka(pde_t*, char*); int allocuvm(pde_t*, char*, uint); diff --git a/main.c b/main.c index c8aa53a..1a49bc6 100644 --- a/main.c +++ b/main.c @@ -67,7 +67,7 @@ mpmain(void) ksegment(); lapicinit(cpunum()); } - vminit(); // turn on paging + vmenable(); // turn on paging cprintf("cpu%d: starting\n", cpu->id); idtinit(); // load idt register xchg(&cpu->booted, 1); diff --git a/vm.c b/vm.c index 20afa28..262f079 100644 --- a/vm.c +++ b/vm.c @@ -369,11 +369,11 @@ kvmalloc(void) // Turn on paging. void -vminit(void) +vmenable(void) { uint cr0; - lcr3(PADDR(kpgdir)); + switchkvm(); // load kpgdir into cr3 cr0 = rcr0(); cr0 |= CR0_PG; lcr0(cr0);