11e57a46299244793beb27e74be171d1540606999oliviermartin/** @file
21e57a46299244793beb27e74be171d1540606999oliviermartin  Library that helps implement monolithic PEI. (SEC goes to DXE)
31e57a46299244793beb27e74be171d1540606999oliviermartin
41e57a46299244793beb27e74be171d1540606999oliviermartin  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
51e57a46299244793beb27e74be171d1540606999oliviermartin
61e57a46299244793beb27e74be171d1540606999oliviermartin  This program and the accompanying materials
71e57a46299244793beb27e74be171d1540606999oliviermartin  are licensed and made available under the terms and conditions of the BSD License
81e57a46299244793beb27e74be171d1540606999oliviermartin  which accompanies this distribution.  The full text of the license may be found at
91e57a46299244793beb27e74be171d1540606999oliviermartin  http://opensource.org/licenses/bsd-license.php
101e57a46299244793beb27e74be171d1540606999oliviermartin
111e57a46299244793beb27e74be171d1540606999oliviermartin  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
121e57a46299244793beb27e74be171d1540606999oliviermartin  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
131e57a46299244793beb27e74be171d1540606999oliviermartin
141e57a46299244793beb27e74be171d1540606999oliviermartin**/
151e57a46299244793beb27e74be171d1540606999oliviermartin
161e57a46299244793beb27e74be171d1540606999oliviermartin#ifndef __PRE_PI_LIB_H__
171e57a46299244793beb27e74be171d1540606999oliviermartin#define __PRE_PI_LIB_H__
181e57a46299244793beb27e74be171d1540606999oliviermartin
191e57a46299244793beb27e74be171d1540606999oliviermartin#include <Guid/ExtractSection.h>
201e57a46299244793beb27e74be171d1540606999oliviermartin
211e57a46299244793beb27e74be171d1540606999oliviermartin/**
221e57a46299244793beb27e74be171d1540606999oliviermartin  This service enables discovery of additional firmware volumes.
231e57a46299244793beb27e74be171d1540606999oliviermartin
241e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Instance              This instance of the firmware volume to find.  The value 0 is the
251e57a46299244793beb27e74be171d1540606999oliviermartin                                Boot Firmware Volume (BFV).
261e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FwVolHeader           Pointer to the firmware volume header of the volume to return.
271e57a46299244793beb27e74be171d1540606999oliviermartin
281e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS           The volume was found.
291e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_FOUND         The volume was not found.
301e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER FwVolHeader is NULL.
311e57a46299244793beb27e74be171d1540606999oliviermartin
321e57a46299244793beb27e74be171d1540606999oliviermartin**/
331e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
341e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
351e57a46299244793beb27e74be171d1540606999oliviermartinFfsFindNextVolume (
361e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN                          Instance,
371e57a46299244793beb27e74be171d1540606999oliviermartin  IN OUT EFI_PEI_FV_HANDLE          *VolumeHandle
381e57a46299244793beb27e74be171d1540606999oliviermartin  );
391e57a46299244793beb27e74be171d1540606999oliviermartin
401e57a46299244793beb27e74be171d1540606999oliviermartin
411e57a46299244793beb27e74be171d1540606999oliviermartin/**
421e57a46299244793beb27e74be171d1540606999oliviermartin  This service enables discovery of additional firmware files.
431e57a46299244793beb27e74be171d1540606999oliviermartin
441e57a46299244793beb27e74be171d1540606999oliviermartin  @param  SearchType            A filter to find files only of this type.
451e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FwVolHeader           Pointer to the firmware volume header of the volume to search.
461e57a46299244793beb27e74be171d1540606999oliviermartin                                This parameter must point to a valid FFS volume.
471e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FileHeader            Pointer to the current file from which to begin searching.
481e57a46299244793beb27e74be171d1540606999oliviermartin
491e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS           The file was found.
501e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_FOUND         The file was not found.
511e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_FOUND         The header checksum was not zero.
521e57a46299244793beb27e74be171d1540606999oliviermartin
531e57a46299244793beb27e74be171d1540606999oliviermartin**/
541e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
551e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
561e57a46299244793beb27e74be171d1540606999oliviermartinFfsFindNextFile (
571e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_FV_FILETYPE            SearchType,
581e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PEI_FV_HANDLE          VolumeHandle,
591e57a46299244793beb27e74be171d1540606999oliviermartin  IN OUT EFI_PEI_FILE_HANDLE    *FileHandle
601e57a46299244793beb27e74be171d1540606999oliviermartin  );
611e57a46299244793beb27e74be171d1540606999oliviermartin
621e57a46299244793beb27e74be171d1540606999oliviermartin
631e57a46299244793beb27e74be171d1540606999oliviermartin/**
641e57a46299244793beb27e74be171d1540606999oliviermartin  This service enables discovery sections of a given type within a valid FFS file.
651e57a46299244793beb27e74be171d1540606999oliviermartin
661e57a46299244793beb27e74be171d1540606999oliviermartin  @param  SearchType            The value of the section type to find.
671e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FfsFileHeader         A pointer to the file header that contains the set of sections to
681e57a46299244793beb27e74be171d1540606999oliviermartin                                be searched.
691e57a46299244793beb27e74be171d1540606999oliviermartin  @param  SectionData           A pointer to the discovered section, if successful.
701e57a46299244793beb27e74be171d1540606999oliviermartin
711e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS           The section was found.
721e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_FOUND         The section was not found.
731e57a46299244793beb27e74be171d1540606999oliviermartin
741e57a46299244793beb27e74be171d1540606999oliviermartin**/
751e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
761e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
771e57a46299244793beb27e74be171d1540606999oliviermartinFfsFindSectionData (
781e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_SECTION_TYPE           SectionType,
791e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PEI_FILE_HANDLE        FileHandle,
801e57a46299244793beb27e74be171d1540606999oliviermartin  OUT VOID                      **SectionData
811e57a46299244793beb27e74be171d1540606999oliviermartin  );
821e57a46299244793beb27e74be171d1540606999oliviermartin
831e57a46299244793beb27e74be171d1540606999oliviermartin
841e57a46299244793beb27e74be171d1540606999oliviermartin/**
851e57a46299244793beb27e74be171d1540606999oliviermartin  Find a file in the volume by name
863402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
871e57a46299244793beb27e74be171d1540606999oliviermartin  @param FileName       A pointer to the name of the file to
881e57a46299244793beb27e74be171d1540606999oliviermartin                        find within the firmware volume.
891e57a46299244793beb27e74be171d1540606999oliviermartin
901e57a46299244793beb27e74be171d1540606999oliviermartin  @param VolumeHandle   The firmware volume to search FileHandle
911e57a46299244793beb27e74be171d1540606999oliviermartin                        Upon exit, points to the found file's
921e57a46299244793beb27e74be171d1540606999oliviermartin                        handle or NULL if it could not be found.
931e57a46299244793beb27e74be171d1540606999oliviermartin
941e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS             File was found.
951e57a46299244793beb27e74be171d1540606999oliviermartin
961e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_FOUND           File was not found.
971e57a46299244793beb27e74be171d1540606999oliviermartin
981e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER   VolumeHandle or FileHandle or
991e57a46299244793beb27e74be171d1540606999oliviermartin                                  FileName was NULL.
1001e57a46299244793beb27e74be171d1540606999oliviermartin
1011e57a46299244793beb27e74be171d1540606999oliviermartin**/
1021e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
1031e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
1041e57a46299244793beb27e74be171d1540606999oliviermartinFfsFindByName (
1051e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST  EFI_GUID            *FileName,
1061e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST  EFI_PEI_FV_HANDLE   VolumeHandle,
1071e57a46299244793beb27e74be171d1540606999oliviermartin  OUT       EFI_PEI_FILE_HANDLE *FileHandle
1081e57a46299244793beb27e74be171d1540606999oliviermartin  );
1091e57a46299244793beb27e74be171d1540606999oliviermartin
1101e57a46299244793beb27e74be171d1540606999oliviermartin
1111e57a46299244793beb27e74be171d1540606999oliviermartin/**
1121e57a46299244793beb27e74be171d1540606999oliviermartin  Get information about the file by name.
1131e57a46299244793beb27e74be171d1540606999oliviermartin
1141e57a46299244793beb27e74be171d1540606999oliviermartin  @param FileHandle   Handle of the file.
1151e57a46299244793beb27e74be171d1540606999oliviermartin
1161e57a46299244793beb27e74be171d1540606999oliviermartin  @param FileInfo     Upon exit, points to the file's
1171e57a46299244793beb27e74be171d1540606999oliviermartin                      information.
1181e57a46299244793beb27e74be171d1540606999oliviermartin
1191e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS             File information returned.
1203402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
1211e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER   If FileHandle does not
1221e57a46299244793beb27e74be171d1540606999oliviermartin                                  represent a valid file.
1233402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
1241e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER   If FileInfo is NULL.
1253402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
1261e57a46299244793beb27e74be171d1540606999oliviermartin**/
1271e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
1283402aac7d985bf8a9f9d3c639f3fe93609380513Ronald CronEFIAPI
1291e57a46299244793beb27e74be171d1540606999oliviermartinFfsGetFileInfo (
1301e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST  EFI_PEI_FILE_HANDLE   FileHandle,
1311e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_FV_FILE_INFO            *FileInfo
1321e57a46299244793beb27e74be171d1540606999oliviermartin  );
1331e57a46299244793beb27e74be171d1540606999oliviermartin
1341e57a46299244793beb27e74be171d1540606999oliviermartin
1351e57a46299244793beb27e74be171d1540606999oliviermartin/**
1361e57a46299244793beb27e74be171d1540606999oliviermartin  Get Information about the volume by name
1371e57a46299244793beb27e74be171d1540606999oliviermartin
1381e57a46299244793beb27e74be171d1540606999oliviermartin  @param VolumeHandle   Handle of the volume.
1391e57a46299244793beb27e74be171d1540606999oliviermartin
1401e57a46299244793beb27e74be171d1540606999oliviermartin  @param VolumeInfo     Upon exit, points to the volume's
1411e57a46299244793beb27e74be171d1540606999oliviermartin                        information.
1421e57a46299244793beb27e74be171d1540606999oliviermartin
1431e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS             File information returned.
1443402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
1451e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER   If FileHandle does not
1461e57a46299244793beb27e74be171d1540606999oliviermartin                                  represent a valid file.
1473402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
1481e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_INVALID_PARAMETER   If FileInfo is NULL.
1491e57a46299244793beb27e74be171d1540606999oliviermartin
1501e57a46299244793beb27e74be171d1540606999oliviermartin**/
1511e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
1521e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
1531e57a46299244793beb27e74be171d1540606999oliviermartinFfsGetVolumeInfo (
1541e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EFI_PEI_FV_HANDLE       VolumeHandle,
1551e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_FV_INFO             *VolumeInfo
1561e57a46299244793beb27e74be171d1540606999oliviermartin  );
1571e57a46299244793beb27e74be171d1540606999oliviermartin
1581e57a46299244793beb27e74be171d1540606999oliviermartin
1591e57a46299244793beb27e74be171d1540606999oliviermartin
1601e57a46299244793beb27e74be171d1540606999oliviermartin/**
1611e57a46299244793beb27e74be171d1540606999oliviermartin  Get Fv image from the FV type file, then add FV & FV2 Hob.
1621e57a46299244793beb27e74be171d1540606999oliviermartin
16391c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @param FileHandle      File handle of a Fv type file.
1641e57a46299244793beb27e74be171d1540606999oliviermartin
16591c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_NOT_FOUND  FV image can't be found.
16691c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_SUCCESS    Successfully to process it.
1671e57a46299244793beb27e74be171d1540606999oliviermartin
1681e57a46299244793beb27e74be171d1540606999oliviermartin**/
1691e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
1701e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
1711e57a46299244793beb27e74be171d1540606999oliviermartinFfsProcessFvFile (
1721e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EFI_PEI_FILE_HANDLE   FvFileHandle
1731e57a46299244793beb27e74be171d1540606999oliviermartin  );
1741e57a46299244793beb27e74be171d1540606999oliviermartin
1751e57a46299244793beb27e74be171d1540606999oliviermartin
1761e57a46299244793beb27e74be171d1540606999oliviermartin/**
1771e57a46299244793beb27e74be171d1540606999oliviermartin  Search through every FV until you find a file of type FileType
1781e57a46299244793beb27e74be171d1540606999oliviermartin
17991c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @param FileType        File handle of a Fv type file.
18091c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @param Volumehandle    On succes Volume Handle of the match
18191c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @param FileHandle      On success File Handle of the match
1823402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
18391c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_NOT_FOUND  FV image can't be found.
18491c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_SUCCESS    Successfully found FileType
1851e57a46299244793beb27e74be171d1540606999oliviermartin
1861e57a46299244793beb27e74be171d1540606999oliviermartin**/
1871e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
1881e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
1891e57a46299244793beb27e74be171d1540606999oliviermartinFfsAnyFvFindFirstFile (
1901e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EFI_FV_FILETYPE       FileType,
1911e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_PEI_FV_HANDLE     *VolumeHandle,
1921e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_PEI_FILE_HANDLE   *FileHandle
1931e57a46299244793beb27e74be171d1540606999oliviermartin  );
1941e57a46299244793beb27e74be171d1540606999oliviermartin
1951e57a46299244793beb27e74be171d1540606999oliviermartin
1961e57a46299244793beb27e74be171d1540606999oliviermartin/**
1971e57a46299244793beb27e74be171d1540606999oliviermartin  Get Fv image from the FV type file, then add FV & FV2 Hob.
1981e57a46299244793beb27e74be171d1540606999oliviermartin
19991c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @param FileHandle  File handle of a Fv type file.
2001e57a46299244793beb27e74be171d1540606999oliviermartin
2011e57a46299244793beb27e74be171d1540606999oliviermartin
20291c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_NOT_FOUND  FV image can't be found.
20391c38d4e94c1461f5824b83d3722fe46626aa0d3Ronald Cron  @retval EFI_SUCCESS    Successfully to process it.
2041e57a46299244793beb27e74be171d1540606999oliviermartin
2051e57a46299244793beb27e74be171d1540606999oliviermartin**/
2061e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
2071e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
2081e57a46299244793beb27e74be171d1540606999oliviermartinFfsProcessFvFile (
2091e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EFI_PEI_FILE_HANDLE   FvFileHandle
2101e57a46299244793beb27e74be171d1540606999oliviermartin  );
2111e57a46299244793beb27e74be171d1540606999oliviermartin
2121e57a46299244793beb27e74be171d1540606999oliviermartin
2131e57a46299244793beb27e74be171d1540606999oliviermartin/**
2143402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This service enables PEIMs to ascertain the present value of the boot mode.
2151e57a46299244793beb27e74be171d1540606999oliviermartin
2161e57a46299244793beb27e74be171d1540606999oliviermartin
2173402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  @retval BootMode
2181e57a46299244793beb27e74be171d1540606999oliviermartin
2191e57a46299244793beb27e74be171d1540606999oliviermartin**/
2201e57a46299244793beb27e74be171d1540606999oliviermartinEFI_BOOT_MODE
2211e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
2221e57a46299244793beb27e74be171d1540606999oliviermartinGetBootMode (
2231e57a46299244793beb27e74be171d1540606999oliviermartin  VOID
2241e57a46299244793beb27e74be171d1540606999oliviermartin  );
2251e57a46299244793beb27e74be171d1540606999oliviermartin
2261e57a46299244793beb27e74be171d1540606999oliviermartin
2271e57a46299244793beb27e74be171d1540606999oliviermartin/**
2283402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This service enables PEIMs to update the boot mode variable.
2291e57a46299244793beb27e74be171d1540606999oliviermartin
2301e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BootMode              The value of the boot mode to set.
2311e57a46299244793beb27e74be171d1540606999oliviermartin
2321e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS           The value was successfully updated
2331e57a46299244793beb27e74be171d1540606999oliviermartin
2341e57a46299244793beb27e74be171d1540606999oliviermartin**/
2351e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
2361e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
2371e57a46299244793beb27e74be171d1540606999oliviermartinSetBootMode (
2381e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_BOOT_MODE              BootMode
2391e57a46299244793beb27e74be171d1540606999oliviermartin  );
2401e57a46299244793beb27e74be171d1540606999oliviermartin
2411e57a46299244793beb27e74be171d1540606999oliviermartin/**
2421e57a46299244793beb27e74be171d1540606999oliviermartin  This service enables a PEIM to ascertain the address of the list of HOBs in memory.
2431e57a46299244793beb27e74be171d1540606999oliviermartin
2441e57a46299244793beb27e74be171d1540606999oliviermartin  @param  HobList               A pointer to the list of HOBs that the PEI Foundation will initialize.
2451e57a46299244793beb27e74be171d1540606999oliviermartin
2461e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_SUCCESS           The list was successfully returned.
2471e57a46299244793beb27e74be171d1540606999oliviermartin  @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
2481e57a46299244793beb27e74be171d1540606999oliviermartin
2491e57a46299244793beb27e74be171d1540606999oliviermartin**/
2501e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
2511e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
2521e57a46299244793beb27e74be171d1540606999oliviermartinGetHobList (
2533402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  VOID
2541e57a46299244793beb27e74be171d1540606999oliviermartin  );
2551e57a46299244793beb27e74be171d1540606999oliviermartin
2561e57a46299244793beb27e74be171d1540606999oliviermartin
2571e57a46299244793beb27e74be171d1540606999oliviermartin/**
2581e57a46299244793beb27e74be171d1540606999oliviermartin  Updates the pointer to the HOB list.
2591e57a46299244793beb27e74be171d1540606999oliviermartin
2601e57a46299244793beb27e74be171d1540606999oliviermartin  @param  HobList       Hob list pointer to store
2613402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
2621e57a46299244793beb27e74be171d1540606999oliviermartin**/
2631e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
2641e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
2651e57a46299244793beb27e74be171d1540606999oliviermartinSetHobList (
2661e57a46299244793beb27e74be171d1540606999oliviermartin  IN  VOID      *HobList
2671e57a46299244793beb27e74be171d1540606999oliviermartin  );
2681e57a46299244793beb27e74be171d1540606999oliviermartin
2691e57a46299244793beb27e74be171d1540606999oliviermartinEFI_HOB_HANDOFF_INFO_TABLE*
2701e57a46299244793beb27e74be171d1540606999oliviermartinHobConstructor (
2711e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *EfiMemoryBegin,
2721e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  EfiMemoryLength,
2731e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *EfiFreeMemoryBottom,
2741e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *EfiFreeMemoryTop
2751e57a46299244793beb27e74be171d1540606999oliviermartin  );
2761e57a46299244793beb27e74be171d1540606999oliviermartin
2771e57a46299244793beb27e74be171d1540606999oliviermartin/**
2781e57a46299244793beb27e74be171d1540606999oliviermartin  Retrieves the magic value from the PE/COFF header.
2791e57a46299244793beb27e74be171d1540606999oliviermartin
2801e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Hdr             The buffer in which to return the PE32, PE32+, or TE header.
2811e57a46299244793beb27e74be171d1540606999oliviermartin
2821e57a46299244793beb27e74be171d1540606999oliviermartin  @return EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC - Image is PE32
2831e57a46299244793beb27e74be171d1540606999oliviermartin  @return EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC - Image is PE32+
2841e57a46299244793beb27e74be171d1540606999oliviermartin
2851e57a46299244793beb27e74be171d1540606999oliviermartin**/
2861e57a46299244793beb27e74be171d1540606999oliviermartinVOID
2871e57a46299244793beb27e74be171d1540606999oliviermartinCreateHobList (
2881e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *MemoryBegin,
2891e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  MemoryLength,
2901e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *HobBase,
2911e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID   *StackBase
2921e57a46299244793beb27e74be171d1540606999oliviermartin  );
2931e57a46299244793beb27e74be171d1540606999oliviermartin
2941e57a46299244793beb27e74be171d1540606999oliviermartin
2951e57a46299244793beb27e74be171d1540606999oliviermartin/**
2961e57a46299244793beb27e74be171d1540606999oliviermartin  This service enables PEIMs to create various types of HOBs.
2971e57a46299244793beb27e74be171d1540606999oliviermartin
2981e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Type                  The type of HOB to be installed.
2991e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length                The length of the HOB to be added.
3001e57a46299244793beb27e74be171d1540606999oliviermartin
3011e57a46299244793beb27e74be171d1540606999oliviermartin  @retval !NULL                 The HOB was successfully created.
3021e57a46299244793beb27e74be171d1540606999oliviermartin  @retval NULL                  There is no additional space for HOB creation.
3031e57a46299244793beb27e74be171d1540606999oliviermartin
3041e57a46299244793beb27e74be171d1540606999oliviermartin**/
3051e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
3061e57a46299244793beb27e74be171d1540606999oliviermartinCreateHob (
3071e57a46299244793beb27e74be171d1540606999oliviermartin  IN  UINT16    HobType,
3081e57a46299244793beb27e74be171d1540606999oliviermartin  IN  UINT16    HobLenght
3091e57a46299244793beb27e74be171d1540606999oliviermartin  );
3101e57a46299244793beb27e74be171d1540606999oliviermartin
3111e57a46299244793beb27e74be171d1540606999oliviermartin
3121e57a46299244793beb27e74be171d1540606999oliviermartin/**
3131e57a46299244793beb27e74be171d1540606999oliviermartin  Returns the next instance of a HOB type from the starting HOB.
3141e57a46299244793beb27e74be171d1540606999oliviermartin
3153402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This function searches the first instance of a HOB type from the starting HOB pointer.
3161e57a46299244793beb27e74be171d1540606999oliviermartin  If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
3171e57a46299244793beb27e74be171d1540606999oliviermartin  In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
3181e57a46299244793beb27e74be171d1540606999oliviermartin  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
3191e57a46299244793beb27e74be171d1540606999oliviermartin  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
3201e57a46299244793beb27e74be171d1540606999oliviermartin  If HobStart is NULL, then ASSERT().
3211e57a46299244793beb27e74be171d1540606999oliviermartin
3221e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Type          The HOB type to return.
3231e57a46299244793beb27e74be171d1540606999oliviermartin  @param  HobStart      The starting HOB pointer to search from.
3241e57a46299244793beb27e74be171d1540606999oliviermartin
3251e57a46299244793beb27e74be171d1540606999oliviermartin  @return The next instance of a HOB type from the starting HOB.
3261e57a46299244793beb27e74be171d1540606999oliviermartin
3271e57a46299244793beb27e74be171d1540606999oliviermartin**/
3281e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
3291e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
3301e57a46299244793beb27e74be171d1540606999oliviermartinGetNextHob (
3311e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT16                 Type,
3321e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST VOID             *HobStart
3331e57a46299244793beb27e74be171d1540606999oliviermartin  );
3341e57a46299244793beb27e74be171d1540606999oliviermartin
3351e57a46299244793beb27e74be171d1540606999oliviermartin/**
3361e57a46299244793beb27e74be171d1540606999oliviermartin  Returns the first instance of a HOB type among the whole HOB list.
3371e57a46299244793beb27e74be171d1540606999oliviermartin
3383402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This function searches the first instance of a HOB type among the whole HOB list.
3393402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  If there does not exist such HOB type in the HOB list, it will return NULL.
3401e57a46299244793beb27e74be171d1540606999oliviermartin
3411e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Type          The HOB type to return.
3421e57a46299244793beb27e74be171d1540606999oliviermartin
3431e57a46299244793beb27e74be171d1540606999oliviermartin  @return The next instance of a HOB type from the starting HOB.
3441e57a46299244793beb27e74be171d1540606999oliviermartin
3451e57a46299244793beb27e74be171d1540606999oliviermartin**/
3461e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
3471e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
3481e57a46299244793beb27e74be171d1540606999oliviermartinGetFirstHob (
3491e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT16                 Type
3501e57a46299244793beb27e74be171d1540606999oliviermartin  );
3511e57a46299244793beb27e74be171d1540606999oliviermartin
3521e57a46299244793beb27e74be171d1540606999oliviermartin/**
3533402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This function searches the first instance of a HOB from the starting HOB pointer.
3543402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  Such HOB should satisfy two conditions:
3553402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
3563402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  If there does not exist such HOB from the starting HOB pointer, it will return NULL.
3571e57a46299244793beb27e74be171d1540606999oliviermartin  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
3581e57a46299244793beb27e74be171d1540606999oliviermartin  to extract the data section and its size info respectively.
3591e57a46299244793beb27e74be171d1540606999oliviermartin  In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
3601e57a46299244793beb27e74be171d1540606999oliviermartin  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
3611e57a46299244793beb27e74be171d1540606999oliviermartin  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
3621e57a46299244793beb27e74be171d1540606999oliviermartin  If Guid is NULL, then ASSERT().
3631e57a46299244793beb27e74be171d1540606999oliviermartin  If HobStart is NULL, then ASSERT().
3641e57a46299244793beb27e74be171d1540606999oliviermartin
3651e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Guid          The GUID to match with in the HOB list.
3661e57a46299244793beb27e74be171d1540606999oliviermartin  @param  HobStart      A pointer to a Guid.
3671e57a46299244793beb27e74be171d1540606999oliviermartin
3681e57a46299244793beb27e74be171d1540606999oliviermartin  @return The next instance of the matched GUID HOB from the starting HOB.
3691e57a46299244793beb27e74be171d1540606999oliviermartin
3701e57a46299244793beb27e74be171d1540606999oliviermartin**/
3711e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
3721e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
3731e57a46299244793beb27e74be171d1540606999oliviermartinGetNextGuidHob (
3741e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST EFI_GUID         *Guid,
3751e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST VOID             *HobStart
3761e57a46299244793beb27e74be171d1540606999oliviermartin  );
3771e57a46299244793beb27e74be171d1540606999oliviermartin
3781e57a46299244793beb27e74be171d1540606999oliviermartin/**
3793402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This function searches the first instance of a HOB among the whole HOB list.
3801e57a46299244793beb27e74be171d1540606999oliviermartin  Such HOB should satisfy two conditions:
3811e57a46299244793beb27e74be171d1540606999oliviermartin  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
3821e57a46299244793beb27e74be171d1540606999oliviermartin  If there does not exist such HOB from the starting HOB pointer, it will return NULL.
3831e57a46299244793beb27e74be171d1540606999oliviermartin  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
3841e57a46299244793beb27e74be171d1540606999oliviermartin  to extract the data section and its size info respectively.
3851e57a46299244793beb27e74be171d1540606999oliviermartin  If Guid is NULL, then ASSERT().
3861e57a46299244793beb27e74be171d1540606999oliviermartin
3871e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Guid          The GUID to match with in the HOB list.
3881e57a46299244793beb27e74be171d1540606999oliviermartin
3891e57a46299244793beb27e74be171d1540606999oliviermartin  @return The first instance of the matched GUID HOB among the whole HOB list.
3901e57a46299244793beb27e74be171d1540606999oliviermartin
3911e57a46299244793beb27e74be171d1540606999oliviermartin**/
3921e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
3931e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
3941e57a46299244793beb27e74be171d1540606999oliviermartinGetFirstGuidHob (
3951e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST EFI_GUID         *Guid
3961e57a46299244793beb27e74be171d1540606999oliviermartin  );
3971e57a46299244793beb27e74be171d1540606999oliviermartin
3981e57a46299244793beb27e74be171d1540606999oliviermartin
3991e57a46299244793beb27e74be171d1540606999oliviermartin/**
4001e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB for a loaded PE32 module.
4011e57a46299244793beb27e74be171d1540606999oliviermartin
4021e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB for a loaded PE32 module.
4031e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
4041e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
4051e57a46299244793beb27e74be171d1540606999oliviermartin  If ModuleName is NULL, then ASSERT().
4061e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
4071e57a46299244793beb27e74be171d1540606999oliviermartin
4081e57a46299244793beb27e74be171d1540606999oliviermartin  @param  ModuleName              The GUID File Name of the module.
4091e57a46299244793beb27e74be171d1540606999oliviermartin  @param  MemoryAllocationModule  The 64 bit physical address of the module.
4101e57a46299244793beb27e74be171d1540606999oliviermartin  @param  ModuleLength            The length of the module in bytes.
4111e57a46299244793beb27e74be171d1540606999oliviermartin  @param  EntryPoint              The 64 bit physical address of the module entry point.
4121e57a46299244793beb27e74be171d1540606999oliviermartin
4131e57a46299244793beb27e74be171d1540606999oliviermartin**/
4141e57a46299244793beb27e74be171d1540606999oliviermartinVOID
4151e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
4161e57a46299244793beb27e74be171d1540606999oliviermartinBuildModuleHob (
4171e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST EFI_GUID         *ModuleName,
4181e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS   MemoryAllocationModule,
4191e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                 ModuleLength,
4201e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS   EntryPoint
4211e57a46299244793beb27e74be171d1540606999oliviermartin  );
4221e57a46299244793beb27e74be171d1540606999oliviermartin
4231e57a46299244793beb27e74be171d1540606999oliviermartin/**
4241e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB that describes a chunk of system memory.
4251e57a46299244793beb27e74be171d1540606999oliviermartin
4261e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB that describes a chunk of system memory.
4271e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
4281e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
4291e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
4301e57a46299244793beb27e74be171d1540606999oliviermartin
4311e57a46299244793beb27e74be171d1540606999oliviermartin  @param  ResourceType        The type of resource described by this HOB.
4321e57a46299244793beb27e74be171d1540606999oliviermartin  @param  ResourceAttribute   The resource attributes of the memory described by this HOB.
4331e57a46299244793beb27e74be171d1540606999oliviermartin  @param  PhysicalStart       The 64 bit physical address of memory described by this HOB.
4341e57a46299244793beb27e74be171d1540606999oliviermartin  @param  NumberOfBytes       The length of the memory described by this HOB in bytes.
4351e57a46299244793beb27e74be171d1540606999oliviermartin
4361e57a46299244793beb27e74be171d1540606999oliviermartin**/
4371e57a46299244793beb27e74be171d1540606999oliviermartinVOID
4381e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
4391e57a46299244793beb27e74be171d1540606999oliviermartinBuildResourceDescriptorHob (
4401e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_RESOURCE_TYPE            ResourceType,
4411e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_RESOURCE_ATTRIBUTE_TYPE  ResourceAttribute,
4421e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS         PhysicalStart,
4431e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                       NumberOfBytes
4441e57a46299244793beb27e74be171d1540606999oliviermartin  );
4451e57a46299244793beb27e74be171d1540606999oliviermartin
4461e57a46299244793beb27e74be171d1540606999oliviermartin/**
4471e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a GUID HOB with a certain data length.
4481e57a46299244793beb27e74be171d1540606999oliviermartin
4493402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  This function builds a customized HOB tagged with a GUID for identification
4503402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  and returns the start address of GUID HOB data so that caller can fill the customized data.
4511e57a46299244793beb27e74be171d1540606999oliviermartin  The HOB Header and Name field is already stripped.
4521e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
4531e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
4541e57a46299244793beb27e74be171d1540606999oliviermartin  If Guid is NULL, then ASSERT().
4551e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
4561e57a46299244793beb27e74be171d1540606999oliviermartin  If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
4571e57a46299244793beb27e74be171d1540606999oliviermartin
4581e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Guid          The GUID to tag the customized HOB.
4591e57a46299244793beb27e74be171d1540606999oliviermartin  @param  DataLength    The size of the data payload for the GUID HOB.
4601e57a46299244793beb27e74be171d1540606999oliviermartin
4611e57a46299244793beb27e74be171d1540606999oliviermartin  @return The start address of GUID HOB data.
4621e57a46299244793beb27e74be171d1540606999oliviermartin
4631e57a46299244793beb27e74be171d1540606999oliviermartin**/
4641e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
4651e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
4661e57a46299244793beb27e74be171d1540606999oliviermartinBuildGuidHob (
4671e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST EFI_GUID              *Guid,
4681e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN                       DataLength
4691e57a46299244793beb27e74be171d1540606999oliviermartin  );
4701e57a46299244793beb27e74be171d1540606999oliviermartin
4711e57a46299244793beb27e74be171d1540606999oliviermartin/**
4721e57a46299244793beb27e74be171d1540606999oliviermartin  Copies a data buffer to a newly-built HOB.
4731e57a46299244793beb27e74be171d1540606999oliviermartin
4741e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a customized HOB tagged with a GUID for identification,
4751e57a46299244793beb27e74be171d1540606999oliviermartin  copies the input data to the HOB data field and returns the start address of the GUID HOB data.
4761e57a46299244793beb27e74be171d1540606999oliviermartin  The HOB Header and Name field is already stripped.
4771e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
4781e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
4791e57a46299244793beb27e74be171d1540606999oliviermartin  If Guid is NULL, then ASSERT().
4801e57a46299244793beb27e74be171d1540606999oliviermartin  If Data is NULL and DataLength > 0, then ASSERT().
4811e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
4821e57a46299244793beb27e74be171d1540606999oliviermartin  If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
4831e57a46299244793beb27e74be171d1540606999oliviermartin
4841e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Guid          The GUID to tag the customized HOB.
4851e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Data          The data to be copied into the data field of the GUID HOB.
4861e57a46299244793beb27e74be171d1540606999oliviermartin  @param  DataLength    The size of the data payload for the GUID HOB.
4871e57a46299244793beb27e74be171d1540606999oliviermartin
4881e57a46299244793beb27e74be171d1540606999oliviermartin  @return The start address of GUID HOB data.
4891e57a46299244793beb27e74be171d1540606999oliviermartin
4901e57a46299244793beb27e74be171d1540606999oliviermartin**/
4911e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
4921e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
4931e57a46299244793beb27e74be171d1540606999oliviermartinBuildGuidDataHob (
4941e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST EFI_GUID              *Guid,
4951e57a46299244793beb27e74be171d1540606999oliviermartin  IN VOID                        *Data,
4961e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN                       DataLength
4971e57a46299244793beb27e74be171d1540606999oliviermartin  );
4981e57a46299244793beb27e74be171d1540606999oliviermartin
4991e57a46299244793beb27e74be171d1540606999oliviermartin/**
5001e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a Firmware Volume HOB.
5011e57a46299244793beb27e74be171d1540606999oliviermartin
5021e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a Firmware Volume HOB.
5031e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
5041e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
5051e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
5061e57a46299244793beb27e74be171d1540606999oliviermartin
5071e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The base address of the Firmware Volume.
5081e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The size of the Firmware Volume in bytes.
5091e57a46299244793beb27e74be171d1540606999oliviermartin
5101e57a46299244793beb27e74be171d1540606999oliviermartin**/
5111e57a46299244793beb27e74be171d1540606999oliviermartinVOID
5121e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
5131e57a46299244793beb27e74be171d1540606999oliviermartinBuildFvHob (
5141e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
5151e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length
5161e57a46299244793beb27e74be171d1540606999oliviermartin  );
5171e57a46299244793beb27e74be171d1540606999oliviermartin
5181e57a46299244793beb27e74be171d1540606999oliviermartin/**
5193402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  Builds a Firmware Volume HOB and a resrouce descriptor hob
5201e57a46299244793beb27e74be171d1540606999oliviermartin
5211e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a Firmware Volume HOB.
5221e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
5231e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
5241e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
5251e57a46299244793beb27e74be171d1540606999oliviermartin
5261e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The base address of the Firmware Volume.
5271e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The size of the Firmware Volume in bytes.
5281e57a46299244793beb27e74be171d1540606999oliviermartin
5291e57a46299244793beb27e74be171d1540606999oliviermartin**/
5301e57a46299244793beb27e74be171d1540606999oliviermartinVOID
5311e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
5323402aac7d985bf8a9f9d3c639f3fe93609380513Ronald CronBuildFvHobs (
5331e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS         PhysicalStart,
5341e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                       NumberOfBytes,
5351e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_RESOURCE_ATTRIBUTE_TYPE  *ResourceAttribute  OPTIONAL
5363402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron  );
5371e57a46299244793beb27e74be171d1540606999oliviermartin
5381e57a46299244793beb27e74be171d1540606999oliviermartin
5391e57a46299244793beb27e74be171d1540606999oliviermartin/**
5401e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a EFI_HOB_TYPE_FV2 HOB.
5411e57a46299244793beb27e74be171d1540606999oliviermartin
5421e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a EFI_HOB_TYPE_FV2 HOB.
5431e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
5441e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
5451e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
5461e57a46299244793beb27e74be171d1540606999oliviermartin
5471e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The base address of the Firmware Volume.
5481e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The size of the Firmware Volume in bytes.
5491e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FvName       The name of the Firmware Volume.
5501e57a46299244793beb27e74be171d1540606999oliviermartin  @param  FileName      The name of the file.
5513402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
5521e57a46299244793beb27e74be171d1540606999oliviermartin**/
5531e57a46299244793beb27e74be171d1540606999oliviermartinVOID
5541e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
5551e57a46299244793beb27e74be171d1540606999oliviermartinBuildFv2Hob (
5561e57a46299244793beb27e74be171d1540606999oliviermartin  IN          EFI_PHYSICAL_ADDRESS        BaseAddress,
5571e57a46299244793beb27e74be171d1540606999oliviermartin  IN          UINT64                      Length,
5581e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST    EFI_GUID                    *FvName,
5591e57a46299244793beb27e74be171d1540606999oliviermartin  IN CONST    EFI_GUID                    *FileName
5601e57a46299244793beb27e74be171d1540606999oliviermartin  );
5611e57a46299244793beb27e74be171d1540606999oliviermartin
5621e57a46299244793beb27e74be171d1540606999oliviermartin/**
5631e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a Capsule Volume HOB.
5641e57a46299244793beb27e74be171d1540606999oliviermartin
5651e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a Capsule Volume HOB.
5661e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
5671e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
5681e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
5691e57a46299244793beb27e74be171d1540606999oliviermartin
5701e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The base address of the Capsule Volume.
5711e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The size of the Capsule Volume in bytes.
5721e57a46299244793beb27e74be171d1540606999oliviermartin
5731e57a46299244793beb27e74be171d1540606999oliviermartin**/
5741e57a46299244793beb27e74be171d1540606999oliviermartinVOID
5751e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
5761e57a46299244793beb27e74be171d1540606999oliviermartinBuildCvHob (
5771e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
5781e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length
5791e57a46299244793beb27e74be171d1540606999oliviermartin  );
5801e57a46299244793beb27e74be171d1540606999oliviermartin
5811e57a46299244793beb27e74be171d1540606999oliviermartin/**
5821e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB for the CPU.
5831e57a46299244793beb27e74be171d1540606999oliviermartin
5841e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB for the CPU.
5851e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
5861e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
5871e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
5881e57a46299244793beb27e74be171d1540606999oliviermartin
5891e57a46299244793beb27e74be171d1540606999oliviermartin  @param  SizeOfMemorySpace   The maximum physical memory addressability of the processor.
5901e57a46299244793beb27e74be171d1540606999oliviermartin  @param  SizeOfIoSpace       The maximum physical I/O addressability of the processor.
5911e57a46299244793beb27e74be171d1540606999oliviermartin
5921e57a46299244793beb27e74be171d1540606999oliviermartin**/
5931e57a46299244793beb27e74be171d1540606999oliviermartinVOID
5941e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
5951e57a46299244793beb27e74be171d1540606999oliviermartinBuildCpuHob (
5961e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT8                       SizeOfMemorySpace,
5971e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT8                       SizeOfIoSpace
5981e57a46299244793beb27e74be171d1540606999oliviermartin  );
5991e57a46299244793beb27e74be171d1540606999oliviermartin
6001e57a46299244793beb27e74be171d1540606999oliviermartin/**
6011e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB for the Stack.
6021e57a46299244793beb27e74be171d1540606999oliviermartin
6031e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB for the stack.
6041e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
6051e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
6061e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
6071e57a46299244793beb27e74be171d1540606999oliviermartin
6081e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The 64 bit physical address of the Stack.
6091e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The length of the stack in bytes.
6101e57a46299244793beb27e74be171d1540606999oliviermartin
6111e57a46299244793beb27e74be171d1540606999oliviermartin**/
6121e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6131e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
6141e57a46299244793beb27e74be171d1540606999oliviermartinBuildStackHob (
6151e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
6161e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length
6171e57a46299244793beb27e74be171d1540606999oliviermartin  );
6181e57a46299244793beb27e74be171d1540606999oliviermartin
6191e57a46299244793beb27e74be171d1540606999oliviermartin/**
6201e57a46299244793beb27e74be171d1540606999oliviermartin  Update the Stack Hob if the stack has been moved
6211e57a46299244793beb27e74be171d1540606999oliviermartin
6221e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The 64 bit physical address of the Stack.
6231e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The length of the stack in bytes.
6241e57a46299244793beb27e74be171d1540606999oliviermartin
6251e57a46299244793beb27e74be171d1540606999oliviermartin**/
6261e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6271e57a46299244793beb27e74be171d1540606999oliviermartinUpdateStackHob (
6281e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
6291e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length
6301e57a46299244793beb27e74be171d1540606999oliviermartin  );
6311e57a46299244793beb27e74be171d1540606999oliviermartin
6321e57a46299244793beb27e74be171d1540606999oliviermartin
6331e57a46299244793beb27e74be171d1540606999oliviermartin/**
6341e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB for the BSP store.
6351e57a46299244793beb27e74be171d1540606999oliviermartin
6361e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB for BSP store.
6371e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
6381e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
6391e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
6401e57a46299244793beb27e74be171d1540606999oliviermartin
6411e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The 64 bit physical address of the BSP.
6421e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The length of the BSP store in bytes.
6431e57a46299244793beb27e74be171d1540606999oliviermartin  @param  MemoryType    Type of memory allocated by this HOB.
6441e57a46299244793beb27e74be171d1540606999oliviermartin
6451e57a46299244793beb27e74be171d1540606999oliviermartin**/
6461e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6471e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
6481e57a46299244793beb27e74be171d1540606999oliviermartinBuildBspStoreHob (
6491e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
6501e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length,
6511e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_MEMORY_TYPE             MemoryType
6521e57a46299244793beb27e74be171d1540606999oliviermartin  );
6531e57a46299244793beb27e74be171d1540606999oliviermartin
6541e57a46299244793beb27e74be171d1540606999oliviermartin/**
6551e57a46299244793beb27e74be171d1540606999oliviermartin  Builds a HOB for the memory allocation.
6561e57a46299244793beb27e74be171d1540606999oliviermartin
6571e57a46299244793beb27e74be171d1540606999oliviermartin  This function builds a HOB for the memory allocation.
6581e57a46299244793beb27e74be171d1540606999oliviermartin  It can only be invoked during PEI phase;
6591e57a46299244793beb27e74be171d1540606999oliviermartin  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
6601e57a46299244793beb27e74be171d1540606999oliviermartin  If there is no additional space for HOB creation, then ASSERT().
6611e57a46299244793beb27e74be171d1540606999oliviermartin
6621e57a46299244793beb27e74be171d1540606999oliviermartin  @param  BaseAddress   The 64 bit physical address of the memory.
6631e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Length        The length of the memory allocation in bytes.
6641e57a46299244793beb27e74be171d1540606999oliviermartin  @param  MemoryType    Type of memory allocated by this HOB.
6651e57a46299244793beb27e74be171d1540606999oliviermartin
6661e57a46299244793beb27e74be171d1540606999oliviermartin**/
6671e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6681e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
6691e57a46299244793beb27e74be171d1540606999oliviermartinBuildMemoryAllocationHob (
6701e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PHYSICAL_ADDRESS        BaseAddress,
6711e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINT64                      Length,
6721e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_MEMORY_TYPE             MemoryType
6731e57a46299244793beb27e74be171d1540606999oliviermartin  );
6741e57a46299244793beb27e74be171d1540606999oliviermartin
6751e57a46299244793beb27e74be171d1540606999oliviermartin
6761e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6771e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
6781e57a46299244793beb27e74be171d1540606999oliviermartinBuildExtractSectionHob (
6791e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EFI_GUID                                  *Guid,
6801e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER   SectionGetInfo,
6811e57a46299244793beb27e74be171d1540606999oliviermartin  IN  EXTRACT_GUIDED_SECTION_DECODE_HANDLER     SectionExtraction
6821e57a46299244793beb27e74be171d1540606999oliviermartin  );
6831e57a46299244793beb27e74be171d1540606999oliviermartin
6841e57a46299244793beb27e74be171d1540606999oliviermartinVOID
6851e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
6861e57a46299244793beb27e74be171d1540606999oliviermartinBuildPeCoffLoaderHob (
6871e57a46299244793beb27e74be171d1540606999oliviermartin  VOID
6881e57a46299244793beb27e74be171d1540606999oliviermartin  );
6891e57a46299244793beb27e74be171d1540606999oliviermartin
6901e57a46299244793beb27e74be171d1540606999oliviermartin
6911e57a46299244793beb27e74be171d1540606999oliviermartin/**
6921e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates one or more 4KB pages of type EfiBootServicesData.
6931e57a46299244793beb27e74be171d1540606999oliviermartin
6941e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates the number of 4KB pages of MemoryType and returns a pointer to the
6951e57a46299244793beb27e74be171d1540606999oliviermartin  allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If Pages is 0, then NULL
6961e57a46299244793beb27e74be171d1540606999oliviermartin  is returned.  If there is not enough memory remaining to satisfy the request, then NULL is
6971e57a46299244793beb27e74be171d1540606999oliviermartin  returned.
6981e57a46299244793beb27e74be171d1540606999oliviermartin
6991e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Pages                 The number of 4 KB pages to allocate.
7001e57a46299244793beb27e74be171d1540606999oliviermartin
7011e57a46299244793beb27e74be171d1540606999oliviermartin  @return A pointer to the allocated buffer or NULL if allocation fails.
7021e57a46299244793beb27e74be171d1540606999oliviermartin
7031e57a46299244793beb27e74be171d1540606999oliviermartin**/
7043402aac7d985bf8a9f9d3c639f3fe93609380513Ronald CronVOID *
7051e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7061e57a46299244793beb27e74be171d1540606999oliviermartinAllocatePages (
7071e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN            Pages
7081e57a46299244793beb27e74be171d1540606999oliviermartin  );
7093402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
7101e57a46299244793beb27e74be171d1540606999oliviermartin/**
7111e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates a buffer of type EfiBootServicesData.
7121e57a46299244793beb27e74be171d1540606999oliviermartin
7131e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates the number bytes specified by AllocationSize of type EfiBootServicesData and returns a
7141e57a46299244793beb27e74be171d1540606999oliviermartin  pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is
7151e57a46299244793beb27e74be171d1540606999oliviermartin  returned.  If there is not enough memory remaining to satisfy the request, then NULL is returned.
7161e57a46299244793beb27e74be171d1540606999oliviermartin
7171e57a46299244793beb27e74be171d1540606999oliviermartin  @param  AllocationSize        The number of bytes to allocate.
7181e57a46299244793beb27e74be171d1540606999oliviermartin
7191e57a46299244793beb27e74be171d1540606999oliviermartin  @return A pointer to the allocated buffer or NULL if allocation fails.
7201e57a46299244793beb27e74be171d1540606999oliviermartin
7211e57a46299244793beb27e74be171d1540606999oliviermartin**/
7221e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
7231e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7241e57a46299244793beb27e74be171d1540606999oliviermartinAllocatePool (
7251e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  AllocationSize
7261e57a46299244793beb27e74be171d1540606999oliviermartin  );
7273402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
7283402aac7d985bf8a9f9d3c639f3fe93609380513Ronald Cron
7291e57a46299244793beb27e74be171d1540606999oliviermartin/**
7301e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates one or more 4KB pages of type EfiBootServicesData at a specified alignment.
7311e57a46299244793beb27e74be171d1540606999oliviermartin
7321e57a46299244793beb27e74be171d1540606999oliviermartin  Allocates the number of 4KB pages specified by Pages of type EfiBootServicesData with an
7331e57a46299244793beb27e74be171d1540606999oliviermartin  alignment specified by Alignment.  The allocated buffer is returned.  If Pages is 0, then NULL is
7341e57a46299244793beb27e74be171d1540606999oliviermartin  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
7351e57a46299244793beb27e74be171d1540606999oliviermartin  request, then NULL is returned.
7361e57a46299244793beb27e74be171d1540606999oliviermartin  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
7371e57a46299244793beb27e74be171d1540606999oliviermartin
7381e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Pages                 The number of 4 KB pages to allocate.
7391e57a46299244793beb27e74be171d1540606999oliviermartin  @param  Alignment             The requested alignment of the allocation.  Must be a power of two.
7401e57a46299244793beb27e74be171d1540606999oliviermartin                                If Alignment is zero, then byte alignment is used.
7411e57a46299244793beb27e74be171d1540606999oliviermartin
7421e57a46299244793beb27e74be171d1540606999oliviermartin  @return A pointer to the allocated buffer or NULL if allocation fails.
7431e57a46299244793beb27e74be171d1540606999oliviermartin
7441e57a46299244793beb27e74be171d1540606999oliviermartin**/
7451e57a46299244793beb27e74be171d1540606999oliviermartinVOID *
7461e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7471e57a46299244793beb27e74be171d1540606999oliviermartinAllocateAlignedPages (
7481e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  Pages,
7491e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  Alignment
7501e57a46299244793beb27e74be171d1540606999oliviermartin  );
7511e57a46299244793beb27e74be171d1540606999oliviermartin
7521e57a46299244793beb27e74be171d1540606999oliviermartin
7531e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
7541e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7551e57a46299244793beb27e74be171d1540606999oliviermartinLoadPeCoffImage (
7561e57a46299244793beb27e74be171d1540606999oliviermartin  IN  VOID                                      *PeCoffImage,
7571e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_PHYSICAL_ADDRESS                      *ImageAddress,
7581e57a46299244793beb27e74be171d1540606999oliviermartin  OUT UINT64                                    *ImageSize,
7591e57a46299244793beb27e74be171d1540606999oliviermartin  OUT EFI_PHYSICAL_ADDRESS                      *EntryPoint
7601e57a46299244793beb27e74be171d1540606999oliviermartin  );
7611e57a46299244793beb27e74be171d1540606999oliviermartin
7621e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
7631e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7641e57a46299244793beb27e74be171d1540606999oliviermartinLoadDxeCoreFromFfsFile (
7651e57a46299244793beb27e74be171d1540606999oliviermartin  IN EFI_PEI_FILE_HANDLE  FileHandle,
7661e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN                StackSize
7671e57a46299244793beb27e74be171d1540606999oliviermartin  );
7681e57a46299244793beb27e74be171d1540606999oliviermartin
7691e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
7701e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7711e57a46299244793beb27e74be171d1540606999oliviermartinLoadDxeCoreFromFv (
7721e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  *FvInstance,   OPTIONAL
7731e57a46299244793beb27e74be171d1540606999oliviermartin  IN UINTN  StackSize
7741e57a46299244793beb27e74be171d1540606999oliviermartin  );
7751e57a46299244793beb27e74be171d1540606999oliviermartin
7761e57a46299244793beb27e74be171d1540606999oliviermartinEFI_STATUS
7771e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7781e57a46299244793beb27e74be171d1540606999oliviermartinDecompressFirstFv (
7791e57a46299244793beb27e74be171d1540606999oliviermartin  VOID
7801e57a46299244793beb27e74be171d1540606999oliviermartin  );
7811e57a46299244793beb27e74be171d1540606999oliviermartin
7821e57a46299244793beb27e74be171d1540606999oliviermartinVOID
7831e57a46299244793beb27e74be171d1540606999oliviermartinEFIAPI
7841e57a46299244793beb27e74be171d1540606999oliviermartinAddDxeCoreReportStatusCodeCallback (
7851e57a46299244793beb27e74be171d1540606999oliviermartin  VOID
7861e57a46299244793beb27e74be171d1540606999oliviermartin  );
7871e57a46299244793beb27e74be171d1540606999oliviermartin
7881e57a46299244793beb27e74be171d1540606999oliviermartin
7891e57a46299244793beb27e74be171d1540606999oliviermartin#endif
790