[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Prefer multiboot-provided e820 over bios-provided e801 memory info.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 29 Aug 2012 06:00:09 +0000
  • Delivery-date: Wed, 29 Aug 2012 06:00:27 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1346190045 -3600
# Node ID a0b5f8102a0013c112d8e2f7c476040e882838ae
# Parent  3908b256ff345539ae63851b8d3f810d9af19890
x86: Prefer multiboot-provided e820 over bios-provided e801 memory info.

Some UEFI systems do not provide e820 information. In this case we
should take the detailed memory map provided by a multiboot-capable
loader, rather than rely on very conservative values from the e801
bios call. Using the latter on any modern system really hardly makes
good sense.

[Excellent candidate for 4.1 backport]

Signed-off-by: Keir Fraser <keir@xxxxxxx>
Tested-by: Jonathan Tripathy <jonnyt@xxxxxxxxxxx>
---


diff -r 3908b256ff34 -r a0b5f8102a00 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Aug 28 14:46:30 2012 +0100
+++ b/xen/arch/x86/setup.c      Tue Aug 28 22:40:45 2012 +0100
@@ -690,17 +690,6 @@ void __init __start_xen(unsigned long mb
     {
         memmap_type = "Xen-e820";
     }
-    else if ( bootsym(lowmem_kb) )
-    {
-        memmap_type = "Xen-e801";
-        e820_raw[0].addr = 0;
-        e820_raw[0].size = bootsym(lowmem_kb) << 10;
-        e820_raw[0].type = E820_RAM;
-        e820_raw[1].addr = 0x100000;
-        e820_raw[1].size = bootsym(highmem_kb) << 10;
-        e820_raw[1].type = E820_RAM;
-        e820_raw_nr = 2;
-    }
     else if ( mbi->flags & MBI_MEMMAP )
     {
         memmap_type = "Multiboot-e820";
@@ -738,6 +727,17 @@ void __init __start_xen(unsigned long mb
             bytes += map->size + 4;
         }
     }
+    else if ( bootsym(lowmem_kb) )
+    {
+        memmap_type = "Xen-e801";
+        e820_raw[0].addr = 0;
+        e820_raw[0].size = bootsym(lowmem_kb) << 10;
+        e820_raw[0].type = E820_RAM;
+        e820_raw[1].addr = 0x100000;
+        e820_raw[1].size = bootsym(highmem_kb) << 10;
+        e820_raw[1].type = E820_RAM;
+        e820_raw_nr = 2;
+    }
     else if ( mbi->flags & MBI_MEMLIMITS )
     {
         memmap_type = "Multiboot-e801";

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.