From: Sergiu Moga Date: Mon, 24 Apr 2023 17:10:03 +0000 (+0300) Subject: plat/common/bootinfo: Add `UEFI` System Tables address in `bootinfo` X-Git-Tag: RELEASE-0.14.0~57 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=64a2dcf05788a0b6000754ec203405c909659a88;p=unikraft%2Funikraft.git plat/common/bootinfo: Add `UEFI` System Tables address in `bootinfo` Allow quick access to the `UEFI` System Tables through a field in the `bootinfo` structure. Signed-off-by: Sergiu Moga Reviewed-by: Dragos Petre Reviewed-by: Marco Schlumpp Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #911 --- diff --git a/plat/common/include/uk/plat/common/bootinfo.h b/plat/common/include/uk/plat/common/bootinfo.h index 87dc03917..431f48a84 100644 --- a/plat/common/include/uk/plat/common/bootinfo.h +++ b/plat/common/include/uk/plat/common/bootinfo.h @@ -40,6 +40,9 @@ struct ukplat_bootinfo { /** Address of the devicetree blob */ __u64 dtb; + /** Address of UEFI System Table */ + __u64 efi_st; + /** * List of memory regions. Must be the last member as the * memory regions directly follow this boot information structure @@ -47,7 +50,7 @@ struct ukplat_bootinfo { struct ukplat_memregion_list mrds; } __packed __align(__SIZEOF_LONG__); -UK_CTASSERT(sizeof(struct ukplat_bootinfo) == 72); +UK_CTASSERT(sizeof(struct ukplat_bootinfo) == 80); #ifdef CONFIG_UKPLAT_MEMRNAME #if __SIZEOF_LONG__ == 8 diff --git a/support/scripts/mkbootinfo.py b/support/scripts/mkbootinfo.py index e57347bef..3071ae8c8 100755 --- a/support/scripts/mkbootinfo.py +++ b/support/scripts/mkbootinfo.py @@ -23,7 +23,7 @@ UKPLAT_MEMRF_EXECUTE = 0x0004 # Region is executable UKPLAT_MEMR_NAME_LEN = 36 # Boot info structure (see include/uk/plat/common/bootinfo.h) -UKPLAT_BOOTINFO_SIZE = 72 +UKPLAT_BOOTINFO_SIZE = 80 UKPLAT_BOOTINFO_MAGIC = 0xB007B0B0 # Boot Bobo UKPLAT_BOOTINFO_VERSION = 0x01 @@ -96,6 +96,7 @@ def main(): secobj.write(b'\0' * 8) # cmdline secobj.write(b'\0' * 8) # cmdline_len secobj.write(b'\0' * 8) # dtb + secobj.write(b'\0' * 8) # efi_st secobj.write(cap.to_bytes(4, endianness)) # mrds.capacity secobj.write(b'\0' * 4) # mrds.count