"MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf" (a DXE_RUNTIME_DRIVER)
implements the SMM Initial Program Loader. It produces
EFI_SMM_BASE2_PROTOCOL and EFI_SMM_COMMUNICATION_PROTOCOL, relying on:
- EFI_SMM_ACCESS2_PROTOCOL
(provided by OvmfPkg/SmmAccess/SmmAccess2Dxe.inf),
- EFI_SMM_CONTROL2_PROTOCOL
(provided by OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf).
(The SMM IPL also depends on EFI_SMM_CONFIGURATION_PROTOCOL_GUID, but this
dependency is not enforced in the entry point. A protocol notify callback
is registered instead, hence we can delay providing that protocol via the
PiSmmCpuDxeSmm driver that is (to be) imported from UefiCpuPkg/.)
The SMM IPL loads the SMM core into SMRAM and executes it from there.
Therefore we add the SMM core to the build as well.
For the SMM core, a number of library classes need to be resolved.
Furthermore, each FDF file must provide the GenFds.py BaseTools utility
with a build rule for SMM_CORE; we copy the DXE_CORE's rule.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19043
6f19259b-4bc3-4df7-8a09-
765794883524
[LibraryClasses.common.SMM_CORE]\r
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+ SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf\r
+ MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf\r
+ ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+ SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
\r
################################################################################\r
#\r
!if $(SMM_REQUIRE) == TRUE\r
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+\r
+ #\r
+ # SMM Initial Program Load (a DXE_RUNTIME_DRIVER)\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+\r
+ #\r
+ # SMM_CORE\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
!if $(SMM_REQUIRE) == TRUE\r
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
\r
################################################################################\r
FILE RAW = $(NAMED_GUID) {\r
RAW BIN Align = 16 |.bin\r
}\r
+\r
+[Rule.Common.SMM_CORE]\r
+ FILE SMM_CORE = $(NAMED_GUID) {\r
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi\r
+ UI STRING="$(MODULE_NAME)" Optional\r
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
+ }\r
[LibraryClasses.common.SMM_CORE]\r
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+ SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf\r
+ MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf\r
+ ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+ SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
\r
################################################################################\r
#\r
!if $(SMM_REQUIRE) == TRUE\r
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+\r
+ #\r
+ # SMM Initial Program Load (a DXE_RUNTIME_DRIVER)\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+\r
+ #\r
+ # SMM_CORE\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
!if $(SMM_REQUIRE) == TRUE\r
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
\r
################################################################################\r
FILE RAW = $(NAMED_GUID) {\r
RAW BIN Align = 16 |.bin\r
}\r
+\r
+[Rule.Common.SMM_CORE]\r
+ FILE SMM_CORE = $(NAMED_GUID) {\r
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi\r
+ UI STRING="$(MODULE_NAME)" Optional\r
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
+ }\r
[LibraryClasses.common.SMM_CORE]\r
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf\r
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf\r
+ SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf\r
+ MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf\r
+ ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf\r
+ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
+ SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf\r
+ SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf\r
+!ifdef $(DEBUG_ON_SERIAL_PORT)\r
+ DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf\r
+!else\r
+ DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf\r
+!endif\r
\r
################################################################################\r
#\r
!if $(SMM_REQUIRE) == TRUE\r
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+\r
+ #\r
+ # SMM Initial Program Load (a DXE_RUNTIME_DRIVER)\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+\r
+ #\r
+ # SMM_CORE\r
+ #\r
+ MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
!if $(SMM_REQUIRE) == TRUE\r
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf\r
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf\r
+INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf\r
!endif\r
\r
################################################################################\r
FILE RAW = $(NAMED_GUID) {\r
RAW BIN Align = 16 |.bin\r
}\r
+\r
+[Rule.Common.SMM_CORE]\r
+ FILE SMM_CORE = $(NAMED_GUID) {\r
+ PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi\r
+ UI STRING="$(MODULE_NAME)" Optional\r
+ VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)\r
+ }\r