This series patches are generate to meet Microsoft WSMT table definition on FIXED_COMM_BUFFERS requirement.
Before this series patches, the DXE or OS module can use any non-SMM memory as communication buffer to exchange data with SMM agent. Microsoft WSMT table has requirement to support fixed communication buffer - so that SMM agent can only support communication buffer with type EfiReservedMemoryType/ EfiRuntimeServicesCode/EfiRuntimeServicesData/EfiACPIMemoryNVS, which will not be used by OS during runtime. So we clean up all SMM handler to only use these memory regions for SMM communication, and enhance check in SmmMemLib to catch the violation. This series patches are validated on real platforms with SMM enabled. This series patches are validated on OVMF ia32-x64 with SMM enabled. Cc: "Gao, Liming" <[email protected]> Cc: "Tian, Feng" <[email protected]> Cc: "Zeng, Star" <[email protected]> Cc: "Dong, Eric" <[email protected]> Cc: "Laszlo Ersek" <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <[email protected]> Reviewed-by: "Tian, Feng" <[email protected]> Reviewed-by: "Gao, Liming" <[email protected]> Jiewen Yao (12): MdeModulePkg: Add EDKII_PI_SMM_COMMUNICATION_REGION_TABLE definition. MdeModulePkg: Add new driver to publish EDKII_PI_SMM_COMMUNICATION_REGION_TABLE. MdeModulePkg-MemoryProfile(1): Add SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET definition. MdeModulePkg-MemoryProfile(2): Add SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET in PiSmmCore. MdeModulePkg-MemoryProfile(3): Use SMRAM_PROFILE_COMMAND_GET_PROFILE_DATA_BY_OFFSET in MemoryProfileInfo. MdeModulePkg-FPDT(1): Add SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET definition. MdeModulePkg-FPDT(2): Add SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET in FpdtSmm Handler. MdeModulePkg-FPDT(3): Use SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET in FpdtDxe. MdeModulePkg-FPDT(4): Use SMM_FPDT_FUNCTION_GET_BOOT_RECORD_DATA_BY_OFFSET in PerfLib. SecurityPkg-Opal(1): Use fixed SMM communication buffer in OPAL password lib. SecurityPkg-Opal(2): Enhance AHCI Bar MMIO region check. MdePkg-SmmMemLib: Enhance SmmIsBufferOutsideSmmValid() check for fixed comm buffer. .../MemoryProfileInfo/MemoryProfileInfo.c | 103 ++++++--- .../MemoryProfileInfo/MemoryProfileInfo.inf | 3 +- MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c | 247 +++++++++++++++++---- MdeModulePkg/Include/Guid/FirmwarePerformance.h | 8 +- MdeModulePkg/Include/Guid/MemoryProfile.h | 27 ++- .../Include/Guid/PiSmmCommunicationRegionTable.h | 63 ++++++ .../DxeSmmPerformanceLib/DxeSmmPerformanceLib.c | 154 ++++++++++--- .../DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf | 3 +- MdeModulePkg/MdeModulePkg.dec | 2 + MdeModulePkg/MdeModulePkg.dsc | 1 + .../FirmwarePerformanceDxe.c | 118 ++++++---- .../FirmwarePerformanceDxe.inf | 3 +- .../FirmwarePerformanceSmm.c | 63 +++--- .../SmmCommunicationBuffer.c | 99 +++++++++ .../SmmCommunicationBuffer.inf | 62 ++++++ .../SmmCommunicationBuffer.uni | Bin 0 -> 2794 bytes .../SmmCommunicationBufferExtra.uni | Bin 0 -> 1372 bytes MdePkg/Library/SmmMemLib/SmmMemLib.c | 180 ++++++++++++++- MdePkg/Library/SmmMemLib/SmmMemLib.inf | 6 +- .../OpalPasswordSupportLib.c | 32 ++- .../OpalPasswordSupportLib.inf | 4 + .../OpalPasswordSupportNotify.h | 2 +- .../Tcg/Opal/OpalPasswordSmm/OpalAhciMode.c | 30 ++- .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c | 51 +++++ .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.h | 5 +- .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.inf | 2 +- 26 files changed, 1071 insertions(+), 197 deletions(-) create mode 100644 MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h create mode 100644 MdeModulePkg/Universal/SmmCommunicationBuffer/SmmCommunicationBuffer.c create mode 100644 MdeModulePkg/Universal/SmmCommunicationBuffer/SmmCommunicationBuffer.inf create mode 100644 MdeModulePkg/Universal/SmmCommunicationBuffer/SmmCommunicationBuffer.uni create mode 100644 MdeModulePkg/Universal/SmmCommunicationBuffer/SmmCommunicationBufferExtra.uni -- 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

