[SeaBIOS] [edk2 PATCH 3/3] OvmfPkg/AcpiPlatformDxe: support 64-bit zone in ALLOCATE command
Laszlo Ersek
lersek at redhat.com
Fri Jun 2 18:03:32 CEST 2017
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 at redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel at linaro.org>
Cc: Ben Warren <ben at skyportsystems.com>
Cc: Dongjiu Geng <gengdongjiu at huawei.com>
Cc: Igor Mammedov <imammedo at redhat.com>
Cc: Jordan Justen <jordan.l.justen at intel.com>
Cc: Leif Lindholm <leif.lindholm at linaro.org>
Cc: Shannon Zhao <zhaoshenglong at huawei.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek at 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
More information about the SeaBIOS
mailing list