2 Load image file from fv to memory.
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
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.
13 Module Name: LoadFile.h
15 @par Revision Reference:
16 This PPI is defined in PI Version 1.00.
20 #ifndef __FV_FILE_LOADER_PPI_H__
21 #define __FV_FILE_LOADER_PPI_H__
23 #define EFI_PEI_LOAD_FILE_PPI_GUID \
24 { 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }
27 typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI
;
30 This service is the single member function of EFI_LOAD_FILE_PPI. This service separates
31 image loading and relocating from the PEI Foundation.
33 @param This Interface pointer that implements
34 the Load File PPI instance.
36 @param FileHandle File handle of the file to load.
37 Type EFI_PEI_FILE_HANDLE is defined in
40 @param ImageAddress Pointer to the address of the
43 @param ImageSize Pointer to the size of the loaded
46 @param EntryPoint Pointer to the entry point of the
49 @param AuthenticationState On exit, points to the attestation
50 authentication state of the image
51 or 0 if no attestation was
52 performed. The format of
53 AuthenticationState is defined in
54 EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI.ExtractSection()
57 @retval EFI_SUCCESS The image was loaded successfully.
59 @retval EFI_OUT_OF_RESOURCES There was not enough memory.
61 @retval EFI_LOAD_ERROR There was no supported image in
62 the file EFI_INVALID_PARAMETER
63 FileHandle was not a valid
65 @retval EFI_INVALID_PARAMETER EntryPoint was NULL.
67 @retval EFI_NOT_SUPPORTED An image requires relocations or
73 (EFIAPI
*EFI_PEI_LOAD_FILE
) (
74 IN CONST EFI_PEI_LOAD_FILE_PPI
*This
,
75 IN CONST EFI_PEI_FILE_HANDLE FileHandle
,
76 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
77 OUT UINT64
*ImageSize
,
78 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
,
79 OUT UINT32
*AuthenticationState
84 This PPI is a pointer to the Load File service.
85 This service will be published by a PEIM. The PEI Foundation
86 will use this service to launch the known PEI module images.
89 @param LoadFile Loads a PEIM into memory for subsequent
90 execution. See the LoadFile() function
94 struct _EFI_PEI_LOAD_FILE_PPI
{
95 EFI_PEI_LOAD_FILE LoadFile
;
100 #define EFI_PEI_FV_FILE_LOADER_GUID \
102 0x7e1f0d85, 0x4ff, 0x4bb2, {0x86, 0x6a, 0x31, 0xa2, 0x99, 0x6a, 0x48, 0xa8 } \
105 typedef struct _EFI_PEI_FV_FILE_LOADER_PPI EFI_PEI_FV_FILE_LOADER_PPI
;
108 Loads a PEIM into memory for subsequent execution.
110 @param This Interface pointer that implements the Load File PPI instance.
111 @param FfsHeader Pointer to the FFS header of the file to load.
112 @param ImageAddress Pointer to the address of the loaded Image
113 @param ImageSize Pointer to the size of the loaded image.
114 @param EntryPoint Pointer to the entry point of the image.
116 @retval EFI_SUCCESS The image was loaded successfully.
117 @retval EFI_OUT_OF_RESOURCES There was not enough memory.
118 @retval EFI_INVALID_PARAMETER The contents of the FFS file did not
119 contain a valid PE/COFF image that could be loaded.
124 (EFIAPI
*EFI_PEI_FV_LOAD_FILE
) (
125 IN EFI_PEI_FV_FILE_LOADER_PPI
*This
,
126 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
127 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
128 OUT UINT64
*ImageSize
,
129 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
133 @par Ppi Description:
134 This PPI is a pointer to the Load File service. This service will be
135 published by a PEIM.The PEI Foundation will use this service to
136 launch the known non-XIP PE/COFF PEIM images. This service may
137 depend upon the presence of the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI.
140 Loads a PEIM into memory for subsequent execution
143 struct _EFI_PEI_FV_FILE_LOADER_PPI
{
144 EFI_PEI_FV_LOAD_FILE FvLoadFile
;
147 extern EFI_GUID gEfiPeiFvFileLoaderPpiGuid
;