]>
Commit | Line | Data |
---|---|---|
deb7f094 | 1 | /** @file\r |
2 | Load File protocol as defined in the UEFI 2.0 specification.\r | |
3 | \r | |
9095d37b LG |
4 | Load file protocol exists to supports the addition of new boot devices,\r |
5 | and to support booting from devices that do not map well to file system.\r | |
deb7f094 | 6 | Network boot is done via a LoadFile protocol.\r |
7 | \r | |
8 | UEFI 2.0 can boot from any device that produces a LoadFile protocol.\r | |
9 | \r | |
9095d37b | 10 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 11 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
deb7f094 | 12 | \r |
13 | **/\r | |
14 | \r | |
15 | #ifndef __EFI_LOAD_FILE2_PROTOCOL_H__\r | |
16 | #define __EFI_LOAD_FILE2_PROTOCOL_H__\r | |
17 | \r | |
18 | #define EFI_LOAD_FILE2_PROTOCOL_GUID \\r | |
19 | { \\r | |
20 | 0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d } \\r | |
21 | }\r | |
22 | \r | |
23 | ///\r | |
24 | /// Protocol Guid defined by UEFI2.1.\r | |
25 | ///\r | |
26 | #define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID\r | |
27 | \r | |
28 | typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL;\r | |
29 | \r | |
30 | \r | |
31 | /**\r | |
32 | Causes the driver to load a specified file.\r | |
33 | \r | |
34 | @param This Protocol instance pointer.\r | |
35 | @param FilePath The device specific path of the file to load.\r | |
36 | @param BootPolicy Should always be FALSE.\r | |
37 | @param BufferSize On input the size of Buffer in bytes. On output with a return\r | |
38 | code of EFI_SUCCESS, the amount of data transferred to\r | |
39 | Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,\r | |
40 | the size of Buffer required to retrieve the requested file.\r | |
41 | @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL,\r | |
42 | then no the size of the requested file is returned in\r | |
43 | BufferSize.\r | |
44 | \r | |
45 | @retval EFI_SUCCESS The file was loaded.\r | |
46 | @retval EFI_UNSUPPORTED BootPolicy is TRUE.\r | |
47 | @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or\r | |
48 | BufferSize is NULL.\r | |
49 | @retval EFI_NO_MEDIA No medium was present to load the file.\r | |
50 | @retval EFI_DEVICE_ERROR The file was not loaded due to a device error.\r | |
51 | @retval EFI_NO_RESPONSE The remote system did not respond.\r | |
52 | @retval EFI_NOT_FOUND The file was not found\r | |
53 | @retval EFI_ABORTED The file load process was manually canceled.\r | |
9095d37b | 54 | @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current\r |
deb7f094 | 55 | directory entry. BufferSize has been updated with\r |
56 | the size needed to complete the request.\r | |
57 | \r | |
58 | \r | |
59 | **/\r | |
60 | typedef\r | |
61 | EFI_STATUS\r | |
62 | (EFIAPI *EFI_LOAD_FILE2)(\r | |
63 | IN EFI_LOAD_FILE2_PROTOCOL *This,\r | |
64 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r | |
65 | IN BOOLEAN BootPolicy,\r | |
66 | IN OUT UINTN *BufferSize,\r | |
67 | IN VOID *Buffer OPTIONAL\r | |
68 | );\r | |
69 | \r | |
70 | ///\r | |
71 | /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.\r | |
72 | ///\r | |
73 | struct _EFI_LOAD_FILE2_PROTOCOL {\r | |
74 | EFI_LOAD_FILE2 LoadFile;\r | |
75 | };\r | |
76 | \r | |
77 | extern EFI_GUID gEfiLoadFile2ProtocolGuid;\r | |
78 | \r | |
79 | #endif\r |