summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2024-09-10 11:52:36 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-10-12 08:56:05 +0000
commit7d4da670ea7b3be1f8c3a8d6768f59c2c8d3752a (patch)
tree47f1ff4117434e2a6d2221603b279af654a60c2b /UefiCpuPkg/Library
parent2351165f1b8252269a36d625823743d9f6c243b9 (diff)
downloadedk2-7d4da670ea7b3be1f8c3a8d6768f59c2c8d3752a.tar.gz
edk2-7d4da670ea7b3be1f8c3a8d6768f59c2c8d3752a.tar.bz2
edk2-7d4da670ea7b3be1f8c3a8d6768f59c2c8d3752a.zip
UefiCpuPkg: Add SmmCpuPlatformHookBeforeMmiHandler
This patch is to add SmmCpuPlatformHookBeforeMmiHandler interface in SmmCpuPlatformHookLib. The new API can be used to perform the platform specific items before executing MMI Handler. For example, Intel can leverage this API to clear the pending SMI bit after all CPUs finish the sync and before the MMI handlers. If so, the the redundant SMI can be avoided after CPU exit from current SMI. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r--UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c b/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
index 085a03e52a..b03a72d177 100644
--- a/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
+++ b/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
@@ -1,7 +1,7 @@
/** @file
SMM CPU Platform Hook NULL library instance.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -100,3 +100,21 @@ GetPlatformPageTableAttribute (
{
return EFI_UNSUPPORTED;
}
+
+/**
+ SMM CPU Platform Hook before executing MMI Handler.
+
+ This function can be used to perform the platform specific items before executing MMI Handler.
+
+ @retval EFI_SUCCESS The smm cpu platform hook before executing MMI Handler is executed successfully.
+ @retval EFI_UNSUPPORTED The smm cpu platform hook before executing MMI Handler is unsupported.
+
+**/
+EFI_STATUS
+EFIAPI
+SmmCpuPlatformHookBeforeMmiHandler (
+ VOID
+ )
+{
+ return EFI_UNSUPPORTED;
+}