diff options
| author | Tom Rini <[email protected]> | 2026-03-16 08:23:18 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-16 08:23:18 -0600 |
| commit | fa3a11fcf01a27f038789f4ef36d0414fe78b493 (patch) | |
| tree | 416a413625c79ac468a679a5f6cb0c1610a70280 /include | |
| parent | 071e914b4aa139c9c411efda3fe1ffaebda5c76e (diff) | |
| parent | 8f83a4596677fe6a3f3b587b76d460644205a922 (diff) | |
Merge tag 'efi-2026-03-14' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request efi-2026-03-14
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/29512
UEFI:
* Require at least 128 KiB of stack space to use EFI sub-system.
* Avoid buffer overrun in efi_var_restore().
* Avoid superfluous variable store writes on unchanged data
* Implement SPI Flash store for EFI variables.
* Add an efidebug ecpt sub-command to display the ECPT table
and a unit test for the command.
Others:
* Add missing include string.h to make exception command build again.
* lib: uuid: add EBBR 2.1 conformance profile GUID
Diffstat (limited to 'include')
| -rw-r--r-- | include/efi_loader.h | 7 | ||||
| -rw-r--r-- | include/efi_variable.h | 8 | ||||
| -rw-r--r-- | include/exception.h | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 3e70ac07055..3a4d502631c 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -387,6 +387,10 @@ extern const efi_guid_t efi_guid_capsule_report; extern const efi_guid_t efi_guid_firmware_management_protocol; /* GUID for the ESRT */ extern const efi_guid_t efi_esrt_guid; +/* GUID for the ECPT */ +#if CONFIG_IS_ENABLED(EFI_ECPT) +extern const efi_guid_t efi_ecpt_guid; +#endif /* GUID of the SMBIOS table */ extern const efi_guid_t smbios_guid; extern const efi_guid_t smbios3_guid; @@ -1144,6 +1148,9 @@ struct pkcs7_message *efi_parse_pkcs7_header(const void *buf, /* runtime implementation of memcpy() */ void efi_memcpy_runtime(void *dest, const void *src, size_t n); +/* runtime implementation of memcmp() */ +int efi_memcmp_runtime(const void *s1, const void *s2, size_t n); + /* commonly used helper functions */ u16 *efi_create_indexed_name(u16 *buffer, size_t buffer_size, const char *name, unsigned int index); diff --git a/include/efi_variable.h b/include/efi_variable.h index fc1184e5ca1..c3229c717d8 100644 --- a/include/efi_variable.h +++ b/include/efi_variable.h @@ -216,6 +216,11 @@ void efi_var_mem_del(struct efi_var_entry *var); * The variable is appended without checking if a variable of the same name * already exists. The two data buffers are concatenated. * + * When @changep is non-NULL and @size2 is 0, the function compares the new + * value against an existing variable with the same name and vendor. If + * attributes and data are identical the insertion is skipped and *@changep + * is set to false, avoiding superfluous writes. + * * @variable_name: variable name * @vendor: GUID * @attributes: variable attributes @@ -224,13 +229,14 @@ void efi_var_mem_del(struct efi_var_entry *var); * @size2: size of the second data field * @data2: second data buffer * @time: time of authentication (as seconds since start of epoch) + * @changep: pointer to change flag (may be NULL) * Result: status code */ efi_status_t efi_var_mem_ins(const u16 *variable_name, const efi_guid_t *vendor, u32 attributes, const efi_uintn_t size1, const void *data1, const efi_uintn_t size2, const void *data2, - const u64 time); + const u64 time, bool *changep); /** * efi_var_mem_free() - determine free memory for variables diff --git a/include/exception.h b/include/exception.h index a7f21e73d75..0d4dff49954 100644 --- a/include/exception.h +++ b/include/exception.h @@ -6,6 +6,7 @@ */ #include <command.h> +#include <string.h> static int do_exception(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
