From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: nathaniel.l.desimone@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Thu, 06 Jun 2019 02:53:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2019 02:53:42 -0700 X-ExtLoop1: 1 Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by fmsmga006.fm.intel.com with ESMTP; 06 Jun 2019 02:53:42 -0700 Received: from orsmsx116.amr.corp.intel.com (10.22.240.14) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 6 Jun 2019 02:53:42 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.116]) by ORSMSX116.amr.corp.intel.com ([169.254.7.165]) with mapi id 14.03.0415.000; Thu, 6 Jun 2019 02:53:42 -0700 From: "Nate DeSimone" To: "Chiu, Chasel" , "devel@edk2.groups.io" CC: "Kubacki, Michael A" , "Gao, Liming" Subject: Re: [PATCH 1/2] Intel/MinPlatformPkg: Support DXE drivers in FSP 2.1. Thread-Topic: [PATCH 1/2] Intel/MinPlatformPkg: Support DXE drivers in FSP 2.1. Thread-Index: AQHVGm/QaK3I8yM+UkGkv4pDJfDYpaaOZSmA Date: Thu, 6 Jun 2019 09:53:40 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AAEBD5E6D@ORSMSX114.amr.corp.intel.com> References: <20190604005233.12312-1-chasel.chiu@intel.com> <20190604005233.12312-2-chasel.chiu@intel.com> In-Reply-To: <20190604005233.12312-2-chasel.chiu@intel.com> 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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDEyZDhiNjgtOTkxYS00ZTVlLTg4Y2EtMzhmM2UxNTI1NGFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRXBmUzd3T0l0eUo1djY4akNidWNYOHlOZ3ZwN0cxUVpDOTBSVzEwUzJQQk9hWVMwcGY1TnorYlozK0tZMVdyMyJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.138] 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 The FSP specification allows FSP-S to contain an arbitrary number of Firmwa= re Volumes. Your attached patch makes the assumption that it only contains = one. I'm OK if you decide to commit this as-is for now since it is better t= han nothing, but I expect a Bugzilla to be filed to fix the 1 FV assumption= . Reviewed-by: Nate DeSimone -----Original Message----- From: Chiu, Chasel=20 Sent: Monday, June 3, 2019 5:53 PM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Kubacki, Michael A ; Desimone, Nathaniel L ; Ga= o, Liming Subject: [PATCH 1/2] Intel/MinPlatformPkg: Support DXE drivers in FSP 2.1. From: "Chasel, Chiu" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1873 In dispatch mode FSP-S contains DXE drivers so needs to BuildFvHob for DXE = dispatcher to dispatch this FV. Test: FSP API mode still boots successfully without impact. Cc: Michael Kubacki Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Chasel Chiu --- Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLi= b/FspWrapperHobProcessLib.c | 19 ++++++++++++++++--- Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLi= b/PeiFspWrapperHobProcessLib.inf | 5 ++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapper= HobProcessLib/FspWrapperHobProcessLib.c b/Platform/Intel/MinPlatformPkg/Fsp= Wrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c index e8df06dfb7..7ee4d3a31c 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProc= essLib/FspWrapperHobProcessLib.c +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobP +++ rocessLib/FspWrapperHobProcessLib.c @@ -1,7 +1,7 @@ /** @file Provide FSP wrapper hob process related function. =20 -Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -653,8 +653,21 @@ PostFspsHobProcess ( { EFI_STATUS Status; =20 - ProcessFspHobList (FspHobList); - + if (PcdGet8 (PcdFspModeSelection) =3D=3D 1) { + // + // Only in FSP API mode the wrapper has to build hobs basing on FSP ou= tput data. + // + ASSERT (FspHobList !=3D NULL); + ProcessFspHobList (FspHobList); + } else { + // + // Only in FSP Dispatch mode, FSP-S should be reported to DXE dispatch= er. + // + BuildFvHob ( + (EFI_PHYSICAL_ADDRESS) (UINTN) PcdGet32 (PcdFlashFvFspSBase), + PcdGet32 (PcdFlashFvFspSSize) + ); + } CheckFspGraphicsDeviceInfoHob (); DEBUG_CODE_BEGIN (); DumpFspSmbiosMemoryInfoHob (); diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapper= HobProcessLib/PeiFspWrapperHobProcessLib.inf b/Platform/Intel/MinPlatformPk= g/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.= inf index a76e3195d6..64f3302959 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProc= essLib/PeiFspWrapperHobProcessLib.inf +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobP +++ rocessLib/PeiFspWrapperHobProcessLib.inf @@ -1,7 +1,7 @@ ## @file # Provide FSP wrapper hob process related function. # -# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights=20 +reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -65,6 +65,9 @@ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength gMinPlatformPkgTokenSpaceGuid.PcdFspCpuPeiApWakeupBufferAddr + gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase + gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize =20 [Guids] gFspReservedMemoryResourceHobGuid ## CONSUMES ## H= OB -- 2.13.3.windows.1