ia64/xen-unstable
changeset 5895:a0a14aedfa68
Fix memory reservation in XenLinux.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Jul 27 09:24:51 2005 +0000 (2005-07-27) |
parents | 4c52791a0444 |
children | d86a9892396a 5f9ca2959ffc |
files | linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c Wed Jul 27 00:27:36 2005 +0000 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c Wed Jul 27 09:24:51 2005 +0000 1.3 @@ -748,8 +748,10 @@ static int __init smp_scan_config (unsig 1.4 || (mpf->mpf_specification == 4)) ) { 1.5 1.6 smp_found_config = 1; 1.7 +#ifndef CONFIG_XEN 1.8 printk(KERN_INFO "found SMP MP-table at %08lx\n", 1.9 virt_to_phys(mpf)); 1.10 + reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE); 1.11 if (mpf->mpf_physptr) { 1.12 /* 1.13 * We cannot access to MPC table to compute 1.14 @@ -766,6 +768,10 @@ static int __init smp_scan_config (unsig 1.15 size = end - mpf->mpf_physptr; 1.16 reserve_bootmem(mpf->mpf_physptr, size); 1.17 } 1.18 +#else 1.19 + printk(KERN_INFO "found SMP MP-table at %08lx\n", 1.20 + ((unsigned long)bp - (unsigned long)isa_bus_to_virt(base)) + base); 1.21 +#endif 1.22 1.23 mpf_found = mpf; 1.24 return 1; 1.25 @@ -809,9 +815,11 @@ void __init find_smp_config (void) 1.26 * MP1.4 SPEC states to only scan first 1K of 4K EBDA. 1.27 */ 1.28 1.29 +#ifndef CONFIG_XEN 1.30 address = get_bios_ebda(); 1.31 if (address) 1.32 smp_scan_config(address, 0x400); 1.33 +#endif 1.34 } 1.35 1.36 /* --------------------------------------------------------------------------
2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Jul 27 00:27:36 2005 +0000 2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Jul 27 09:24:51 2005 +0000 2.3 @@ -1060,6 +1060,7 @@ static void __init register_bootmem_low_ 2.4 } 2.5 } 2.6 2.7 +#ifndef CONFIG_XEN 2.8 /* 2.9 * workaround for Dell systems that neglect to reserve EBDA 2.10 */ 2.11 @@ -1070,6 +1071,7 @@ static void __init reserve_ebda_region(v 2.12 if (addr) 2.13 reserve_bootmem(addr, PAGE_SIZE); 2.14 } 2.15 +#endif 2.16 2.17 #ifndef CONFIG_DISCONTIGMEM 2.18 void __init setup_bootmem_allocator(void); 2.19 @@ -1152,6 +1154,13 @@ void __init setup_bootmem_allocator(void 2.20 reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(min_low_pfn) + 2.21 bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY)); 2.22 2.23 +#ifndef CONFIG_XEN 2.24 + /* 2.25 + * reserve physical page 0 - it's a special BIOS page on many boxes, 2.26 + * enabling clean reboots, SMP operation, laptop functions. 2.27 + */ 2.28 + reserve_bootmem(0, PAGE_SIZE); 2.29 + 2.30 /* reserve EBDA region, it's a 4K region */ 2.31 reserve_ebda_region(); 2.32 2.33 @@ -1176,6 +1185,7 @@ void __init setup_bootmem_allocator(void 2.34 */ 2.35 acpi_reserve_bootmem(); 2.36 #endif 2.37 +#endif /* !CONFIG_XEN */ 2.38 2.39 #ifdef CONFIG_BLK_DEV_INITRD 2.40 if (xen_start_info.mod_start) {