Home | History | Annotate | Download | only in LoadFile
      1 /*++
      2 
      3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
      4 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
      8 
      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.
     11 
     12 Module Name:
     13 
     14   LoadFile.h
     15 
     16 Abstract:
     17 
     18   Load File protocol as defined in the EFI 1.0 specification.
     19 
     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.
     23 
     24   EFI 1.0 can boot from any device that produces a LoadFile protocol.
     25 
     26 --*/
     27 
     28 #ifndef _LOAD_FILE_H_
     29 #define _LOAD_FILE_H_
     30 
     31 #define LOAD_FILE_PROTOCOL_GUID \
     32   { \
     33     0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} \
     34   }
     35 
     36 EFI_FORWARD_DECLARATION (EFI_LOAD_FILE_PROTOCOL);
     37 
     38 typedef
     39 EFI_STATUS
     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
     46   )
     47 /*++
     48 
     49   Routine Description:
     50     Causes the driver to load a specified file.
     51 
     52   Arguments:
     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
     58                  to be loaded.
     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
     65                   BufferSize.
     66 
     67   Returns:
     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
     71                              BufferSize is NULL.
     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.
     77 
     78 --*/
     79 ;
     80 
     81 struct _EFI_LOAD_FILE_PROTOCOL {
     82   EFI_LOAD_FILE LoadFile;
     83 };
     84 
     85 extern EFI_GUID gEfiLoadFileProtocolGuid;
     86 
     87 #endif
     88