The QemuLoaderAlloc64Bit (3) Zone value permits the guest firmware to allocate the blob being downloaded anywhere in the 64-bit address space. Set the maximum Address value in ProcessCmdAllocate() accordingly.
Cc: "Michael S. Tsirkin" <m...@redhat.com> Cc: Ard Biesheuvel <ard.biesheu...@linaro.org> Cc: Ben Warren <b...@skyportsystems.com> Cc: Dongjiu Geng <gengdong...@huawei.com> Cc: Igor Mammedov <imamm...@redhat.com> Cc: Jordan Justen <jordan.l.jus...@intel.com> Cc: Leif Lindholm <leif.lindh...@linaro.org> Cc: Shannon Zhao <zhaoshengl...@huawei.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- OvmfPkg/AcpiPlatformDxe/QemuLoader.h | 3 ++- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuLoader.h b/OvmfPkg/AcpiPlatformDxe/QemuLoader.h index fa558540e62b..1daa918ff9b7 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuLoader.h +++ b/OvmfPkg/AcpiPlatformDxe/QemuLoader.h @@ -31,11 +31,12 @@ typedef enum { QemuLoaderCmdWritePointer, } QEMU_LOADER_COMMAND_TYPE; typedef enum { QemuLoaderAllocHigh = 1, - QemuLoaderAllocFSeg + QemuLoaderAllocFSeg, + QemuLoaderAlloc64Bit, } QEMU_LOADER_ALLOC_ZONE; typedef enum { QemuLoaderAllocContentMixed = 0x00, QemuLoaderAllocContentNoAcpi = 0x80, diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c index 23d543ffe361..0b0b3f590f2b 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -202,11 +202,11 @@ ProcessCmdAllocate ( } else { AcpiTablesExcluded = FALSE; } NumPages = EFI_SIZE_TO_PAGES (FwCfgSize); - Address = 0xFFFFFFFF; + Address = (Zone == QemuLoaderAlloc64Bit) ? MAX_UINT64 : MAX_UINT32; Status = gBS->AllocatePages (AllocateMaxAddress, EfiACPIMemoryNVS, NumPages, &Address); if (EFI_ERROR (Status)) { return Status; } -- 2.9.3