[AMD Public Use]

+ Michael Kinney, Liming Gao for MdePkg

We have several instances where Intel and AMD processors differ.  Therefore, we 
must determine between the two X64 processors.  Currently we have multiple 
copies of StandardSignatureIsAuthenticAMD function throughout UefiCpuPkg.  They 
check CPUID:0 for AuthenticAMD.  My initial thought was to move the function to 
UefiCpuPkg/BaseUefiCpuLib/.  Eric Dong suggested it could be in 
MdePkg/Library/BaseCpuLib.

Does it make sense to have a way to identify the processor designer/processor 
technology via BaseCpuLib?  What could that look like?  Would it be many 
functions targeted at each designer/technology, or something different?

Or should we keep the functionality all within UefiCpuPkg as it is today and 
consolidate the functions into BaseUefiCpuLib?

Garrett Kirkendall
SMTS Firmware Engineer | CTE
7171 Southwest Parkway, Austin, TX 78735 USA
AMD   facebook<https://www.facebook.com/AMD>  |  amd.com<http://www.amd.com/>

From: Dong, Eric <eric.d...@intel.com>
Sent: Thursday, June 11, 2020 2:07 AM
To: Ni, Ray <ray...@intel.com>; devel@edk2.groups.io; Kirkendall, Garrett 
<garrett.kirkend...@amd.com>
Cc: Laszlo Ersek <ler...@redhat.com>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function 
to BaseUefiCpuLib

[CAUTION: External Email]
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...@intel.com<mailto:ray...@intel.com>>
Sent: Thursday, June 11, 2020 12:56 PM
To: Dong, Eric <eric.d...@intel.com<mailto:eric.d...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
garrett.kirkend...@amd.com<mailto:garrett.kirkend...@amd.com>
Cc: Laszlo Ersek <ler...@redhat.com<mailto:ler...@redhat.com>>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function 
to BaseUefiCpuLib

UefiCpuLib is in UefiCpuPkg.
All consumers are in UefiCpuPkg. I think we can keep its location unchanged.

From: Dong, Eric <eric.d...@intel.com<mailto:eric.d...@intel.com>>
Sent: Thursday, June 11, 2020 9:29 AM
To: Ni, Ray <ray...@intel.com<mailto:ray...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
garrett.kirkend...@amd.com<mailto:garrett.kirkend...@amd.com>
Cc: Laszlo Ersek <ler...@redhat.com<mailto:ler...@redhat.com>>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function 
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 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...@intel.com<mailto:ray...@intel.com>>
Sent: Thursday, June 11, 2020 9:12 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; 
garrett.kirkend...@amd.com<mailto:garrett.kirkend...@amd.com>
Cc: Dong, Eric <eric.d...@intel.com<mailto:eric.d...@intel.com>>; Laszlo Ersek 
<ler...@redhat.com<mailto:ler...@redhat.com>>
Subject: RE: UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD 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<mailto:devel@edk2.groups.io> 
> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Kirkendall, 
> Garrett
> Sent: Wednesday, June 10, 2020 10:18 PM
> To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Eric <eric.d...@intel.com<mailto:eric.d...@intel.com>>; Ni, Ray 
> <ray...@intel.com<mailto:ray...@intel.com>>; Laszlo Ersek 
> <ler...@redhat.com<mailto:ler...@redhat.com>>
> Subject: [edk2-devel] UefiCpuPkg: Discuss: Move 
> StandardSignatureIsAuthenticAMD function to BaseUefiCpuLib
>
> [AMD Public Use]
>
> There are currently three instances of StandardSignatureIsAuthenticAMD 
> Function in the below locations.  I need to
> propose another change that will require the same function in PiSmmCpuDxeSmm. 
>  I would like to see this function move
> to a single "LibraryClass" location.  I think no one knew where to propose 
> the function, so we ended up with three
> instances so far.  The best place I can find would be 
> UefiCpuPkg/BaseUefiCpuLib/.  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: 
> StandardSignatureIsAuthenticAMD (
> UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.c: 
> StandardSignatureIsAuthenticAMD (
> UefiCpuPkg/Library/MpInitLib/MpLib.c: StandardSignatureIsAuthenticAMD (
>
> GARRETT KIRKENDALL
> SMTS Firmware Engineer | CTE
> 7171 Southwest Parkway, Austin, TX 78735 USA
> AMD   facebook  |  amd.com
>
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61139): https://edk2.groups.io/g/devel/message/61139
Mute This Topic: https://groups.io/mt/74817330/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to