2 Build FV related hobs for platform.
4 Copyright (c) 2006 - 2009, Intel Corporation
5 All rights reserved. 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/PeimEntryPoint.h>
18 #include <Library/HobLib.h>
19 #include <Library/PeiServicesLib.h>
20 #include <Library/PeiServicesTablePointerLib.h>
21 #include <Library/PcdLib.h>
25 Perform a call-back into the SEC simulator to get address of the Firmware Hub
27 @param FfsHeader Ffs Header availible to every PEIM
28 @param PeiServices General purpose services available to every PEIM.
30 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
38 EFI_PHYSICAL_ADDRESS FdBase
;
40 DEBUG ((EFI_D_ERROR
, "Platform PEI Firmware Volume Initialization\n"));
43 (EFI_D_ERROR
, "Firmware Volume HOB: 0x%x 0x%x\n",
44 PcdGet32 (PcdOvmfFlashFvRecoveryBase
),
45 PcdGet32 (PcdOvmfFlashFvRecoverySize
)
49 FdBase
= PcdGet32 (PcdOvmfFlashFvRecoveryBase
) - PcdGet32 (PcdVariableStoreSize
) - PcdGet32 (PcdFlashNvStorageFtwSpareSize
);
50 BuildFvHob (PcdGet32 (PcdOvmfFlashFvRecoveryBase
), PcdGet32 (PcdOvmfFlashFvRecoverySize
));
52 BuildResourceDescriptorHob (
53 EFI_RESOURCE_FIRMWARE_DEVICE
,
54 (EFI_RESOURCE_ATTRIBUTE_PRESENT
| EFI_RESOURCE_ATTRIBUTE_INITIALIZED
| EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE
),
56 PcdGet32 (PcdOvmfFirmwareFdSize
)