]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.c
MdeModulePkg Ppi/IoMmu.h: Add EFI_NOT_AVAILABLE_YET return status code
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / PlatformFspLib / PlatformFspLib.c
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
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 **/
15 #include "PiPei.h"
16 #include <Library/HobLib.h>
17 #include <Library/BaseLib.h>
18 #include <Library/DebugLib.h>
19 #include <Guid/MemoryConfigData.h>
20 #include <PlatformFspLib.h>
21
22 EFI_STATUS
23 PlatformHobCreateFromFsp (
24 IN CONST EFI_PEI_SERVICES **PeiServices,
25 VOID *HobList
26 )
27 {
28 VOID *HobData;
29 VOID *NewHobData;
30 UINTN DataSize;
31
32 //
33 // Other hob, todo: put this into FspWrapPlatformLib
34 //
35 if ((HobList = GetNextGuidHob (&gEfiMemoryConfigDataGuid, HobList)) != NULL) {
36 HobData = GET_GUID_HOB_DATA (HobList);
37 DataSize = GET_GUID_HOB_DATA_SIZE(HobList);
38 DEBUG((EFI_D_ERROR, "gEfiMemoryConfigDataGuid Hob found: 0x%x.\n", DataSize));
39
40 NewHobData = BuildGuidHob (&gEfiMemoryConfigDataGuid, DataSize);
41 (*PeiServices)->CopyMem (
42 NewHobData,
43 HobData,
44 DataSize
45 );
46 }
47
48 return EFI_SUCCESS;
49 }