--- /dev/null
+/** @file\r
+\r
+ Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ \r\r
+ This program and the accompanying materials are licensed and made available under\r\r
+ the terms and conditions of the BSD License that accompanies this distribution. \r\r
+ The full text of the license may be found at \r\r
+ http://opensource.org/licenses/bsd-license.php. \r\r
+ \r\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
+ \r\r
+\r
+**/\r
+#include "PiPei.h"\r
+#include <Library/HobLib.h>\r
+#include <Library\BaseLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Guid/MemoryConfigData.h>\r
+#include <PlatformFspLib.h>\r
+\r
+EFI_STATUS\r
+PlatformHobCreateFromFsp (\r
+ IN CONST EFI_PEI_SERVICES **PeiServices,\r
+ VOID *HobList\r
+ )\r
+{\r
+ VOID *HobData;\r
+ VOID *NewHobData;\r
+ UINTN DataSize;\r
+\r
+ //\r
+ // Other hob, todo: put this into FspWrapPlatformLib\r
+ //\r
+ if ((HobList = GetNextGuidHob (&gEfiMemoryConfigDataGuid, HobList)) != NULL) {\r
+ HobData = GET_GUID_HOB_DATA (HobList);\r
+ DataSize = GET_GUID_HOB_DATA_SIZE(HobList);\r
+ DEBUG((EFI_D_ERROR, "gEfiMemoryConfigDataGuid Hob found: 0x%x.\n", DataSize));\r
+\r
+ NewHobData = BuildGuidHob (&gEfiMemoryConfigDataGuid, DataSize);\r
+ (*PeiServices)->CopyMem (\r
+ NewHobData,\r
+ HobData,\r
+ DataSize\r
+ );\r
+ }\r
+\r
+ return EFI_SUCCESS;\r
+}\r