]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/PlatformPei/Fv.c
2 Build FV related hobs for platform.
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
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.
16 #include <Library/DebugLib.h>
17 #include <Library/HobLib.h>
18 #include <Library/PeiServicesLib.h>
19 #include <Library/PcdLib.h>
23 Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
24 and DXE know about them.
26 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
34 DEBUG ((EFI_D_INFO
, "Platform PEI Firmware Volume Initialization\n"));
37 // Create a memory allocation HOB for the PEI FV.
39 // Note: This should be changed to ACPI NVS when S3 resume is enabled.
41 BuildMemoryAllocationHob (
42 PcdGet32 (PcdOvmfPeiMemFvBase
),
43 PcdGet32 (PcdOvmfPeiMemFvSize
),
48 // Let DXE know about the DXE FV
50 BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase
), PcdGet32 (PcdOvmfDxeMemFvSize
));
53 // Create a memory allocation HOB for the DXE FV.
55 BuildMemoryAllocationHob (
56 PcdGet32 (PcdOvmfDxeMemFvBase
),
57 PcdGet32 (PcdOvmfDxeMemFvSize
),
62 // Let PEI know about the DXE FV so it can find the DXE Core
64 PeiServicesInstallFvInfoPpi (
66 (VOID
*)(UINTN
) PcdGet32 (PcdOvmfDxeMemFvBase
),
67 PcdGet32 (PcdOvmfDxeMemFvSize
),