]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Build FV related hobs for platform.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
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 "Platform.h"\r | |
17 | #include <Library/DebugLib.h>\r | |
18 | #include <Library/HobLib.h>\r | |
19 | #include <Library/PeiServicesLib.h>\r | |
20 | #include <Library/PcdLib.h>\r | |
21 | \r | |
22 | \r | |
23 | /**\r | |
24 | Publish PEI & DXE (Decompressed) Memory based FVs to let PEI\r | |
25 | and DXE know about them.\r | |
26 | \r | |
27 | @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.\r | |
28 | \r | |
29 | **/\r | |
30 | EFI_STATUS\r | |
31 | PeiFvInitialization (\r | |
32 | VOID\r | |
33 | )\r | |
34 | {\r | |
35 | DEBUG ((EFI_D_INFO, "Platform PEI Firmware Volume Initialization\n"));\r | |
36 | \r | |
37 | //\r | |
38 | // Create a memory allocation HOB for the PEI FV.\r | |
39 | //\r | |
40 | // Allocate as ACPI NVS is S3 is supported\r | |
41 | //\r | |
42 | BuildMemoryAllocationHob (\r | |
43 | PcdGet32 (PcdOvmfPeiMemFvBase),\r | |
44 | PcdGet32 (PcdOvmfPeiMemFvSize),\r | |
45 | mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData\r | |
46 | );\r | |
47 | \r | |
48 | //\r | |
49 | // Let DXE know about the DXE FV\r | |
50 | //\r | |
51 | BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize));\r | |
52 | \r | |
53 | //\r | |
54 | // Create a memory allocation HOB for the DXE FV.\r | |
55 | //\r | |
56 | BuildMemoryAllocationHob (\r | |
57 | PcdGet32 (PcdOvmfDxeMemFvBase),\r | |
58 | PcdGet32 (PcdOvmfDxeMemFvSize),\r | |
59 | EfiBootServicesData\r | |
60 | );\r | |
61 | \r | |
62 | //\r | |
63 | // Let PEI know about the DXE FV so it can find the DXE Core\r | |
64 | //\r | |
65 | PeiServicesInstallFvInfoPpi (\r | |
66 | NULL,\r | |
67 | (VOID *)(UINTN) PcdGet32 (PcdOvmfDxeMemFvBase),\r | |
68 | PcdGet32 (PcdOvmfDxeMemFvSize),\r | |
69 | NULL,\r | |
70 | NULL\r | |
71 | );\r | |
72 | \r | |
73 | return EFI_SUCCESS;\r | |
74 | }\r | |
75 | \r |