mirror of https://github.com/acidanthera/audk.git
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,8 +554,10 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -588,8 +590,10 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -649,8 +649,10 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -683,8 +685,10 @@ 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue