From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.519.1576276051412055784 for ; Fri, 13 Dec 2019 14:27:31 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2019 14:27:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,311,1571727600"; d="scan'208";a="204455821" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga007.jf.intel.com with ESMTP; 13 Dec 2019 14:27:27 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.106]) by ORSMSX104.amr.corp.intel.com ([169.254.4.218]) with mapi id 14.03.0439.000; Fri, 13 Dec 2019 14:27:26 -0800 From: "Nate DeSimone" To: "devel@edk2.groups.io" , "Desimone, Nathaniel L" , "Agyeman, Prince" CC: "Chiu, Chasel" , "Kubacki, Michael A" Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Thread-Topic: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Thread-Index: AQHVsIlVv1U4SVv/hkiGtQYY3AAVkKe3IDHwgAGotoD//9f8IIAABq9w Date: Fri, 13 Dec 2019 22:27:26 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5C4C811@ORSMSX114.amr.corp.intel.com> References: <20191212011314.6860-1-prince.agyeman@intel.com> <02A34F284D1DA44BB705E61F7180EF0AB5C47702@ORSMSX114.amr.corp.intel.com> <15E00DF9E44B8812.24131@groups.io> In-Reply-To: <15E00DF9E44B8812.24131@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTRjY2UzZjMtZDYzNy00YjJjLTk1NTMtZWZmOTdjYTA3YjAwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSFFLamd2NFRuQ0ZUTnk4d1hDXC9WQmo4T2lMUFY1Nk04cjRtcmUyVlBZcGdKcldjSWtuV1hlMWJzY1pibnVnS1cifQ== x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Actually looking at the CoffeeLake FSP Integration Guide it states the mini= mum stack size to be 160KB (0x28000) so I guess a slight revision to my pre= vious statement: gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x28000 Thanks, Nate -----Original Message----- From: devel@edk2.groups.io On Behalf Of Nate DeSimo= ne Sent: Friday, December 13, 2019 2:14 PM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: Re: [edk2-devel] [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg= : Update PCDs to enable stack sharing Hi Prince, Looking at your patch I see the following two changes: 1. Reduce FSP Temp Ram size from 152KB to 64KB: - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x10000 This makes sense because now that the FSP is using the single stack it doe= s not need as much temp ram. 2. Increase the size of the platform's PEI phase stack from 128KB to 256KB= : - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x20000 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x40000 This also makes sense because the FSP is now running on the same stack as = the rest of the platform code, so more space will be needed to run MRC. Wha= t I am questioning is if we really need 256KB? Looking at the numbers from = before, it seems like MRC was running OK with only 152KB of stack space, do= es platform code really use that much stack space _at_the_same_time_ that M= RC is running? Or maybe, the newer version of MRC uses more stack space now= ? The basic summary is... have you tried booting with gSiPkgTokenSpaceGuid.P= cdPeiTemporaryRamStackSize|0x26000? Thanks, Nate -----Original Message----- From: Agyeman, Prince =20 Sent: Friday, December 13, 2019 8:25 AM To: Desimone, Nathaniel L ; devel@edk2.gro= ups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs= to enable stack sharing Hi Nate, Which 256KB are you referring to ? The temporary ram size was reduced from 152KB (0x26000) to 64KB (0x10000) With stack sharing enabled in FSP, temp ram size of 0x26000 causes system= to hang during memory training. - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize |0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x10000 -----Original Message----- From: Desimone, Nathaniel L Sent: Thursday, December 12, 2019 3:07 PM To: Agyeman, Prince ; devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A Subject: RE: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs= to enable stack sharing Hi Prince, Is 256KB really necessary? Could you try the 152KB (0x26000) that we had p= reviously? Thanks, Nate -----Original Message----- From: Agyeman, Prince Sent: Wednesday, December 11, 2019 5:13 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Kubacki, Michael A Subject: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to = enable stack sharing REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2409 Updated WhiskeylakeURvp PCDs to enable FSP/BL stack sharing. This fixes the boot failure seen with the latest Coffee Lake (CFL) FSP bin= ary (v 7.0.68.41) Cc: Chasel Chiu Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBo= ardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Open= BoardPkgPcd.dsc index 906f7b7ade..b3e1da3970 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgP= cd.dsc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk +++ gPcd.dsc @@ -54,15 +54,14 @@ gSiPkgTokenSpaceGuid.PcdTsegSize|0x1000000 =20 # - # FSP API mode does not share stack with the boot loader, - # so FSP needs more temporary memory for FSP heap + stack size. + # When sharing stack with boot loader, FSP only needs small temp ram=20 + for heap # - gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x26000 + gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize|0x10000 + # - # FSP API mode does not need to enlarge the boot loader stack size - # since the stacks are separate. + # Boot loader stack size has to be big enough to executing FSP # - gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x20000 + gSiPkgTokenSpaceGuid.PcdPeiTemporaryRamStackSize|0x40000 =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000 gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength|0x10000000 -- 2.19.1.windows.1