From 081f6416ff7c2b6a2fe91bb96cdb645c3890a6f3 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Wed, 23 Nov 2016 21:33:20 +0800 Subject: [PATCH] UefiCpuPkg/DxeMpLib: Get safe AP loop handler from global variable AP loop function is already saved into global variable, needn't to get it from AP function parameter. Cc: Laszlo Ersek Cc: Feng Tian Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Laszlo Ersek Tested-by: Laszlo Ersek --- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c index 7f3900b4c1..a0d5eebc94 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -244,7 +244,7 @@ RelocateApLoop ( CpuMpData = GetCpuMpData (); MwaitSupport = IsMwaitSupport (); - AsmRelocateApLoopFunc = (ASM_RELOCATE_AP_LOOP) (UINTN) Buffer; + AsmRelocateApLoopFunc = (ASM_RELOCATE_AP_LOOP) (UINTN) mReservedApLoopFunc; AsmRelocateApLoopFunc (MwaitSupport, CpuMpData->ApTargetCState, CpuMpData->PmCodeSegment); // // It should never reach here @@ -273,7 +273,7 @@ MpInitChangeApLoopCallback ( CpuMpData->SaveRestoreFlag = TRUE; CpuMpData->PmCodeSegment = GetProtectedModeCS (); CpuMpData->ApLoopMode = PcdGet8 (PcdCpuApLoopMode); - WakeUpAP (CpuMpData, TRUE, 0, RelocateApLoop, mReservedApLoopFunc); + WakeUpAP (CpuMpData, TRUE, 0, RelocateApLoop, NULL); DEBUG ((DEBUG_INFO, "%a() done!\n", __FUNCTION__)); }