From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel-bounces@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 CE69C2117B57A; Thu, 25 Oct 2018 22:13:28 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2018 22:13:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,426,1534834800"; d="scan'208";a="268917759" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 25 Oct 2018 22:13:27 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 22:13:27 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 25 Oct 2018 22:13:26 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.84]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.102]) with mapi id 14.03.0415.000; Fri, 26 Oct 2018 13:13:24 +0800 From: "Zeng, Star" To: edk2-devel , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure Thread-Index: AQHUbOfpw8XIFCKB7UG4URDAcaZAXqUw+1Yg Date: Fri, 26 Oct 2018 05:13:24 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BC5BC40@shsmsx102.ccr.corp.intel.com> References: <20181026045346.10192-1-jian.j.wang@intel.com> In-Reply-To: <20181026045346.10192-1-jian.j.wang@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/Core: fix an IA32 build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 05:13:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org]=20 Sent: Friday, October 26, 2018 12:54 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zeng, Star Subject: [edk2] [PATCH] MdeModulePkg/Core: fix an IA32 build failure REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1277 The failure is caused by data type conversion between UINTN and UINT64, which is checked in at 63ebde8ef6d4ff497d054ccc010904ecd4441198. Cc: Star Zeng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/= Mem/HeapGuard.c index 449a022658..521e0d7b2a 100644 --- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c +++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c @@ -463,7 +463,7 @@ IsGuardPage ( IN EFI_PHYSICAL_ADDRESS Address ) { - UINTN BitMap; + UINT64 BitMap; =20 // // There must be at least one guarded page before and/or after given @@ -1368,7 +1368,7 @@ GuardAllFreedPages ( UINT64 Address; UINT64 GuardPage; INTN Level; - UINTN BitIndex; + UINT64 BitIndex; UINTN GuardPageNumber; =20 if (mGuardedMemoryMap =3D=3D 0 || @@ -1475,12 +1475,12 @@ MergeGuardPages ( } =20 Bitmap =3D 0; - Pages =3D EFI_SIZE_TO_PAGES (MaxAddress - MemoryMapEntry->PhysicalStart= ); - Pages -=3D MemoryMapEntry->NumberOfPages; + Pages =3D EFI_SIZE_TO_PAGES ((UINTN)(MaxAddress - MemoryMapEntry->Physi= calStart)); + Pages -=3D (INTN)MemoryMapEntry->NumberOfPages; while (Pages > 0) { if (Bitmap =3D=3D 0) { EndAddress =3D MemoryMapEntry->PhysicalStart + - EFI_PAGES_TO_SIZE (MemoryMapEntry->NumberOfPages); + EFI_PAGES_TO_SIZE ((UINTN)MemoryMapEntry->NumberOfPages= ); Bitmap =3D GetGuardedMemoryBits (EndAddress, GUARDED_HEAP_MAP_ENTRY_= BITS); } =20 --=20 2.19.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel