summaryrefslogtreecommitdiff
path: root/IntelFspWrapperPkg
diff options
context:
space:
mode:
authorYao, Jiewen <jiewen.yao@intel.com>2015-11-16 08:12:48 +0000
committervanjeff <vanjeff@Edk2>2015-11-16 08:12:48 +0000
commite42c0d6cf83cf42c2a1a209162e48a8ab33999de (patch)
treee7eff30e87d834aaec2c2bc769048faba25c6812 /IntelFspWrapperPkg
parentbcdff59e3a033ce7b3e1046e69297a3e2cf3d0f1 (diff)
downloadedk2-platforms-e42c0d6cf83cf42c2a1a209162e48a8ab33999de.tar.xz
Publish FspHob to PEI Hob by default.
because most platforms use such logic. PcdDataBaseHobGuid GuidHob is excluded because PCD database in FSP is different with the one in PEI. (Sync patch r18687 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18813 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFspWrapperPkg')
-rw-r--r--IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c38
-rw-r--r--IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf1
2 files changed, 39 insertions, 0 deletions
diff --git a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c
index 099980e525..a96c151df4 100644
--- a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c
+++ b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c
@@ -25,6 +25,7 @@
#include <Guid/GuidHobFspEas.h>
#include <Guid/MemoryTypeInformation.h>
+#include <Guid/PcdDataBaseHobGuid.h>
#include <Ppi/Capsule.h>
//
@@ -335,6 +336,41 @@ FspHobProcessForMemoryResource (
}
/**
+ Process FSP HOB list
+
+ @param[in] FspHobList Pointer to the HOB data structure produced by FSP.
+
+**/
+VOID
+ProcessFspHobList (
+ IN VOID *FspHobList
+ )
+{
+ EFI_PEI_HOB_POINTERS FspHob;
+
+ FspHob.Raw = FspHobList;
+
+ //
+ // Add all the HOBs from FSP binary to FSP wrapper
+ //
+ while (!END_OF_HOB_LIST (FspHob)) {
+ if (FspHob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION) {
+ //
+ // Skip FSP binary creates PcdDataBaseHobGuid
+ //
+ if (!CompareGuid(&FspHob.Guid->Name, &gPcdDataBaseHobGuid)) {
+ BuildGuidDataHob (
+ &FspHob.Guid->Name,
+ GET_GUID_HOB_DATA(FspHob),
+ GET_GUID_HOB_DATA_SIZE(FspHob)
+ );
+ }
+ }
+ FspHob.Raw = GET_NEXT_HOB (FspHob);
+ }
+}
+
+/**
BIOS process FspBobList for other data (not Memory Resource Descriptor).
@param[in] FspHobList Pointer to the HOB data structure produced by FSP.
@@ -347,6 +383,8 @@ FspHobProcessForOtherData (
IN VOID *FspHobList
)
{
+ ProcessFspHobList (FspHobList);
+
return EFI_SUCCESS;
}
diff --git a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf
index 12f922c0d9..c7f35f7bdf 100644
--- a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf
+++ b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf
@@ -70,6 +70,7 @@
[Guids]
gFspReservedMemoryResourceHobGuid ## CONSUMES ## HOB
gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID
+ gPcdDataBaseHobGuid ## CONSUMES ## HOB
[Ppis]
gEfiPeiCapsulePpiGuid ## CONSUMES