]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/XenPlatformPei/Fv.c
2 Build FV related hobs for platform.
4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2019, Citrix Systems, Inc.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include <Library/DebugLib.h>
14 #include <Library/HobLib.h>
15 #include <Library/PeiServicesLib.h>
16 #include <Library/PcdLib.h>
20 Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
21 and DXE know about them.
23 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
31 DEBUG ((DEBUG_INFO
, "Platform PEI Firmware Volume Initialization\n"));
34 // Create a memory allocation HOB for the PEI FV.
36 // Allocate as ACPI NVS is S3 is supported
38 BuildMemoryAllocationHob (
39 PcdGet32 (PcdOvmfPeiMemFvBase
),
40 PcdGet32 (PcdOvmfPeiMemFvSize
),
45 // Let DXE know about the DXE FV
47 BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase
), PcdGet32 (PcdOvmfDxeMemFvSize
));
50 // Create a memory allocation HOB for the DXE FV.
52 // If "secure" S3 is needed, then SEC will decompress both PEI and DXE
53 // firmware volumes at S3 resume too, hence we need to keep away the OS from
54 // DXEFV as well. Otherwise we only need to keep away DXE itself from the
57 BuildMemoryAllocationHob (
58 PcdGet32 (PcdOvmfDxeMemFvBase
),
59 PcdGet32 (PcdOvmfDxeMemFvSize
),
64 // Let PEI know about the DXE FV so it can find the DXE Core
66 PeiServicesInstallFvInfoPpi (
68 (VOID
*)(UINTN
) PcdGet32 (PcdOvmfDxeMemFvBase
),
69 PcdGet32 (PcdOvmfDxeMemFvSize
),