From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by ml01.01.org (Postfix) with ESMTP id E33751A1E10 for ; Mon, 1 Aug 2016 11:06:57 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 01 Aug 2016 11:06:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,456,1464678000"; d="scan'208";a="857438380" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga003.jf.intel.com with ESMTP; 01 Aug 2016 11:06:57 -0700 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 1 Aug 2016 11:06:56 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.118]) by ORSMSX156.amr.corp.intel.com ([169.254.8.236]) with mapi id 14.03.0248.002; Mon, 1 Aug 2016 11:06:56 -0700 From: "Mudusuru, Giri P" To: "Yarlagadda, Satya P" , "edk2-devel@lists.01.org" CC: "Ma, Maurice" , "Yao, Jiewen" Thread-Topic: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically Thread-Index: AQHR6+m2ec/j0CtyTUq5ed51sZHgl6A0ZueQ Date: Mon, 1 Aug 2016 18:06:56 +0000 Message-ID: <4666AEFED60F8E4198B42BB01DCEABDF76E9BF84@ORSMSX113.amr.corp.intel.com> References: <20160801114134.7912-1-satya.p.yarlagadda@intel.com> In-Reply-To: <20160801114134.7912-1-satya.p.yarlagadda@intel.com> Accept-Language: en-US, hi-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Subject: Re: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically 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: Mon, 01 Aug 2016 18:06:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Giri P Mudusuru =20 Please update the comments for the opcode to be in line similar to the http= s://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.= asm=20 Thanks, -Giri > -----Original Message----- > From: Yarlagadda, Satya P > Sent: Monday, August 1, 2016 4:42 AM > To: edk2-devel@lists.01.org > Cc: Ma, Maurice ; Yao, Jiewen > ; Mudusuru, Giri P > Subject: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically >=20 > we need to locate the FSP Info Header by calculating offset dynamically t= o > handle the scenario of FSP component is being rebased to different locati= on. >=20 > Cc: Maurice Ma > Cc: Jiewen Yao > Cc: Giri P Mudusuru > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Satya Yarlagadda > --- > IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > index 00e953b..7d5fa5e 100644 > --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > @@ -14,22 +14,22 @@ > SECTION .text >=20 > global ASM_PFX(FspInfoHeaderRelativeOff) > -ASM_PFX(FspInfoHeaderRelativeOff): > - ; > - ; This value will be pached by the build script > - ; > - DD 0x12345678 >=20 > global ASM_PFX(AsmGetFspBaseAddress) > ASM_PFX(AsmGetFspBaseAddress): > - mov eax, ASM_PFX(AsmGetFspInfoHeader) > - sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] > + call ASM_PFX(AsmGetFspInfoHeader) > add eax, 0x1C > mov eax, dword [eax] > ret >=20 > global ASM_PFX(AsmGetFspInfoHeader) > ASM_PFX(AsmGetFspInfoHeader): > - mov eax, ASM_PFX(AsmGetFspInfoHeader) > - sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] > + call ASM_PFX(NextInstruction) > +ASM_PFX(NextInstruction): > + pop eax > + sub eax, ASM_PFX(NextInstruction) > + add eax, ASM_PFX(AsmGetFspInfoHeader) > + ;sub eax, 012345678h > + DB 02Dh > +ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 > ret > -- > 2.9.2.windows.1