From fcfca140f59e7351b484bcad5bf74dba23f48523 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Sat, 22 Jun 2024 14:11:19 +0800 Subject: [PATCH] Platform/Intel: Include required StandaloneMm modules Include required StandaloneMm Drivers and Libs under PcdStandaloneMmEnable PCD. Change the PcdStandaloneMmEnable to TRUE to enable the MM on QSP. Signed-off-by: Jiaxin Wu --- .../Include/Dsc/CoreCommonLib.dsc | 2 +- .../Include/Dsc/CoreDxeInclude.dsc | 64 +++++++++++++------ .../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 31 ++++++++- .../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 7 +- .../Include/Fdf/CoreOsBootInclude.fdf | 48 +++++++++----- .../Include/Fdf/CoreSecurityLateInclude.fdf | 14 ++-- .../Intel/MinPlatformPkg/MinPlatformPkg.dsc | 1 + .../BoardX58Ich10/OpenBoardPkg.dsc | 43 +++++++++---- .../BoardX58Ich10/OpenBoardPkg.fdf | 12 +++- .../BoardX58Ich10/OpenBoardPkgPcd.dsc | 4 +- 10 files changed, 169 insertions(+), 57 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc index 790fccf4009..780e2c27b93 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc @@ -112,7 +112,7 @@ # # Platform # - TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf + TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf # # Misc diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc index 600a9565370..1641d7eec51 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc @@ -40,14 +40,25 @@ # # Real variables for stages 5+ # - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf { + + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandaloneMm.inf + } + + !else + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { + + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf + NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf + } + !endif + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { - - NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf - NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf - NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf - } MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf @@ -126,21 +137,33 @@ PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } - MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf - MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf + StandaloneMmPkg/Core/StandaloneMmCore.inf { + + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + HobPrintLib|MdeModulePkg/Library/HobPrintLib/HobPrintLib.inf + } + + MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterStandaloneMm.inf + MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandaloneMm.inf + UefiCpuPkg/CpuIo2Smm/CpuIo2StandaloneMm.inf + MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceStandaloneMm.inf + !else + MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf + MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + + MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf + MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf + UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf + MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf + MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf + !endif - MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf - MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf - - #UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf - - UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf - MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf - MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf !if gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE @@ -155,7 +178,12 @@ NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf } - SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + SecurityPkg/Tcg/Tcg2Smm/Tcg2StandaloneMm.inf + !else + SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf + !endif + SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf !endif diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc index 3b9cf101f18..a18a2a1bb0a 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc @@ -24,7 +24,11 @@ HstiLib|MdePkg/Library/DxeHstiLib/DxeHstiLib.inf - LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf + !else + LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf + !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf @@ -93,6 +97,31 @@ VariableReadLib|MinPlatformPkg/Library/SmmVariableReadLib/TraditionalMmVariableReadLib.inf VariableWriteLib|MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmVariableWriteLib.inf +[LibraryClasses.common.MM_STANDALONE] + MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf + ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportStatusCodeLib.inf + HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf + StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf + MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm.inf + SmmCpuPlatformHookLib|UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.inf + MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/IntelMmSaveStateLib.inf + SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneMmCpuFeaturesLib.inf + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf + CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf + +[LibraryClasses.common.MM_CORE_STANDALONE] + HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf + ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/StandaloneMmReportStatusCodeLib.inf + ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf + FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf + MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMmCoreMemoryAllocationLib.inf + MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf + StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf + MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf + [LibraryClasses.common.SMM_CORE] MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc index b5d5d009318..bd16a9e1cd1 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc @@ -28,7 +28,11 @@ ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibBase.inf - LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf + !else + LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf + !endif CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE @@ -64,3 +68,4 @@ SmmRelocationLib|UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf SmmControlLib|IntelSiliconPkg/Feature/SmmControl/Library/PeiSmmControlLib/PeiSmmControlLib.inf + MmUnblockMemoryLib|UefiCpuPkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLib.inf diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreOsBootInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreOsBootInclude.fdf index 64bfcd9745c..f6612f9e81f 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreOsBootInclude.fdf +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreOsBootInclude.fdf @@ -8,26 +8,44 @@ ## !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE -INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf -INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf -INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf + !else + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf + !endif !endif !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE -INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf -INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf -INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf -INF MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf -#INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf -INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf -INF MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf -INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf + INF MdeModulePkg/Universal/SmmCommunicationBufferDxe/SmmCommunicationBufferDxe.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + INF StandaloneMmPkg/Core/StandaloneMmCore.inf + INF StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.inf + + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterStandaloneMm.inf + INF MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerStandaloneMm.inf + INF UefiCpuPkg/CpuIo2Smm/CpuIo2StandaloneMm.inf + !else + INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf + INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + + INF MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf + INF MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf + INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf + INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf + !endif !endif !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE -INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf -INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf -INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf -INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf + INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf + INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceStandaloneMm.inf + !else + INF MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf + !endif !endif diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf index 3edc878e173..6d3e6fadeec 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf +++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CoreSecurityLateInclude.fdf @@ -12,9 +12,13 @@ INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.i !endif !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable == TRUE -INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf -INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf -INF SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf -INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf -INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf + INF SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf + INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf + INF RuleOverride = DRIVER_ACPITABLE SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.inf + INF SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + INF SecurityPkg/Tcg/Tcg2Smm/Tcg2StandaloneMm.inf + !else + INF SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf + !endif !endif diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc index 405a3afb01e..7ff85ddf1c5 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -97,6 +97,7 @@ TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf + MmUnblockMemoryLib|UefiCpuPkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLib.inf [LibraryClasses.common.DXE_DRIVER] # diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 164e5eca2da..2880e4743b5 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -100,6 +100,7 @@ CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf + StandaloneMmMemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf ##################################### # Platform Package @@ -168,7 +169,7 @@ BoardBdsHookLib|$(BOARD_PKG)/Library/BoardBdsHookLib/BoardBdsHookLib.inf BoardBootManagerLib|$(BOARD_PKG)/Library/BoardBootManagerLib/BoardBootManagerLib.inf -[LibraryClasses.common.DXE_SMM_DRIVER] +[LibraryClasses.common.DXE_SMM_DRIVER, LibraryClasses.common.MM_STANDALONE] ####################################### # Silicon Initialization Package ####################################### @@ -183,10 +184,7 @@ ####################################### # S3 SMM driver # @todo: UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf - UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf { - - LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf - } + UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf ####################################### # Silicon Initialization Package @@ -248,9 +246,20 @@ MdeModulePkg/Universal/PrintDxe/PrintDxe.inf !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.inf + !else + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf + !endif !endif UefiCpuPkg/CpuDxe/CpuDxe.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf { + + NULL|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf + NULL|StandaloneMmPkg/Library/SmmLockBoxMmDependency/SmmLockBoxMmDependency.inf + } + !endif ShellPkg/Application/Shell/Shell.inf { @@ -283,18 +292,26 @@ # Silicon Initialization Package ####################################### SimicsIch10BinPkg/UndiBinary/UndiDxe.inf -!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE - $(PCH_PKG)/SmmControl/RuntimeDxe/SmmControl2Dxe.inf - $(PCH_PKG)/Spi/Smm/PchSpiSmm.inf - IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccess.inf - IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf -!endif + !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE + $(PCH_PKG)/SmmControl/RuntimeDxe/SmmControl2Dxe.inf + IntelSiliconPkg/Feature/SmmAccess/SmmAccessDxe/SmmAccess.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + $(PCH_PKG)/Spi/Smm/PchSpiStandaloneMm.inf + IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf + !else + $(PCH_PKG)/Spi/Smm/PchSpiSmm.inf + IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf + !endif + !endif ##################################### # Platform Package ##################################### $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitDxe/PlatformInitDxe.inf - $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf + !if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + !else + $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf + !endif ####################################### # Board Package diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf index ceace433a69..3db28d86865 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf @@ -204,7 +204,6 @@ INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf -INF IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf INF BoardModulePkg/LegacySioDxe/LegacySioDxe.inf INF BoardModulePkg/BoardBdsHookDxe/BoardBdsHookDxe.inf @@ -219,9 +218,18 @@ INF RuleOverride=ACPITABLE $(BOARD_PKG)/AcpiTables/AcpiTables.inf INF $(BOARD_PKG)/SimicsVideoDxe/SimicsVideoDxe.inf INF MinPlatformPkg/PlatformInit/PlatformInitDxe/PlatformInitDxe.inf -INF MinPlatformPkg/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf INF $(BOARD_PKG)/SimicsDxe/SimicsDxe.inf +!if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE + #INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.inf + INF StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf + INF IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceStandaloneMm.inf +!else + #INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf + INF IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf + INF MinPlatformPkg/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf +!endif + FILE FREEFORM = 7BB28B99-61BB-11D5-9A5D-0090273FC14D { SECTION RAW = $(BOARD_PKG)/Logo/Logo.bmp } diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc index df588fb0319..0dcc5b99f0d 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc @@ -46,7 +46,7 @@ gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE gUefiCpuPkgTokenSpaceGuid.PcdSmmFeatureControlEnable|FALSE gUefiCpuPkgTokenSpaceGuid.PcdSmrrEnable|TRUE - gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable|FALSE + gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable|TRUE ###################################### # Platform Configuration @@ -78,7 +78,9 @@ gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable|TRUE gMinPlatformPkgTokenSpaceGuid.PcdSerialTerminalEnable|TRUE +!if gMinPlatformPkgTokenSpaceGuid.PcdStandaloneMmEnable == TRUE gStandaloneMmPkgTokenSpaceGuid.PcdRestartMmDispatcherOnceMmEntryRegistered|TRUE +!endif [PcdsFeatureFlag.X64] ######################################