WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fix memory reservation in XenLinux.

# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID a0a14aedfa68b5783508fde32135a329694b894e
# Parent  4c52791a04445a906e1b191c128d8660bd3fd918
Fix memory reservation in XenLinux.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 4c52791a0444 -r a0a14aedfa68 
linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c       Wed Jul 27 
00:27:36 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c       Wed Jul 27 
09:24:51 2005
@@ -748,8 +748,10 @@
                                || (mpf->mpf_specification == 4)) ) {
 
                        smp_found_config = 1;
+#ifndef CONFIG_XEN
                        printk(KERN_INFO "found SMP MP-table at %08lx\n",
                                                virt_to_phys(mpf));
+                       reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE);
                        if (mpf->mpf_physptr) {
                                /*
                                 * We cannot access to MPC table to compute
@@ -766,6 +768,10 @@
                                        size = end - mpf->mpf_physptr;
                                reserve_bootmem(mpf->mpf_physptr, size);
                        }
+#else
+                       printk(KERN_INFO "found SMP MP-table at %08lx\n",
+                               ((unsigned long)bp - (unsigned 
long)isa_bus_to_virt(base)) + base);
+#endif
 
                        mpf_found = mpf;
                        return 1;
@@ -809,9 +815,11 @@
         * MP1.4 SPEC states to only scan first 1K of 4K EBDA.
         */
 
+#ifndef CONFIG_XEN
        address = get_bios_ebda();
        if (address)
                smp_scan_config(address, 0x400);
+#endif
 }
 
 /* --------------------------------------------------------------------------
diff -r 4c52791a0444 -r a0a14aedfa68 
linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Jul 27 00:27:36 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Jul 27 09:24:51 2005
@@ -1060,6 +1060,7 @@
        }
 }
 
+#ifndef CONFIG_XEN
 /*
  * workaround for Dell systems that neglect to reserve EBDA
  */
@@ -1070,6 +1071,7 @@
        if (addr)
                reserve_bootmem(addr, PAGE_SIZE);       
 }
+#endif
 
 #ifndef CONFIG_DISCONTIGMEM
 void __init setup_bootmem_allocator(void);
@@ -1152,6 +1154,13 @@
        reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(min_low_pfn) +
                         bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
 
+#ifndef CONFIG_XEN
+       /*
+        * reserve physical page 0 - it's a special BIOS page on many boxes,
+        * enabling clean reboots, SMP operation, laptop functions.
+        */
+       reserve_bootmem(0, PAGE_SIZE);
+
        /* reserve EBDA region, it's a 4K region */
        reserve_ebda_region();
 
@@ -1176,6 +1185,7 @@
         */
        acpi_reserve_bootmem();
 #endif
+#endif /* !CONFIG_XEN */
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (xen_start_info.mod_start) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix memory reservation in XenLinux., Xen patchbot -unstable <=