mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
UefiCpuPkg/LocalApicLib: Exclude second SendIpi sequence on AMD processors.
On AMD processors the second SendIpi in the SendInitSipiSipi and SendInitSipiSipiAllExcludingSelf routines is not required, and may cause undesired side-effects during MP initialization. This patch leverages the StandardSignatureIsAuthenticAMD check to exclude the second SendIpi and its associated MicroSecondDelay (200). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leo Duran <leo.duran@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Jeff Fan <jeff.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
aeb6f57625
commit
bf252e29a5
@ -554,9 +554,11 @@ SendInitSipiSipi (
|
|||||||
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
|
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
|
||||||
IcrLow.Bits.Level = 1;
|
IcrLow.Bits.Level = 1;
|
||||||
SendIpi (IcrLow.Uint32, ApicId);
|
SendIpi (IcrLow.Uint32, ApicId);
|
||||||
|
if (!StandardSignatureIsAuthenticAMD ()) {
|
||||||
MicroSecondDelay (200);
|
MicroSecondDelay (200);
|
||||||
SendIpi (IcrLow.Uint32, ApicId);
|
SendIpi (IcrLow.Uint32, ApicId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Send an INIT-Start-up-Start-up IPI sequence to all processors excluding self.
|
Send an INIT-Start-up-Start-up IPI sequence to all processors excluding self.
|
||||||
@ -588,9 +590,11 @@ SendInitSipiSipiAllExcludingSelf (
|
|||||||
IcrLow.Bits.Level = 1;
|
IcrLow.Bits.Level = 1;
|
||||||
IcrLow.Bits.DestinationShorthand = LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF;
|
IcrLow.Bits.DestinationShorthand = LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF;
|
||||||
SendIpi (IcrLow.Uint32, 0);
|
SendIpi (IcrLow.Uint32, 0);
|
||||||
|
if (!StandardSignatureIsAuthenticAMD ()) {
|
||||||
MicroSecondDelay (200);
|
MicroSecondDelay (200);
|
||||||
SendIpi (IcrLow.Uint32, 0);
|
SendIpi (IcrLow.Uint32, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initialize the state of the SoftwareEnable bit in the Local APIC
|
Initialize the state of the SoftwareEnable bit in the Local APIC
|
||||||
|
@ -649,9 +649,11 @@ SendInitSipiSipi (
|
|||||||
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
|
IcrLow.Bits.DeliveryMode = LOCAL_APIC_DELIVERY_MODE_STARTUP;
|
||||||
IcrLow.Bits.Level = 1;
|
IcrLow.Bits.Level = 1;
|
||||||
SendIpi (IcrLow.Uint32, ApicId);
|
SendIpi (IcrLow.Uint32, ApicId);
|
||||||
|
if (!StandardSignatureIsAuthenticAMD ()) {
|
||||||
MicroSecondDelay (200);
|
MicroSecondDelay (200);
|
||||||
SendIpi (IcrLow.Uint32, ApicId);
|
SendIpi (IcrLow.Uint32, ApicId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Send an INIT-Start-up-Start-up IPI sequence to all processors excluding self.
|
Send an INIT-Start-up-Start-up IPI sequence to all processors excluding self.
|
||||||
@ -683,9 +685,11 @@ SendInitSipiSipiAllExcludingSelf (
|
|||||||
IcrLow.Bits.Level = 1;
|
IcrLow.Bits.Level = 1;
|
||||||
IcrLow.Bits.DestinationShorthand = LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF;
|
IcrLow.Bits.DestinationShorthand = LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF;
|
||||||
SendIpi (IcrLow.Uint32, 0);
|
SendIpi (IcrLow.Uint32, 0);
|
||||||
|
if (!StandardSignatureIsAuthenticAMD ()) {
|
||||||
MicroSecondDelay (200);
|
MicroSecondDelay (200);
|
||||||
SendIpi (IcrLow.Uint32, 0);
|
SendIpi (IcrLow.Uint32, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Initialize the state of the SoftwareEnable bit in the Local APIC
|
Initialize the state of the SoftwareEnable bit in the Local APIC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user