]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/PlatformPei/Fv.c
OvmfPkg/PlatformPei: Don't allocate ACPI NVS memory
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
1 /** @file
2 Build FV related hobs for platform.
3
4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. 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/DebugLib.h>
17 #include <Library/HobLib.h>
18 #include <Library/PeiServicesLib.h>
19 #include <Library/PcdLib.h>
20
21
22 /**
23 Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
24 and DXE know about them.
25
26 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
27
28 **/
29 EFI_STATUS
30 PeiFvInitialization (
31 VOID
32 )
33 {
34 DEBUG ((EFI_D_INFO, "Platform PEI Firmware Volume Initialization\n"));
35
36 //
37 // Create a memory allocation HOB for the PEI FV.
38 //
39 // Note: This should be changed to ACPI NVS when S3 resume is enabled.
40 //
41 BuildMemoryAllocationHob (
42 PcdGet32 (PcdOvmfPeiMemFvBase),
43 PcdGet32 (PcdOvmfPeiMemFvSize),
44 EfiBootServicesData
45 );
46
47 //
48 // Let DXE know about the DXE FV
49 //
50 BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize));
51
52 //
53 // Create a memory allocation HOB for the DXE FV.
54 //
55 BuildMemoryAllocationHob (
56 PcdGet32 (PcdOvmfDxeMemFvBase),
57 PcdGet32 (PcdOvmfDxeMemFvSize),
58 EfiBootServicesData
59 );
60
61 //
62 // Let PEI know about the DXE FV so it can find the DXE Core
63 //
64 PeiServicesInstallFvInfoPpi (
65 NULL,
66 (VOID *)(UINTN) PcdGet32 (PcdOvmfDxeMemFvBase),
67 PcdGet32 (PcdOvmfDxeMemFvSize),
68 NULL,
69 NULL
70 );
71
72 return EFI_SUCCESS;
73 }
74