MdeModulePkg DxeCore: Add read only memory support.
authorStar Zeng <star.zeng@intel.com>
Mon, 11 May 2015 03:33:44 +0000 (03:33 +0000)
committerlzeng14 <lzeng14@Edk2>
Mon, 11 May 2015 03:33:44 +0000 (03:33 +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@17397 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/Gcd/Gcd.c

index bce01a0..fdd2d40 100644 (file)
@@ -25,6 +25,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
                                        EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED      | \\r
                                        EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED     | \\r
                                        EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED | \\r
+                                       EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED | \\r
                                        EFI_RESOURCE_ATTRIBUTE_16_BIT_IO           | \\r
                                        EFI_RESOURCE_ATTRIBUTE_32_BIT_IO           | \\r
                                        EFI_RESOURCE_ATTRIBUTE_64_BIT_IO           | \\r
@@ -90,6 +91,7 @@ GCD_ATTRIBUTE_CONVERSION_ENTRY mAttributeConversionTable[] = {
   { EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE,        EFI_MEMORY_RP,          TRUE  },\r
   { EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE,       EFI_MEMORY_WP,          TRUE  },\r
   { EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE,   EFI_MEMORY_XP,          TRUE  },\r
+  { EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE,   EFI_MEMORY_RO,          TRUE  },\r
   { EFI_RESOURCE_ATTRIBUTE_PRESENT,                 EFI_MEMORY_PRESENT,     FALSE },\r
   { EFI_RESOURCE_ATTRIBUTE_INITIALIZED,             EFI_MEMORY_INITIALIZED, FALSE },\r
   { EFI_RESOURCE_ATTRIBUTE_TESTED,                  EFI_MEMORY_TESTED,      FALSE },\r
@@ -234,6 +236,8 @@ CoreValidateResourceDescriptorHobAttributes (
           ((Attributes & EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE) != 0));\r
   ASSERT (((Attributes & EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED) == 0) ||\r
           ((Attributes & EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE) != 0));\r
+  ASSERT (((Attributes & EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED) == 0) ||\r
+          ((Attributes & EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE) != 0));\r
   ASSERT (((Attributes & EFI_RESOURCE_ATTRIBUTE_PERSISTENT) == 0) ||\r
           ((Attributes & EFI_RESOURCE_ATTRIBUTE_PERSISTABLE) != 0));\r
 }\r