diff options
author | Keir Fraser <keir@xen.org> | 2012-09-20 11:01:04 +0200 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2012-09-20 11:01:04 +0200 |
commit | c28be3cadd8383ea7f8205273b95bc5cc63a665b (patch) | |
tree | ae2043e72886fac16759fc7e0b1d599fc6ea0d35 | |
parent | 5bd668cda8102ea35957a6a0db18a29efcaf0df5 (diff) | |
download | xen-c28be3cadd8383ea7f8205273b95bc5cc63a665b.tar.gz xen-c28be3cadd8383ea7f8205273b95bc5cc63a665b.tar.bz2 xen-c28be3cadd8383ea7f8205273b95bc5cc63a665b.zip |
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.
Signed-off-by: Keir Fraser <keir@xen.org>
Tested-by: Jonathan Tripathy <jonnyt@abpni.co.uk>
xen-unstable changeset: 25786:a0b5f8102a00
xen-unstable date: Tue Aug 28 21:40:45 UTC 2012
-rw-r--r-- | xen/arch/x86/setup.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index d88884e4cb..d4f746b747 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -665,17 +665,6 @@ void __init __start_xen(unsigned long mbi_p) { 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"; @@ -713,6 +702,17 @@ void __init __start_xen(unsigned long mbi_p) 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"; |