From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.15569.1591948790868312126 for ; Fri, 12 Jun 2020 00:59:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) IronPort-SDR: pAgfe29y9Ug7DidX1w1Hn57ZrauxGnbIE2zOdQHd6MVrTuNEfkRRppPd6IdRd5RYyr5HhFiHT+ KYmLmQ94tIXQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 00:59:49 -0700 IronPort-SDR: 7zrNuCYJRb9AnxSwFuTPOKQ0kPDHfQH9WIapUsRGNa+J4k8AuNY0m7XvSQnM4AIjQRnJe6qEb8 bIgslW8S50iQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,502,1583222400"; d="scan'208,217";a="289809095" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 12 Jun 2020 00:59:49 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 12 Jun 2020 00:59:49 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by shsmsx102.ccr.corp.intel.com ([169.254.2.36]) with mapi id 14.03.0439.000; Fri, 12 Jun 2020 15:59:45 +0800 From: "Ni, Ray" To: "Dong, Eric" , "devel@edk2.groups.io" , "garrett.kirkendall@amd.com" CC: Laszlo Ersek Subject: Re: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function to BaseUefiCpuLib Thread-Topic: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function to BaseUefiCpuLib Thread-Index: AdY/LxrU4UeZwuEKT3qg1oH+0DYgTwAXZggwAACawuAAB1X4MAAEfJIQADQ2FOA= Date: Fri, 12 Jun 2020 07:59:45 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C5B41A3@SHSMSX104.ccr.corp.intel.com> References: <734D49CCEBEEF84792F5B80ED585239D5C5AB095@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C5AB9FA@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action msip_labels: MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Enabled=true; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SetDate=2020-06-10T13:48:24Z; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Method=Privileged; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_Name=Public_0; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_ActionId=a0aba147-89af-413a-9a26-cb37e91c8949; MSIP_Label_0d814d60-469d-470c-8cb0-58434e2bf457_ContentBits=1 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_734D49CCEBEEF84792F5B80ED585239D5C5B41A3SHSMSX104ccrcor_" --_000_734D49CCEBEEF84792F5B80ED585239D5C5B41A3SHSMSX104ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Comments in BaseCpuLib tell that this library is separated from BaseLib due= to IPF. The CPU Library provides services to flush CPU TLBs and place the CPU in= a sleep state. The implementation of these services on Itanium processors requires the = use of PAL Calls. PAL Calls require PEI and DXE specific mechanisms to look up PAL Entry P= oint. As a result, these services could not be defined in the Base Library. So I think we should avoid adding API to this library. From: Dong, Eric Sent: Thursday, June 11, 2020 3:07 PM To: Ni, Ray ; devel@edk2.groups.io; garrett.kirkendall@a= md.com Cc: Laszlo Ersek Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD fun= ction to BaseUefiCpuLib I mean there is already a BaseCpuLib in MdePkg. Is it possible to add it t= o there? If no usage outside of UefiCpuPkg, I'm ok to move this function to UefiCpu= Lib. Thanks, Eric From: Ni, Ray > Sent: Thursday, June 11, 2020 12:56 PM To: Dong, Eric >; devel@ed= k2.groups.io; garrett.kirkendall@amd.com Cc: Laszlo Ersek > Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD fun= ction to BaseUefiCpuLib UefiCpuLib is in UefiCpuPkg. All consumers are in UefiCpuPkg. I think we can keep its location unchange= d. From: Dong, Eric > Sent: Thursday, June 11, 2020 9:29 AM To: Ni, Ray >; devel@edk2.groups= .io; garrett.kirkendall@amd.com Cc: Laszlo Ersek > Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD fun= ction to BaseUefiCpuLib This proposal is ok to me. I'm not sure whether it can be added to MdePkg, just like add to CpuLib. I= found all the definitions and functions used in StandardSignatureIsAuthent= icAMD function defined in MdePkg. If it can be added to MdePkg, all code base can use this function, if it b= een added to UefiCpuPkg, other core packages may can't use it. Thanks, Eric From: Ni, Ray > Sent: Thursday, June 11, 2020 9:12 AM To: devel@edk2.groups.io; garrett.kirkendall@= amd.com Cc: Dong, Eric >; Laszlo E= rsek > Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD fun= ction to BaseUefiCpuLib Since all platform DSCs have already listed UefiCpuLib.inf so this change = doesn't impact platform DSC. I don't see an issue with this change. Eric, What's your opinion? Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io > On Behalf Of Kirkendall, Garrett > Sent: Wednesday, June 10, 2020 10:18 PM > To: devel@edk2.groups.io > Cc: Dong, Eric >; Ni, Ra= y >; Laszlo Ersek > > Subject: [edk2-devel] UefiCpuPkg: Discuss: Move StandardSignatureIsAuthe= nticAMD function to BaseUefiCpuLib > > [AMD Public Use] > > There are currently three instances of StandardSignatureIsAuthenticAMD F= unction in the below locations. I need to > propose another change that will require the same function in PiSmmCpuDx= eSmm. I would like to see this function move > to a single "LibraryClass" location. I think no one knew where to propo= se the function, so we ended up with three > instances so far. The best place I can find would be UefiCpuPkg/BaseUef= iCpuLib/. Thoughts? Is there a better function > name such that a similar Intel identifier function could be created when= needed in the future? > > I'm thinking this will be 3 patches > 1. Add StandardSignatureIsAuthenticAMD to BaseUefiCpuLib > 2. Move current instances to Library function > 3. Propose code change in PiSmmCpuDxeSmm > > UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c: StandardSignatureIsAuthe= nticAMD ( > UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c: StandardSign= atureIsAuthenticAMD ( > UefiCpuPkg/Library/MpInitLib/MpLib.c: StandardSignatureIsAuthenticAMD ( > > GARRETT KIRKENDALL > SMTS Firmware Engineer | CTE > 7171 Southwest Parkway, Austin, TX 78735 USA > AMD facebook | amd.com > >=20 --_000_734D49CCEBEEF84792F5B80ED585239D5C5B41A3SHSMSX104ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Comments in BaseCpuLib tell that this library is se= parated from BaseLib due to IPF.

 

 &nb= sp;The CPU Library provides services to flush=  CPU TLBs and place the CPU in a&nb= sp;sleep state.

 &nb= sp;The implementation of these services on It= anium processors requires the use of PAL = ;Calls.

 &nb= sp;PAL Calls require PEI and DXE specific&nbs= p;mechanisms to look up PAL Entry Point.=

 &nb= sp;As a result, these services could not = ;be defined in the Base Library.

 

So I think we should avoid adding API to this libra= ry.

 

From: Dong, Eric <eric.dong@intel.com>=
Sent: Thursday, June 11, 2020 3:07 PM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io; garrett= .kirkendall@amd.com
Cc: Laszlo Ersek <lersek@redhat.com>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthentic= AMD function to BaseUefiCpuLib

 

I mean there is already a BaseCpuLib in MdePkg. Is = it possible to add it to there?

 

If no usage outside of UefiCpuPkg, I’m ok to = move this function to UefiCpuLib.

 

Thanks,

Eric

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, June 11, 2020 12:56 PM
To: Dong, Eric <eric.dong= @intel.com>; devel@edk2.groups.io; garrett.kirkendall@amd.com
Cc: Laszlo Ersek <lersek@re= dhat.com>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthentic= AMD function to BaseUefiCpuLib

 

UefiCpuLib is in UefiCpuPkg.

All consumers are in UefiCpuPkg. I think we can kee= p its location unchanged.

 

From: Dong, Eric <eric.dong@intel.com>
Sent: Thursday, June 11, 2020 9:29 AM
To: Ni, Ray <ray.ni@intel.co= m>; devel@edk2.groups.io; ga= rrett.kirkendall@amd.com
Cc: Laszlo Ersek <lersek@re= dhat.com>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthentic= AMD function to BaseUefiCpuLib

 

This proposal is ok to me.

 

I’m not sure whether it can be added to MdePk= g, just like add to CpuLib. I found all the definitions and functions used = in StandardSignatureIsAuthenticAMD function defined in MdePkg.

 

If it can be added to MdePkg, all code base can use= this function, if it been added to UefiCpuPkg, other core packages may can= ’t use it.

 

Thanks,

Eric

From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, June 11, 2020 9:12 AM
To: devel@edk2.groups.io; garrett.kirkendall@amd.com
Cc: Dong, Eric <eric.dong= @intel.com>; Laszlo Ersek <l= ersek@redhat.com>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthentic= AMD function to BaseUefiCpuLib

 

Since all platform DSCs have already = listed UefiCpuLib.inf so this change doesn't = impact platform DSC.
I don't see an issue = with this change.

Eric,
What's your opinion?

Thanks,
Ray

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of&nbs= p;Kirkendall, Garrett
> Sent: Wednesday, June&nbs= p;10, 2020 10:18 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <<= a href=3D"mailto:eric.dong@intel.com">eric.dong@intel.com>; Ni,=  Ray <ray.ni@intel.com= >; Laszlo Ersek <= lersek@redhat.com>
> Subject: [edk2-devel] Uef= iCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD = function to BaseUefiCpuLib

> [AMD Public Use]
> There are currently = three instances of StandardSignatureIsAuthenticAMD Func= tion in the below locations.  I need&nbs= p;to
> propose another change&nb= sp;that will require the same function in&nbs= p;PiSmmCpuDxeSmm.  I would like to see t= his function move
> to a single "Li= braryClass" location.  I think no one&nb= sp;knew where to propose the function, so&nbs= p;we ended up with three
> instances so far. &n= bsp;The best place I can find would be&n= bsp;UefiCpuPkg/BaseUefiCpuLib/.  Thoughts?  Is the= re a better function
> name such that a&nbs= p;similar Intel identifier function could be = created when needed in the future?

> I'm thinking this wi= ll be 3 patches
> 1. Add StandardSignatureI= sAuthenticAMD to BaseUefiCpuLib
> 2. Move current inst= ances to Library function
> 3. Propose code chan= ge in PiSmmCpuDxeSmm

> UefiCpuPkg/Library/BaseXApicLib/Bas= eXApicLib.c: StandardSignatureIsAuthenticAMD (
> UefiCpuPkg/Library/BaseXApicX2ApicL= ib/BaseXApicX2ApicLib.c: StandardSignatureIsAuthenticAMD (=
> UefiCpuPkg/Library/MpInitLib/MpLib.= c: StandardSignatureIsAuthenticAMD (

> GARRETT KIRKENDALL
> SMTS Firmware Engineer&nb= sp;| CTE
> 7171 Southwest Parkway,&n= bsp;Austin, TX 78735 USA
> AMD   facebook =  |  amd.com

--_000_734D49CCEBEEF84792F5B80ED585239D5C5B41A3SHSMSX104ccrcor_--