In preparation for moving StandardSignatureIsAuthenticAMD to UefiCpuLib
in UefiCpuPkg, PcAtChipset/PcAtChipsetPkg.dsc needs LibraryClass
UefiCpuLib.
LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf will need
UefiCpuLib LibraryClass. Likely most "real" platforms will be using
BaseX2XApicLib instance which already required UefiCpuLib.
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
---
PcAtChipsetPkg/PcAtChipsetPkg.dsc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
index 01a3ee716a98..b61b7d1f528e 100644
--- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc
+++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
@@ -2,6 +2,7 @@
# PC/AT Chipset Package
#
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2020, AMD Incorporated. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -39,6 +40,7 @@ [LibraryClasses]
ResetSystemLib|PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
+ UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
--
2.27.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#61557): https://edk2.groups.io/g/devel/message/61557
Mute This Topic: https://groups.io/mt/75037835/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Ray Ni <ray.ni@intel.com> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#62118): https://edk2.groups.io/g/devel/message/62118 Mute This Topic: https://groups.io/mt/75037835/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Hi Garrett, Thanks for report quickly and it work and the 'Mac format issue disappear'. But another build error occur 'error LNK2005: _InitializeFloatingPointUnits already defined in FspSecCoreT.lib(InitializeFpu.obj)' It seem that result by ApicLib who depend UefiCpuLib now. I want to know why you add this dependency, have any other way to do it, for example, add the dependency to the dsc file. Best Regards Guomin > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of > Kirkendall, Garrett > Sent: Monday, June 22, 2020 9:18 PM > To: devel@edk2.groups.io > Cc: Ni, Ray <ray.ni@intel.com> > Subject: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: PcAtChipsetPkg.dsc > add UefiCpuLib LibraryClass > > In preparation for moving StandardSignatureIsAuthenticAMD to UefiCpuLib > in UefiCpuPkg, PcAtChipset/PcAtChipsetPkg.dsc needs LibraryClass > UefiCpuLib. > LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf will need > UefiCpuLib LibraryClass. Likely most "real" platforms will be using > BaseX2XApicLib instance which already required UefiCpuLib. > > Cc: Ray Ni <ray.ni@intel.com> > Signed-off-by: Garrett Kirkendall <garrett.kirkendall@amd.com> > --- > PcAtChipsetPkg/PcAtChipsetPkg.dsc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc > b/PcAtChipsetPkg/PcAtChipsetPkg.dsc > index 01a3ee716a98..b61b7d1f528e 100644 > --- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc > +++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc > @@ -2,6 +2,7 @@ > # PC/AT Chipset Package > # > # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR> > +# Copyright (c) 2020, AMD Incorporated. All rights reserved.<BR> > # > # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -39,6 +40,7 @@ > [LibraryClasses] > > ResetSystemLib|PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.in > f > IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf > LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf > + UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > > ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseR > eportStatusCodeLibNull.inf > HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf > > -- > 2.27.0 > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61570): https://edk2.groups.io/g/devel/message/61570 Mute This Topic: https://groups.io/mt/75037835/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 06/23/20 02:52, Guomin Jiang wrote: > Hi Garrett, > > Thanks for report quickly and it work and the 'Mac format issue disappear'. > > But another build error occur 'error LNK2005: _InitializeFloatingPointUnits already defined in FspSecCoreT.lib(InitializeFpu.obj)' > It seem that result by ApicLib who depend UefiCpuLib now. Yes. > I want to know why you add this dependency, It was discussed on the list in advance. [edk2-devel] UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD function to BaseUefiCpuLib https://edk2.groups.io/g/devel/message/61079 In addition, we have investigated all the platforms in the open source edk2 and edk2-platforms trees that could require an update due to the new dependency: https://edk2.groups.io/g/devel/message/61525 And this series is in fact addressing them all. > have any other way to do it, for example, add the dependency to the dsc file. Please describe how you can reproduce the link error using edk2 and edk2-platforms content *only* (= using open source components only). Thanks Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61583): https://edk2.groups.io/g/devel/message/61583 Mute This Topic: https://groups.io/mt/75037835/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Hi Laszlo, The step to reproduce as below: 1. add below change diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc index 26cd3da43c3f..d43cb5be6472 100644 --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc @@ -62,7 +62,10 @@ [Components] IntelFsp2Pkg/Library/BaseDebugDeviceLibNull/BaseDebugDeviceLibNull.inf IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.inf - IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf + IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf { + <LibraryClasses> + NULL|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf + } IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf 2. build -p IntelFsp2Pkg\IntelFsp2Pkg.dsc -b DEBUG -a IA32 -t VS2019 and I can see BaseUefiCpuLib.lib(InitializeFpu.obj) : error LNK2005: _InitializeFloatingPointUnits already defined in FspSecCoreT.lib(InitializeFpu.obj) I can't reproduce it with the original edk2 or edk2-platforms, but our project have the depend on ApicLib, so if the ApicLib depend on UefiCpuLib, it will break our project build. Below Thanks. > -----Original Message----- > From: Laszlo Ersek <lersek@redhat.com> > Sent: Tuesday, June 23, 2020 7:16 PM > To: devel@edk2.groups.io; Jiang, Guomin <guomin.jiang@intel.com>; > garrett.kirkendall@amd.com > Cc: Ni, Ray <ray.ni@intel.com>; Dong, Eric <eric.dong@intel.com> > Subject: Re: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: > PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > > On 06/23/20 02:52, Guomin Jiang wrote: > > Hi Garrett, > > > > Thanks for report quickly and it work and the 'Mac format issue disappear'. > > > > But another build error occur 'error LNK2005: _InitializeFloatingPointUnits > already defined in FspSecCoreT.lib(InitializeFpu.obj)' > > It seem that result by ApicLib who depend UefiCpuLib now. > > Yes. > > > I want to know why you add this dependency, > > It was discussed on the list in advance. > > [edk2-devel] UefiCpuPkg: Discuss: Move StandardSignatureIsAuthenticAMD > function to BaseUefiCpuLib > > https://edk2.groups.io/g/devel/message/61079 > > In addition, we have investigated all the platforms in the open source > edk2 and edk2-platforms trees that could require an update due to the new > dependency: > > https://edk2.groups.io/g/devel/message/61525 > > And this series is in fact addressing them all. > > > have any other way to do it, for example, add the dependency to the dsc > file. > > Please describe how you can reproduce the link error using edk2 and edk2- > platforms content *only* (= using open source components only). > > Thanks > Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61767): https://edk2.groups.io/g/devel/message/61767 Mute This Topic: https://groups.io/mt/75037835/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Hi Guomin, Laszlo & Garrett, Because both UefiCpuLib and FspSecCoreT / FspSecCoreM both define InitializeFloatingPointUnits API. So this build issue been reported. I have submit a patch to remove InitializeFloatingPointUnits in FspSecCoreT / FspSecCoreM, https://edk2.groups.io/g/devel/message/61757. Please wait that patch been merged before committing this change. Thanks, Eric > -----Original Message----- > From: Jiang, Guomin <guomin.jiang@intel.com> > Sent: Sunday, June 28, 2020 5:11 PM > To: Laszlo Ersek <lersek@redhat.com>; devel@edk2.groups.io; > garrett.kirkendall@amd.com > Cc: Ni, Ray <ray.ni@intel.com>; Dong, Eric <eric.dong@intel.com> > Subject: RE: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: > PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > > Hi Laszlo, > > The step to reproduce as below: > 1. add below change > diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc > index 26cd3da43c3f..d43cb5be6472 100644 > --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc > +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc > @@ -62,7 +62,10 @@ [Components] > IntelFsp2Pkg/Library/BaseDebugDeviceLibNull/BaseDebugDeviceLibNull.inf > > IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.in > f > > - IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf > + IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf { > + <LibraryClasses> > + NULL|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > + } > IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf > IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf > > 2. build -p IntelFsp2Pkg\IntelFsp2Pkg.dsc -b DEBUG -a IA32 -t VS2019 and I > can see BaseUefiCpuLib.lib(InitializeFpu.obj) : error LNK2005: > _InitializeFloatingPointUnits already defined in > FspSecCoreT.lib(InitializeFpu.obj) > > I can't reproduce it with the original edk2 or edk2-platforms, but our project > have the depend on ApicLib, so if the ApicLib depend on UefiCpuLib, it will > break our project build. > > Below > Thanks. > > > -----Original Message----- > > From: Laszlo Ersek <lersek@redhat.com> > > Sent: Tuesday, June 23, 2020 7:16 PM > > To: devel@edk2.groups.io; Jiang, Guomin <guomin.jiang@intel.com>; > > garrett.kirkendall@amd.com > > Cc: Ni, Ray <ray.ni@intel.com>; Dong, Eric <eric.dong@intel.com> > > Subject: Re: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: > > PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > > > > On 06/23/20 02:52, Guomin Jiang wrote: > > > Hi Garrett, > > > > > > Thanks for report quickly and it work and the 'Mac format issue > disappear'. > > > > > > But another build error occur 'error LNK2005: > > > _InitializeFloatingPointUnits > > already defined in FspSecCoreT.lib(InitializeFpu.obj)' > > > It seem that result by ApicLib who depend UefiCpuLib now. > > > > Yes. > > > > > I want to know why you add this dependency, > > > > It was discussed on the list in advance. > > > > [edk2-devel] UefiCpuPkg: Discuss: Move > StandardSignatureIsAuthenticAMD > > function to BaseUefiCpuLib > > > > https://edk2.groups.io/g/devel/message/61079 > > > > In addition, we have investigated all the platforms in the open source > > edk2 and edk2-platforms trees that could require an update due to the > > new > > dependency: > > > > https://edk2.groups.io/g/devel/message/61525 > > > > And this series is in fact addressing them all. > > > > > have any other way to do it, for example, add the dependency to the > > > dsc > > file. > > > > Please describe how you can reproduce the link error using edk2 and > > edk2- platforms content *only* (= using open source components only). > > > > Thanks > > Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61768): https://edk2.groups.io/g/devel/message/61768 Mute This Topic: https://groups.io/mt/75037835/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.