]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/common/bootinfo: Add `UEFI` System Tables address in `bootinfo`
authorSergiu Moga <sergiu.moga@protonmail.com>
Mon, 24 Apr 2023 17:10:03 +0000 (20:10 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 15:57:48 +0000 (15:57 +0000)
Allow quick access to the `UEFI` System Tables through a field in
the `bootinfo` structure.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Dragos Petre <dragos.petre27@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #911

plat/common/include/uk/plat/common/bootinfo.h
support/scripts/mkbootinfo.py

index 87dc03917c70922be27313e29473ee3e4d4c5aa9..431f48a84b9462a4a01baddad78bc79928685043 100644 (file)
@@ -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
index e57347bef0fd92e4be0b74fcd7e0ac372f885883..3071ae8c884691db544b507c5c73cbc033d3057a 100755 (executable)
@@ -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