summaryrefslogtreecommitdiff
path: root/src/commonlib/include
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2024-06-24 16:23:32 +0300
committerFelix Held <felix-coreboot@felixheld.de>2024-08-19 14:30:20 +0000
commit1a8b9c20f8de41a8f027ff54a614b8c1ac9bcff8 (patch)
tree1b05711f3b861d761ad48bb59bb023944ac94b68 /src/commonlib/include
parent2355aa7d3ba490512483925b6362ec45064a8c0f (diff)
drivers/efi: add optional ESRT-friendly coreboot table tag
EFI System Resource Table (ESRT) is an informational structure that reports basic details about current system or device firmware. This is chiefly used to perform firmware updates. New CONFIG_DRIVERS_EFI_FW_INFO is off by default, enabling it adds DRIVERS_EFI_FW_{GUID,VERSION,LSV} to be used to specify firmware version/update information. Existing forms of versions wouldn't be sufficient because there is no universal way of converting string versions to 32-bit unsigned integers and there are no GUIDs or lowest supported versions. Change-Id: Ic1b768d7bed43edf7ca8e41552087734054de033 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83421 Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: coreboot org <coreboot.org@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/commonlib/include')
-rw-r--r--src/commonlib/include/commonlib/coreboot_tables.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h
index 94985b1567..a9e14c7bff 100644
--- a/src/commonlib/include/commonlib/coreboot_tables.h
+++ b/src/commonlib/include/commonlib/coreboot_tables.h
@@ -87,6 +87,7 @@ enum {
LB_TAG_TYPE_C_INFO = 0x0042,
LB_TAG_ACPI_RSDP = 0x0043,
LB_TAG_PCIE = 0x0044,
+ LB_TAG_EFI_FW_INFO = 0x0045,
/* The following options are CMOS-related */
LB_TAG_CMOS_OPTION_TABLE = 0x00c8,
LB_TAG_OPTION = 0x00c9,
@@ -578,4 +579,23 @@ struct lb_acpi_rsdp {
lb_uint64_t rsdp_pointer; /* Address of the ACPI RSDP */
};
+/*
+ * Machine-friendly version of a system firmware component. A component is
+ * identified by a GUID. coreboot is an obvious main component but there could
+ * be others (like EC) which should get their own instances of the tag.
+ *
+ * The main consumer of this information is UEFI firmware but something else
+ * could reuse it too.
+ *
+ * Larger number in a version field corresponds to a more recent version.
+ */
+struct lb_efi_fw_info {
+ uint32_t tag;
+ uint32_t size;
+ uint8_t guid[16]; /* Called "firmware class" in UEFI */
+ uint32_t version; /* Current version */
+ uint32_t lowest_supported_version; /* Lowest allowed version for downgrades */
+ uint32_t fw_size; /* Size of firmware in bytes */
+} __packed;
+
#endif