From: Eugeniu Rosca Date: Sat, 14 Jul 2018 20:53:31 +0000 (+0200) Subject: efi: Add EFI_MEMORY_{NV, MORE_RELIABLE, RO} attributes X-Git-Tag: v2018.09-rc3~33^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3a40cce2a9765de6776e2c099d59879e49dfe4b;p=platform%2Fkernel%2Fu-boot.git efi: Add EFI_MEMORY_{NV, MORE_RELIABLE, RO} attributes With this update, the memory attributes are in sync with Linux kernel v4.18-rc4. They also match page 190 of UEFI 2.7 spec [1]. [1] http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf Suggested-by: Heinrich Schuchardt Signed-off-by: Eugeniu Rosca Reviewed-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- diff --git a/cmd/efi.c b/cmd/efi.c index 92a565f..366a79a 100644 --- a/cmd/efi.c +++ b/cmd/efi.c @@ -39,6 +39,9 @@ static struct attr_info { { EFI_MEMORY_WP, "write-protect" }, { EFI_MEMORY_RP, "read-protect" }, { EFI_MEMORY_XP, "execute-protect" }, + { EFI_MEMORY_NV, "non-volatile" }, + { EFI_MEMORY_MORE_RELIABLE, "higher reliability" }, + { EFI_MEMORY_RO, "read-only" }, { EFI_MEMORY_RUNTIME, "needs runtime mapping" } }; diff --git a/include/efi.h b/include/efi.h index cfdccd7..7e7c1ca 100644 --- a/include/efi.h +++ b/include/efi.h @@ -178,6 +178,10 @@ enum efi_mem_type { #define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ #define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ #define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ +#define EFI_MEMORY_NV ((u64)0x0000000000008000ULL) /* non-volatile */ +#define EFI_MEMORY_MORE_RELIABLE \ + ((u64)0x0000000000010000ULL) /* higher reliability */ +#define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ #define EFI_MEM_DESC_VERSION 1