From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.2581.1590024618813025816 for ; Wed, 20 May 2020 18:30:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=fvpazRtu; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: chasel.chiu@intel.com) IronPort-SDR: mNOW1oGN5W5uZpk8lRcQTzYsMw8L1hpghCbxFVB/pnCNW9ezKU3p3WbiohXeU8mw+V6baRlUWF tSRp12dOAucA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2020 18:30:18 -0700 IronPort-SDR: zUJy8Sm3JfW2Lq2YhY5LVo+hiCHXYXurZyt6IhIFYNxPOuqqHF2HzN399P/hd9GckSa94cvxx1 zAcYKer7frzA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,416,1583222400"; d="scan'208";a="255170731" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga008.fm.intel.com with ESMTP; 20 May 2020 18:30:18 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 May 2020 18:30:17 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 20 May 2020 18:30:17 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 20 May 2020 18:30:17 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 20 May 2020 18:30:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OkU+bqe/BB/rSE/8I8a+24gAt7OAlazWvy+/mjEnKU6iImSlt09pVjdINeybTJaus04ktdvwC0tr9Ow/m/Us4lafO/eD00a0p/6Q41pjxKvvdZM3l5qlgkpUmgZX/Wq6J2otIiky/3WtGAAPxUB2PaAE1GkSJ1yhxQyDJdnFmLZMoEZAeQ8PvXLUMHvrVg11U5iD6szZ1SqK5KxdWGKgW1EILHprLxNJWBPVYBCLbMtZxpaDbGOCXZxqsNL7fGWx0DoCgNmi467gRaxrRX6lAcRFt3TPhKbml1H8GASTjcUq1gQKp8J0yzGATT30CTGoir/YcyIYyPYF2xq9WxTJTw== 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=2Y1zJdOJfRSL8xktoTWN46q2KBrr42iQTkXBLftxZXU=; b=Xp0+bJm4oGNqIPr7YuRSEDJTd8/GJaLRXT/NCCUQon/vqun4kDd5l8NtqtiG6hWkM8UvvGIH7ACa+LCMdT/lY8riRpl3TN3OfppeoMOW3z7lY4IUfXXrZkUZQJUpr+ovvi1qJKAU8OrT3y08qNEgHNliWu9ymKstcePzAT8Z9hl2KNDn/HSW/RGkOEf98LbA1y/34HpKIJLIbykLoh6AxYHcFQzg1a12Qv6PvimLv8DD2gt3Q0ML2ex0Yrh3NH6JzoncnafmG75EiAMkGBxvQe17/NYkRN/38jdIYytwYPlDuYgqnTWO8jBYpAsOFp8RDXN8uV0dSXXVqktdDVaLig== 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=2Y1zJdOJfRSL8xktoTWN46q2KBrr42iQTkXBLftxZXU=; b=fvpazRtuMoRyOF7fByJiFwDrLf3IjZ4+NtEgb6CqtWYdwN9oDRGalhfWeANz8Yl60dLCSBym83lvC84TebM259urnIzQEz+nTuaeHfAFgEtDPmBd3R20ClHKmD1ks1lF9imBJ7rpKmMmNaXBQ/joaNg6zwcEf2FiGiPttSkTjjQ= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB2861.namprd11.prod.outlook.com (2603:10b6:805:61::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25; Thu, 21 May 2020 01:30:14 +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; Thu, 21 May 2020 01:30:14 +0000 From: "Chiu, Chasel" To: "devel@edk2.groups.io" , "Chiu, Chasel" CC: "Ma, Maurice" , "Desimone, Nathaniel L" , "Zeng, Star" Subject: Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Topic: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData. Thread-Index: AQHWLlehublJVTiImUGPf6Ov20ZMJKixwfTA Date: Thu, 21 May 2020 01:30:13 +0000 Message-ID: References: <16109F23980D9FB3.14536@groups.io> In-Reply-To: <16109F23980D9FB3.14536@groups.io> 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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [134.134.136.208] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2831d92e-20bc-42b0-a969-08d7fd2682bb x-ms-traffictypediagnostic: SN6PR11MB2861: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 041032FF37 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bxNd/aa2ckPJNZPIfxJZZ6oiVd+BqkvMoqV/2cFQ7sQfaZEaFmiPerZaKCcPrVHMOiUYF1avrxbHLtgir3O1vFm6zN5/kqhVXNYCFvD3Y1BU2e7rUh/1t9d9mkqyffLi0rsYcVpuFsUiHZ+jf86LF4fOje6b6u3ivkiI252+yxqcQotPmeZ0pDJky/63L3rUuMiBcTr42jymz442cwNCis5yvC//Prj2+00hw2hunlDDd1ZWQewwGJ8Z6TIlyPiTKtXP4omju3TkSxk77f1iZ/InXl4Ad9fjecY1Zytd58IF1OFI6Pwp3Qb/EbO4rfcRvowaK1arBxAsP18/HlAlfkWAEhfwaE0y+KvOKjUZ3GH6FUlNqN81Wj7GkY7wv90su2FrNoX9wJyfXqALrhpw7boentpxiQ74ey6OljgjkO2+TLTvLHisH1rcCiJYPMrkhTs0XBvG9Rx6MOTYuzVmh2llCFswJ7uoOLg1nvg4VQm5BADILdTn92tCmFW7lcFgLkQwFpwOI2/EfbYkqCPfGA== 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)(346002)(136003)(376002)(39860400002)(396003)(52536014)(8676002)(66476007)(55016002)(66556008)(64756008)(66446008)(2906002)(71200400001)(9686003)(76116006)(33656002)(66946007)(478600001)(186003)(26005)(19627235002)(966005)(53546011)(107886003)(6506007)(316002)(8936002)(86362001)(4326008)(7696005)(5660300002)(110136005)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: MXl92TfB1Uwcmf+KMTCLYeRpoVI/ywcvA0a4Qn/DHy+lBqUUkrNhAbBsszSLGn97r+Zd9v5wrpQVGjjrK7P1ZLDKdZ7MvVrLjRw+jAaVC0faMmlhLVnR8aIq73IvxBt3n0y8xnH2flRz1JoP5reGYowxLPoGVmfB/132EVvixj4UB28TTwhkdhUAwgXUKT13cHp3WrzMR17Idr6uxdfUjDV2VRwzMySJ1U1sgV2vhmf+YFlZONSN5StaKwwEL2YQniuNepx/NUuUGqUS4CMsWYyvXk5apvsWZHWnOR4EHKBp7a1N+xyKXbROO+eN657PN3E2AQjYJ0uqmr1QD6ickkFVkAkGNxAM7/VteD1Y4CZ8uMH5W3T50ZrqiFRdbGnIN4s5czR1PBWICR+CsVZg0C8yQgan51HfdydZQmtRWPAsBsuV3l7gJ/ZgnG6zliuSeb0UwckC5fXyTO9X+dFP8dJqq0onmnSvBmX4g8iCKOcCgsh/eoqmwPZE3tdWTG+W MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2831d92e-20bc-42b0-a969-08d7fd2682bb X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2020 01:30:13.8676 (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: nvXCwzfx4ZOLfkYc+Op2MjpQuNeFtWB8/2YHLDCPn2/eYewmroafn8vwqf3iMDbbWwvUsOhZIg0wjnLuVxl5iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2861 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 Change pushed: 3f89db869028fa65a37756fd7f391cbd69f4579c Thanks, Chasel > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chiu, > Chasel > Sent: Wednesday, May 20, 2020 11:34 AM > To: devel@edk2.groups.io > Cc: Ma, Maurice ; Desimone, Nathaniel L > ; Zeng, Star > Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to > FspGlobalData. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2726 >=20 > 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 retriev= e > it after stack switched. >=20 > Also need to add Loader2PeiSwitchStack () to header file as public funct= ion > for platform FSP code to consume. >=20 > 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(-) >=20 > 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 >=20 > - Copyright (c) 2014, Intel Corporation. All rights reserved.
> + Copyright (c) 2014 - 2020, Intel Corporation. All rights > + reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -36,4 +36,20 @@ Pei2LoaderSwitchStack ( > VOID > ); >=20 > +/** > + > + 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 >=20 >=20 >=20