From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.6765.1589948725695023578 for ; Tue, 19 May 2020 21:25:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=UtK8rBdv; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: chasel.chiu@intel.com) IronPort-SDR: EBpvZo35FHxLYKrh4aJaTiz17/ccBs+Hg9giH4x2pNutLFYhF/3NwUSb7KsdZn5gnBT+i9tGkP TH7FACzsW/tA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2020 21:25:25 -0700 IronPort-SDR: XD7m5Q+vuRFsnmuLHVtmXIuguI3sd5pTDU5dBFj5ecrtELXohbgdZugTsLrjU97HRBRL94oI1B icTCQFXd7j+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,412,1583222400"; d="scan'208";a="300323980" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga008.jf.intel.com with ESMTP; 19 May 2020 21:25:25 -0700 Received: from orsmsx163.amr.corp.intel.com (10.22.240.88) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:25:24 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX163.amr.corp.intel.com (10.22.240.88) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:25:24 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 19 May 2020 21:25:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZoIbK0dn1DuDKWSv/Xom9NSmxK2RJfz+T+F0hIFg9C1iH6m1dK8a0mG3w74/ov7Vvi68p4MnXBeFU6UYKopdLKtmn9+74yCCUP6uVkym7uR9bc0No7u3Vj0rerdRjsVjkktR661LpO795M3BBWz2jE+U1moq/HFgMkjjCr0Qvgp0OhyhCHRvaR3rhu6UoQWOK/S0rxoASt1LZhVaiynkRii6GKrM8iLshNs8m221ILlGZDOON/TriSZJMPvv/gfBQN3C/7WAmK2FyZS8IQWFgXtGswwdF6NwFcQg/VTD5fKfz4pPMQD5xlJ8WwSKJsU15VwRQXtrbyyWmE3/btBJ6g== 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=Jpzv8wgguEK3Oj+UCYsUNtCopr5mkHpM6XfQnK0NH5I=; b=DVVyk4xwcUdnmfHdgTvJyGrXknxZHWzj8uvQl0t1pDcU/WIBraF7acKNsUMmdkDnLHk4viztU0vgyaLkSosFy3mzm0gQprQtcstv/YW/fdRvEDFU2nuDGDeTCVB+ppvGFhbzocht8DTs/lbiJLxTtYnZVztb/mpZriYELA1DwHf1/6OkGl1/Y/GI8/nBD056ZuE64J1tdTHmtz7Br4mvYYh5P6q/sziDbcl2hRylfFIngPXoxm6enXTL/NUg+CGNrI1OW82GnF5UaAvKpW3nyRQzuJ0e06G79k8Opo8XVOWzIfSKn/nM7+X4XoYUcpfcrSYaysNcaujYXB1PC0qm2A== 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=Jpzv8wgguEK3Oj+UCYsUNtCopr5mkHpM6XfQnK0NH5I=; b=UtK8rBdvgBBAj6ha5mhvjStCioYNuXJcQYCmI7HZDZBjCHb07MQC8IyR/ICdZX8DEnctHQG3gzObhazTaNEDZakmYPyaAtnCFGVyS9oZFYZmuN5ed3lPVowlvWqVZkVwQt25c3firSzxqWL5QlFO5bt/pro3LKkQlMk/ldVSsxM= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB2893.namprd11.prod.outlook.com (2603:10b6:805:dc::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Wed, 20 May 2020 04:25:23 +0000 Received: from SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584]) by SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584%4]) with mapi id 15.20.3021.020; Wed, 20 May 2020 04:25:23 +0000 From: "Chiu, Chasel" To: "Zeng, Star" , "Desimone, Nathaniel L" , "devel@edk2.groups.io" CC: "Ma, Maurice" Subject: Re: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Topic: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Index: AQHWLleNYkwnKfAwkk+6ugAt8DiPSaiwXOeggAACdgCAAAEysA== Date: Wed, 20 May 2020 04:25:22 +0000 Message-ID: References: <20200520033356.5708-1-chasel.chiu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 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: [134.134.136.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4df12c18-8ae2-471a-225b-08d7fc75d037 x-ms-traffictypediagnostic: SN6PR11MB2893: 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: ZQ2K+Hty1wvEzlASudYAH77fHneDN79+l+fz4VNx+ix2JJb2ORijmWpjKSR+wxXLbU0CmAbViyfelQupT0EVgVMFP5lSmZMPaYtGx6siiWG6Y4Aw3c+Rn87TFnX0dJ9LivrWZ8s+gi4GN6kT1+ZHcEldDw+Su2+z3ot1zvedPvnXk+bjATcVC4bbCTg2PYSrRPk6hQl6rKxbYWCUoRT5XqIbloiHkWK0UsZT/QyTNBawxqs8HnbZU15jZ7sBYuNx8C1d/p3Mbs7kUtqa08cGpQ7Y2yMXuLPDbE9azPa0JJOW4v+P+yozQ6kwlTJqmREMowIazpVA++XANXiAnJjG3rnJud+rvUX+14N34YUZU0AK/aGKO9qk2DT9j2/fAPhfE6PoH217HUx4Xoiv/ooliawS7Ri0ytdp1ahvFzK6dylkoWQzobaErgkvSI4y98Qlh0ACCO16TtEgkl4qD9D9KMYE/A56gTH11u8xuRS3aQKM+4Ja2yaudVGn/DARFR1SjutZdeZJe53buvKXxpFilw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2814.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(396003)(376002)(39860400002)(136003)(346002)(316002)(7696005)(107886003)(6506007)(53546011)(52536014)(186003)(5660300002)(33656002)(19627235002)(86362001)(8936002)(26005)(55016002)(8676002)(9686003)(64756008)(71200400001)(4326008)(110136005)(478600001)(66946007)(966005)(66476007)(66446008)(66556008)(76116006)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 3XNtWsy+4TGRjgSxGutf/S9ca9pCtoq8Hau//YxVZrIKBB4fZ4NoQSshrtXRhK4CaE8F4sVMTjT/zIKz7WPUyVbL5cZMIyvOMYfnNHKM9q/IJz+QpOjzazzEvYhyg7DgiRSBNlSbIE/iP43UK/VrYsi6pdWZspZ7LYy0+ANQLo8nBYOj1gMyOiQZStIWEr1d2SmP9rXi2DmPehwrm/rh/7XSGx7fCdY+6VCFaQ5Qjx56l2JmUrbRA+dBGgcV/c/4MSYL/HcmmR2/pE/2FSW6aPTR18ioWNoaI7js/ZAj4fXp2pmPodDonF6Wy4UQsUKBD+v4G0p/I0ErHtYDpE1a4lwmlH1WDUPPPt90VmieSguYEKx9/2ZAFAu2JoSyHSZP4JWHI0Jw3+zKsj3G5VunHHr4K4Q9Guyi5PrJfwWwjRpL81XemoPKgR2iEg4lz44CBJ81+3r1OdMNVCLnARPls3DbGNgZ9LAsMot16+1z//s9iFaDe/Xf3tZr2WhY84go MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4df12c18-8ae2-471a-225b-08d7fc75d037 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2020 04:25:22.8993 (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: 6dKKoAQHcmXd1dMVx/qq55niIzheTJySoLymgFz4qONwgq4cX/KVNMqzkRUo68SsAi2cmVSK+kG3AJJdx85K1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2893 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yes, thanks for good catch! I will correct it. > -----Original Message----- > From: Zeng, Star > Sent: Wednesday, May 20, 2020 12:21 PM > To: Desimone, Nathaniel L ; Chiu, Chasel > ; devel@edk2.groups.io > Cc: Ma, Maurice ; Zeng, Star > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to > FspGlobalData. >=20 > equilivant is a typo? >=20 > > -----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. > > > > Reviewed-by: Nate DeSimone > > > > > -----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