diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2007-12-15 18:23:13 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2007-12-15 18:23:13 +0000 |
commit | 8710cb7a9156d0648d54700669adb9d79529dfb6 (patch) | |
tree | 0d2bb26e9615c1bc1385b70055ed3f7d76f57110 | |
parent | 08cd0c80ad8e8b6de5fbdd05693386d7267e6ccb (diff) | |
download | xen-8710cb7a9156d0648d54700669adb9d79529dfb6.tar.gz xen-8710cb7a9156d0648d54700669adb9d79529dfb6.tar.bz2 xen-8710cb7a9156d0648d54700669adb9d79529dfb6.zip |
x86: Fix e820 walk and allocator initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r-- | xen/arch/x86/setup.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 734e70e009..095ee91116 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -742,8 +742,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++ ) @@ -769,8 +769,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 ) @@ -780,8 +779,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(); |