1 /** @file 2 3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 4 5 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 9 The full text of the license may be found at 11 http://opensource.org/licenses/bsd-license.php. 13 15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 19 21 23 **/ 24 #include "PiPei.h" 25 #include <Library/HobLib.h> 26 #include <Library\BaseLib.h> 27 #include <Library/DebugLib.h> 28 #include <Guid/MemoryConfigData.h> 29 #include <PlatformFspLib.h> 30 31 EFI_STATUS 32 PlatformHobCreateFromFsp ( 33 IN CONST EFI_PEI_SERVICES **PeiServices, 34 VOID *HobList 35 ) 36 { 37 VOID *HobData; 38 VOID *NewHobData; 39 UINTN DataSize; 40 41 // 42 // Other hob, todo: put this into FspWrapPlatformLib 43 // 44 if ((HobList = GetNextGuidHob (&gEfiMemoryConfigDataGuid, HobList)) != NULL) { 45 HobData = GET_GUID_HOB_DATA (HobList); 46 DataSize = GET_GUID_HOB_DATA_SIZE(HobList); 47 DEBUG((EFI_D_ERROR, "gEfiMemoryConfigDataGuid Hob found: 0x%x.\n", DataSize)); 48 49 NewHobData = BuildGuidHob (&gEfiMemoryConfigDataGuid, DataSize); 50 (*PeiServices)->CopyMem ( 51 NewHobData, 52 HobData, 53 DataSize 54 ); 55 } 56 57 return EFI_SUCCESS; 58 } 59