ia64/xen-unstable

changeset 14084:da37c365b375

x86/64: Fix a user of alloc_boot_pages() who should use
alloc_boot_low_pages() instead.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Feb 22 22:27:40 2007 +0000 (2007-02-22)
parents 3746b3d4f301
children 8407279d3751
files xen/arch/x86/setup.c xen/arch/x86/x86_64/mm.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Thu Feb 22 15:26:21 2007 +0000
     1.2 +++ b/xen/arch/x86/setup.c	Thu Feb 22 22:27:40 2007 +0000
     1.3 @@ -476,7 +476,7 @@ void __init __start_xen(multiboot_info_t
     1.4              s = initial_images_end;
     1.5          init_boot_pages(s, e);
     1.6  
     1.7 -#if defined (CONFIG_X86_64)
     1.8 +#if defined(CONFIG_X86_64)
     1.9          /*
    1.10           * x86/64 maps all registered RAM. Points to note:
    1.11           *  1. The initial pagetable already maps low 1GB, so skip that.
    1.12 @@ -532,7 +532,12 @@ void __init __start_xen(multiboot_info_t
    1.13          k = ((initial_images_end - initial_images_start) & ~PAGE_MASK) ? 1 : 0;
    1.14          k += (initial_images_end - initial_images_start) >> PAGE_SHIFT;
    1.15  
    1.16 -        k = alloc_boot_low_pages(k, 1);
    1.17 +#if defined(CONFIG_X86_32)
    1.18 +        /* Must allocate within bootstrap 1:1 limits. */
    1.19 +        k = alloc_boot_low_pages(k, 1); /* 0x0 - HYPERVISOR_VIRT_START */
    1.20 +#else
    1.21 +        k = alloc_boot_pages(k, 1);
    1.22 +#endif
    1.23          if ( k == 0 )
    1.24              panic("Unable to allocate initial images memory\n");
    1.25  
     2.1 --- a/xen/arch/x86/x86_64/mm.c	Thu Feb 22 15:26:21 2007 +0000
     2.2 +++ b/xen/arch/x86/x86_64/mm.c	Thu Feb 22 22:27:40 2007 +0000
     2.3 @@ -44,7 +44,8 @@ struct page_info *alloc_xen_pagetable(vo
     2.4      if ( !early_boot )
     2.5          return alloc_domheap_page(NULL);
     2.6  
     2.7 -    pfn = alloc_boot_pages(1, 1);
     2.8 +    /* Early pagetables must come from low 1GB of memory. */
     2.9 +    pfn = alloc_boot_low_pages(1, 1); /* 0x0 - 0x40000000 */
    2.10      return ((pfn == 0) ? NULL : mfn_to_page(pfn));
    2.11  }
    2.12