From: Ben Pfaff Date: Thu, 24 Feb 2005 22:23:50 +0000 (+0000) Subject: active_pd() should return a virtual address. Thanks to Guy Isely X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b82382ed47ec31ba6fff7e368e47c0530f7e2acb;p=pintos-anon active_pd() should return a virtual address. Thanks to Guy Isely for reporting this bug. --- diff --git a/src/userprog/pagedir.c b/src/userprog/pagedir.c index 3ad8123..d9cfd30 100644 --- a/src/userprog/pagedir.c +++ b/src/userprog/pagedir.c @@ -203,7 +203,7 @@ active_pd (void) `pd'. See [IA32-v2a] "MOV--Move to/from Control Registers" and [IA32-v3] 3.7.5. */ - uint32_t *pd; + uintptr_t pd; asm ("mov %0, %%cr3" : "=r" (pd)); - return pd; + return ptov (pd); }