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