mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
efbb5c5411
commit
4eae16a077
1 file changed
+11
-11
+11
-11
@@ -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";
|
||||
|
||||