]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add RO memory and resource HOB attribute definitions.
authorStar Zeng <star.zeng@intel.com>
Mon, 11 May 2015 03:32:48 +0000 (03:32 +0000)
committerlzeng14 <lzeng14@Edk2>
Mon, 11 May 2015 03:32:48 +0000 (03:32 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17396 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Pi/PiHob.h
MdePkg/Include/Uefi/UefiSpec.h

index fc523e1e8bb4f92eba6067c3fb245ce3a56e331b..b24f95149ba90c8d09010118fb05dd3917da6c2b 100644 (file)
@@ -255,6 +255,13 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 #define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002\r
 #define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004\r
 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080\r
+//\r
+// This is typically used as memory cacheability attribute today.\r
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED\r
+// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED\r
+// means Memory cacheability attribute: The memory supports being programmed with\r
+// a writeprotected cacheable attribute.\r
+//\r
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100\r
 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200\r
 #define EFI_RESOURCE_ATTRIBUTE_PERSISTENT               0x00800000\r
@@ -274,10 +281,20 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 #define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO                0x00010000\r
 #define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED        0x00020000\r
 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE         0x00100000\r
+//\r
+// This is typically used as memory cacheability attribute today.\r
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE\r
+// as Memory capability attribute: The memory supports being protected from processor\r
+// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:\r
+// The memory supports being programmed with a writeprotected cacheable attribute.\r
+//\r
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000\r
 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000\r
 #define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000\r
 \r
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000\r
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00800000\r
+\r
 ///\r
 /// Describes the resource properties of all fixed,\r
 /// nonrelocatable resource ranges found on the processor\r
index 1c401e8e85186f87d44d54125538e44a3ce583f4..243f33078a5e962b4b8cdc3ca88b453f3fb64e41 100644 (file)
@@ -71,9 +71,13 @@ typedef enum {
 //\r
 // Physical memory protection attributes\r
 //\r
+// Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory\r
+// protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.\r
+//\r
 #define EFI_MEMORY_WP   0x0000000000001000ULL\r
 #define EFI_MEMORY_RP   0x0000000000002000ULL\r
 #define EFI_MEMORY_XP   0x0000000000004000ULL\r
+#define EFI_MEMORY_RO   0x0000000000020000ULL\r
 //\r
 // Physical memory persistence attribute. \r
 // The memory region supports byte-addressable non-volatility.\r