2 Load image file from fv to memory.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 This PPI is introduced in PI Version 1.0.
12 #ifndef __LOAD_FILE_PPI_H__
13 #define __LOAD_FILE_PPI_H__
15 #define EFI_PEI_LOAD_FILE_PPI_GUID \
16 { 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }
18 typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI
;
21 Loads a PEIM into memory for subsequent execution.
23 This service is the single member function of EFI_LOAD_FILE_PPI.
24 This service separates image loading and relocating from the PEI Foundation.
26 @param This Interface pointer that implements
27 the Load File PPI instance.
28 @param FileHandle File handle of the file to load.
29 @param ImageAddress Pointer to the address of the loaded image.
30 @param ImageSize Pointer to the size of the loaded image.
31 @param EntryPoint Pointer to the entry point of the image.
32 @param AuthenticationState On exit, points to the attestation
33 authentication state of the image
34 or 0 if no attestation was performed.
36 @retval EFI_SUCCESS The image was loaded successfully.
37 @retval EFI_OUT_OF_RESOURCES There was not enough memory.
38 @retval EFI_LOAD_ERROR There was no supported image in the file.
39 @retval EFI_INVALID_PARAMETER FileHandle was not a valid firmware file handle.
40 @retval EFI_INVALID_PARAMETER EntryPoint was NULL.
41 @retval EFI_UNSUPPORTED An image requires relocations or is not
43 @retval EFI_WARN_BUFFER_TOO_SMALL
44 There is not enough heap to allocate the requested size.
45 This will not prevent the XIP image from being invoked.
50 (EFIAPI
*EFI_PEI_LOAD_FILE
)(
51 IN CONST EFI_PEI_LOAD_FILE_PPI
*This
,
52 IN EFI_PEI_FILE_HANDLE FileHandle
,
53 OUT EFI_PHYSICAL_ADDRESS
*ImageAddress
,
54 OUT UINT64
*ImageSize
,
55 OUT EFI_PHYSICAL_ADDRESS
*EntryPoint
,
56 OUT UINT32
*AuthenticationState
60 /// This PPI is a pointer to the Load File service.
61 /// This service will be published by a PEIM. The PEI Foundation
62 /// will use this service to launch the known PEI module images.
64 struct _EFI_PEI_LOAD_FILE_PPI
{
65 EFI_PEI_LOAD_FILE LoadFile
;
68 extern EFI_GUID gEfiPeiLoadFilePpiGuid
;