[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [edk2 PATCH 3/3] OvmfPkg/AcpiPlatformDxe: support 64-bit zo
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [edk2 PATCH 3/3] OvmfPkg/AcpiPlatformDxe: support 64-bit zone in ALLOCATE command |
Date: |
Fri, 2 Jun 2017 18:03:32 +0200 |
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" <address@hidden>
Cc: Ard Biesheuvel <address@hidden>
Cc: Ben Warren <address@hidden>
Cc: Dongjiu Geng <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Jordan Justen <address@hidden>
Cc: Leif Lindholm <address@hidden>
Cc: Shannon Zhao <address@hidden>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <address@hidden>
---
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
- [Qemu-devel] [qemu PATCH 3/7] hw/acpi/bios-linker-loader: introduce BIOS_LINKER_LOADER_ALLOC_ZONE_64BIT, (continued)