summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2017-03-01 12:03:26 +0800
committerFu Siyuan <siyuan.fu@intel.com>2017-03-01 14:18:01 +0800
commit4879e13097830f9c7cb924a674bcf96cb7686baf (patch)
treeab211a92779eddca870db4c4f48ade186c94ce72 /MdeModulePkg/Core
parent5ab97a64b51cbf803005eb664cdeab3b562d9c56 (diff)
downloadedk2-platforms-4879e13097830f9c7cb924a674bcf96cb7686baf.tar.xz
MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error.
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>
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/Page.c2
-rw-r--r--MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c
index d596db7ad4..7e8fa94d7d 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -554,7 +554,7 @@ CoreAddMemoryDescriptor (
CoreReleaseMemoryLock ();
ApplyMemoryProtectionPolicy (EfiMaxMemoryType, Type, Start,
- EFI_PAGES_TO_SIZE (NumberOfPages));
+ LShiftU64 (NumberOfPages, EFI_PAGE_SHIFT));
//
// If Loading Module At Fixed Address feature is enabled. try to allocate memory with Runtime code & Boot time code type
diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
index 172d667985..45f360cccf 100644
--- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
+++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
@@ -851,7 +851,7 @@ InitializeDxeNxMemoryProtectionPolicy (
if (Attributes != 0) {
SetUefiImageMemoryAttributes (
MemoryMapEntry->PhysicalStart,
- EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages),
+ LShiftU64 (MemoryMapEntry->NumberOfPages, EFI_PAGE_SHIFT),
Attributes);
}
MemoryMapEntry = NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorSize);