iPXE
LoadFile.h
Go to the documentation of this file.
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
10Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
11SPDX-License-Identifier: BSD-2-Clause-Patent
12
13**/
14
15#pragma once
16
17FILE_LICENCE ( BSD2_PATENT );
18FILE_SECBOOT ( PERMITTED );
19
20#define EFI_LOAD_FILE_PROTOCOL_GUID \
21 { \
22 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
23 }
24
25///
26/// Protocol Guid defined by EFI1.1.
27///
28#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID
29
31
32///
33/// Backward-compatible with EFI1.1
34///
36
37/**
38 Causes the driver to load a specified file.
39
40 @param This Protocol instance pointer.
41 @param FilePath The device specific path of the file to load.
42 @param BootPolicy If TRUE, indicates that the request originates from the
43 boot manager is attempting to load FilePath as a boot
44 selection. If FALSE, then FilePath must match as exact file
45 to be loaded.
46 @param BufferSize On input the size of Buffer in bytes. On output with a return
47 code of EFI_SUCCESS, the amount of data transferred to
48 Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
49 the size of Buffer required to retrieve the requested file.
50 @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL,
51 then the size of the requested file is returned in
52 BufferSize.
53
54 @retval EFI_SUCCESS The file was loaded.
55 @retval EFI_UNSUPPORTED The device does not support the provided BootPolicy
56 @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or
57 BufferSize is NULL.
58 @retval EFI_NO_MEDIA No medium was present to load the file.
59 @retval EFI_DEVICE_ERROR The file was not loaded due to a device error.
60 @retval EFI_NO_RESPONSE The remote system did not respond.
61 @retval EFI_NOT_FOUND The file was not found.
62 @retval EFI_ABORTED The file load process was manually cancelled.
63 @retval EFI_WARN_FILE_SYSTEM The resulting Buffer contains UEFI-compliant file system.
64**/
65typedef
70 IN BOOLEAN BootPolicy,
73 );
74
75///
76/// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
77///
81
unsigned char BOOLEAN
Logical Boolean.
UINT64 UINTN
Unsigned value of native width.
#define EFIAPI
#define VOID
Undeclared type.
Definition Base.h:271
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition Base.h:292
EFI_STATUS(EFIAPI * EFI_LOAD_FILE)(IN EFI_LOAD_FILE_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *FilePath, IN BOOLEAN BootPolicy, IN OUT UINTN *BufferSize, IN VOID *Buffer OPTIONAL)
Causes the driver to load a specified file.
Definition LoadFile.h:67
EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE
Backward-compatible with EFI1.1.
Definition LoadFile.h:35
struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL
Definition LoadFile.h:30
EFI_GUID gEfiLoadFileProtocolGuid
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
UINT16_t BufferSize
Buffer size.
Definition pxe_api.h:7
SEGOFF16_t Buffer
Buffer address.
Definition pxe_api.h:8
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition DevicePath.h:45
The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
Definition LoadFile.h:78
EFI_LOAD_FILE LoadFile
Definition LoadFile.h:79