]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Ppi/LoadFile.h
af02be7c9e6aaade43bd778c9c319b4d5d294696
[mirror_edk2.git] / MdePkg / Include / Ppi / LoadFile.h
1 /** @file
2 Load image file from fv to memory.
3
4 Copyright (c) 2006, 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
35 @param FfsHeader Pointer to the FFS header of the file to load.
36
37 @param ImageAddress Pointer to the address of the loaded Image
38
39 @param ImageSize Pointer to the size of the loaded image.
40
41 @param EntryPoint Pointer to the entry point of the image.
42
43 @retval EFI_SUCCESS The image was loaded successfully.
44
45 @retval EFI_OUT_OF_RESOURCES There was not enough memory.
46
47 @retval EFI_INVALID_PARAMETER The contents of the FFS file did not
48 contain a valid PE/COFF image that could be loaded.
49
50 **/
51 typedef
52 EFI_STATUS
53 (EFIAPI *EFI_PEI_FV_LOAD_FILE) (
54 IN EFI_PEI_FV_FILE_LOADER_PPI *This,
55 IN EFI_FFS_FILE_HEADER *FfsHeader,
56 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
57 OUT UINT64 *ImageSize,
58 OUT EFI_PHYSICAL_ADDRESS *EntryPoint
59 );
60
61 /**
62 @par Ppi Description:
63 This PPI is a pointer to the Load File service. This service will be
64 published by a PEIM.The PEI Foundation will use this service to
65 launch the known non-XIP PE/COFF PEIM images. This service may
66 depend upon the presence of the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI.
67
68 @param FvLoadFile
69 Loads a PEIM into memory for subsequent execution
70
71 **/
72 struct _EFI_PEI_FV_FILE_LOADER_PPI {
73 EFI_PEI_FV_LOAD_FILE FvLoadFile;
74 };
75
76 extern EFI_GUID gEfiPeiFvFileLoaderPpiGuid;
77
78 #endif