X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=OvmfPkg%2FPlatformPei%2FFv.c;h=3ed775c850832f472df524cf8f0522662ec5dae5;hb=74e5c15842b75be9e7d2057ac0345cbf524b2234;hp=7ae35237b272ed0fe2c5409b0c41c83e0ec4d269;hpb=49ba9447c92d6fca214476381107a180d08e59d1;p=mirror_edk2.git diff --git a/OvmfPkg/PlatformPei/Fv.c b/OvmfPkg/PlatformPei/Fv.c index 7ae35237b2..3ed775c850 100644 --- a/OvmfPkg/PlatformPei/Fv.c +++ b/OvmfPkg/PlatformPei/Fv.c @@ -1,8 +1,8 @@ /** @file Build FV related hobs for platform. - Copyright (c) 2006 - 2009, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -13,19 +13,16 @@ **/ #include "PiPei.h" +#include "Platform.h" #include -#include #include #include -#include #include /** - Perform a call-back into the SEC simulator to get address of the Firmware Hub - - @param FfsHeader Ffs Header availible to every PEIM - @param PeiServices General purpose services available to every PEIM. + Publish PEI & DXE (Decompressed) Memory based FVs to let PEI + and DXE know about them. @retval EFI_SUCCESS Platform PEI FVs were initialized successfully. @@ -35,25 +32,42 @@ PeiFvInitialization ( VOID ) { - EFI_PHYSICAL_ADDRESS FdBase; - - DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n")); + DEBUG ((EFI_D_INFO, "Platform PEI Firmware Volume Initialization\n")); - DEBUG ( - (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n", - PcdGet32 (PcdOvmfFlashFvRecoveryBase), - PcdGet32 (PcdOvmfFlashFvRecoverySize) - ) + // + // Create a memory allocation HOB for the PEI FV. + // + // Allocate as ACPI NVS is S3 is supported + // + BuildMemoryAllocationHob ( + PcdGet32 (PcdOvmfPeiMemFvBase), + PcdGet32 (PcdOvmfPeiMemFvSize), + mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData ); - FdBase = PcdGet32 (PcdOvmfFlashFvRecoveryBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize); - BuildFvHob (PcdGet32 (PcdOvmfFlashFvRecoveryBase), PcdGet32 (PcdOvmfFlashFvRecoverySize)); + // + // Let DXE know about the DXE FV + // + BuildFvHob (PcdGet32 (PcdOvmfDxeMemFvBase), PcdGet32 (PcdOvmfDxeMemFvSize)); + + // + // Create a memory allocation HOB for the DXE FV. + // + BuildMemoryAllocationHob ( + PcdGet32 (PcdOvmfDxeMemFvBase), + PcdGet32 (PcdOvmfDxeMemFvSize), + EfiBootServicesData + ); - BuildResourceDescriptorHob ( - EFI_RESOURCE_FIRMWARE_DEVICE, - (EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE), - FdBase, - PcdGet32 (PcdOvmfFirmwareFdSize) + // + // Let PEI know about the DXE FV so it can find the DXE Core + // + PeiServicesInstallFvInfoPpi ( + NULL, + (VOID *)(UINTN) PcdGet32 (PcdOvmfDxeMemFvBase), + PcdGet32 (PcdOvmfDxeMemFvSize), + NULL, + NULL ); return EFI_SUCCESS;