]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
8a7d75b0 | 2 | Load File protocol as defined in the UEFI 2.0 specification.\r |
d1f95000 | 3 | \r |
af2dc6a7 | 4 | The load file protocol exists to supports the addition of new boot devices, \r |
d1f95000 | 5 | and to support booting from devices that do not map well to file system. \r |
6 | Network boot is done via a LoadFile protocol.\r | |
7 | \r | |
8a7d75b0 | 8 | UEFI 2.0 can boot from any device that produces a LoadFile protocol.\r |
d1f95000 | 9 | \r |
fed5f447 | 10 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r |
af2dc6a7 | 11 | This program and the accompanying materials are licensed and made available under \r |
12 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
13 | The full text of the license may be found at\r | |
14 | http://opensource.org/licenses/bsd-license.php. \r | |
15 | \r | |
16 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
17 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
d1f95000 | 18 | \r |
d1f95000 | 19 | **/\r |
20 | \r | |
21 | #ifndef __EFI_LOAD_FILE_PROTOCOL_H__\r | |
22 | #define __EFI_LOAD_FILE_PROTOCOL_H__\r | |
23 | \r | |
a6508c05 | 24 | #define EFI_LOAD_FILE_PROTOCOL_GUID \\r |
d1f95000 | 25 | { \\r |
26 | 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \\r | |
27 | }\r | |
28 | \r | |
99e8ed21 | 29 | ///\r |
30 | /// Protocol Guid defined by EFI1.1.\r | |
31 | ///\r | |
a6508c05 | 32 | #define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID\r |
d1f95000 | 33 | \r |
34 | typedef struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL;\r | |
35 | \r | |
99e8ed21 | 36 | ///\r |
37 | /// Backward-compatible with EFI1.1\r | |
38 | /// \r | |
a6508c05 | 39 | typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE;\r |
40 | \r | |
d1f95000 | 41 | /**\r |
42 | Causes the driver to load a specified file.\r | |
43 | \r | |
44 | @param This Protocol instance pointer.\r | |
45 | @param FilePath The device specific path of the file to load.\r | |
46 | @param BootPolicy If TRUE, indicates that the request originates from the\r | |
47 | boot manager is attempting to load FilePath as a boot\r | |
48 | selection. If FALSE, then FilePath must match as exact file\r | |
49 | to be loaded.\r | |
50 | @param BufferSize On input the size of Buffer in bytes. On output with a return\r | |
51 | code of EFI_SUCCESS, the amount of data transferred to\r | |
52 | Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,\r | |
53 | the size of Buffer required to retrieve the requested file.\r | |
54 | @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL,\r | |
f620c889 | 55 | then the size of the requested file is returned in\r |
d1f95000 | 56 | BufferSize.\r |
57 | \r | |
58 | @retval EFI_SUCCESS The file was loaded.\r | |
59 | @retval EFI_UNSUPPORTED The device does not support the provided BootPolicy\r | |
60 | @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or\r | |
61 | BufferSize is NULL.\r | |
62 | @retval EFI_NO_MEDIA No medium was present to load the file.\r | |
63 | @retval EFI_DEVICE_ERROR The file was not loaded due to a device error.\r | |
64 | @retval EFI_NO_RESPONSE The remote system did not respond.\r | |
af2dc6a7 | 65 | @retval EFI_NOT_FOUND The file was not found.\r |
d1f95000 | 66 | @retval EFI_ABORTED The file load process was manually cancelled.\r |
fed5f447 | 67 | @retval EFI_WARN_FILE_SYSTEM The resulting Buffer contains UEFI-compliant file system.\r |
d1f95000 | 68 | **/\r |
69 | typedef\r | |
70 | EFI_STATUS\r | |
8b13229b | 71 | (EFIAPI *EFI_LOAD_FILE)(\r |
d1f95000 | 72 | IN EFI_LOAD_FILE_PROTOCOL *This,\r |
73 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r | |
74 | IN BOOLEAN BootPolicy,\r | |
75 | IN OUT UINTN *BufferSize,\r | |
76 | IN VOID *Buffer OPTIONAL\r | |
ed66e1bc | 77 | );\r |
d1f95000 | 78 | \r |
44717a39 | 79 | ///\r |
80 | /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.\r | |
81 | ///\r | |
d1f95000 | 82 | struct _EFI_LOAD_FILE_PROTOCOL {\r |
83 | EFI_LOAD_FILE LoadFile;\r | |
84 | };\r | |
85 | \r | |
86 | extern EFI_GUID gEfiLoadFileProtocolGuid;\r | |
87 | \r | |
88 | #endif\r |