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" mst@redhat.com Cc: Ard Biesheuvel ard.biesheuvel@linaro.org Cc: Ben Warren ben@skyportsystems.com Cc: Dongjiu Geng gengdongjiu@huawei.com Cc: Igor Mammedov imammedo@redhat.com Cc: Jordan Justen jordan.l.justen@intel.com Cc: Leif Lindholm leif.lindholm@linaro.org Cc: Shannon Zhao zhaoshenglong@huawei.com Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek lersek@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; }