From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 9119881F10 for ; Fri, 25 Nov 2016 02:44:14 -0800 (PST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4B9E804F6; Fri, 25 Nov 2016 10:44:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-35.phx2.redhat.com [10.3.116.35]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAPAiCkk009360; Fri, 25 Nov 2016 05:44:12 -0500 To: Jeff Fan , edk2-devel@ml01.01.org References: <20161125060312.27932-1-jeff.fan@intel.com> <20161125060312.27932-2-jeff.fan@intel.com> Cc: Feng Tian , Michael D Kinney From: Laszlo Ersek Message-ID: <6a2975e2-1e13-380a-b6d1-c29f40b5bc31@redhat.com> Date: Fri, 25 Nov 2016 11:44:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <20161125060312.27932-2-jeff.fan@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 25 Nov 2016 10:44:13 +0000 (UTC) Subject: Re: [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 10:44:14 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 11/25/16 07:03, Jeff Fan wrote: > 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__)); > } > > Reviewed-by: Laszlo Ersek