From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 3C48B821CB for ; Tue, 28 Feb 2017 20:15:47 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2017 20:15:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,223,1484035200"; d="scan'208";a="71370820" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 28 Feb 2017 20:15:46 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 28 Feb 2017 20:15:46 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 28 Feb 2017 20:15:46 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Wed, 1 Mar 2017 12:15:45 +0800 From: "Tian, Feng" To: "Zeng, Star" , "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: Ard Biesheuvel , "Tian, Feng" Thread-Topic: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid IA32 build error. Thread-Index: AQHSkkEAA4qwdLXm+0OllykxU/d0lKF+2Z2AgACGz6A= Date: Wed, 1 Mar 2017 04:15:44 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699B63D4@SHSMSX101.ccr.corp.intel.com> References: <1488341087-233076-1-git-send-email-siyuan.fu@intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B82D3C1@shsmsx102.ccr.corp.intel.com> In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B82D3C1@shsmsx102.ccr.corp.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:15:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Zeng, Star=20 Sent: Wednesday, March 1, 2017 12:13 PM To: Fu, Siyuan ; edk2-devel@lists.01.org Cc: Tian, Feng ; Ard Biesheuvel ; Zeng, Star Subject: RE: [Patch] MdeModulePkg: use LShiftU64() instead of "<<" to avoid= IA32 build error. 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