Commit c3a40cce2a9765de6776e2c099d59879e49dfe4b
Committed by
Alexander Graf
1 parent
9b89183b97
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
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 <xypron.glpk@gmx.de> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Showing 2 changed files with 7 additions and 0 deletions Side-by-side Diff
cmd/efi.c
... | ... | @@ -39,6 +39,9 @@ |
39 | 39 | { EFI_MEMORY_WP, "write-protect" }, |
40 | 40 | { EFI_MEMORY_RP, "read-protect" }, |
41 | 41 | { EFI_MEMORY_XP, "execute-protect" }, |
42 | + { EFI_MEMORY_NV, "non-volatile" }, | |
43 | + { EFI_MEMORY_MORE_RELIABLE, "higher reliability" }, | |
44 | + { EFI_MEMORY_RO, "read-only" }, | |
42 | 45 | { EFI_MEMORY_RUNTIME, "needs runtime mapping" } |
43 | 46 | }; |
44 | 47 |
include/efi.h
... | ... | @@ -178,6 +178,10 @@ |
178 | 178 | #define EFI_MEMORY_WP ((u64)0x0000000000001000ULL) /* write-protect */ |
179 | 179 | #define EFI_MEMORY_RP ((u64)0x0000000000002000ULL) /* read-protect */ |
180 | 180 | #define EFI_MEMORY_XP ((u64)0x0000000000004000ULL) /* execute-protect */ |
181 | +#define EFI_MEMORY_NV ((u64)0x0000000000008000ULL) /* non-volatile */ | |
182 | +#define EFI_MEMORY_MORE_RELIABLE \ | |
183 | + ((u64)0x0000000000010000ULL) /* higher reliability */ | |
184 | +#define EFI_MEMORY_RO ((u64)0x0000000000020000ULL) /* read-only */ | |
181 | 185 | #define EFI_MEMORY_RUNTIME ((u64)0x8000000000000000ULL) /* range requires runtime mapping */ |
182 | 186 | #define EFI_MEM_DESC_VERSION 1 |
183 | 187 |