From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.354.1576275236236490320 for ; Fri, 13 Dec 2019 14:13:56 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2019 14:13:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,311,1571727600"; d="scan'208";a="364423708" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga004.jf.intel.com with ESMTP; 13 Dec 2019 14:13:55 -0800 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 13 Dec 2019 14:13:54 -0800 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.106]) by ORSMSX113.amr.corp.intel.com ([169.254.9.100]) with mapi id 14.03.0439.000; Fri, 13 Dec 2019 14:13:54 -0800 From: "Nate DeSimone" 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 Thread-Topic: [edk2-platforms] [PATCH] WhiskeylakeOpenBoardPkg: Update PCDs to enable stack sharing Thread-Index: AQHVsIlVv1U4SVv/hkiGtQYY3AAVkKe3IDHwgAGotoD//9f8IA== Date: Fri, 13 Dec 2019 22:13:53 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5C4C709@ORSMSX114.amr.corp.intel.com> References: <20191212011314.6860-1-prince.agyeman@intel.com> <02A34F284D1DA44BB705E61F7180EF0AB5C47702@ORSMSX114.amr.corp.intel.com> In-Reply-To: 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 Return-Path: nathaniel.l.desimone@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 does= 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 t= he rest of the platform code, so more space will be needed to run MRC. What= I am questioning is if we really need 256KB? Looking at the numbers from b= efore, it seems like MRC was running OK with only 152KB of stack space, doe= s platform code really use that much stack space _at_the_same_time_ that MR= C is running? Or maybe, the newer version of MRC uses more stack space now? The basic summary is... have you tried booting with gSiPkgTokenSpaceGuid.Pc= dPeiTemporaryRamStackSize|0x26000? Thanks, Nate -----Original Message----- From: Agyeman, Prince =20 Sent: Friday, December 13, 2019 8:25 AM To: Desimone, Nathaniel L ; devel@edk2.grou= ps.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 pr= eviously? 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 e= nable 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 bina= ry (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/OpenBoa= rdPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenB= oardPkgPcd.dsc index 906f7b7ade..b3e1da3970 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPc= d.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