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