From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.6938.1647586142497680816 for ; Thu, 17 Mar 2022 23:49:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=m17p+mwM; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0076e51d84=abner.chang@hpe.com) Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22I4uMrC020862; Fri, 18 Mar 2022 06:47:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pps0720; bh=639kfbJKtSmguV/K1eeBpMNxCOXJ/gbSQBw9cXHfSjc=; b=m17p+mwMwtAnZW9k38+n5Ew3Tvzfwbai6CshKNnK333jDWC7cXv/c/3iIVNEIFjG+oBE FzNCRsd2Cuvby9Oy5YrNN8tFuKTONfSovVU3g9wS/3XswBjGHJwYxLuWi96WxzIZKtNJ uQMuR/Oiy6hQPThNFAe/VMQ9HDQKQuZG7WNBItZXqvfOd2Igeefz6Uz0oHGHIt/XeRW7 kAx95RpePuFXjLpET3j+Oue/abx1k3YzIPIo/z1tOZl2OqUXIyBylEascYKCtaPEW++r 7yaoemS7t7TAne6vGB6cdl5nTN0dfO8v6wMbVfcYbRJcakcKTgSE9Z35IusTWKpPB9KR SQ== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 3evkg78r5t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Mar 2022 06:47:00 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 6EFA3A1; Fri, 18 Mar 2022 06:46:59 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 8B4244E; Fri, 18 Mar 2022 06:46:56 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Daniel Schaefer , Eric Dong , Ray Ni , Rahul Kumar , Sunil V L , Andrew Fish , Leif Lindholm , Michael D Kinney , Chao Li Subject: [PATCH 1/6] [RFC] UefiCpuPkg: Classify IA32/X64 modules in DSC file Date: Fri, 18 Mar 2022 13:43:17 +0800 Message-Id: <20220318054322.11520-2-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220318054322.11520-1-abner.chang@hpe.com> References: <20220318054322.11520-1-abner.chang@hpe.com> X-Proofpoint-ORIG-GUID: I8WHMFI7eogonRO9vnpBcsqAMmZQCL4P X-Proofpoint-GUID: I8WHMFI7eogonRO9vnpBcsqAMmZQCL4P X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-18_06,2022-03-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 adultscore=0 mlxscore=0 mlxlogscore=911 spamscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203180034 Content-Transfer-Encoding: quoted-printable https://bugzilla.tianocore.org/show_bug.cgi?id=3D3860 This is the first step of reworking on UefiCpuPkg in order to accommodating all processor architectures in UEfiCpuPkg. Classify UefiCpuPkg modules to IA32 and X64 sections in DSC file. Move the module to Common section if more than one archs can leverage the same module. Such as the patch 3/6 for BaseUefiCpuLib. Signed-off-by: Abner Chang Co-authored-by: Daniel Schaefer Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Sunil V L Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Cc: Chao Li --- UefiCpuPkg/UefiCpuPkg.dsc | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc index a0bbde9985..6b43ff6822 100644 --- a/UefiCpuPkg/UefiCpuPkg.dsc +++ b/UefiCpuPkg/UefiCpuPkg.dsc @@ -2,6 +2,7 @@ # UefiCpuPkg Package=0D #=0D # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
= =0D +# Copyright (c) 2022 Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -23,7 +24,7 @@ =0D !include MdePkg/MdeLibs.dsc.inc=0D =0D -[LibraryClasses]=0D +[LibraryClasses.common]=0D BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf=0D @@ -31,9 +32,7 @@ SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull= .inf=0D DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf=0D DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf=0D - UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf=0D IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf=0D - MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf=0D PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D UefiLib|MdePkg/Library/UefiLib/UefiLib.inf=0D @@ -47,48 +46,56 @@ PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibN= ull.inf=0D TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplat= e.inf=0D DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.i= nf=0D - LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepor= tStatusCodeLibNull.inf=0D SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniza= tionLib.inf=0D SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf=0D CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMain= tenanceLib.inf=0D PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf=0D PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf=0D - SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCp= uPlatformHookLibNull.inf=0D - SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib= .inf=0D PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf=0D PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf=0D TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf=0D +=0D +[LibraryClasses.IA32, LibraryClasses.X64]=0D + UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf=0D + MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf=0D + LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.in= f=0D + SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCp= uPlatformHookLibNull.inf=0D + SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib= .inf=0D VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf=0D MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf=0D SmmCpuRendezvousLib|UefiCpuPkg/Library/SmmCpuRendezvousLib/SmmCpuRendezv= ousLib.inf=0D =0D [LibraryClasses.common.SEC]=0D + HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D + MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D +=0D +[LibraryClasses.IA32.SEC, LibraryClasses.X64.SEC]=0D PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.= inf=0D !if $(TOOL_CHAIN_TAG) =3D=3D "XCODE5"=0D CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5S= ecPeiCpuExceptionHandlerLib.inf=0D !else=0D CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf=0D !endif=0D - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/= PeiServicesTablePointerLibIdt.inf=0D - MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D =0D [LibraryClasses.common.PEIM]=0D MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAlloc= ationLib.inf=0D HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf=0D LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf=0D - MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf=0D - RegisterCpuFeaturesLib|UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegi= sterCpuFeaturesLib.inf=0D - CpuCacheInfoLib|UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.in= f=0D =0D [LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM]=0D PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/= PeiServicesTablePointerLibIdt.inf=0D CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuE= xceptionHandlerLib.inf=0D + MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf=0D + RegisterCpuFeaturesLib|UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegi= sterCpuFeaturesLib.inf=0D + CpuCacheInfoLib|UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.in= f=0D =0D [LibraryClasses.common.DXE_DRIVER]=0D MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D +=0D +[LibraryClasses.IA32.DXE_DRIVER, LibraryClasses.X64.DXE_DRIVER]=0D CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuE= xceptionHandlerLib.inf=0D MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf=0D RegisterCpuFeaturesLib|UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegi= sterCpuFeaturesLib.inf=0D @@ -99,6 +106,8 @@ MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.= inf=0D MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAlloc= ationLib.inf=0D HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf=0D +=0D +[LibraryClasses.IA32.DXE_SMM_DRIVER, LibraryClasses.X64.DXE_SMM_DRIVER]=0D CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuE= xceptionHandlerLib.inf=0D =0D [LibraryClasses.common.MM_STANDALONE]=0D @@ -112,7 +121,7 @@ # Drivers/Libraries within this package=0D #=0D =0D -[Components]=0D +[Components.IA32, Components.X64]=0D UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D UefiCpuPkg/CpuIoPei/CpuIoPei.inf=0D UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf= =0D @@ -122,7 +131,6 @@ UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf=0D UefiCpuPkg/MicrocodeMeasurementDxe/MicrocodeMeasurementDxe.inf=0D =0D -[Components.IA32, Components.X64]=0D UefiCpuPkg/CpuDxe/CpuDxe.inf=0D UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf {=0D =0D --=20 2.31.1