]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add New Memory Attributes
authorOleksiy Yakovlev <oleksiyy@ami.com>
Thu, 2 Jul 2020 20:50:36 +0000 (16:50 -0400)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 15 Jul 2020 14:58:25 +0000 (14:58 +0000)
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO
attributes introduced in UEFI 2.8
(UEFI 2.8, mantis 1919 and 1872)
Fix typos in EFI_MEMORY_CPU_CRYPTO description.
Add attributes bitmasks, grouped by type.

Signed-off-by: Oleksiy Yakovlev <oleksiyy@ami.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Message-Id: <20200702205039.52400-2-oleksiyy@ami.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
MdePkg/Include/Uefi/UefiSpec.h

index 558e1bce2e41fa2f59b6dd45c4563958faf5f406..05b82e0be10c7c526cb667050e224fa76c959ee9 100644 (file)
@@ -96,9 +96,9 @@ typedef enum {
 #define EFI_MEMORY_SP               0x0000000000040000ULL\r
 //\r
 // If this flag is set, the memory region is capable of being\r
-// protected with the CPU?s memory cryptographic\r
+// protected with the CPU's memory cryptographic\r
 // capabilities. If this flag is clear, the memory region is not\r
-// capable of being protected with the CPU?s memory\r
+// capable of being protected with the CPU's memory\r
 // cryptographic capabilities or the CPU does not support CPU\r
 // memory cryptographic capabilities.\r
 //\r
@@ -109,6 +109,12 @@ typedef enum {
 //\r
 #define EFI_MEMORY_RUNTIME          0x8000000000000000ULL\r
 \r
+//\r
+// Attributes bitmasks, grouped by type\r
+//\r
+#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP)\r
+#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)\r
+\r
 ///\r
 /// Memory descriptor version number.\r
 ///\r