]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error.
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 1 Mar 2017 04:03:26 +0000 (12:03 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Wed, 1 Mar 2017 06:18:01 +0000 (14:18 +0800)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Core/Dxe/Mem/Page.c
MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c

index d596db7ad4278163a3fea6a9c26f8601c5d4b5f5..7e8fa94d7d4fe33d589f9c172281c8d0de5436e9 100644 (file)
@@ -554,7 +554,7 @@ CoreAddMemoryDescriptor (
   CoreReleaseMemoryLock ();\r
 \r
   ApplyMemoryProtectionPolicy (EfiMaxMemoryType, Type, Start,\r
-    EFI_PAGES_TO_SIZE (NumberOfPages));\r
+    LShiftU64 (NumberOfPages, EFI_PAGE_SHIFT));\r
 \r
   //\r
   // If Loading Module At Fixed Address feature is enabled. try to allocate memory with Runtime code & Boot time code type\r
index 172d6679857a36ddc34547c4afabe7c9a48b85ca..45f360cccf75a8aad6a4213266ea64a1b2ac04e8 100644 (file)
@@ -851,7 +851,7 @@ InitializeDxeNxMemoryProtectionPolicy (
     if (Attributes != 0) {\r
       SetUefiImageMemoryAttributes (\r
         MemoryMapEntry->PhysicalStart,\r
-        EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages),\r
+        LShiftU64 (MemoryMapEntry->NumberOfPages, EFI_PAGE_SHIFT),\r
         Attributes);\r
     }\r
     MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);\r