]>
Commit | Line | Data |
---|---|---|
49ba9447 | 1 | /** @file\r |
2 | Build FV related hobs for platform.\r | |
3 | \r | |
56d7640a HT |
4 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r |
5 | This program and the accompanying materials\r | |
49ba9447 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include "PiPei.h"\r | |
16 | #include <Library/DebugLib.h>\r | |
49ba9447 | 17 | #include <Library/HobLib.h>\r |
18 | #include <Library/PeiServicesLib.h>\r | |
49ba9447 | 19 | #include <Library/PcdLib.h>\r |
20 | \r | |
21 | \r | |
22 | /**\r | |
23 | Perform a call-back into the SEC simulator to get address of the Firmware Hub\r | |
24 | \r | |
25 | @param FfsHeader Ffs Header availible to every PEIM\r | |
26 | @param PeiServices General purpose services available to every PEIM.\r | |
27 | \r | |
28 | @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.\r | |
29 | \r | |
30 | **/\r | |
31 | EFI_STATUS\r | |
32 | PeiFvInitialization (\r | |
33 | VOID\r | |
34 | )\r | |
35 | {\r | |
c1c2669c | 36 | EFI_PHYSICAL_ADDRESS FdBase;\r |
49ba9447 | 37 | \r |
38 | DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));\r | |
39 | \r | |
40 | DEBUG (\r | |
41 | (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n",\r | |
c1c2669c | 42 | PcdGet32 (PcdOvmfMemFvBase),\r |
43 | PcdGet32 (PcdOvmfMemFvSize)\r | |
49ba9447 | 44 | )\r |
45 | );\r | |
46 | \r | |
c1c2669c | 47 | FdBase = PcdGet32 (PcdOvmfMemFvBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r |
48 | BuildFvHob (PcdGet32 (PcdOvmfMemFvBase), PcdGet32 (PcdOvmfMemFvSize));\r | |
49ba9447 | 49 | \r |
c1c2669c | 50 | //\r |
51 | // Create a memory allocation HOB.\r | |
52 | //\r | |
53 | BuildMemoryAllocationHob (\r | |
54 | PcdGet32 (PcdOvmfMemFvBase),\r | |
55 | PcdGet32 (PcdOvmfMemFvSize),\r | |
56 | EfiBootServicesData\r | |
49ba9447 | 57 | );\r |
58 | \r | |
59 | return EFI_SUCCESS;\r | |
60 | }\r | |
61 | \r |