]>
Commit | Line | Data |
---|---|---|
49ba9447 | 1 | /** @file\r |
2 | Build FV related hobs for platform.\r | |
3 | \r | |
b36f701d | 4 | Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r |
56d7640a | 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 | |
74e5c158 | 16 | #include "Platform.h"\r |
49ba9447 | 17 | #include <Library/DebugLib.h>\r |
49ba9447 | 18 | #include <Library/HobLib.h>\r |
19 | #include <Library/PeiServicesLib.h>\r | |
49ba9447 | 20 | #include <Library/PcdLib.h>\r |
21 | \r | |
22 | \r | |
23 | /**\r | |
b36f701d JJ |
24 | Publish PEI & DXE (Decompressed) Memory based FVs to let PEI\r |
25 | and DXE know about them.\r | |
49ba9447 | 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 | |
b36f701d | 35 | DEBUG ((EFI_D_INFO, "Platform PEI Firmware Volume Initialization\n"));\r |
49ba9447 | 36 | \r |
b36f701d JJ |
37 | //\r |
38 | // Create a memory allocation HOB for the PEI FV.\r | |
39 | //\r | |
74e5c158 | 40 | // Allocate as ACPI NVS is S3 is supported\r |
b36f701d JJ |
41 | //\r |
42 | BuildMemoryAllocationHob (\r | |
43 | PcdGet32 (PcdOvmfPeiMemFvBase),\r | |
44 | PcdGet32 (PcdOvmfPeiMemFvSize),\r | |
74e5c158 | 45 | mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData\r |
49ba9447 | 46 | );\r |
47 | \r | |
b36f701d JJ |
48 | //\r |
49 | // Let DXE know about the DXE FV\r | |
50 | //\r | |
51 | BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize));\r | |
49ba9447 | 52 | \r |
c1c2669c | 53 | //\r |
b36f701d | 54 | // Create a memory allocation HOB for the DXE FV.\r |
c1c2669c | 55 | //\r |
56 | BuildMemoryAllocationHob (\r | |
b36f701d JJ |
57 | PcdGet32 (PcdOvmfDxeMemFvBase),\r |
58 | PcdGet32 (PcdOvmfDxeMemFvSize),\r | |
c1c2669c | 59 | EfiBootServicesData\r |
49ba9447 | 60 | );\r |
61 | \r | |
b36f701d JJ |
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 | |
49ba9447 | 73 | return EFI_SUCCESS;\r |
74 | }\r | |
75 | \r |