Re: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove S3 requirement

Michael Kubacki

Installation is a platform decision. The buried dependency on boot mode in this particular function is just a roadblock platforms have to work around. The role of this API is to install the PPI.


On 8/9/2021 9:47 PM, Ni, Ray wrote:
Allowing the gPeiSmmAccessPpiGuid PPI installation in normal boot will further allow gEfiPeiSmmCommunicationPpiGuid
installation in normal path, while without your change neither of the PPIs is installed in normal boot.
+ Jiewen for potential security concern.

-----Original Message-----
From: Chaganty, Rangasai V <rangasai.v.chaganty@...>
Sent: Tuesday, August 10, 2021 6:46 AM
To: mikuback@...;
Cc: Ni, Ray <>
Subject: RE: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove S3 requirement

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@...>

-----Original Message-----
From: mikuback@... <mikuback@...>
Sent: Monday, August 09, 2021 6:40 AM
Cc: Ni, Ray <>; Chaganty, Rangasai V <rangasai.v.chaganty@...>
Subject: [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove S3 requirement

From: Michael Kubacki <michael.kubacki@...>


PeiInstallSmmAccessPpi() currently requires the boot mode be set to S3 to actually install gEfiPeiMmAccessPpiGuid.

This change removes this requirement in the function implementation for two reasons:

1. Practical use cases exist to require this PPI in cases other than
the boot mode being set to BOOT_ON_S3_RESUME.

2. It is poor API design to implicitly bury this requirement within
a function whose responsibility is to install the PPI. The caller
can easily place arbitrary constraints around whether to call
based on conditions such as the boot mode being

Cc: Ray Ni <>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c
index d9bf4fba983e..4df0d695fdaf 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAcce
+++ ssLib/PeiSmmAccessLib.c
@@ -252,19 +252,7 @@ PeiInstallSmmAccessPpi (
VOID *HobList;

- Status = PeiServicesGetBootMode (&BootMode);
- if (EFI_ERROR (Status)) {
- //
- // If not in S3 boot path. do nothing
- //
- return EFI_SUCCESS;
- }
- if (BootMode != BOOT_ON_S3_RESUME) {
- return EFI_SUCCESS;
- }
// Initialize private data

Join to automatically receive all group messages.