From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web12.2452.1648192607246040730 for ; Fri, 25 Mar 2022 00:16:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=MxDXAQ4s; 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.143.35, mailfrom: prvs=0083f32eee=abner.chang@hpe.com) Received: from pps.filterd (m0134424.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22P6QtEP032524; Fri, 25 Mar 2022 07:16:44 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=MxDXAQ4soulhERnw7lUlj4iYAwh1MEwCA1EHOTuhlsnGt6CpfP+D1Y/enGg8gkccLz48 aHhTmrXZewjJrkSTqfx7gu+bl6oBIWkTzWMG5YG/YV7Bwmspi6gI0Dd6N+3LKaEs5eEV vSH8XQFeMIY224/rWCOo3jgp+ZVLL37GvbpMs/wDvWVe8+kXZ98MNoFCRwjHpHyl9UkL h+RlO4S4tQGQSSIuPloWV1RUAQ1LdOmY5LQD5SZpN23qNcutVk8/5MCFqrXEHmcskjkj yeCiPiEYgG1/CI9bt2EC84EKsoEzuNMD2+Sj7R95gQo8SrXicFisgqDcDR7Rd9qmd/YQ vQ== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3f18fqrg93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Mar 2022 07:16:44 +0000 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 7DBF18D; Fri, 25 Mar 2022 07:16:43 +0000 (UTC) Received: from UB16Abner.asiapacific.hpqcorp.net (ub16abner.asiapacific.hpqcorp.net [15.119.209.229]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 48C8047; Fri, 25 Mar 2022 07:16:41 +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 V2 1/8] [RFC] UefiCpuPkg: Classify IA32/X64 modules in DSC file Date: Fri, 25 Mar 2022 14:12:42 +0800 Message-Id: <20220325061249.30626-2-abner.chang@hpe.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220325061249.30626-1-abner.chang@hpe.com> References: <20220325061249.30626-1-abner.chang@hpe.com> X-Proofpoint-GUID: Fv5EJw6ujvNij_P47GlmAIWFWaDwL4fF X-Proofpoint-ORIG-GUID: Fv5EJw6ujvNij_P47GlmAIWFWaDwL4fF 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-25_02,2022-03-24_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=910 clxscore=1015 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203250039 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