* [PATCH edk2-platforms 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove the S3 check
@ 2021-10-11 8:53 Guomin Jiang
0 siblings, 0 replies; only message in thread
From: Guomin Jiang @ 2021-10-11 8:53 UTC (permalink / raw)
To: devel; +Cc: Guomin Jiang, Ray Ni, Rangasai V Chaganty
Always install the SmmAccessPpi without checking S3 boot mode.
The caller can add the S3 check to decide if it is need to install the
Ppi
Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
---
.../PeiSmmAccessLib/PeiSmmAccessLib.inf | 40 ++++++++-----------
.../Library/PeiSmmAccessLib/PeiSmmAccessLib.c | 16 +-------
2 files changed, 19 insertions(+), 37 deletions(-)
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf
index 0c2411ea57c8..8cf6d7923398 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf
@@ -1,41 +1,35 @@
## @file
# Library description file for the SmmAccess
#
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
-
[Defines]
-INF_VERSION = 0x00010017
-BASE_NAME = PeiSmmAccessLib
-FILE_GUID = 54020881-B594-442A-8377-A57AFF98C7CF
-VERSION_STRING = 1.0
-MODULE_TYPE = PEIM
-LIBRARY_CLASS = SmmAccessLib
-
+ INF_VERSION = 0x00010017
+ BASE_NAME = PeiSmmAccessLib
+ FILE_GUID = 54020881-B594-442A-8377-A57AFF98C7CF
+ VERSION_STRING = 1.0
+ MODULE_TYPE = PEIM
+ LIBRARY_CLASS = SmmAccessLib
[LibraryClasses]
-BaseLib
-BaseMemoryLib
-HobLib
-PciSegmentLib
-PeiServicesLib
-
+ BaseLib
+ BaseMemoryLib
+ HobLib
+ PciSegmentLib
+ PeiServicesLib
[Packages]
-MdePkg/MdePkg.dec
-IntelSiliconPkg/IntelSiliconPkg.dec
-
+ MdePkg/MdePkg.dec
+ IntelSiliconPkg/IntelSiliconPkg.dec
[Sources]
-PeiSmmAccessLib.c
-
+ PeiSmmAccessLib.c
[Ppis]
-gEfiPeiMmAccessPpiGuid ## PRODUCES
-
+ gEfiPeiMmAccessPpiGuid ## PRODUCES
[Guids]
-gEfiSmmSmramMemoryGuid
+ gEfiSmmSmramMemoryGuid
diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c
index d9bf4fba983e..0e3f230e413e 100644
--- a/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c
+++ b/Silicon/Intel/IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.c
@@ -1,7 +1,7 @@
/** @file
This is to publish the SMM Access Ppi instance.
- Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -234,7 +234,7 @@ GetCapabilities (
/**
This function is to install an SMM Access PPI
- <b>Introduction</b> \n
- An API to install an instance of EFI_PEI_MM_ACCESS_PPI. This PPI is commonly used to control SMM mode memory access for S3 resume.
+ An API to install an instance of EFI_PEI_MM_ACCESS_PPI.
@retval EFI_SUCCESS - Ppi successfully started and installed.
@retval EFI_NOT_FOUND - Ppi can't be found.
@@ -252,19 +252,7 @@ PeiInstallSmmAccessPpi (
EFI_SMRAM_HOB_DESCRIPTOR_BLOCK *DescriptorBlock;
SMM_ACCESS_PRIVATE_DATA *SmmAccessPrivate;
VOID *HobList;
- EFI_BOOT_MODE BootMode;
- 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
//
--
2.30.0.windows.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-11 8:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-11 8:53 [PATCH edk2-platforms 1/1] IntelSiliconPkg/PeiSmmAccessLib: Remove the S3 check Guomin Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox