From: "Chiu, Chasel" <chasel.chiu@intel.com>
To: devel@edk2.groups.io
Cc: "Chasel, Chiu" <chasel.chiu@intel.com>,
Michael Kubacki <michael.a.kubacki@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>,
Liming Gao <liming.gao@intel.com>
Subject: [PATCH 1/2] Intel/MinPlatformPkg: Support DXE drivers in FSP 2.1.
Date: Tue, 4 Jun 2019 08:52:32 +0800 [thread overview]
Message-ID: <20190604005233.12312-2-chasel.chiu@intel.com> (raw)
In-Reply-To: <20190604005233.12312-1-chasel.chiu@intel.com>
From: "Chasel, Chiu" <chasel.chiu@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1873
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 <michael.a.kubacki@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
---
Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c | 19 ++++++++++++++++---
Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf | 5 ++++-
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c
index e8df06dfb7..7ee4d3a31c 100644
--- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/FspWrapperHobProcessLib.c
@@ -1,7 +1,7 @@
/** @file
Provide FSP wrapper hob process related function.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -653,8 +653,21 @@ PostFspsHobProcess (
{
EFI_STATUS Status;
- ProcessFspHobList (FspHobList);
-
+ if (PcdGet8 (PcdFspModeSelection) == 1) {
+ //
+ // Only in FSP API mode the wrapper has to build hobs basing on FSP output data.
+ //
+ ASSERT (FspHobList != NULL);
+ ProcessFspHobList (FspHobList);
+ } else {
+ //
+ // Only in FSP Dispatch mode, FSP-S should be reported to DXE dispatcher.
+ //
+ BuildFvHob (
+ (EFI_PHYSICAL_ADDRESS) (UINTN) PcdGet32 (PcdFlashFvFspSBase),
+ PcdGet32 (PcdFlashFvFspSSize)
+ );
+ }
CheckFspGraphicsDeviceInfoHob ();
DEBUG_CODE_BEGIN ();
DumpFspSmbiosMemoryInfoHob ();
diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf
index a76e3195d6..64f3302959 100644
--- a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf
@@ -1,7 +1,7 @@
## @file
# Provide FSP wrapper hob process related function.
#
-# Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -65,6 +65,9 @@
gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
gMinPlatformPkgTokenSpaceGuid.PcdPciExpressRegionLength
gMinPlatformPkgTokenSpaceGuid.PcdFspCpuPeiApWakeupBufferAddr
+ gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection
+ gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase
+ gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize
[Guids]
gFspReservedMemoryResourceHobGuid ## CONSUMES ## HOB
--
2.13.3.windows.1
next prev parent reply other threads:[~2019-06-04 0:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 0:52 [PATCH 0/2] Support DXE drivers in FSP 2.1 Chiu, Chasel
2019-06-04 0:52 ` Chiu, Chasel [this message]
2019-06-06 9:53 ` [PATCH 1/2] Intel/MinPlatformPkg: " Nate DeSimone
2019-06-11 1:26 ` Chiu, Chasel
2019-06-04 0:52 ` [PATCH 2/2] KabylakeOpenBoardPkg: " Chiu, Chasel
2019-06-06 9:53 ` Nate DeSimone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190604005233.12312-2-chasel.chiu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox