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 <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt 2024-12-13 10:20:32 +01:00
parent 60c9b794e7
commit 6a87a5d068
2 changed files with 5 additions and 2 deletions

View file

@ -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"},
};

View file

@ -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