]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/PlatformPei/Fv.c
OvmfPkg: PlatformPei: simplify memory range expressions in MemDetect()
[mirror_edk2.git] / OvmfPkg / PlatformPei / Fv.c
CommitLineData
49ba9447 1/** @file\r
2 Build FV related hobs for platform.\r
3\r
a473e416 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
56d7640a 5 This program and the accompanying materials\r
49ba9447 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
49ba9447 17#include <Library/HobLib.h>\r
18#include <Library/PeiServicesLib.h>\r
49ba9447 19#include <Library/PcdLib.h>\r
20\r
21\r
22/**\r
23 Perform a call-back into the SEC simulator to get address of the Firmware Hub\r
24\r
25 @param FfsHeader Ffs Header availible to every PEIM\r
26 @param PeiServices General purpose services available to every PEIM.\r
27\r
28 @retval EFI_SUCCESS Platform PEI FVs were initialized successfully.\r
29\r
30**/\r
31EFI_STATUS\r
32PeiFvInitialization (\r
33 VOID\r
34 )\r
35{\r
49ba9447 36 DEBUG ((EFI_D_ERROR, "Platform PEI Firmware Volume Initialization\n"));\r
37\r
38 DEBUG (\r
39 (EFI_D_ERROR, "Firmware Volume HOB: 0x%x 0x%x\n",\r
c1c2669c 40 PcdGet32 (PcdOvmfMemFvBase),\r
41 PcdGet32 (PcdOvmfMemFvSize)\r
49ba9447 42 )\r
43 );\r
44\r
c1c2669c 45 BuildFvHob (PcdGet32 (PcdOvmfMemFvBase), PcdGet32 (PcdOvmfMemFvSize));\r
49ba9447 46\r
c1c2669c 47 //\r
48 // Create a memory allocation HOB.\r
49 //\r
50 BuildMemoryAllocationHob (\r
51 PcdGet32 (PcdOvmfMemFvBase),\r
52 PcdGet32 (PcdOvmfMemFvSize),\r
53 EfiBootServicesData\r
49ba9447 54 );\r
55\r
56 return EFI_SUCCESS;\r
57}\r
58\r