Skip to content

Commit a8363bc

Browse files
sweeaunmergify[bot]
authored andcommitted
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 <[email protected]>
1 parent 21cbba1 commit a8363bc

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

UefiCpuPkg/Include/Library/SmmCpuPlatformHookLib.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,24 @@ SmmCpuPlatformHookBeforeMmiHandler (
115115
VOID
116116
);
117117

118+
/**
119+
This function determines whether the first CPU Synchronization should be executed unconditionally
120+
when a SMI occurs.
121+
122+
If the function returns true, it indicates that there is no need to check the system configuration
123+
and status, and the first CPU Synchronization should be executed unconditionally.
124+
125+
If the function returns false, it indicates that the first CPU Synchronization is not executed
126+
unconditionally, and the decision to synchronize should be based on the system configuration and status.
127+
128+
@retval TRUE The first CPU Synchronization is executed unconditionally.
129+
@retval FALSE The first CPU Synchronization is not executed unconditionally.
130+
131+
**/
132+
BOOLEAN
133+
EFIAPI
134+
IsCpuSyncAlwaysNeeded (
135+
VOID
136+
);
137+
118138
#endif

UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,26 @@ SmmCpuPlatformHookBeforeMmiHandler (
118118
{
119119
return EFI_UNSUPPORTED;
120120
}
121+
122+
/**
123+
This function determines whether the first CPU Synchronization should be executed unconditionally
124+
when a SMI occurs.
125+
126+
If the function returns true, it indicates that there is no need to check the system configuration
127+
and status, and the first CPU Synchronization should be executed unconditionally.
128+
129+
If the function returns false, it indicates that the first CPU Synchronization is not executed
130+
unconditionally, and the decision to synchronize should be based on the system configuration and status.
131+
132+
@retval TRUE The first CPU Synchronization is executed unconditionally.
133+
@retval FALSE The first CPU Synchronization is not executed unconditionally.
134+
135+
**/
136+
BOOLEAN
137+
EFIAPI
138+
IsCpuSyncAlwaysNeeded (
139+
VOID
140+
)
141+
{
142+
return FALSE;
143+
}

0 commit comments

Comments
 (0)