From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.6736.1589948445098386173 for ; Tue, 19 May 2020 21:20:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Zfhv0Wn4; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: star.zeng@intel.com) IronPort-SDR: kasVIokOCWwc3nBNS+TT6vaYn+WeElq4MSDgfwasmNWstc6j8zetbkjlFGXGsU6CID1xhq9gMx QLWtPH8P9FDA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 21:20:44 -0700 IronPort-SDR: WMOr2zhh1BM/RsIme3EYZmoQhdhtdUfAC6AX4aujraN2s29eL2bAisChNGvu/uJHpfDTDHri/J 9AfO9G0IM8xw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,412,1583222400"; d="scan'208";a="289215597" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 19 May 2020 21:20:44 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:20:43 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:20:43 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:20:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BTaA/oUTIubvaWJ6UF4El6NanFFE8SstHgICzrYrezFrqYPI4MJWXIFxKPCdP0vUSivx+aovUElknSPocm2KhxqG/lGHShCh5cvvQ1KgaEVcpNf1UJyjxvnxlnlb3IOXnzKm/whRU2/GFPVfDaXtzmmDiAerngHZzRs7pGUzVR+I77OZd67jNCvTK63llZeJbZDbyVNgL9wycjvx0/YOFO+Yf9RQgoUD1lydO5Fw+aN9c0CxChJ49CV9+HYi13KYMYp+BMmoxRikcPPI0/RswBpFoK/sadMIJ3yMGRIqX5/7ORNSd8Pk9Wi0U8oKJdBKSAhsPtxBq3eBUGhASn/xwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2+7fzlxEqJx3J/zzU6/KgRu3KaLHrRz46fcw9I6U7tw=; b=QsOG12eUfqotccMNz36Kj/Og0DKhGusYUyMPWqF+jrsK+AqDRBTawvhpL8C90iQ6Njxna5F8CcORIAUR1JPGMaVsGUia7n8HHcPlbmlTxmSQWIEWeM37arD61SrLi9LrjjmP2KfNRr5oKbTciLKR8UXTRMLzlJp7J9i6LxUeaYdavhythwIJLzhSuE9jLm1VzpBcThfiTmViolDu8An3m+slElO4MY6KejTwb0RpVc1R87h4P5/wYJMgB65Pg3GT0bmI5waxOuIRVy1hVzunkQM5vGx3ZAGCkAojx3hLjKQQB7ZJIgE0H+JKYo+4r9eHFjtXJyajhLCphOpd3b5LtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2+7fzlxEqJx3J/zzU6/KgRu3KaLHrRz46fcw9I6U7tw=; b=Zfhv0Wn4xHg3mkMLXoJ+iQJzvT0O41JZ3bQnng68gfYWVI+gyMWYQtMWGxqE2gh+L2x60q4mDy3hSzYClrkphbfcnyAcMGLXZmzoC09WHZykCG/Jbgw3+cHuP243wdumAUX9y8+VRXhxSGvvApPXQKNBjFnJeBBVoYONG+vi2/s= Received: from DM6PR11MB4058.namprd11.prod.outlook.com (2603:10b6:5:193::13) by DM6PR11MB3132.namprd11.prod.outlook.com (2603:10b6:5:69::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.27; Wed, 20 May 2020 04:20:42 +0000 Received: from DM6PR11MB4058.namprd11.prod.outlook.com ([fe80::1c7:17a0:4899:6a69]) by DM6PR11MB4058.namprd11.prod.outlook.com ([fe80::1c7:17a0:4899:6a69%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 04:20:42 +0000 From: "Zeng, Star" To: "Desimone, Nathaniel L" , "Chiu, Chasel" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "Zeng, Star" Subject: Re: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Topic: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Index: AQHWLleN8jbseCRP8keyVUCKpcQ+iaiwXP0AgAACQ8A= Date: Wed, 20 May 2020 04:20:42 +0000 Message-ID: References: <20200520033356.5708-1-chasel.chiu@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.200] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff5fd688-f200-485d-126c-08d7fc7528f4 x-ms-traffictypediagnostic: DM6PR11MB3132: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 04097B7F7F x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EqXhctgQ0+oAcc6q4mRlselGhZcnZfvsSn7Vu9Ktkm8rgFJ1iSTl6Qs+5X67VRs/B5GUdUxH6Np2ue67ZS5jYmAnq/6lFxEeJhfxYq0hblMJoaIcgA1NPcGcdMfbBawE9sAIOHyjVg3KtNywHBgDrSIr0XUzekvpJKREH2o6D47QdxvAHrSg4Po46KEQ6S5r4rcMC48uitR9XcjSbrAfeHGOd+ZG8KWG6Nri0oFzPRUBxopxx0PsYozNgJu8l8qhunY6EYHodKqIFRAS8Gh1JT722RZf3Er9J1pTRkk09V/pTSd00dkTDnxH8kHPHtUN+ygS1I+PPhtKHsgpQnosBszVSfhPfHGpSZ+ba0cyPAXOKXMahzXnBlFH0HQr21NClcjVXnINf6DOjmbdNskIYuieQ/fxNnV2eW/DNDX8LDomFhOvbt/nNqnuyXg/akuZXP/zO3rCqHGfqh6QBjZoSAw6ZZ2XggWQmtaLoudER/CcfyNSWRG1XCKOn9Fd8MlYS9o9lolc+QZozCqwCTSWPg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4058.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(366004)(39860400002)(376002)(396003)(346002)(9686003)(966005)(7696005)(107886003)(8676002)(33656002)(478600001)(8936002)(5660300002)(76116006)(52536014)(2906002)(55016002)(4326008)(71200400001)(86362001)(66946007)(6506007)(26005)(110136005)(54906003)(53546011)(66556008)(66476007)(64756008)(19627235002)(66446008)(186003)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: QexvYGzFJ1szz1ek+e30ApqqxtiXPxL6mytKJX13+67rLiNvcmz4ZDtAjs3EIOKJtkU8PjB5YcxzgKbrvv0QPrsbSSWZyYA0YKBY131LRQnvpS7+MveEXAS3aehABuZ0S/W2bYFtGH8M9Bxoi0ZIPLjM/FDNEC7e021qWVSyIB89/VMgAfoTWhqCdVSmPQ6O3rVlnV+NDL5T7sRuvJkEOXKsidFgpep+U6fg6PkUUKNlz5qmR+QiWHAnzxBccVH8h8wb1co5PX60hYKhLEa3BKrSkERPcFmT9ho+wzXvqZLSHtJGr+xcWM5JALUcenZg+ZMXh8LVOWg1ZiE8rdNijyJDcld0uAOxCQ9Djtztax0KI/QYtfB37yeW+iOj6h3C6LMmDqaqB0/y8X8MgoLxrbSO3Iewd6vxgbcorJpz4VzlLGmZxUQ1APL1I8Xrgzzswe/eJeo4tbEuJYu7KSA3Yzs8lbjo2/Vxlfq/ESwT/d0= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ff5fd688-f200-485d-126c-08d7fc7528f4 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2020 04:20:42.3472 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zmYbZ4IqXXOOu9OZeiqY2VtKhSEOVg0iw60drOneoJWqPxc7N28Av2c88RLpip/OhUYSqpC6UCrNpofXbBQ7Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3132 Return-Path: star.zeng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable equilivant is a typo? > -----Original Message----- > From: Desimone, Nathaniel L > Sent: Wednesday, May 20, 2020 12:12 PM > To: Chiu, Chasel ; devel@edk2.groups.io > Cc: Ma, Maurice ; Zeng, Star > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to > FspGlobalData. >=20 > Reviewed-by: Nate DeSimone >=20 > > -----Original Message----- > > From: Chiu, Chasel > > Sent: Tuesday, May 19, 2020 8:34 PM > > To: devel@edk2.groups.io > > Cc: Ma, Maurice ; Desimone, Nathaniel L > > ; Zeng, Star > > Subject: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData= . > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2726 > > > > When FSP switching stack and calling bootloader functions, the > > function parameter in stack may not be accessible easily. > > We can store the function parameter pointer to FspGlobalData and > > retrieve it after stack switched. > > > > Also need to add Loader2PeiSwitchStack () to header file as public > > function for platform FSP code to consume. > > > > Cc: Maurice Ma > > Cc: Nate DeSimone > > Cc: Star Zeng > > Signed-off-by: Chasel Chiu > > --- > > IntelFsp2Pkg/Include/FspGlobalData.h | 12 ++++++++++-- > > IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 18 > > +++++++++++++++++- > > 2 files changed, 27 insertions(+), 3 deletions(-) > > > > diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h > > b/IntelFsp2Pkg/Include/FspGlobalData.h > > index 5bde316893..dba9b48e1a 100644 > > --- a/IntelFsp2Pkg/Include/FspGlobalData.h > > +++ b/IntelFsp2Pkg/Include/FspGlobalData.h > > @@ -52,12 +52,20 @@ typedef struct { > > VOID *MemoryInitUpdPtr; > > VOID *SiliconInitUpdPtr; > > UINT8 ApiIdx; > > - UINT8 FspMode; // 0: FSP in API mode; 1: FSP in > DISPATCH mode > > + /// > > + /// 0: FSP in API mode; 1: FSP in DISPATCH mode > > + /// > > + UINT8 FspMode; > > UINT8 OnSeparateStack; > > UINT8 Reserved3; > > UINT32 NumberOfPhases; > > UINT32 PhasesExecuted; > > - UINT8 Reserved4[20]; > > + /// > > + /// To store function parameters pointer > > + /// so it can be retrieved after stack switched. > > + /// > > + VOID *FunctionParameterPtr; > > + UINT8 Reserved4[16]; > > UINT32 PerfSig; > > UINT16 PerfLen; > > UINT16 Reserved5; > > diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h > > b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h > > index 0c76e9f022..bed2a5d677 100644 > > --- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h > > +++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h > > @@ -1,6 +1,6 @@ > > /** @file > > > > - Copyright (c) 2014, Intel Corporation. All rights reserved.
> > + Copyright (c) 2014 - 2020, Intel Corporation. All rights > > + reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -36,4 +36,20 @@ Pei2LoaderSwitchStack ( > > VOID > > ); > > > > +/** > > + > > + This function is equilivant to Pei2LoaderSwitchStack () but just > > + indicates the stack after switched is FSP stack. > > + > > + @return ReturnKey After switching to the saved stack, > > + this value will be saved in eax before > returning. > > + > > + > > +**/ > > +UINT32 > > +EFIAPI > > +Loader2PeiSwitchStack ( > > + VOID > > + ); > > + > > #endif > > -- > > 2.13.3.windows.1