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 <[email protected]> --- EmulatorPkg/CpuRuntimeDxe/MpService.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c index 536a47f..ed57d7a 100644 --- a/EmulatorPkg/CpuRuntimeDxe/MpService.c +++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c @@ -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; } -- 1.9.3 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
