From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 043871A1DEF for ; Mon, 22 Aug 2016 01:19:09 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 22 Aug 2016 01:19:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,559,1464678000"; d="scan'208";a="441811" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 22 Aug 2016 01:19:08 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 01:19:08 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Aug 2016 01:19:08 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.107]) with mapi id 14.03.0248.002; Mon, 22 Aug 2016 16:19:06 +0800 From: "Yao, Jiewen" To: "Yarlagadda, Satya P" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelFsp2Pkg: Add function to get FspInfoHeader before stack is ready Thread-Index: AQHR+RBjKYkARdDhEU+LG4AUGVvi/aBUqYcw Date: Mon, 22 Aug 2016 08:19:05 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C500280425C@shsmsx102.ccr.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: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] 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: Mon, 22 Aug 2016 08:19:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Yarlagadda, Satya P > Sent: Thursday, August 18, 2016 1: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 > stack 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 build 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