From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 69404821CB for ; Tue, 28 Feb 2017 20:04:52 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2017 20:04:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,223,1484035200"; d="scan'208";a="70248181" Received: from sfu5-mobl3.ccr.corp.intel.com ([10.239.192.109]) by orsmga005.jf.intel.com with ESMTP; 28 Feb 2017 20:04:50 -0800 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Feng Tian , Star Zeng Date: Wed, 1 Mar 2017 12:04:47 +0800 Message-Id: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 Subject: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 04:04:52 -0000 Cc: Feng Tian Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- MdeModulePkg/Core/Dxe/Mem/Page.c | 2 +- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index d596db7..7e8fa94 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 172d667..45f360c 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); -- 2.7.4.windows.1