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