From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 9066A81DFC for ; Mon, 14 Nov 2016 17:24:22 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 14 Nov 2016 17:24:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,640,1473145200"; d="scan'208";a="901405334" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 14 Nov 2016 17:24:26 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Nov 2016 17:24:26 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 14 Nov 2016 17:24:25 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Tue, 15 Nov 2016 09:24:22 +0800 From: "Fan, Jeff" To: "Yao, Jiewen" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path Thread-Index: AQHSO97k043lSFBUy0mbX04flay71KDZPLAA//+CvICAAIZV0A== Date: Tue, 15 Nov 2016 01:24:21 +0000 Message-ID: <542CF652F8836A4AB8DBFAAD40ED192A4A2DD0EA@shsmsx102.ccr.corp.intel.com> References: <20161111054545.19616-1-jeff.fan@intel.com> <542CF652F8836A4AB8DBFAAD40ED192A4A2DCDE3@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C50386D0C34@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C50386D0C34@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmE5ZWExODYtOWUyOC00YzY2LTlhOWQtMzkzN2Y3NTk2NGRlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkQ3S1IxWVRHcFR1SW00QnZYZnAzSEpCSDZiRUZ2S2FCVDBYTjBlTk9KZU09In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path 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: Tue, 15 Nov 2016 01:24:22 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jiewen, Good suggestion, I will update comments when pushing the patches. I still wait for Laszlo' t-b comments before I push this serial of patches. Jeff -----Original Message----- From: Yao, Jiewen=20 Sent: Tuesday, November 15, 2016 9:22 AM To: Fan, Jeff; edk2-devel@lists.01.org Cc: Yao, Jiewen Subject: RE: [edk2] [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 pat= h HI jeff The patch looks good and I have one minor suggestion on below comment: Allocate safe memory in ACPI NVS for AP to execute hlt loop on S3 path =3D= =3D> Allocate safe memory in ACPI NVS for AP to execute hlt loop in protect= ed mode on S3 path I recommend we add "in protected mode" statement for the reason to allocate= below 4GiB memory. With that comment update, reviewed-by: Jiewen.yao@intel.com Thank you Yao Jiewen > -----Original Message----- > From: Fan, Jeff > Sent: Tuesday, November 15, 2016 8:50 AM > To: Yao, Jiewen > Subject: FW: [edk2] [PATCH v2 0/3] Put AP into safe hlt-loop code on=20 > S3 path >=20 >=20 >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of=20 > Jeff Fan > Sent: Friday, November 11, 2016 1:46 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH v2 0/3] Put AP into safe hlt-loop code on S3=20 > path >=20 > On S3 path, we will wake up APs to restore CPU context in=20 > PiSmmCpuDxeSmm driver. In case, one NMI or SMI happens, APs may exit=20 > from hlt state and execute the instruction after HLT instruction. >=20 > But APs are not running on safe code, it leads OVMF S3 boot unstable. >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D216 >=20 > I tested real platform with 64bit DXE. >=20 > v2: > 1. Make stack alignment per Laszlo's comment. > 2. Trim whitespace at end of end per Laszlo's comment. > 3. Update year mark in file header. > 4. Enhancement on InterlockedDecrement() per Paolo's comment. >=20 > Jeff Fan (3): > UefiCpuPkg/PiSmmCpuDxeSmm: Put AP into safe hlt-loop code on S3 path > UefiCpuPkg/PiSmmCpuDxeSmm: Place AP to 32bit protected mode on S3=20 > path > UefiCpuPkg/PiSmmCpuDxeSmm: Decrease mNumberToFinish in AP safe code >=20 > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 33 > +++++++++++++- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 29 +++++++++++- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 15 +++++++ > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 63 > ++++++++++++++++++++++++++- > 4 files changed, 136 insertions(+), 4 deletions(-) >=20 > -- > 2.9.3.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel