audk/OvmfPkg/Library/LoadLinuxLib
Laszlo Ersek 4388b0ee0c OvmfPkg: allocate the EFI memory map for Linux as Loader Data
In Linux, efi_memblock_x86_reserve_range() and efi_reserve_boot_services()
expect that whoever allocates the EFI memmap allocates it in Loader Data
type memory. Linux's own exit_boot()-->low_alloc() complies, but
SetupLinuxMemmap() in LoadLinuxLib doesn't.

The memory type discrepancy leads to efi_memblock_x86_reserve_range() and
efi_reserve_boot_services() both trying to reserve the range backing the
memmap, resulting in memmap entry truncation in
efi_reserve_boot_services().

This fix also makes this allocation consistent with all other persistent
allocations in  "OvmfPkg/Library/LoadLinuxLib/Linux.c".

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reported-and-tested-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14555 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-18 07:03:51 +00:00
..
Ia32 OvmfPkg LoadLinuxLib: Use kernel's EFI entry point where available 2013-02-14 19:21:39 +00:00
X64 OvmfPkg LoadLinuxLib: Use kernel's EFI entry point where available 2013-02-14 19:21:39 +00:00
Linux.c OvmfPkg: allocate the EFI memory map for Linux as Loader Data 2013-08-18 07:03:51 +00:00
LinuxGdt.c OvmfPkg: Add LoadLinuxLib library implementation 2012-11-02 18:27:55 +00:00
LoadLinuxLib.h OvmfPkg LoadLinuxLib: Use kernel's EFI entry point where available 2013-02-14 19:21:39 +00:00
LoadLinuxLib.inf OvmfPkg: Add LoadLinuxLib library implementation 2012-11-02 18:27:55 +00:00