3 Copyright (c) 2004, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Load File protocol as defined in the EFI 1.0 specification.
20 Load file protocol exists to supports the addition of new boot devices,
21 and to support booting from devices that do not map well to file system.
22 Network boot is done via a LoadFile protocol.
24 EFI 1.0 can boot from any device that produces a LoadFile protocol.
31 #define LOAD_FILE_PROTOCOL_GUID \
33 0x56EC3091, 0x954C, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
36 EFI_FORWARD_DECLARATION (EFI_LOAD_FILE_PROTOCOL
);
40 (EFIAPI
*EFI_LOAD_FILE
) (
41 IN EFI_LOAD_FILE_PROTOCOL
* This
,
42 IN EFI_DEVICE_PATH_PROTOCOL
* FilePath
,
43 IN BOOLEAN BootPolicy
,
44 IN OUT UINTN
*BufferSize
,
45 IN VOID
*Buffer OPTIONAL
50 Causes the driver to load a specified file.
53 This - Protocol instance pointer.
54 FilePath - The device specific path of the file to load.
55 BootPolicy - If TRUE, indicates that the request originates from the
56 boot manager is attempting to load FilePath as a boot
57 selection. If FALSE, then FilePath must match as exact file
59 BufferSize - On input the size of Buffer in bytes. On output with a return
60 code of EFI_SUCCESS, the amount of data transferred to
61 Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
62 the size of Buffer required to retrieve the requested file.
63 Buffer - The memory buffer to transfer the file to. IF Buffer is NULL,
64 then no the size of the requested file is returned in
68 EFI_SUCCESS - The file was loaded.
69 EFI_UNSUPPORTED - The device does not support the provided BootPolicy
70 EFI_INVALID_PARAMETER - FilePath is not a valid device path, or
72 EFI_NO_MEDIA - No medium was present to load the file.
73 EFI_DEVICE_ERROR - The file was not loaded due to a device error.
74 EFI_NO_RESPONSE - The remote system did not respond.
75 EFI_NOT_FOUND - The file was not found
76 EFI_ABORTED - The file load process was manually cancelled.
81 typedef struct _EFI_LOAD_FILE_PROTOCOL
{
82 EFI_LOAD_FILE LoadFile
;
83 } EFI_LOAD_FILE_PROTOCOL
;
85 extern EFI_GUID gEfiLoadFileProtocolGuid
;