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@xen.org>
Tested-by: Jonathan Tripathy <jonnyt@abpni.co.uk>
This commit is contained in:
Keir Fraser committed 2012-08-28 22:40:45 +01:00
1 parent efbb5c5411
commit 4eae16a077
1 file changed
+11 -11
+11 -11
View File
@@ -690,17 +690,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";
@@ -738,6 +727,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";
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.