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; +}