From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.17690.1656540729615814448 for ; Wed, 29 Jun 2022 15:12:10 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dve0r9ZN; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656540730; x=1688076730; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0GxSKhFFj10PBZ2AzJSD5dN/V9wStZfn8lB6wP4V1kg=; b=dve0r9ZNkFEdWDT9GVj42jroa4lUe7eBxCe6MAWVptVFoGAj7RQI1vrp 5lspcHOPMUL2A++gZamo62QGmyibC7a1BKvRXpfvlWH2d+sVyAr7Lc/+v kCw3r32znPryc4VGW9Aax3uEnhw22NoaLCnAOrNYVKrN0dWKV2Yg1ZIM3 ddxIsRxZwVg4XCnwMdR8YPZ/wRd0XxHGfzK/E46+CemRVln3QvxqriUJv 36LD0ZbnlSGsXTS5sgEdusfmhcMd8+EIqquYYcPrS5M3LmQW+3JcyhC2k NfpssCWUKihke8MgT7RWCUmvJ1VCGuuNP+GLGOA0XCwTXxescJS0w3Bt+ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="262578739" X-IronPort-AV: E=Sophos;i="5.92,232,1650956400"; d="scan'208";a="262578739" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 15:11:48 -0700 X-IronPort-AV: E=Sophos;i="5.92,232,1650956400"; d="scan'208";a="767768826" Received: from iworam-desk.amr.corp.intel.com ([10.24.80.243]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 15:11:48 -0700 From: "Oram, Isaac W" To: devel@edk2.groups.io Cc: Isaac Oram , Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel][edk2-platforms][PATCH V1 2/2] MinPlatformPkg/Build: Reduce duplication Date: Wed, 29 Jun 2022 15:11:38 -0700 Message-Id: <31499f57e5001e64fe2f54f9cae90bbc6aa4e984.1656539669.git.isaac.w.oram@intel.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Removed needless duplication between sections. Addes spaces after commas. Remove commented out code. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram --- .../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 55 +++++-------------- .../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 29 +++------- 2 files changed, 20 insertions(+), 64 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc index 9b3095d662..6a4d586ddf 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc @@ -8,14 +8,14 @@ ## - # - # Generic EDKII Lib - # +# +# Generic EDKII Lib +# - # - # DXE phase common - # -[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION] +# +# DXE phase common +# +[LibraryClasses.common.DXE_CORE, LibraryClasses.common.DXE_SMM_DRIVER, LibraryClasses.common.SMM_CORE, LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf @@ -32,14 +32,8 @@ FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf -!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE - PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf -!endif - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/DxeTcg2PhysicalPresenceLib.inf @@ -50,6 +44,9 @@ VariableReadLib|MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRuntimeVariableReadLib.inf VariableWriteLib|MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRuntimeVariableWriteLib.inf +[LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION] + PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf + [LibraryClasses.common.DXE_CORE, LibraryClasses.common.SMM_CORE] !if $(TARGET) != RELEASE DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf @@ -62,21 +59,15 @@ !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf -!endif !endif +[LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.UEFI_DRIVER] + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf + [LibraryClasses.common.DXE_DRIVER] - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf TpmPlatformHierarchyLib|MinPlatformPkg/Tcg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - -[LibraryClasses.common.UEFI_DRIVER] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf -# PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf [LibraryClasses.common.DXE_SMM_DRIVER] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf @@ -87,7 +78,6 @@ !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE PerformanceLib|MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf !endif SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf @@ -100,8 +90,6 @@ VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf [LibraryClasses.common.SMM_CORE] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf @@ -109,31 +97,14 @@ !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE PerformanceLib|MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf -!endif !endif [LibraryClasses.common.DXE_RUNTIME_DRIVER] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf -!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE - PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf -!endif BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf -[LibraryClasses.common.UEFI_DRIVER] - Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf - [LibraryClasses.common.UEFI_APPLICATION] - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf - #PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf - -!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE - PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf -!endif diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc index 1bf8338f95..8e91dba6ac 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc @@ -15,7 +15,12 @@ # PEI phase common # -[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM] +[LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE] +!if $(TARGET) != RELEASE + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +!endif + +[LibraryClasses.common.SEC, LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM] S3BootScriptLib|MdePkg/Library/BaseS3BootScriptLibNull/BaseS3BootScriptLibNull.inf PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf @@ -25,39 +30,22 @@ LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf - !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf !endif TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf - VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf [LibraryClasses.common.SEC] ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf - CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf -!if $(TARGET) != RELEASE - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!endif PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf VariableReadLib|MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVariableReadLibNull.inf -[LibraryClasses.common.PEI_CORE] +[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM] TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/PeiAcpiTimerLib.inf - CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf -!if $(TARGET) != RELEASE - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!endif - -!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE - PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf -!endif [LibraryClasses.common.PEIM] - CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/PeiAcpiTimerLib.inf - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf @@ -69,7 +57,4 @@ TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLogRecordLib.inf TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmMeasurementLib.inf -!if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE - PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf -!endif VariableReadLib|MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableReadLib.inf -- 2.36.1.windows.1