]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/PlatformPei/Fv.c
Update the copyright notice format
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
1 /** @file
2 Build FV related hobs for platform.
3
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5 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
9
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.
12
13 **/
14
15 #include "PiPei.h"
16 #include <Library/DebugLib.h>
17 #include <Library/HobLib.h>
18 #include <Library/PeiServicesLib.h>
19 #include <Library/PcdLib.h>
20
21
22 /**
23 Perform a call-back into the SEC simulator to get address of the Firmware Hub
24
25 @param FfsHeader Ffs Header availible to every PEIM
26 @param PeiServices General purpose services available to every PEIM.
27
28 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.
29
30 **/
31 EFI_STATUS
32 PeiFvInitialization (
33 VOID
34 )
35 {
36 EFI_PHYSICAL_ADDRESS FdBase;
37
38 DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));
39
40 DEBUG (
41 (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n",
42 PcdGet32 (PcdOvmfMemFvBase),
43 PcdGet32 (PcdOvmfMemFvSize)
44 )
45 );
46
47 FdBase = PcdGet32 (PcdOvmfMemFvBase) - PcdGet32 (PcdVariableStoreSize) - PcdGet32 (PcdFlashNvStorageFtwSpareSize);
48 BuildFvHob (PcdGet32 (PcdOvmfMemFvBase), PcdGet32 (PcdOvmfMemFvSize));
49
50 //
51 // Create a memory allocation HOB.
52 //
53 BuildMemoryAllocationHob (
54 PcdGet32 (PcdOvmfMemFvBase),
55 PcdGet32 (PcdOvmfMemFvSize),
56 EfiBootServicesData
57 );
58
59 return EFI_SUCCESS;
60 }
61