VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/XenPlatformPei/Fv.c@ 107675

最後變更 在這個檔案從107675是 99404,由 vboxsync 提交於 2 年 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.7 KB
 
1/** @file
2 Build FV related hobs for platform.
3
4 Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) 2019, Citrix Systems, Inc.
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#include "PiPei.h"
12#include "Platform.h"
13#include <Library/DebugLib.h>
14#include <Library/HobLib.h>
15#include <Library/PeiServicesLib.h>
16#include <Library/PcdLib.h>
17
18/**
19 Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
20 and DXE know about them.
21
22 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
23
24**/
25EFI_STATUS
26PeiFvInitialization (
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 //
37 BuildMemoryAllocationHob (
38 PcdGet32 (PcdOvmfPeiMemFvBase),
39 PcdGet32 (PcdOvmfPeiMemFvSize),
40 EfiBootServicesData
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 //
56 BuildMemoryAllocationHob (
57 PcdGet32 (PcdOvmfDxeMemFvBase),
58 PcdGet32 (PcdOvmfDxeMemFvSize),
59 EfiBootServicesData
60 );
61
62 //
63 // Let PEI know about the DXE FV so it can find the DXE Core
64 //
65 PeiServicesInstallFvInfoPpi (
66 NULL,
67 (VOID *)(UINTN)PcdGet32 (PcdOvmfDxeMemFvBase),
68 PcdGet32 (PcdOvmfDxeMemFvSize),
69 NULL,
70 NULL
71 );
72
73 return EFI_SUCCESS;
74}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette