From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AFB3F81DA1 for ; Thu, 24 Nov 2016 22:03:18 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 24 Nov 2016 22:03:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,693,1473145200"; d="scan'208";a="1063955901" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by orsmga001.jf.intel.com with ESMTP; 24 Nov 2016 22:03:17 -0800 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Laszlo Ersek , Feng Tian , Michael D Kinney Date: Fri, 25 Nov 2016 14:03:08 +0800 Message-Id: <20161125060312.27932-2-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20161125060312.27932-1-jeff.fan@intel.com> References: <20161125060312.27932-1-jeff.fan@intel.com> Subject: [PATCH v2 1/5] UefiCpuPkg/DxeMpLib: Get safe AP loop handler from global variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 06:03:18 -0000 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 --- 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 7f3900b..a0d5eeb 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__)); } -- 2.9.3.windows.2