debuggers.hg
changeset 16662:257ca4017b41
x86: Fix e820 walk and allocator initialisation.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Sat Dec 15 18:23:13 2007 +0000 (2007-12-15) |
parents | 9152cf7f5b82 |
children | 44a98411d230 |
files | xen/arch/x86/setup.c |
line diff
1.1 --- a/xen/arch/x86/setup.c Fri Dec 14 10:26:06 2007 -0700 1.2 +++ b/xen/arch/x86/setup.c Sat Dec 15 18:23:13 2007 +0000 1.3 @@ -742,8 +742,8 @@ void __init __start_xen(unsigned long mb 1.4 kexec_reserve_area(&boot_e820); 1.5 1.6 /* 1.7 - * With the boot allocator now seeded, we can walk every RAM region and 1.8 - * map it in its entirety (on x86/64, at least) and notify it to the 1.9 + * With the boot allocator now initialised, we can walk every RAM region 1.10 + * and map it in its entirety (on x86/64, at least) and notify it to the 1.11 * boot allocator. 1.12 */ 1.13 for ( i = 0; i < boot_e820.nr_map; i++ ) 1.14 @@ -769,8 +769,7 @@ void __init __start_xen(unsigned long mb 1.15 #endif 1.16 1.17 /* Pass mapped memory to allocator /before/ creating new mappings. */ 1.18 - if ( s < map_s ) 1.19 - init_boot_pages(s, map_s); 1.20 + init_boot_pages(s, min_t(uint64_t, map_s, e)); 1.21 1.22 /* Create new mappings /before/ passing memory to the allocator. */ 1.23 if ( map_s < map_e ) 1.24 @@ -780,8 +779,7 @@ void __init __start_xen(unsigned long mb 1.25 PAGE_HYPERVISOR); 1.26 1.27 /* Pass remainder of this memory chunk to the allocator. */ 1.28 - if ( map_s < e ) 1.29 - init_boot_pages(map_s, e); 1.30 + init_boot_pages(map_s, e); 1.31 } 1.32 1.33 memguard_init();