From c3cf134a41835e6e023277783deb3ee18e9a74ad Mon Sep 17 00:00:00 2001 From: Adriano Cordova Date: Fri, 6 Dec 2024 14:18:34 -0300 Subject: efi_loader: Expose efi_reinstall_protocol_interface in efi_loader.h This is done so that the device path protocol interface of the network device can be changed internally by u-boot when a new bootfile gets downloaded. Signed-off-by: Adriano Cordova Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- include/efi_loader.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 9afbec35ebf..0d858c1e12e 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -711,6 +711,11 @@ efi_status_t efi_search_protocol(const efi_handle_t handle, efi_status_t efi_add_protocol(const efi_handle_t handle, const efi_guid_t *protocol, void *protocol_interface); +/* Reinstall a protocol on a handle */ +efi_status_t EFIAPI efi_reinstall_protocol_interface( + efi_handle_t handle, + const efi_guid_t *protocol, + void *old_interface, void *new_interface); /* Open protocol */ efi_status_t efi_protocol_open(struct efi_handler *handler, void **protocol_interface, void *agent_handle, -- cgit v1.3.1 From 60c9b794e71e2862a64e6e2a08fda20c4eb3befb Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 13 Dec 2024 09:58:40 +0100 Subject: efi_loader: update EFI specification version UEFI specification 2.11 has been published. There are no changes relevant for the U-Boot scope. So let us update the supported specification version. Change the comment for the constant to Sphinx style. Reviewed-by: Ilias Apalodimas Signed-off-by: Heinrich Schuchardt --- include/efi_api.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/efi_api.h b/include/efi_api.h index 61c4eda8f8a..b10f467f67f 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -20,8 +20,10 @@ #include #include -/* UEFI spec version 2.9 */ -#define EFI_SPECIFICATION_VERSION (2 << 16 | 100) +/** + * define EFI_SPECIFICATION_VERSION - UEFI specification version + */ +#define EFI_SPECIFICATION_VERSION (2 << 16 | 110) /* Types and defines for EFI CreateEvent */ enum efi_timer_delay { -- cgit v1.3.1 From 6a87a5d0688491e7bd30b243adb6d67ea813d234 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 13 Dec 2024 10:20:32 +0100 Subject: cmd: efidebug: update output of memory attributes * add EFI_MEMORY_CPU_CRYPTO, EFI_MEMORY_HOT_PLUGGABLE * correct output for EFI_MEMORY_XP * remove duplicate list entry for EFI_MEMORY_UC Reviewed-by: Ilias Apalodimas Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 5 +++-- include/efi.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 02f1e080e88..2461425e291 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -554,7 +554,6 @@ static const struct efi_mem_attrs { const u64 bit; const char *text; } efi_mem_attrs[] = { - {EFI_MEMORY_UC, "UC"}, {EFI_MEMORY_UC, "UC"}, {EFI_MEMORY_WC, "WC"}, {EFI_MEMORY_WT, "WT"}, @@ -562,11 +561,13 @@ static const struct efi_mem_attrs { {EFI_MEMORY_UCE, "UCE"}, {EFI_MEMORY_WP, "WP"}, {EFI_MEMORY_RP, "RP"}, - {EFI_MEMORY_XP, "WP"}, + {EFI_MEMORY_XP, "XP"}, {EFI_MEMORY_NV, "NV"}, {EFI_MEMORY_MORE_RELIABLE, "REL"}, {EFI_MEMORY_RO, "RO"}, {EFI_MEMORY_SP, "SP"}, + {EFI_MEMORY_CPU_CRYPTO, "CRYPT"}, + {EFI_MEMORY_HOT_PLUGGABLE, "HOTPL"}, {EFI_MEMORY_RUNTIME, "RT"}, }; diff --git a/include/efi.h b/include/efi.h index d50b3d3cec9..d005cb6181e 100644 --- a/include/efi.h +++ b/include/efi.h @@ -266,6 +266,8 @@ enum efi_memory_type { #define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ #define EFI_MEMORY_SP ((u64)0x0000000000040000ULL) /* specific-purpose memory (SPM) */ #define EFI_MEMORY_CPU_CRYPTO ((u64)0x0000000000080000ULL) /* cryptographically protectable */ +#define EFI_MEMORY_HOT_PLUGGABLE \ + ((u64)0x0000000000100000ULL) /* hot pluggable */ #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ #define EFI_MEM_DESC_VERSION 1 -- cgit v1.3.1 From 9c6c7e30aa006a3eab52302e5399f5eb592184ed Mon Sep 17 00:00:00 2001 From: Yang Gang Date: Fri, 3 Jan 2025 16:18:42 +0800 Subject: efi: Correct ECPT table GUID Refer to UEFI specification 2.10: #define EFI_CONFORMANCE_PROFILES_TABLE_GUID \ { 0x36122546, 0xf7e7, 0x4c8f, \ { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }} Signed-off-by: Yang Gang Fixes: 6b92c1735205 ("efi: Create ECPT table") Reviewed-by: Heinrich Schuchardt --- include/efi_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/efi_api.h b/include/efi_api.h index b10f467f67f..eb61eafa028 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -229,7 +229,7 @@ enum efi_reset_type { 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a) #define EFI_CONFORMANCE_PROFILES_TABLE_GUID \ - EFI_GUID(0x36122546, 0xf7ef, 0x4c8f, 0xbd, 0x9b, \ + EFI_GUID(0x36122546, 0xf7e7, 0x4c8f, 0xbd, 0x9b, \ 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b) #define EFI_CONFORMANCE_PROFILES_TABLE_VERSION 1 -- cgit v1.3.1