From eb114b9c880a8fbcf1ad461ff7fc9a37f7fc7cb6 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 14 Mar 2012 01:18:43 +0100 Subject: 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. --- i386/intel/pmap.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'i386/intel/pmap.h') diff --git a/i386/intel/pmap.h b/i386/intel/pmap.h index e02ad36..11bca80 100644 --- a/i386/intel/pmap.h +++ b/i386/intel/pmap.h @@ -100,6 +100,13 @@ typedef unsigned int pt_entry_t; #define lin2pdenum(a) (((a) >> PDESHIFT) & PDEMASK) #endif +/* + * Convert linear offset to page directory pointer index + */ +#if PAE +#define lin2pdpnum(a) (((a) >> PDPSHIFT) & PDPMASK) +#endif + /* * Convert page descriptor index to linear address */ -- cgit v1.2.3