From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id 9D54A1A1DFE for ; Fri, 19 Aug 2016 16:20:19 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 19 Aug 2016 16:20:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,546,1464678000"; d="scan'208";a="1028656457" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga001.fm.intel.com with ESMTP; 19 Aug 2016 16:20:19 -0700 Received: from orsmsx154.amr.corp.intel.com (10.22.226.12) by ORSMSX103.amr.corp.intel.com (10.22.225.130) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 19 Aug 2016 16:20:18 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.118]) by ORSMSX154.amr.corp.intel.com ([169.254.11.220]) with mapi id 14.03.0248.002; Fri, 19 Aug 2016 16:20:18 -0700 From: "Mudusuru, Giri P" To: "Yarlagadda, Satya P" , "edk2-devel@lists.01.org" CC: "Ma, Maurice" , "Yao, Jiewen" Thread-Topic: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready Thread-Index: AQHR+RBh4/cwTwv4ukmRd2wscCvBzKBQ7lZw Date: Fri, 19 Aug 2016 23:20:17 +0000 Message-ID: <4666AEFED60F8E4198B42BB01DCEABDF76EB5E38@ORSMSX113.amr.corp.intel.com> References: <20160818052031.14576-1-satya.p.yarlagadda@intel.com> In-Reply-To: <20160818052031.14576-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: Add function to get FspInfoHeader before stack is ready 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, 19 Aug 2016 23:20:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Giri P Mudusuru =20 > -----Original Message----- > From: Yarlagadda, Satya P > Sent: Wednesday, August 17, 2016 10:21 PM > To: edk2-devel@lists.01.org > Cc: Ma, Maurice ; Yao, Jiewen > ; Mudusuru, Giri P > Subject: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before s= tack > is ready >=20 > we need to locate the FSP Info Header before the stack is initialized to > access the cfg region for any UPD. Hence adding the > AsmGetFspInfoHeaderNoStack function to support it. >=20 > Note: This function is there in IntelFspPkg but got removed in IntelFsp2P= kg >=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 | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > index 43eac97..a848dcb 100644 > --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm > @@ -14,6 +14,8 @@ > SECTION .text >=20 > global ASM_PFX(FspInfoHeaderRelativeOff) > +ASM_PFX(FspInfoHeaderRelativeOff): > + DD 0x12345678 ; This value must be patched by the bu= ild script >=20 > global ASM_PFX(AsmGetFspBaseAddress) > ASM_PFX(AsmGetFspBaseAddress): > @@ -29,6 +31,11 @@ ASM_PFX(NextInstruction): > pop eax > sub eax, ASM_PFX(NextInstruction) > add eax, ASM_PFX(AsmGetFspInfoHeader) > - DB 02Dh ; opcode of = sub eax, imm32 > -ASM_PFX(FspInfoHeaderRelativeOff): DD 0x12345678 ; sub eax, > FspInfoHeaderRelativeOff > + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] > ret > + > +global ASM_PFX(AsmGetFspInfoHeaderNoStack) > +ASM_PFX(AsmGetFspInfoHeaderNoStack): > + mov eax, ASM_PFX(AsmGetFspInfoHeader) > + sub eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)] > + jmp edi > -- > 2.9.2.windows.1