public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marvin Häuser" <Marvin.Haeuser@outlook.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "michael.d.kinney@intel.com" <michael.d.kinney@intel.com>,
	"liming.gao@intel.com" <liming.gao@intel.com>,
	"star.zeng@intel.com" <star.zeng@intel.com>,
	"eric.dong@intel.com" <eric.dong@intel.com>,
	"ruiyu.ni@intel.com" <ruiyu.ni@intel.com>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"kelly.steele@intel.com" <kelly.steele@intel.com>,
	"jordan.l.justen@intel.com" <jordan.l.justen@intel.com>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>
Subject: [PATCH 2/8] MdeModulePkg/SmmLockBoxPeiLib: Update MM PPI usages.
Date: Tue, 24 Jul 2018 01:40:35 +0000	[thread overview]
Message-ID: <VI1PR0801MB1790493145E8EAE76D3E44D480550@VI1PR0801MB1790.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <d625966ce7c0ac98b65f1e946b2cf833f6801706.1532395896.git.Marvin.Haeuser@outlook.com>

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.Haeuser@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



       reply	other threads:[~2018-07-24  1:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d625966ce7c0ac98b65f1e946b2cf833f6801706.1532395896.git.Marvin.Haeuser@outlook.com>
2018-07-24  1:40 ` Marvin Häuser [this message]
2018-07-24  1:40 ` [PATCH 3/8] UefiCpuPkg/PiSmmCommunicationPei: Update MM PPI usages Marvin Häuser
2018-07-24  1:40 ` [PATCH 4/8] UefiCpuPkg/S3Resume2Pei: " Marvin Häuser
2018-07-24  1:40 ` [PATCH 5/8] QuarkSocPkg/SmmAccessPei: " Marvin Häuser
2018-07-24  1:40 ` [PATCH 6/8] QuarkSocPkg/SmmControlPei: " Marvin Häuser
2018-07-24  1:40 ` [PATCH 7/8] OvmfPkg/SmmAccessPei: " Marvin Häuser
2018-07-24  9:20   ` Laszlo Ersek
2018-07-24 12:16     ` Marvin Häuser
2018-07-24 12:39       ` Laszlo Ersek
2018-07-24  1:40 ` [PATCH 8/8] MdeModulePkg: Deprecate Smm* PPIs Marvin Häuser
2018-07-24  6:38   ` Gao, Liming
2018-07-24 10:04     ` Zeng, Star
2018-07-24 10:28     ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR0801MB1790493145E8EAE76D3E44D480550@VI1PR0801MB1790.eurprd08.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox