diff mbox series

[U-Boot,v2,2/3] efi: Add EFI_MEMORY_{NV, MORE_RELIABLE, RO} attributes

Message ID 20180714205332.17709-2-erosca@de.adit-jv.com
State Accepted
Commit c3a40cce2a9765de6776e2c099d59879e49dfe4b
Delegated to: Alexander Graf
Headers show
Series [U-Boot,v2,1/3] efi: Fix truncation of constant value | expand

Commit Message

Eugeniu Rosca July 14, 2018, 8:53 p.m. UTC
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>
---

v2:
- Newly added

 cmd/efi.c     | 3 +++
 include/efi.h | 4 ++++
 2 files changed, 7 insertions(+)

Comments

Heinrich Schuchardt July 16, 2018, 5:58 a.m. UTC | #1
On 07/14/2018 10:53 PM, Eugeniu Rosca wrote:
> 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>
Alexander Graf Aug. 20, 2018, 10:05 p.m. UTC | #2
> 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>

Thanks, applied to efi-2018.09

Alex
diff mbox series

Patch

diff --git a/cmd/efi.c b/cmd/efi.c
index 92a565f71373..366a79a96488 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 eb2a569fe010..046decba3d58 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -170,6 +170,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