[PATCH 1/1] cmd: efidebug: update output of memory attributes

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Dec 13 10:20:32 CET 2024


* add EFI_MEMORY_CPU_CRYPTO, EFI_MEMORY_HOT_PLUGGABLE
* correct output for EFI_MEMORY_XP
* remove duplicate list entry for EFI_MEMORY_UC

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 cmd/efidebug.c | 5 +++--
 include/efi.h  | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

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 c559fda3004..899160f1546 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
 
-- 
2.45.2



More information about the U-Boot mailing list