From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 CFDA52034A7C4 for ; Mon, 23 Oct 2017 22:57:14 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 23 Oct 2017 23:00:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,426,1503385200"; d="scan'208";a="166269253" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 23 Oct 2017 23:00:57 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Oct 2017 23:00:57 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Oct 2017 23:00:57 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Tue, 24 Oct 2017 14:00:55 +0800 From: "Ni, Ruiyu" To: "Dong, Eric" , "edk2-devel@lists.01.org" Thread-Topic: [Patch 1/2] UefiCpuPkg/MpInitLib: Change AP Index variable name. Thread-Index: AQHTS8++SZDkkAyn6EmwyKIaqbNTLaLygtxQ Date: Tue, 24 Oct 2017 06:00:54 +0000 Deferred-Delivery: Tue, 24 Oct 2017 06:00:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BAA3592@SHSMSX104.ccr.corp.intel.com> References: <1508743358-3640-1-git-send-email-eric.dong@intel.com> <1508743358-3640-2-git-send-email-eric.dong@intel.com> In-Reply-To: <1508743358-3640-2-git-send-email-eric.dong@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 1/2] UefiCpuPkg/MpInitLib: Change AP Index variable name. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 05:57:15 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: Dong, Eric > Sent: Monday, October 23, 2017 3:23 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: [Patch 1/2] UefiCpuPkg/MpInitLib: Change AP Index variable name. >=20 > Original AP index variable name not well express the meaning of the varia= ble. > Also this name is better used in later patch. > So change the variable name for better understanding. >=20 > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc | 2 +- > UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++-- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 6 +++--- > UefiCpuPkg/Library/MpInitLib/MpLib.h | 2 +- > UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc | 2 +- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 4 ++-- > 6 files changed, 10 insertions(+), 10 deletions(-) >=20 > diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc > b/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc > index 6276230..976af1f 100644 > --- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc > +++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc > @@ -33,7 +33,7 @@ GdtrLocation equ LockLocation += 10h > IdtrLocation equ LockLocation + 16h > BufferStartLocation equ LockLocation + 1Ch > ModeOffsetLocation equ LockLocation + 20h > -NumApsExecutingLocation equ LockLocation + 24h > +ApIndexLocation equ LockLocation + 24h > CodeSegmentLocation equ LockLocation + 28h > DataSegmentLocation equ LockLocation + 2Ch > EnableExecuteDisableLocation equ LockLocation + 30h > diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm > b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm > index 52363e6..1b9c6a6 100644 > --- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm > +++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm > @@ -130,7 +130,7 @@ TestLock: > jz TestLock >=20 > mov ecx, esi > - add ecx, NumApsExecutingLocation > + add ecx, ApIndexLocation > inc dword [ecx] > mov ebx, [ecx] >=20 > @@ -200,7 +200,7 @@ CProcedureInvoke: > mov eax, ASM_PFX(InitializeFloatingPointUnits) > call eax ; Call assembly function to initialize = FPU per UEFI spec >=20 > - push ebx ; Push NumApsExecuting > + push ebx ; Push ApIndex > mov eax, esi > add eax, LockLocation > push eax ; push address of exchange info data bu= ffer > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c > b/UefiCpuPkg/Library/MpInitLib/MpLib.c > index f3ee6d4..db923c9 100644 > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c > @@ -542,7 +542,7 @@ VOID > EFIAPI > ApWakeupFunction ( > IN MP_CPU_EXCHANGE_INFO *ExchangeInfo, > - IN UINTN NumApsExecuting > + IN UINTN ApIndex > ) > { > CPU_MP_DATA *CpuMpData; > @@ -574,7 +574,7 @@ ApWakeupFunction ( > // Add CPU number > // > InterlockedIncrement ((UINT32 *) &CpuMpData->CpuCount); > - ProcessorNumber =3D NumApsExecuting; > + ProcessorNumber =3D ApIndex; > // > // This is first time AP wakeup, get BIST information from AP stac= k > // > @@ -764,7 +764,7 @@ FillExchangeInfoData ( > ExchangeInfo->Cr3 =3D AsmReadCr3 (); >=20 > ExchangeInfo->CFunction =3D (UINTN) ApWakeupFunction; > - ExchangeInfo->NumApsExecuting =3D 0; > + ExchangeInfo->ApIndex =3D 0; > ExchangeInfo->InitFlag =3D (UINTN) CpuMpData->InitFlag; > ExchangeInfo->CpuInfo =3D (CPU_INFO_IN_HOB *) (UINTN) CpuMpDat= a- > >CpuInfoInHob; > ExchangeInfo->CpuMpData =3D CpuMpData; > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h > b/UefiCpuPkg/Library/MpInitLib/MpLib.h > index 84ae24f..e41d2db 100644 > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h > @@ -169,7 +169,7 @@ typedef struct { > IA32_DESCRIPTOR IdtrProfile; > UINTN BufferStart; > UINTN ModeOffset; > - UINTN NumApsExecuting; > + UINTN ApIndex; > UINTN CodeSegment; > UINTN DataSegment; > UINTN EnableExecuteDisable; > diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc > b/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc > index 5b2529b..114f4e0 100644 > --- a/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc > +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc > @@ -33,7 +33,7 @@ GdtrLocation equ LockLocation += 20h > IdtrLocation equ LockLocation + 2Ah > BufferStartLocation equ LockLocation + 34h > ModeOffsetLocation equ LockLocation + 3Ch > -NumApsExecutingLocation equ LockLocation + 44h > +ApIndexLocation equ LockLocation + 44h > CodeSegmentLocation equ LockLocation + 4Ch > DataSegmentLocation equ LockLocation + 54h > EnableExecuteDisableLocation equ LockLocation + 5Ch > diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm > b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm > index 0b14a53..4ada649 100644 > --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm > +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm > @@ -134,7 +134,7 @@ TestLock: > cmp rax, NotVacantFlag > jz TestLock >=20 > - lea ecx, [esi + NumApsExecutingLocation] > + lea ecx, [esi + ApIndexLocation] > inc dword [ecx] > mov ebx, [ecx] >=20 > @@ -206,7 +206,7 @@ CProcedureInvoke: > call rax ; Call assembly function to initialize = FPU per UEFI spec > add rsp, 20h >=20 > - mov edx, ebx ; edx is NumApsExecuting > + mov edx, ebx ; edx is ApIndex > mov ecx, esi > add ecx, LockLocation ; rcx is address of exchange info data = buffer >=20 > -- > 2.7.0.windows.1