summaryrefslogtreecommitdiff
path: root/i386/intel/pmap.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-14 01:18:43 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-14 01:18:43 +0100
commiteb114b9c880a8fbcf1ad461ff7fc9a37f7fc7cb6 (patch)
tree4a3eb376c96f71951387d3c66ae55c1352ccadfa /i386/intel/pmap.c
parent8ffbe78a0db6a916de0f0dfba6f4d9dd8dcf20ab (diff)
Fix Xen bootstrap at virtual address above 1GiB
* i386/intel/pmap.h (lin2pdpnum): New macro. * i386/intel/pmap.c (pmap_set_page_readonly_init): Use lin2pdpnum macro instead of hardcoding 0.
Diffstat (limited to 'i386/intel/pmap.c')
-rw-r--r--i386/intel/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 86d2415..76055f8 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -831,7 +831,7 @@ void pmap_set_page_readonly_init(void *_vaddr) {
vm_offset_t vaddr = (vm_offset_t) _vaddr;
#if PAE
pt_entry_t *pdpbase = (void*) boot_info.pt_base;
- vm_offset_t dirbase = ptetokv(pdpbase[0]);
+ vm_offset_t dirbase = ptetokv(pdpbase[lin2pdpnum(vaddr)]);
#else
vm_offset_t dirbase = boot_info.pt_base;
#endif