Revision: 17818
          http://sourceforge.net/p/edk2/code/17818
Author:   shenshushi
Date:     2015-07-03 01:39:06 +0000 (Fri, 03 Jul 2015)
Log Message:
-----------
MdeModulePkg: Refine code to make it more readable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
    
trunk/edk2/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c

Modified: trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
===================================================================
--- trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c     2015-07-03 
01:32:04 UTC (rev 17817)
+++ trunk/edk2/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c     2015-07-03 
01:39:06 UTC (rev 17818)
@@ -788,7 +788,7 @@
   if (((SectionAlignment & (EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT - 1)) 
!= 0) &&
       ((mPropertiesTable.MemoryProtectionAttribute & 
EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) != 0)) {
     DEBUG ((EFI_D_VERBOSE, "SetPropertiesTableSectionAlignment - Clear\n"));
-    mPropertiesTable.MemoryProtectionAttribute &= 
~EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA;
+    mPropertiesTable.MemoryProtectionAttribute &= 
~((UINT64)EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA);
     gBS->GetMemoryMap = CoreGetMemoryMap;
     gBS->Hdr.CRC32 = 0;
     gBS->CalculateCrc32 ((UINT8 *)gBS, gBS->Hdr.HeaderSize, &gBS->Hdr.CRC32);

Modified: 
trunk/edk2/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c
===================================================================
--- 
trunk/edk2/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c
       2015-07-03 01:32:04 UTC (rev 17817)
+++ 
trunk/edk2/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c
       2015-07-03 01:39:06 UTC (rev 17818)
@@ -130,6 +130,8 @@
   if (EFI_ERROR (Status)) {
     goto Done;
   }
+  
+  ASSERT (PropertiesTable != NULL);
 
   DEBUG ((EFI_D_INFO, "MemoryProtectionAttribute - 0x%016lx\n", 
PropertiesTable->MemoryProtectionAttribute));
   if ((PropertiesTable->MemoryProtectionAttribute & 
EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA) == 0) {


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to