]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/PlatformPei/Fv.c
Reviewed the description in the FatBinPkg .dec file.
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
CommitLineData
49ba9447 1/** @file\r
2 Build FV related hobs for platform.\r
3\r
4 Copyright (c) 2006 - 2009, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include "PiPei.h"\r
16#include <Library/DebugLib.h>\r
17#include <Library/PeimEntryPoint.h>\r
18#include <Library/HobLib.h>\r
19#include <Library/PeiServicesLib.h>\r
20#include <Library/PeiServicesTablePointerLib.h>\r
21#include <Library/PcdLib.h>\r
22\r
23\r
24/**\r
25 Perform a call-back into the SEC simulator to get address of the Firmware Hub\r
26\r
27 @param FfsHeader Ffs Header availible to every PEIM\r
28 @param PeiServices General purpose services available to every PEIM.\r
29\r
30 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.\r
31\r
32**/\r
33EFI_STATUS\r
34PeiFvInitialization (\r
35 VOID\r
36 )\r
37{\r
38 EFI_PHYSICAL_ADDRESS FdBase;\r
39\r
40 DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));\r
41\r
42 DEBUG (\r
43 (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n",\r
44 PcdGet32 (PcdOvmfFlashFvRecoveryBase),\r
45 PcdGet32 (PcdOvmfFlashFvRecoverySize)\r
46 )\r
47 );\r
48\r
49 FdBase = PcdGet32 (PcdOvmfFlashFvRecoveryBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);\r
50 BuildFvHob (PcdGet32 (PcdOvmfFlashFvRecoveryBase), PcdGet32 (PcdOvmfFlashFvRecoverySize));\r
51\r
52 BuildResourceDescriptorHob (\r
53 EFI_RESOURCE_FIRMWARE_DEVICE,\r
54 (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE),\r
55 FdBase,\r
56 PcdGet32 (PcdOvmfFirmwareFdSize)\r
57 );\r
58\r
59 return EFI_SUCCESS;\r
60}\r
61\r