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