active_pd() should return a virtual address. Thanks to Guy Isely
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 24 Feb 2005 22:23:50 +0000 (22:23 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 24 Feb 2005 22:23:50 +0000 (22:23 +0000)
<guyi@stanford.edu> for reporting this bug.

src/userprog/pagedir.c

index 3ad8123557a37dace964bcc18be56a431605f87d..d9cfd301e5d5997887eb64e894f8c82e5f282a03 100644 (file)
@@ -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);
 }