ia64/xen-unstable

changeset 19186:1d4ce9e31fa0

minios: fix p2m on x86

15675:bf85b467ee89 Fixed p2m on x86_64, but instead broke it on x86.

Signed-off-by: Samuel Thibault <samuel.thibaut@ens-lyon.org>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 09 14:22:07 2009 +0000 (2009-02-09)
parents 54492bf232f7
children 1eb6afcad849
files extras/mini-os/arch/x86/mm.c
line diff
     1.1 --- a/extras/mini-os/arch/x86/mm.c	Mon Feb 09 12:50:12 2009 +0000
     1.2 +++ b/extras/mini-os/arch/x86/mm.c	Mon Feb 09 14:22:07 2009 +0000
     1.3 @@ -550,9 +550,15 @@ static void clear_bootstrap(void)
     1.4  
     1.5  void arch_init_p2m(unsigned long max_pfn)
     1.6  {
     1.7 +#ifdef __x86_64__
     1.8  #define L1_P2M_SHIFT    9
     1.9  #define L2_P2M_SHIFT    18    
    1.10  #define L3_P2M_SHIFT    27    
    1.11 +#else
    1.12 +#define L1_P2M_SHIFT    10
    1.13 +#define L2_P2M_SHIFT    20    
    1.14 +#define L3_P2M_SHIFT    30    
    1.15 +#endif
    1.16  #define L1_P2M_ENTRIES  (1 << L1_P2M_SHIFT)    
    1.17  #define L2_P2M_ENTRIES  (1 << (L2_P2M_SHIFT - L1_P2M_SHIFT))    
    1.18  #define L3_P2M_ENTRIES  (1 << (L3_P2M_SHIFT - L2_P2M_SHIFT))