From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 B2C6621D2E643 for ; Thu, 24 Aug 2017 03:25:58 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 24 Aug 2017 03:28:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,421,1498546800"; d="scan'208";a="1209860236" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2017 03:28:28 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 24 Aug 2017 03:28:23 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 24 Aug 2017 03:28:22 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.219]) with mapi id 14.03.0319.002; Thu, 24 Aug 2017 18:28:21 +0800 From: "Zeng, Star" To: Laszlo Ersek , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash Thread-Index: AQHTHIf0iDrAg4RIVk2t8D1jiWakqKKSxlOAgACHhPA= Date: Thu, 24 Aug 2017 10:28:19 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B91D410@shsmsx102.ccr.corp.intel.com> References: <1503544809-166388-1-git-send-email-star.zeng@intel.com> <820cfd94-d25e-214f-5555-92fc69951268@redhat.com> In-Reply-To: <820cfd94-d25e-214f-5555-92fc69951268@redhat.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] UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protection crash X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Aug 2017 10:25:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I did test on OVMF for the case by myself. :) Your double confirm will be wonderful. I will wait for your test result. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Lasz= lo Ersek Sent: Thursday, August 24, 2017 6:21 PM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Yao, Jiewen ; Dong, Eric Subject: Re: [edk2] [PATCH] UefiCpuPkg/PiSmmCpuDxeSmm: Fix memory protectio= n crash Hi, On 08/24/17 05:20, Star Zeng wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D624 reports memory=20 > protection crash in PiSmmCpuDxeSmm, Ia32 build with RAM above 4GB (of=20 > which 2GB are placed in 64-bit address). > It is because UEFI builds identity mapping page tables, >> 4G address is not supported at Ia32 build. >=20 > This patch is to get the PhysicalAddressBits that is used to build in=20 > PageTbl.c(Ia32/X64), and use it to check whether the address is=20 > supported or not in ConvertMemoryPageAttributes(). >=20 > With this patch, the debug messages will be like below. > UefiMemory protection: 0x0 - 0x9F000 Success UefiMemory protection:=20 > 0x100000 - 0x807000 Success UefiMemory protection: 0x808000 - 0x810000=20 > Success UefiMemory protection: 0x818000 - 0x820000 Success UefiMemory=20 > protection: 0x1510000 - 0x7B798000 Success UefiMemory protection:=20 > 0x7B79B000 - 0x7E538000 Success UefiMemory protection: 0x7E539000 -=20 > 0x7E545000 Success UefiMemory protection: 0x7E55A000 - 0x7E61F000=20 > Success UefiMemory protection: 0x7E62B000 - 0x7F6AB000 Success=20 > UefiMemory protection: 0x7F703000 - 0x7F70B000 Success UefiMemory=20 > protection: 0x7F70F000 - 0x7F778000 Success UefiMemory protection:=20 > 0x100000000 - 0x180000000 Unsupported >=20 > Cc: Jiewen Yao > Cc: Laszlo Ersek > Cc: Eric Dong > Originally-suggested-by: Jiewen Yao > Reported-by: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c | 4 +++ > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 1 + > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 31=20 > +++++++++++++++++----- > 3 files changed, 30 insertions(+), 6 deletions(-) I might need a few days before I can test this. Please continue reviewing /= discussing the patch (and if v2 is necessary, please CC me); just please g= ive me a chance to test it before merging it. I hope I can test it beginnin= g of next week at the latest. Thanks Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel