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" <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Ben Warren <[email protected]> Cc: Dongjiu Geng <[email protected]> Cc: Igor Mammedov <[email protected]> Cc: Shannon Zhao <[email protected]> Cc: Stefan Berger <[email protected]> Cc: Xiao Guangrong <[email protected]> Signed-off-by: Laszlo Ersek <[email protected]> --- 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 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

