Update all references to the SMM PPIs from MdeModulePkg to rather use MdePkg's MM PPI declarations.
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser <marvin.haeu...@outlook.com> --- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c | 52 ++++++++++---------- MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf | 4 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c index 8a168663c4af..a0f3ab9e76c6 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c @@ -25,8 +25,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/DebugLib.h> #include <Library/PcdLib.h> #include <Protocol/SmmCommunication.h> -#include <Ppi/SmmCommunication.h> -#include <Ppi/SmmAccess.h> +#include <Ppi/MmCommunication.h> +#include <Ppi/MmAccess.h> #include <Guid/AcpiS3Context.h> #include <Guid/SmmLockBox.h> @@ -249,7 +249,7 @@ InternalRestoreLockBoxFromSmram ( IN OUT UINTN *Length OPTIONAL ) { - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; EFI_STATUS Status; SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext; @@ -261,14 +261,14 @@ InternalRestoreLockBoxFromSmram ( // Get needed resource // Status = PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (!EFI_ERROR (Status)) { for (Index = 0; !EFI_ERROR (Status); Index++) { - Status = SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index); + Status = MmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), MmAccess, Index); } } @@ -350,7 +350,7 @@ InternalRestoreAllLockBoxInPlaceFromSmram ( VOID ) { - PEI_SMM_ACCESS_PPI *SmmAccess; + EFI_PEI_MM_ACCESS_PPI *MmAccess; UINTN Index; EFI_STATUS Status; SMM_LOCK_BOX_CONTEXT *SmmLockBoxContext; @@ -362,14 +362,14 @@ InternalRestoreAllLockBoxInPlaceFromSmram ( // Get needed resource // Status = PeiServicesLocatePpi ( - &gPeiSmmAccessPpiGuid, + &gEfiPeiMmAccessPpiGuid, 0, NULL, - (VOID **)&SmmAccess + (VOID **)&MmAccess ); if (!EFI_ERROR (Status)) { for (Index = 0; !EFI_ERROR (Status); Index++) { - Status = SmmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), SmmAccess, Index); + Status = MmAccess->Open ((EFI_PEI_SERVICES **)GetPeiServicesTablePointer (), MmAccess, Index); } } @@ -526,7 +526,7 @@ RestoreLockBox ( ) { EFI_STATUS Status; - EFI_PEI_SMM_COMMUNICATION_PPI *SmmCommunicationPpi; + EFI_PEI_MM_COMMUNICATION_PPI *MmCommunicationPpi; EFI_SMM_LOCK_BOX_PARAMETER_RESTORE *LockBoxParameterRestore; EFI_SMM_COMMUNICATE_HEADER *CommHeader; UINT8 CommBuffer[sizeof(EFI_GUID) + sizeof(UINT64) + sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE)]; @@ -557,10 +557,10 @@ RestoreLockBox ( // Get needed resource // Status = PeiServicesLocatePpi ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, 0, NULL, - (VOID **)&SmmCommunicationPpi + (VOID **)&MmCommunicationPpi ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_INFO, "SmmLockBoxPeiLib LocatePpi - (%r)\n", Status)); @@ -607,11 +607,11 @@ RestoreLockBox ( // Send command // CommSize = sizeof(CommBuffer); - Status = SmmCommunicationPpi->Communicate ( - SmmCommunicationPpi, - &CommBuffer[0], - &CommSize - ); + Status = MmCommunicationPpi->Communicate ( + MmCommunicationPpi, + &CommBuffer[0], + &CommSize + ); if (Status == EFI_NOT_STARTED) { // // Pei SMM communication not ready yet, so we access SMRAM directly @@ -657,7 +657,7 @@ RestoreAllLockBoxInPlace ( ) { EFI_STATUS Status; - EFI_PEI_SMM_COMMUNICATION_PPI *SmmCommunicationPpi; + EFI_PEI_MM_COMMUNICATION_PPI *MmCommunicationPpi; EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE *LockBoxParameterRestoreAllInPlace; EFI_SMM_COMMUNICATE_HEADER *CommHeader; UINT8 CommBuffer[sizeof(EFI_GUID) + sizeof(UINT64) + sizeof(EFI_SMM_LOCK_BOX_PARAMETER_RESTORE_ALL_IN_PLACE)]; @@ -679,10 +679,10 @@ RestoreAllLockBoxInPlace ( // Get needed resource // Status = PeiServicesLocatePpi ( - &gEfiPeiSmmCommunicationPpiGuid, + &gEfiPeiMmCommunicationPpiGuid, 0, NULL, - (VOID **)&SmmCommunicationPpi + (VOID **)&MmCommunicationPpi ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_INFO, "SmmLockBoxPeiLib LocatePpi - (%r)\n", Status)); @@ -716,11 +716,11 @@ RestoreAllLockBoxInPlace ( // Send command // CommSize = sizeof(CommBuffer); - Status = SmmCommunicationPpi->Communicate ( - SmmCommunicationPpi, - &CommBuffer[0], - &CommSize - ); + Status = MmCommunicationPpi->Communicate ( + MmCommunicationPpi, + &CommBuffer[0], + &CommSize + ); if (Status == EFI_NOT_STARTED) { // // Pei SMM communication not ready yet, so we access SMRAM directly diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf index 093957ec0adf..ab093a4b255c 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -55,5 +55,5 @@ [Guids] gEfiAcpiVariableGuid ## SOMETIMES_CONSUMES ## HOB [Ppis] - gEfiPeiSmmCommunicationPpiGuid ## CONSUMES - gPeiSmmAccessPpiGuid ## SOMETIMES_CONSUMES + gEfiPeiMmCommunicationPpiGuid ## CONSUMES + gEfiPeiMmAccessPpiGuid ## SOMETIMES_CONSUMES -- 2.18.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel