]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Ppi/FvLoadFile.h
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / FvLoadFile.h
1 /** @file
2 Load image file from fv to memory.
3
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 @par Revision Reference:
8 This PPI is defined in PEI CIS spec Version 0.91.
9
10 **/
11
12 #ifndef _FV_FILE_LOADER_PPI_H_
13 #define _FV_FILE_LOADER_PPI_H_
14
15 #define EFI_PEI_FV_FILE_LOADER_GUID \
16 { \
17 0x7e1f0d85, 0x4ff, 0x4bb2, {0x86, 0x6a, 0x31, 0xa2, 0x99, 0x6a, 0x48, 0xa8 } \
18 }
19
20 typedef struct _EFI_PEI_FV_FILE_LOADER_PPI EFI_PEI_FV_FILE_LOADER_PPI;
21
22 /**
23 Loads a PEIM into memory for subsequent execution.
24
25 @param This Interface pointer that implements the Load File PPI instance.
26 @param FfsHeader The pointer to the FFS header of the file to load.
27 @param ImageAddress The pointer to the address of the loaded Image
28 @param ImageSize The pointer to the size of the loaded image.
29 @param EntryPoint The pointer to the entry point of the image.
30
31 @retval EFI_SUCCESS The image was loaded successfully.
32 @retval EFI_OUT_OF_RESOURCES There was not enough memory.
33 @retval EFI_INVALID_PARAMETER The contents of the FFS file did not
34 contain a valid PE/COFF image that could be loaded.
35
36 **/
37 typedef
38 EFI_STATUS
39 (EFIAPI *EFI_PEI_FV_LOAD_FILE)(
40 IN EFI_PEI_FV_FILE_LOADER_PPI *This,
41 IN EFI_FFS_FILE_HEADER *FfsHeader,
42 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
43 OUT UINT64 *ImageSize,
44 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
45 );
46
47 /**
48 This PPI is a pointer to the Load File service. This service will be
49 published by a PEIM. The PEI Foundation will use this service to
50 launch the known non-XIP PE/COFF PEIM images. This service may
51 depend upon the presence of the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI.
52 **/
53 struct _EFI_PEI_FV_FILE_LOADER_PPI {
54 ///
55 /// Loads a PEIM into memory for subsequent execution.
56 ///
57 EFI_PEI_FV_LOAD_FILE FvLoadFile;
58 };
59
60 extern EFI_GUID gEfiPeiFvFileLoaderPpiGuid;
61
62 #endif