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