This driver provides EFI_SMM_CPU_IO2_PROTOCOL, which the SMM core depends on in its gEfiDxeSmmReadyToLockProtocolGuid callback (SmmReadyToLockHandler(), "MdeModulePkg/Core/PiSmmCore/PiSmmCore.c").
Approached on a higher level, this driver provides the SmmIo member of the EFI_SMM_SYSTEM_TABLE2 (SMST). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <ler...@redhat.com> --- OvmfPkg/OvmfPkgIa32.dsc | 11 +++++++++++ OvmfPkg/OvmfPkgIa32X64.dsc | 11 +++++++++++ OvmfPkg/OvmfPkgX64.dsc | 11 +++++++++++ OvmfPkg/OvmfPkgIa32.fdf | 9 +++++++++ OvmfPkg/OvmfPkgIa32X64.fdf | 9 +++++++++ OvmfPkg/OvmfPkgX64.fdf | 9 +++++++++ 6 files changed, 60 insertions(+) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 1d918eb..0aae66d 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -292,6 +292,12 @@ [LibraryClasses.common.UEFI_APPLICATION] [LibraryClasses.common.DXE_SMM_DRIVER] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf + SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf +!ifdef $(DEBUG_ON_SERIAL_PORT) + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +!else + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf +!endif [LibraryClasses.common.SMM_CORE] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -696,4 +702,9 @@ [Components] # SMM_CORE # MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + + # + # Privileged drivers (DXE_SMM_DRIVER modules) + # + UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index ac89bf6..e811b9d 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -297,6 +297,12 @@ [LibraryClasses.common.UEFI_APPLICATION] [LibraryClasses.common.DXE_SMM_DRIVER] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf + SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf +!ifdef $(DEBUG_ON_SERIAL_PORT) + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +!else + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf +!endif [LibraryClasses.common.SMM_CORE] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -703,4 +709,9 @@ [Components.X64] # SMM_CORE # MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + + # + # Privileged drivers (DXE_SMM_DRIVER modules) + # + UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 9de84bd..ca227ed 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -297,6 +297,12 @@ [LibraryClasses.common.UEFI_APPLICATION] [LibraryClasses.common.DXE_SMM_DRIVER] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf TimerLib|OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf + SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf +!ifdef $(DEBUG_ON_SERIAL_PORT) + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf +!else + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf +!endif [LibraryClasses.common.SMM_CORE] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf @@ -701,4 +707,9 @@ [Components] # SMM_CORE # MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf + + # + # Privileged drivers (DXE_SMM_DRIVER modules) + # + UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index f705918..e908198 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -360,6 +360,7 @@ [FV.DXEFV] INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf +INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif ################################################################################ @@ -495,3 +496,11 @@ [Rule.Common.SMM_CORE] UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } + +[Rule.Common.DXE_SMM_DRIVER] + FILE SMM = $(NAMED_GUID) { + SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 93a8d44..5300a71 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -360,6 +360,7 @@ [FV.DXEFV] INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf +INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif ################################################################################ @@ -495,3 +496,11 @@ [Rule.Common.SMM_CORE] UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } + +[Rule.Common.DXE_SMM_DRIVER] + FILE SMM = $(NAMED_GUID) { + SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 3c24aed..94a77d6 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -360,6 +360,7 @@ [FV.DXEFV] INF OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf +INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf !endif ################################################################################ @@ -495,3 +496,11 @@ [Rule.Common.SMM_CORE] UI STRING="$(MODULE_NAME)" Optional VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) } + +[Rule.Common.DXE_SMM_DRIVER] + FILE SMM = $(NAMED_GUID) { + SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING="$(MODULE_NAME)" Optional + VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER) + } -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel