mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/MpInitLib: Swap local APIC timer interrupt state
We need to swap local APIC timer interrupt state between old BSP and new BSP. Cc: Feng Tian <feng.tian@intel.com> Cc: Kinney Michael D <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
parent
a8d75a1802
commit
26b43433c1
|
@ -1512,7 +1512,13 @@ SwitchBSPWorker (
|
|||
CPU_STATE State;
|
||||
MSR_IA32_APIC_BASE_REGISTER ApicBaseMsr;
|
||||
BOOLEAN OldInterruptState;
|
||||
BOOLEAN OldTimerInterruptState;
|
||||
|
||||
//
|
||||
// Save and Disable Local APIC timer interrupt
|
||||
//
|
||||
OldTimerInterruptState = GetApicTimerInterruptState ();
|
||||
DisableApicTimerInterrupt ();
|
||||
//
|
||||
// Before send both BSP and AP to a procedure to exchange their roles,
|
||||
// interrupt must be disabled. This is because during the exchange role
|
||||
|
@ -1613,6 +1619,9 @@ SwitchBSPWorker (
|
|||
//
|
||||
SetInterruptState (OldInterruptState);
|
||||
|
||||
if (OldTimerInterruptState) {
|
||||
EnableApicTimerInterrupt ();
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue