From patchwork Tue May 19 15:41:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 246008 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Tue, 19 May 2020 17:41:29 +0200 Subject: [PATCH 1/1] efi_loader: add EFI_MEMORY_SP to memory attributes Message-ID: <20200519154129.19734-1-xypron.glpk@gmx.de> The UEFI 2.8 specification has introduced the EFI_MEMORY_SP memory attribute. Add it to the 'efidebug memmap' and 'efi mem' commands. Signed-off-by: Heinrich Schuchardt --- cmd/efi.c | 1 + cmd/efidebug.c | 1 + include/efi.h | 1 + 3 files changed, 3 insertions(+) -- 2.26.2 diff --git a/cmd/efi.c b/cmd/efi.c index ea239a01f0..5f24e5b4ea 100644 --- a/cmd/efi.c +++ b/cmd/efi.c @@ -43,6 +43,7 @@ static struct attr_info { { EFI_MEMORY_NV, "non-volatile" }, { EFI_MEMORY_MORE_RELIABLE, "higher reliability" }, { EFI_MEMORY_RO, "read-only" }, + { EFI_MEMORY_SP, "specific purpose" }, { EFI_MEMORY_RUNTIME, "needs runtime mapping" } }; diff --git a/cmd/efidebug.c b/cmd/efidebug.c index f020d95dbb..8f6b03c9cf 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -413,6 +413,7 @@ static const struct efi_mem_attrs { {EFI_MEMORY_NV, "NV"}, {EFI_MEMORY_MORE_RELIABLE, "REL"}, {EFI_MEMORY_RO, "RO"}, + {EFI_MEMORY_SP, "SP"}, {EFI_MEMORY_RUNTIME, "RT"}, }; diff --git a/include/efi.h b/include/efi.h index e12697a5d5..f986aad877 100644 --- a/include/efi.h +++ b/include/efi.h @@ -196,6 +196,7 @@ enum efi_mem_type { #define EFI_MEMORY_MORE_RELIABLE \ ((u64)0x0000000000010000ULL) /* higher reliability */ #define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ +#define EFI_MEMORY_SP ((u64)0x0000000000040000ULL) /* specific-purpose memory (SPM) */ #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ #define EFI_MEM_DESC_VERSION 1