TianoCore EDK2 master
Loading...
Searching...
No Matches
Fv.c
Go to the documentation of this file.
1
11#include "PiPei.h"
12#include "Platform.h"
13#include <Library/DebugLib.h>
14#include <Library/HobLib.h>
16#include <Library/PcdLib.h>
17
27 VOID
28 )
29{
30 DEBUG ((DEBUG_INFO, "Platform PEI Firmware Volume Initialization\n"));
31
32 //
33 // Create a memory allocation HOB for the PEI FV.
34 //
35 // Allocate as ACPI NVS is S3 is supported
36 //
38 PcdGet32 (PcdOvmfPeiMemFvBase),
39 PcdGet32 (PcdOvmfPeiMemFvSize),
41 );
42
43 //
44 // Let DXE know about the DXE FV
45 //
46 BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize));
47
48 //
49 // Create a memory allocation HOB for the DXE FV.
50 //
51 // If "secure" S3 is needed, then SEC will decompress both PEI and DXE
52 // firmware volumes at S3 resume too, hence we need to keep away the OS from
53 // DXEFV as well. Otherwise we only need to keep away DXE itself from the
54 // DXEFV area.
55 //
57 PcdGet32 (PcdOvmfDxeMemFvBase),
58 PcdGet32 (PcdOvmfDxeMemFvSize),
60 );
61
62 //
63 // Let PEI know about the DXE FV so it can find the DXE Core
64 //
66 NULL,
67 (VOID *)(UINTN)PcdGet32 (PcdOvmfDxeMemFvBase),
68 PcdGet32 (PcdOvmfDxeMemFvSize),
69 NULL,
70 NULL
71 );
72
73 return EFI_SUCCESS;
74}
UINT64 UINTN
VOID EFIAPI BuildFvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:404
VOID EFIAPI BuildMemoryAllocationHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:601
EFI_STATUS PeiFvInitialization(VOID)
Definition: Fv.c:24
VOID EFIAPI PeiServicesInstallFvInfoPpi(IN CONST EFI_GUID *FvFormat OPTIONAL, IN CONST VOID *FvInfo, IN UINT32 FvInfoSize, IN CONST EFI_GUID *ParentFvName OPTIONAL, IN CONST EFI_GUID *ParentFileName OPTIONAL)
#define NULL
Definition: Base.h:319
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define PcdGet32(TokenName)
Definition: PcdLib.h:362
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
@ EfiBootServicesData