mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	UefiCpuPkg/PiSmmCpuDxeSmm: SmmWaitForApArrival first sync check
Restructured the SmmWaitForApArrival first CPU synchronization conditional checks and added new IsCpuSyncAlwaysNeeded check to determine whether the sync should be executed unconditionally when a SMI occurs. The first CPU synchronization shall executed unconditionally if the new IsCpuSyncAlwaysNeeded check return TRUE. Otherwise, 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>
This commit is contained in:
		 Khor Swee Aun
					Khor Swee Aun
				
			
				
					committed by
					
						![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
			
				
	
			
			
			![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
						parent
						
							cbfae3e8a9
						
					
				
				
					commit
					f6afd87663
				
			| @ -234,10 +234,9 @@ SmmWaitForApArrival ( | ||||
| { | ||||
|   UINT64   Timer; | ||||
|   UINTN    Index; | ||||
|   BOOLEAN  LmceEn; | ||||
|   BOOLEAN  LmceSignal; | ||||
|   UINT32   DelayedCount; | ||||
|   UINT32   BlockedCount; | ||||
|   BOOLEAN  SyncNeeded; | ||||
|  | ||||
|   PERF_FUNCTION_BEGIN (); | ||||
|  | ||||
| @ -246,11 +245,9 @@ SmmWaitForApArrival ( | ||||
|  | ||||
|   ASSERT (SmmCpuSyncGetArrivedCpuCount (mSmmMpSyncData->SyncContext) <= mNumberOfCpus); | ||||
|  | ||||
|   LmceEn     = FALSE; | ||||
|   LmceSignal = FALSE; | ||||
|   if (mMachineCheckSupported) { | ||||
|     LmceEn     = IsLmceOsEnabled (); | ||||
|     LmceSignal = IsLmceSignaled (); | ||||
|   SyncNeeded = IsCpuSyncAlwaysNeeded (); | ||||
|   if (!SyncNeeded) { | ||||
|     SyncNeeded = !(mMachineCheckSupported && IsLmceOsEnabled () && IsLmceSignaled ()); | ||||
|   } | ||||
|  | ||||
|   // | ||||
| @ -268,7 +265,7 @@ SmmWaitForApArrival ( | ||||
|   // Sync with APs 1st timeout | ||||
|   // | ||||
|   for (Timer = StartSyncTimer (); | ||||
|        !IsSyncTimerTimeout (Timer, mTimeoutTicker) && !(LmceEn && LmceSignal); | ||||
|        !IsSyncTimerTimeout (Timer, mTimeoutTicker) && SyncNeeded; | ||||
|        ) | ||||
|   { | ||||
|     mSmmMpSyncData->AllApArrivedWithException = AllCpusInSmmExceptBlockedDisabled (); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user