]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/LoadFile.h
MdePkg: introduce MM communicate 2 protocol
[mirror_edk2.git] / MdePkg / Include / Ppi / LoadFile.h
CommitLineData
5879b875 1/** @file\r
9095d37b 2 Load image file from fv to memory.\r
5879b875 3\r
9095d37b 4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
5879b875 6\r
5879b875 7 @par Revision Reference:\r
0047820e 8 This PPI is introduced in PI Version 1.0.\r
5879b875 9\r
10**/\r
11\r
9b537078 12#ifndef __LOAD_FILE_PPI_H__\r
13#define __LOAD_FILE_PPI_H__\r
5879b875 14\r
15#define EFI_PEI_LOAD_FILE_PPI_GUID \\r
00edb218 16 { 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }\r
5879b875 17\r
18\r
00edb218 19typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;\r
5879b875 20\r
21/**\r
d7132512
LG
22 Loads a PEIM into memory for subsequent execution.\r
23\r
dafa11b1 24 This service is the single member function of EFI_LOAD_FILE_PPI.\r
25 This service separates image loading and relocating from the PEI Foundation.\r
9095d37b 26\r
dafa11b1 27 @param This Interface pointer that implements\r
28 the Load File PPI instance.\r
29 @param FileHandle File handle of the file to load.\r
30 @param ImageAddress Pointer to the address of the loaded image.\r
31 @param ImageSize Pointer to the size of the loaded image.\r
32 @param EntryPoint Pointer to the entry point of the image.\r
33 @param AuthenticationState On exit, points to the attestation\r
34 authentication state of the image\r
35 or 0 if no attestation was performed.\r
36\r
37 @retval EFI_SUCCESS The image was loaded successfully.\r
00edb218 38 @retval EFI_OUT_OF_RESOURCES There was not enough memory.\r
dafa11b1 39 @retval EFI_LOAD_ERROR There was no supported image in the file.\r
40 @retval EFI_INVALID_PARAMETER FileHandle was not a valid firmware file handle.\r
41 @retval EFI_INVALID_PARAMETER EntryPoint was NULL.\r
5fbfa2d0 42 @retval EFI_UNSUPPORTED An image requires relocations or is not\r
dafa11b1 43 memory mapped.\r
9095d37b 44 @retval EFI_WARN_BUFFER_TOO_SMALL\r
5d7f3126
LG
45 There is not enough heap to allocate the requested size.\r
46 This will not prevent the XIP image from being invoked.\r
47\r
5879b875 48**/\r
49typedef\r
50EFI_STATUS\r
8b13229b 51(EFIAPI *EFI_PEI_LOAD_FILE)(\r
dafa11b1 52 IN CONST EFI_PEI_LOAD_FILE_PPI *This,\r
53 IN EFI_PEI_FILE_HANDLE FileHandle,\r
54 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
55 OUT UINT64 *ImageSize,\r
56 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
57 OUT UINT32 *AuthenticationState\r
5879b875 58);\r
59\r
dafa11b1 60///\r
61/// This PPI is a pointer to the Load File service.\r
62/// This service will be published by a PEIM. The PEI Foundation\r
63/// will use this service to launch the known PEI module images.\r
64///\r
5879b875 65struct _EFI_PEI_LOAD_FILE_PPI {\r
00edb218 66 EFI_PEI_LOAD_FILE LoadFile;\r
5879b875 67};\r
68\r
9b537078 69extern EFI_GUID gEfiPeiLoadFilePpiGuid;\r
5879b875 70\r
71#endif\r