mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
OvmfPkg: pull in the SMM IPL and SMM core
"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
This commit is contained in:
parent
c40e1a0cc6
commit
f25cb158ea
@ -295,6 +295,17 @@
|
|||||||
[LibraryClasses.common.SMM_CORE]
|
[LibraryClasses.common.SMM_CORE]
|
||||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
||||||
|
SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
||||||
|
MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
|
||||||
|
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
|
||||||
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
|
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
||||||
|
SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
|
||||||
|
!ifdef $(DEBUG_ON_SERIAL_PORT)
|
||||||
|
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||||
|
!else
|
||||||
|
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
|
||||||
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@ -646,4 +657,14 @@
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM Initial Program Load (a DXE_RUNTIME_DRIVER)
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM_CORE
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
@ -358,6 +358,8 @@ INF OvmfPkg/PlatformDxe/Platform.inf
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -486,3 +488,10 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
|||||||
FILE RAW = $(NAMED_GUID) {
|
FILE RAW = $(NAMED_GUID) {
|
||||||
RAW BIN Align = 16 |.bin
|
RAW BIN Align = 16 |.bin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Rule.Common.SMM_CORE]
|
||||||
|
FILE SMM_CORE = $(NAMED_GUID) {
|
||||||
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
||||||
|
UI STRING="$(MODULE_NAME)" Optional
|
||||||
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
||||||
|
}
|
||||||
|
@ -300,6 +300,17 @@
|
|||||||
[LibraryClasses.common.SMM_CORE]
|
[LibraryClasses.common.SMM_CORE]
|
||||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
||||||
|
SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
||||||
|
MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
|
||||||
|
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
|
||||||
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
|
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
||||||
|
SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
|
||||||
|
!ifdef $(DEBUG_ON_SERIAL_PORT)
|
||||||
|
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||||
|
!else
|
||||||
|
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
|
||||||
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@ -653,4 +664,14 @@
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM Initial Program Load (a DXE_RUNTIME_DRIVER)
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM_CORE
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
@ -358,6 +358,8 @@ INF OvmfPkg/PlatformDxe/Platform.inf
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -486,3 +488,10 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
|||||||
FILE RAW = $(NAMED_GUID) {
|
FILE RAW = $(NAMED_GUID) {
|
||||||
RAW BIN Align = 16 |.bin
|
RAW BIN Align = 16 |.bin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Rule.Common.SMM_CORE]
|
||||||
|
FILE SMM_CORE = $(NAMED_GUID) {
|
||||||
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
||||||
|
UI STRING="$(MODULE_NAME)" Optional
|
||||||
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
||||||
|
}
|
||||||
|
@ -300,6 +300,17 @@
|
|||||||
[LibraryClasses.common.SMM_CORE]
|
[LibraryClasses.common.SMM_CORE]
|
||||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||||
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
|
||||||
|
SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
||||||
|
MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
|
||||||
|
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
|
||||||
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||||
|
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
||||||
|
SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
|
||||||
|
!ifdef $(DEBUG_ON_SERIAL_PORT)
|
||||||
|
DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
|
||||||
|
!else
|
||||||
|
DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
|
||||||
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
@ -651,4 +662,14 @@
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM Initial Program Load (a DXE_RUNTIME_DRIVER)
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
|
||||||
|
#
|
||||||
|
# SMM_CORE
|
||||||
|
#
|
||||||
|
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
@ -358,6 +358,8 @@ INF OvmfPkg/PlatformDxe/Platform.inf
|
|||||||
!if $(SMM_REQUIRE) == TRUE
|
!if $(SMM_REQUIRE) == TRUE
|
||||||
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
INF OvmfPkg/SmmAccess/SmmAccess2Dxe.inf
|
||||||
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
||||||
|
INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -486,3 +488,10 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
|||||||
FILE RAW = $(NAMED_GUID) {
|
FILE RAW = $(NAMED_GUID) {
|
||||||
RAW BIN Align = 16 |.bin
|
RAW BIN Align = 16 |.bin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Rule.Common.SMM_CORE]
|
||||||
|
FILE SMM_CORE = $(NAMED_GUID) {
|
||||||
|
PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
||||||
|
UI STRING="$(MODULE_NAME)" Optional
|
||||||
|
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user