]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Ppi/LoadFile.h
Code Scrub for Protocol and Ppi Definition
[mirror_edk2.git] / MdePkg / Include / Ppi / LoadFile.h
... / ...
CommitLineData
1/** @file\r
2 Load image file from fv to memory. \r
3\r
4 Copyright (c) 2006 - 2008, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13 @par Revision Reference:\r
14 This PPI is defined in PI Version 1.00.\r
15\r
16**/\r
17\r
18#ifndef __LOAD_FILE_PPI_H__\r
19#define __LOAD_FILE_PPI_H__\r
20\r
21#define EFI_PEI_LOAD_FILE_PPI_GUID \\r
22 { 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }\r
23\r
24\r
25typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;\r
26\r
27/**\r
28 Loads a PEIM into memory for subsequent execution.\r
29\r
30 This service is the single member function of EFI_LOAD_FILE_PPI. This service separates\r
31 image loading and relocating from the PEI Foundation.\r
32 \r
33 @param This Interface pointer that implements\r
34 the Load File PPI instance.\r
35\r
36 @param FileHandle File handle of the file to load.\r
37 Type EFI_PEI_FILE_HANDLE is defined in\r
38 FfsFindNextFile().\r
39\r
40 @param ImageAddress Pointer to the address of the\r
41 loaded image.\r
42\r
43 @param ImageSize Pointer to the size of the loaded\r
44 image.\r
45\r
46 @param EntryPoint Pointer to the entry point of the\r
47 image.\r
48\r
49 @param AuthenticationState On exit, points to the attestation\r
50 authentication state of the image\r
51 or 0 if no attestation was\r
52 performed. The format of\r
53 AuthenticationState is defined in\r
54 EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI.ExtractSection()\r
55\r
56\r
57 @retval EFI_SUCCESS The image was loaded successfully.\r
58\r
59 @retval EFI_OUT_OF_RESOURCES There was not enough memory.\r
60\r
61 @retval EFI_LOAD_ERROR There was no supported image in\r
62 the file.\r
63 @retval EFI_INVALID_PARAMETER EntryPoint was NULL.\r
64 Or FileHandle was not a valid firmware file handle.\r
65 @retval EFI_NOT_SUPPORTED An image requires relocations or\r
66 is not memory mapped.\r
67 \r
68**/\r
69typedef\r
70EFI_STATUS\r
71(EFIAPI *EFI_PEI_LOAD_FILE)(\r
72 IN CONST EFI_PEI_LOAD_FILE_PPI *This,\r
73 IN CONST EFI_PEI_FILE_HANDLE FileHandle,\r
74 OUT EFI_PHYSICAL_ADDRESS *ImageAddress,\r
75 OUT UINT64 *ImageSize,\r
76 OUT EFI_PHYSICAL_ADDRESS *EntryPoint,\r
77 OUT UINT32 *AuthenticationState\r
78);\r
79\r
80\r
81/**\r
82 @par Ppi Description:\r
83 This PPI is a pointer to the Load File service.\r
84 This service will be published by a PEIM. The PEI Foundation\r
85 will use this service to launch the known PEI module images.\r
86 \r
87 \r
88 @param LoadFile Loads a PEIM into memory for subsequent\r
89 execution. See the LoadFile() function\r
90 description.\r
91 \r
92**/\r
93struct _EFI_PEI_LOAD_FILE_PPI {\r
94 EFI_PEI_LOAD_FILE LoadFile;\r
95};\r
96\r
97extern EFI_GUID gEfiPeiLoadFilePpiGuid;\r
98\r
99#endif\r