[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [seabios PATCH 2/2] romfile_loader: alloc: cope with the UE
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [seabios PATCH 2/2] romfile_loader: alloc: cope with the UEFI-oriented 64BIT zone hint |
Date: |
Fri, 2 Jun 2017 18:02:10 +0200 |
ROMFILE_LOADER_ALLOC_ZONE_64BIT permits the guest firmware to allocate the
blob being downloaded anywhere in the 64-bit address space. In SeaBIOS, we
can simply alias this zone request to ROMFILE_LOADER_ALLOC_ZONE_HIGH
(i.e., allocate the blob in 32-bit address space.)
Cc: "Kevin O'Connor" <address@hidden>
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: Shannon Zhao <address@hidden>
Cc: Stefan Berger <address@hidden>
Cc: Xiao Guangrong <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
---
src/fw/romfile_loader.h | 7 ++++---
src/fw/romfile_loader.c | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/fw/romfile_loader.h b/src/fw/romfile_loader.h
index d90c3db24331..9828d4ad1094 100644
--- a/src/fw/romfile_loader.h
+++ b/src/fw/romfile_loader.h
@@ -11,11 +11,11 @@ struct romfile_loader_entry_s {
u32 command;
union {
/*
* COMMAND_ALLOCATE - allocate a table from @alloc.file
* subject to @alloc.align alignment (must be power of 2)
- * and @alloc.zone (can be HIGH or FSEG) requirements.
+ * and @alloc.zone (see ROMFILE_LOADER_ALLOC_ZONE_*) requirements.
* The most significant bit (bit 7) of @alloc.zone is used as a content
* hint for UEFI guest firmware, see ROMFILE_LOADER_ALLOC_CONTENT_*.
*
* Must appear exactly once for each file, and before
* this file is referenced by any other command.
@@ -80,12 +80,13 @@ enum {
ROMFILE_LOADER_COMMAND_ADD_CHECKSUM = 0x3,
ROMFILE_LOADER_COMMAND_WRITE_POINTER = 0x4,
};
enum {
- ROMFILE_LOADER_ALLOC_ZONE_HIGH = 0x1,
- ROMFILE_LOADER_ALLOC_ZONE_FSEG = 0x2,
+ ROMFILE_LOADER_ALLOC_ZONE_HIGH = 0x1,
+ ROMFILE_LOADER_ALLOC_ZONE_FSEG = 0x2,
+ ROMFILE_LOADER_ALLOC_ZONE_64BIT = 0x3,
};
enum {
ROMFILE_LOADER_ALLOC_CONTENT_MIXED = 0x00,
ROMFILE_LOADER_ALLOC_CONTENT_NOACPI = 0x80,
diff --git a/src/fw/romfile_loader.c b/src/fw/romfile_loader.c
index 6a457902a36a..c0c476b58990 100644
--- a/src/fw/romfile_loader.c
+++ b/src/fw/romfile_loader.c
@@ -68,10 +68,11 @@ static void romfile_loader_allocate(struct
romfile_loader_entry_s *entry,
zone_req = entry->alloc.zone;
zone_req &= ~(unsigned)ROMFILE_LOADER_ALLOC_CONTENT_NOACPI;
switch (zone_req) {
case ROMFILE_LOADER_ALLOC_ZONE_HIGH:
+ case ROMFILE_LOADER_ALLOC_ZONE_64BIT:
zone = &ZoneHigh;
break;
case ROMFILE_LOADER_ALLOC_ZONE_FSEG:
zone = &ZoneFSeg;
break;
--
2.9.3
- [Qemu-devel] [qemu PATCH 0/7] bios-linker-loader: introduce the NOACPI hint and the 64-bit zone for ALLOCATE, (continued)
- [Qemu-devel] [qemu PATCH 0/7] bios-linker-loader: introduce the NOACPI hint and the 64-bit zone for ALLOCATE, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 1/7] hw/acpi/bios-linker-loader: expose allocation zone as an enum, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 2/7] hw/acpi/bios-linker-loader: introduce "no ACPI tables" content hint for ALLOC, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 4/7] hw/acpi/nvdimm: ask the firmware to allocate NVDIMM_DSM_MEM_FILE as NOACPI, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 3/7] hw/acpi/bios-linker-loader: introduce BIOS_LINKER_LOADER_ALLOC_ZONE_64BIT, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 5/7] hw/acpi/vmgenid: ask the fw to alloc VMGENID_GUID_FW_CFG_FILE as NOACPI, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 6/7] hw/i386/acpi-build: ask the fw to alloc ACPI_BUILD_TPMLOG_FILE with 64bit/NOACPI, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [qemu PATCH 7/7] hw/arm/virt-acpi-build: make the fw alloc blobs with ACPI tables as 64bit, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [seabios PATCH 0/2] romfile_loader: cope with the UEFI-oriented allocation extensions, Laszlo Ersek, 2017/06/02
- [Qemu-devel] [edk2 PATCH 0/3] OvmfPkg/AcpiPlatformDxe: NOACPI hint and 64-bit zone in fw_cfg blob alloc, Laszlo Ersek, 2017/06/02
- Re: [Qemu-devel] allocation zone extensions for the firmware linker/loader, Michael S. Tsirkin, 2017/06/02
- Re: [Qemu-devel] allocation zone extensions for the firmware linker/loader, Laszlo Ersek, 2017/06/03