]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.c
Vlv2TbltDevicePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / PlatformFspLib / PlatformFspLib.c
1 /** @file
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7
8
9 **/
10 #include "PiPei.h"
11 #include <Library/HobLib.h>
12 #include <Library/BaseLib.h>
13 #include <Library/DebugLib.h>
14 #include <Guid/MemoryConfigData.h>
15 #include <PlatformFspLib.h>
16
17 EFI_STATUS
18 PlatformHobCreateFromFsp (
19 IN CONST EFI_PEI_SERVICES **PeiServices,
20 VOID *HobList
21 )
22 {
23 VOID *HobData;
24 VOID *NewHobData;
25 UINTN DataSize;
26
27 //
28 // Other hob, todo: put this into FspWrapPlatformLib
29 //
30 if ((HobList = GetNextGuidHob (&gEfiMemoryConfigDataGuid, HobList)) != NULL) {
31 HobData = GET_GUID_HOB_DATA (HobList);
32 DataSize = GET_GUID_HOB_DATA_SIZE(HobList);
33 DEBUG((EFI_D_ERROR, "gEfiMemoryConfigDataGuid Hob found: 0x%x.\n", DataSize));
34
35 NewHobData = BuildGuidHob (&gEfiMemoryConfigDataGuid, DataSize);
36 (*PeiServices)->CopyMem (
37 NewHobData,
38 HobData,
39 DataSize
40 );
41 }
42
43 return EFI_SUCCESS;
44 }