From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 134C4821CB for ; Tue, 28 Feb 2017 20:13:05 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2017 20:13:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,223,1484035200"; d="scan'208";a="1116885262" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 28 Feb 2017 20:13:04 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 28 Feb 2017 20:13:04 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 28 Feb 2017 20:13:04 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Wed, 1 Mar 2017 12:13:02 +0800 From: "Zeng, Star" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Tian, Feng" , Ard Biesheuvel , "Zeng, Star" Thread-Topic: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error. Thread-Index: AQHSkkEAFglarRdhuUqPBOQ+Enn+vaF/X4Jw Date: Wed, 1 Mar 2017 04:13:01 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B82D3C1@shsmsx102.ccr.corp.intel.com> References: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> In-Reply-To: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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:13:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng Cc Ard. Thanks, Star -----Original Message----- From: Fu, Siyuan=20 Sent: Wednesday, March 1, 2017 12:05 PM To: edk2-devel@lists.01.org Cc: Tian, Feng ; Zeng, Star Subject: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA3= 2 build error. 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/P= age.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 (); =20 ApplyMemoryProtectionPolicy (EfiMaxMemoryType, Type, Start, - EFI_PAGES_TO_SIZE (NumberOfPages)); + LShiftU64 (NumberOfPages, EFI_PAGE_SHIFT)); =20 // // If Loading Module At Fixed Address feature is enabled. try to allocat= e memory with Runtime code & Boot time code type diff --git a/MdeModulePkg/= Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtect= ion.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 !=3D 0) { SetUefiImageMemoryAttributes ( MemoryMapEntry->PhysicalStart, - EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages), + LShiftU64 (MemoryMapEntry->NumberOfPages, EFI_PAGE_SHIFT), Attributes); } MemoryMapEntry =3D NEXT_MEMORY_DESCRIPTOR (MemoryMapEntry, DescriptorS= ize); -- 2.7.4.windows.1