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=a9ca36e41805e259c2bfc238655a9586f7efb303;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); }