From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.3242.1609987981944495950 for ; Wed, 06 Jan 2021 18:53:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=NFgIUuGP; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: chasel.chiu@intel.com) IronPort-SDR: erK8kJSMwqE/9IW5+XoZKtbn+3LRvKan+azPOOv/QEDDiPvZh3sHY7/MKmO0oyfSOn9hUCp5Yl aRMw7TRFwuFw== X-IronPort-AV: E=McAfee;i="6000,8403,9856"; a="164435810" X-IronPort-AV: E=Sophos;i="5.79,328,1602572400"; d="scan'208";a="164435810" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jan 2021 18:53:00 -0800 IronPort-SDR: F7wST/gR3zGKHiH0xfzR8TSUip4Cvevx2zEUNw/s2nFLvsrGyz2/WrA6LgOE2v3s6PLbcUHsou ypnuZboYwwaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,328,1602572400"; d="scan'208";a="462879073" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 06 Jan 2021 18:53:00 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 6 Jan 2021 18:53:00 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 6 Jan 2021 18:52:59 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 6 Jan 2021 18:52:59 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Wed, 6 Jan 2021 18:52:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hTSmE53qrB6hs+VMuN5GmI4800ETopzJLEJYDrQzz1hidENYxcr06flNZDA9VgtdDG0c4g54/Aml1D1Po3TeIfiszp0DKBcN8l2KAs4Cxv/KIsj5CXwXfrDXbAi3hkquqVNd4iUueKUHTHj4fnkraxzuVCNIWJ5mJ9DlXyY/TOI/5by6K3KR3IuHu2aBpn3LwzU2G7HeqH2ZwDjv2Wj/wCdauaLJh0uHymKefV+Wed1CtYvhwjEaAVyOmXX7PQceX7JBpC8Kogt4QUo+Lyigf8QTX372c4mHwxoBLWkQA0YhUZUpOQT6+YiOBhVsPr+2lKg6zAh/3qd8Zd+aCxCsuQ== 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=PzJCpLEc9fjmydstKjfY5CrASLdJhDeVPJ9Zl4gP9QM=; b=UwOgurd90RkK5/4Ejp8SraGWKkD78aat7ounOCPXjzbj1hxg5NpV0zVoHq3OHtUoRr90MBDpA+zECcIEI0qmEbm/A9phmeNhE9XS6r0qbjVTuNyooeccPPjLHpaMVbO5DsjMjhRgl9g9X6C8ioKLe75FOAida0kLoVUq0y7fExTzVeOVxho+ykdJ5Aqd4zoYb6rzQAEF7frZRstTf8W/2OR/8tYXjllO9iu7iZKtjvw+FyGTW8NZZM1E/GnqLhLVQWAZaU5QFrQTYgSIi2NipHxh6UZLsiSqWK/+z0e/kPNzWI9n5BkX3FfdfwRN1fTOLQ/igGtl86dijLBNsf1KwQ== 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=PzJCpLEc9fjmydstKjfY5CrASLdJhDeVPJ9Zl4gP9QM=; b=NFgIUuGP/tFGI60KQnvVPjPq0PFeWM8sGByDWs3AOa7mFQc7fJBuZZOaW14ug2iQNriwZ1FvMP3/z9DX+UJMgk0o3fjKvnAnHJrBlLP1CYeusM2f4Z69/rTObn8uKpP2Z5GJDEYyOmP20DghrC+8elKUAqTESWlHJgA++TwShU8= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB3312.namprd11.prod.outlook.com (2603:10b6:805:c8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.19; Thu, 7 Jan 2021 02:52:54 +0000 Received: from SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::4967:fbdd:5a6f:e298]) by SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::4967:fbdd:5a6f:e298%2]) with mapi id 15.20.3721.024; Thu, 7 Jan 2021 02:52:54 +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: Support FSP private temporary memory. Thread-Topic: [edk2-devel] [PATCH] IntelFsp2Pkg: Support FSP private temporary memory. Thread-Index: AQHW40NbJcWMSaujAk692N+7gW1PYKobecgA Date: Thu, 7 Jan 2021 02:52:54 +0000 Message-ID: References: <16574B3F98009B5A.29174@groups.io> In-Reply-To: <16574B3F98009B5A.29174@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.5.1.3 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: [220.129.109.133] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d9e75f98-c124-45c6-5c6e-08d8b2b75511 x-ms-traffictypediagnostic: SN6PR11MB3312: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2733; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4UCqTjs2qq+l41GU6uBoE6MTFPoEYyr99PJEOHLVanhWnabdrTaR4uwwrnqUDpATD0yHc44xfePCZ9AQ1ubKKIUDB4PzNYmPqfBMteJXZ713HqFBPnI5oauXwtwIquCBb8Ox70zkFMmcdVw2PnWaPby7MjjidU5qlUZl8e9c0M7phTJvhSPrAjgjw36lyZjH74TYBUYSv5w5swVtpfSuC/2XU6O4U482bvwOBMs/EKvkcjemRNVcpyUh4IOq+ULYIxSTdrhFeV/wLyJ1yb/ZTpJxyqBKQBIZM0gCclIagEyhP/nLWk+Kr6igDcUj0LrSmeJXY2q4W92LwbcHPMtuOJZvvsCtwVUmL8h46t/HjLwCag2vrej+Ggc671hzkd5/o/nQBCG3t4gy8xAkpXNC35ZZId12PDS1b6wA3+eOGvb2/eBCqIJSnEQxJj5Wyhg+pMIGDyittmHIXVfGBUhN5w== 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;SFS:(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(107886003)(53546011)(316002)(478600001)(66556008)(66476007)(66446008)(83380400001)(71200400001)(5660300002)(64756008)(33656002)(4326008)(6506007)(8676002)(54906003)(52536014)(2906002)(76116006)(55016002)(966005)(7696005)(9686003)(26005)(186003)(8936002)(19627235002)(86362001)(66946007)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?cDfeEFOi/1pjZf9xPG8q3tEZtUVxdVnjVBul0JB1Du6a7PiuLseOVktbFs0x?= =?us-ascii?Q?bBvlqm6RjpenUEPlcxcsNSk8KZzIL80F+qYF7Zs4n8Yi3GfthktKmWXLspSM?= =?us-ascii?Q?DDUiAZmwi2sh5C9hzfdqDQxUSamm6RXYV8ORbxm9eXgxRih/kDYCTyxf7QdY?= =?us-ascii?Q?B0biwRttsn2H1VptRoWwj8x1pZ5s9DjZ9k2/nfMxovfkoLpL4R5+NbMIVXwp?= =?us-ascii?Q?3Cewsv/UZ860nw5GpPjvJEdroJRFY92GzyQWxIGnQyPYMuuakI+s0RMlUMiP?= =?us-ascii?Q?p4OOAjZGpyBOYyq4qUuzwtAE+/Nr6btxmd4/7T8/MJ2kWBvFk9ebVuVFOCq3?= =?us-ascii?Q?SdIsseY/0X3iLN2OBEMCVlX6CEKZBIDfWi/RCqYH90ys5qi6iFcy/qFQ93Ph?= =?us-ascii?Q?hiRpDzguRkgIndrj72x5pz8wfDFFYzetYfYUhArVvVRkcfWeLfYRRaiIkPB0?= =?us-ascii?Q?ERUi89EScL/QZLi/UmhFb92Igawq+weLeg6xnTAX4sKtewTqvKJssZ6e1rux?= =?us-ascii?Q?54Z3zukkO0yMOIDm5Ji+0XBbIL+QfwEzc68QSyx/PdLKr0VP6FrKUBzbOQe3?= =?us-ascii?Q?tv+/nYEIhrK9EqCOe7ZYmYyRVzhwcOWX+oEgc0SUcwXwD4k15WjSsGLSrHKX?= =?us-ascii?Q?jdTIJdEoF8qRNmye6t0zHxiQq7ih2CPT4nHgBm5qlFo02dCNffBfYNYKp94U?= =?us-ascii?Q?wvQHeJgmLZg99OlwbsU+pMLklZgXY0Ym5G/pmAI58R1LRJiZGwFfOy6d7lkM?= =?us-ascii?Q?0rY99R++TJGuLtIqMAgVn2CpCw4uTTRhaArwvuq3zBgE6zo3lxZP1xgA9l6j?= =?us-ascii?Q?AKJ2gDH6riOzmrnmFR+WV2ENv9NkQPTto9VYg9q41Ag+egTvK250fDgY4wO5?= =?us-ascii?Q?GwJXHNju9Sp8xN2AFqv2RYBlRVsylKGY4Zl2YyKQvlr0FNe+qeTyUdjVGMrt?= =?us-ascii?Q?nb+TZKKhteHAF6WBHvSGkR/Q5gRcx0QwwAGbFWAY1vkgRx5rxczA6cig1qyG?= =?us-ascii?Q?vaQl?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2814.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9e75f98-c124-45c6-5c6e-08d8b2b75511 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jan 2021 02:52:54.7346 (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: enOqh5iil9bYjdpl69HAQ68r/UlZ28oZxlIL7E6QwOT1BblMvo0cRP/Nggkz85gQhj7cyYN9qTtPKcGw/4UuRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3312 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 Patch pushed: 379e5098a4836b21b893b4801baa34b570c24599 > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chiu, Chas= el > Sent: Tuesday, January 5, 2021 5:15 PM > To: devel@edk2.groups.io > Cc: Chiu, Chasel ; Ma, Maurice > ; Desimone, Nathaniel L > ; Zeng, Star > Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: Support FSP private temporary > memory. >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3153 >=20 > When FSP sharing same bootloader stack, the bootloader provided temporary > memory for FSP will be totally given to PeiCore as Heap, but in some case= s FSP > may have to reserve some more temporary memory for private usage. >=20 > This commit adds this flexibility for FSP to reserve some temporary memor= y > before giving them to PeiCore. >=20 > Cc: Maurice Ma > Cc: Nate DeSimone > Cc: Star Zeng > Signed-off-by: Chasel Chiu > --- > IntelFsp2Pkg/FspSecCore/SecMain.c | 11 +++++++---- > IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf | 3 ++- > IntelFsp2Pkg/IntelFsp2Pkg.dec | 7 ++++++- > 3 files changed, 15 insertions(+), 6 deletions(-) >=20 > diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c > b/IntelFsp2Pkg/FspSecCore/SecMain.c > index c8de52e1d5..540571187a 100644 > --- a/IntelFsp2Pkg/FspSecCore/SecMain.c > +++ b/IntelFsp2Pkg/FspSecCore/SecMain.c > @@ -1,6 +1,6 @@ > /** @file - Copyright (c) 2014 - 2020, Intel Corporation. All rights > reserved.
+ Copyright (c) 2014 - 2021, Intel Corporation. All rights > reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/@@ -150,= 15 > +150,18 @@ SecStartup ( > SecCoreData.BootFirmwareVolumeBase =3D BootFirmwareVolume; > SecCoreData.BootFirmwareVolumeSize =3D > (UINT32)((EFI_FIRMWARE_VOLUME_HEADER *)BootFirmwareVolume)- > >FvLength; - SecCoreData.TemporaryRamBase =3D (VOID*)(UINTN) > TempRamBase;+ //+ // Support FSP reserved temporary memory from the > whole temporary memory provided by bootloader.+ // FSP reserved temporar= y > memory will not be given to PeiCore.+ //+ SecCoreData.TemporaryRamBase > =3D (UINT8 *)(UINTN) TempRamBase + PcdGet32 > (PcdFspPrivateTemporaryRamSize);+ SecCoreData.TemporaryRamSize =3D > SizeOfRam - PcdGet32 (PcdFspPrivateTemporaryRamSize); if (PcdGet8 > (PcdFspHeapSizePercentage) =3D=3D 0) {- SecCoreData.TemporaryRamSize = =3D > SizeOfRam; // stack size that is going to be copied to the permanent memo= ry > SecCoreData.PeiTemporaryRamBase =3D SecCoreData.TemporaryRamBase; > SecCoreData.PeiTemporaryRamSize =3D SecCoreData.TemporaryRamSize; > SecCoreData.StackBase =3D (VOID *)GetFspEntryStack(); // Sha= re the same > boot loader stack SecCoreData.StackSize =3D 0; } else = {- > SecCoreData.TemporaryRamSize =3D SizeOfRam; > SecCoreData.PeiTemporaryRamBase =3D SecCoreData.TemporaryRamBase; > SecCoreData.PeiTemporaryRamSize =3D SecCoreData.TemporaryRamSize * > PcdGet8 (PcdFspHeapSizePercentage) / 100; SecCoreData.StackBase = =3D > (VOID*)(UINTN)((UINTN)SecCoreData.TemporaryRamBase + > SecCoreData.PeiTemporaryRamSize);diff --git > a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > index 61b7ddca4c..7b05cae641 100644 > --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > @@ -1,7 +1,7 @@ > ## @file # Sec Core for FSP #-# Copyright (c) 2016 - 2019, Intel Corpo= ration. All > rights reserved.
+# Copyright (c) 2016 - 2021, Intel Corporation. All= rights > reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent #@@ -59,6 > +59,7 @@ > gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize ## CONSUM= ES > gIntelFsp2PkgTokenSpaceGuid.PcdFspHeapSizePercentage ## CONSUMES > gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxInterruptSupported ## > CONSUMES+ gIntelFsp2PkgTokenSpaceGuid.PcdFspPrivateTemporaryRamSize > ## CONSUMES [Ppis] gEfiTemporaryRamSupportPpiGuid = ## > PRODUCESdiff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dec > b/IntelFsp2Pkg/IntelFsp2Pkg.dec > index 60d40ab6b9..ec7b9a7702 100644 > --- a/IntelFsp2Pkg/IntelFsp2Pkg.dec > +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dec > @@ -1,7 +1,7 @@ > ## @file # Provides driver and definitions to build fsp in EDKII bios. #= -# > Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+# > Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.
# = SPDX- > License-Identifier: BSD-2-Clause-Patent # ##@@ -98,6 +98,11 @@ > # Maximal Interrupt supported in IDT table. # > gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxInterruptSupported | 34| > UINT8|0x10000005+ #+ # Allows FSP-M to reserve a section of Temporary > RAM for implementation specific use.+ # Reduces the amount of memory > available for the PeiCore heap.+ #+ > gIntelFsp2PkgTokenSpaceGuid.PcdFspPrivateTemporaryRamSize > |0x00000000|UINT32|0x10000006 > [PcdsFixedAtBuild,PcdsDynamic,PcdsDynamicEx] > gIntelFsp2PkgTokenSpaceGuid.PcdFspReservedMemoryLength > |0x00100000|UINT32|0x46530000-- > 2.28.0.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#69685): https://edk2.groups.io/g/devel/message/69685 > Mute This Topic: https://groups.io/mt/79446867/1777047 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.chiu@intel.com]= -=3D- > =3D-=3D-=3D-=3D-=3D >=20