Intel Extensible Firmware Interface Network Router User Manual


  Open as PDF
of 1084
 
Extensible Firmware Interface Specification
11-2 12/01/02 Version 1.10
LOAD_FILE.LoadFile()
Summary
Causes the driver to load a specified file.
Prototype
EFI_STATUS
(EFIAPI *EFI_LOAD_FILE) (
IN EFI_LOAD_FILE_INTERFACE *This,
IN EFI_DEVICE_PATH *FilePath,
IN BOOLEAN BootPolicy,
IN OUT UINTN *BufferSize,
IN VOID *Buffer OPTIONAL
);
Parameters
This Indicates a pointer to the calling context. Type
EFI_LOAD_FILE_INTERFACE
is defined in Section 11.1.
FilePath The device specific path of the file to load. Type EFI_DEVICE_PATH
is defined in Chapter 8.
BootPolicy If TRUE, indicates that the request originates from the boot manager, and
that the boot manager is attempting to load FilePath as a boot
selection. If FALSE, then FilePath must match an exact file to be
loaded.
BufferSize On input the size of Buffer in bytes. On output with a return code of
EFI_SUCCESS, the amount of data transferred to Buffer.
On output with a return code of EFI_BUFFER_TOO_SMALL, the size
of Buffer required to retrieve the requested file.
Buffer The memory buffer to transfer the file to. If Buffer is NULL, then no
the size of the requested file is returned in BufferSize.
Description
The LoadFile() function interprets the device-specific FilePath parameter, returns the entire
file into Buffer, and sets BufferSize to the amount of data returned. If Buffer is NULL,
then the size of the file is returned in BufferSize. If Buffer is not NULL, and BufferSize
is not large enough to hold the entire file, then EFI_BUFFER_TOO_SMALL is returned, and
BufferSize is updated to indicate the size of the buffer needed to obtain the file. In this case, no
data is returned in Buffer.
If BootPolicy is FALSE the FilePath must match an exact file to be loaded. If no such file
exists, EFI_NOT_FOUND is returned. If BootPolicy is FALSE, and an attempt is being made
to perform a network boot through the PXE Base Code protocol, EFI_UNSUPPORTED is returned.