]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
x86: Fix e820 walk and allocator initialisation.
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 15 Dec 2007 19:03:00 +0000 (19:03 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 15 Dec 2007 19:03:00 +0000 (19:03 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   16624:257ca4017b416b26120f4a271cf608a23cf23468
xen-unstable date:        Sat Dec 15 18:23:13 2007 +0000

xen/arch/x86/setup.c

index f9564a2bcb0185dc4bd42b2bfc785f244a77cfdb..f9b25d51d9d58f1c2007c840a1313dfc9864b46e 100644 (file)
@@ -772,8 +772,8 @@ void __init __start_xen(unsigned long mbi_p)
     kexec_reserve_area(&boot_e820);
 
     /*
-     * With the boot allocator now seeded, we can walk every RAM region and
-     * map it in its entirety (on x86/64, at least) and notify it to the
+     * With the boot allocator now initialised, we can walk every RAM region
+     * and map it in its entirety (on x86/64, at least) and notify it to the
      * boot allocator.
      */
     for ( i = 0; i < boot_e820.nr_map; i++ )
@@ -799,8 +799,7 @@ void __init __start_xen(unsigned long mbi_p)
 #endif
 
         /* Pass mapped memory to allocator /before/ creating new mappings. */
-        if ( s < map_s )
-            init_boot_pages(s, map_s);
+        init_boot_pages(s, min_t(uint64_t, map_s, e));
 
         /* Create new mappings /before/ passing memory to the allocator. */
         if ( map_s < map_e )
@@ -810,8 +809,7 @@ void __init __start_xen(unsigned long mbi_p)
                 PAGE_HYPERVISOR);
 
         /* Pass remainder of this memory chunk to the allocator. */
-        if ( map_s < e )
-            init_boot_pages(map_s, e);
+        init_boot_pages(map_s, e);
     }
 
     memguard_init();