mirror of https://github.com/acidanthera/audk.git
EmulatorPkg/MpService: Fix a NULL reference
when making a CreateEvent() to call CpuCheckAllAPsStatus(), the Context parameter was NULL in CpuCheckAllAPsStatus(), so we must not use the Context as the ProcessorData pointer. and should recalculate it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16183 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
90be222196
commit
8ab6d73c0e
|
@ -984,10 +984,9 @@ CpuCheckAllAPsStatus (
|
|||
gMPSystem.Timeout -= gPollInterval;
|
||||
}
|
||||
|
||||
ProcessorData = (PROCESSOR_DATA_BLOCK *) Context;
|
||||
|
||||
for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; ProcessorNumber++) {
|
||||
if ((ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
|
||||
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
|
||||
if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
|
||||
// Skip BSP
|
||||
continue;
|
||||
}
|
||||
|
@ -1045,7 +1044,8 @@ CpuCheckAllAPsStatus (
|
|||
//
|
||||
if (gMPSystem.FailedList != NULL) {
|
||||
for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; ProcessorNumber++) {
|
||||
if ((ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
|
||||
ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
|
||||
if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
|
||||
// Skip BSP
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue