summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorKhor Swee Aun <swee.aun.khor@intel.com>2024-12-16 16:32:52 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-01-10 07:45:26 +0000
commita8363bce367c872b5de52fa2257508fbcea20d84 (patch)
tree3683a3480f8cdd9758969d4693c96aa7605f95ac /UefiCpuPkg
parent21cbba1bb3789c6d225dffd15a7a638877a25fe6 (diff)
downloadedk2-a8363bce367c872b5de52fa2257508fbcea20d84.tar.gz
Add SmmCpuPlatformHookLib IsCpuSyncAlwaysNeeded interface
This patch adds the IsCpuSyncAlwaysNeeded interface to the SmmCpuPlatformHookLib. This interface will determine whether the first CPU Synchronization should be executed unconditionally when a SMI occurs. If the function returns true, it indicates that there is no need to check the system configuration and status, and the first CPU Synchronization should be executed unconditionally. If the function returns false, it indicates that the first CPU Synchronization is not executed unconditionally, and the decision to synchronize should be based on the system configuration and status. Signed-off-by: Khor Swee Aun <swee.aun.khor@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h20
-rw-r--r--UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c23
2 files changed, 43 insertions, 0 deletions
diff --git a/UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h b/UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h
index 149a694891..5bc9ba2b86 100644
--- a/UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h
+++ b/UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h
@@ -115,4 +115,24 @@ SmmCpuPlatformHookBeforeMmiHandler (
VOID
);
+/**
+ This function determines whether the first CPU Synchronization should be executed unconditionally
+ when a SMI occurs.
+
+ If the function returns true, it indicates that there is no need to check the system configuration
+ and status, and the first CPU Synchronization should be executed unconditionally.
+
+ If the function returns false, it indicates that the first CPU Synchronization is not executed
+ unconditionally, and the decision to synchronize should be based on the system configuration and status.
+
+ @retval TRUE The first CPU Synchronization is executed unconditionally.
+ @retval FALSE The first CPU Synchronization is not executed unconditionally.
+
+**/
+BOOLEAN
+EFIAPI
+IsCpuSyncAlwaysNeeded (
+ VOID
+ );
+
#endif
diff --git a/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c b/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
index b03a72d177..beca8aa6b2 100644
--- a/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
+++ b/UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c
@@ -118,3 +118,26 @@ SmmCpuPlatformHookBeforeMmiHandler (
{
return EFI_UNSUPPORTED;
}
+
+/**
+ This function determines whether the first CPU Synchronization should be executed unconditionally
+ when a SMI occurs.
+
+ If the function returns true, it indicates that there is no need to check the system configuration
+ and status, and the first CPU Synchronization should be executed unconditionally.
+
+ If the function returns false, it indicates that the first CPU Synchronization is not executed
+ unconditionally, and the decision to synchronize should be based on the system configuration and status.
+
+ @retval TRUE The first CPU Synchronization is executed unconditionally.
+ @retval FALSE The first CPU Synchronization is not executed unconditionally.
+
+**/
+BOOLEAN
+EFIAPI
+IsCpuSyncAlwaysNeeded (
+ VOID
+ )
+{
+ return FALSE;
+}