]>
Commit | Line | Data |
---|---|---|
a355a365 | 1 | /** @file\r |
2 | *\r | |
cc053ee6 | 3 | * Copyright (c) 2013-2015, ARM Limited. All rights reserved.\r |
a355a365 | 4 | *\r |
c0b2e477 | 5 | * This program and the accompanying materials\r |
6 | * are licensed and made available under the terms and conditions of the BSD License\r | |
7 | * which accompanies this distribution. The full text of the license may be found at\r | |
8 | * http://opensource.org/licenses/bsd-license.php\r | |
9 | *\r | |
10 | * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
a355a365 | 12 | *\r |
13 | **/\r | |
14 | \r | |
15 | #ifndef __BDS_ENTRY_H__\r | |
16 | #define __BDS_ENTRY_H__\r | |
17 | \r | |
a6e97d28 | 18 | /**\r |
19 | This is defined by the UEFI specs, don't change it\r | |
20 | **/\r | |
21 | typedef struct {\r | |
22 | UINT16 LoadOptionIndex;\r | |
459823d9 | 23 | EFI_LOAD_OPTION *LoadOption;\r |
a6e97d28 | 24 | UINTN LoadOptionSize;\r |
25 | \r | |
26 | UINT32 Attributes;\r | |
27 | UINT16 FilePathListLength;\r | |
28 | CHAR16 *Description;\r | |
29 | EFI_DEVICE_PATH_PROTOCOL *FilePathList;\r | |
30 | \r | |
31 | VOID* OptionalData;\r | |
32 | UINTN OptionalDataSize;\r | |
33 | } BDS_LOAD_OPTION;\r | |
34 | \r | |
6bab33c7 | 35 | /**\r |
36 | Connect a Device Path and return the handle of the driver that support this DevicePath\r | |
37 | \r | |
38 | @param DevicePath Device Path of the File to connect\r | |
39 | @param Handle Handle of the driver that support this DevicePath\r | |
40 | @param RemainingDevicePath Remaining DevicePath nodes that do not match the driver DevicePath\r | |
41 | \r | |
42 | @retval EFI_SUCCESS A driver that matches the Device Path has been found\r | |
43 | @retval EFI_NOT_FOUND No handles match the search.\r | |
44 | @retval EFI_INVALID_PARAMETER DevicePath or Handle is NULL\r | |
45 | \r | |
46 | **/\r | |
47 | EFI_STATUS\r | |
48 | BdsConnectDevicePath (\r | |
49 | IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,\r | |
50 | OUT EFI_HANDLE *Handle,\r | |
51 | OUT EFI_DEVICE_PATH_PROTOCOL **RemainingDevicePath\r | |
52 | );\r | |
53 | \r | |
a355a365 | 54 | /**\r |
55 | Connect all DXE drivers\r | |
56 | \r | |
57 | @retval EFI_SUCCESS All drivers have been connected\r | |
58 | @retval EFI_NOT_FOUND No handles match the search.\r | |
59 | @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to store the matching results.\r | |
60 | \r | |
61 | **/\r | |
62 | EFI_STATUS\r | |
63 | BdsConnectAllDrivers (\r | |
64 | VOID\r | |
65 | );\r | |
66 | \r | |
d8dc9f0a OM |
67 | /**\r |
68 | Return the value of a global variable defined by its VariableName.\r | |
69 | The variable must be defined with the VendorGuid gEfiGlobalVariableGuid.\r | |
70 | \r | |
71 | @param VariableName A Null-terminated string that is the name of the vendor's\r | |
72 | variable.\r | |
73 | @param DefaultValue Value returned by the function if the variable does not exist\r | |
74 | @param DataSize On input, the size in bytes of the return Data buffer.\r | |
75 | On output the size of data returned in Data.\r | |
76 | @param Value Value read from the UEFI Variable or copy of the default value\r | |
77 | if the UEFI Variable does not exist\r | |
78 | \r | |
79 | @retval EFI_SUCCESS All drivers have been connected\r | |
80 | @retval EFI_NOT_FOUND No handles match the search.\r | |
81 | @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to store the matching results.\r | |
82 | \r | |
83 | **/\r | |
c0b2e477 | 84 | EFI_STATUS\r |
85 | GetGlobalEnvironmentVariable (\r | |
86 | IN CONST CHAR16* VariableName,\r | |
87 | IN VOID* DefaultValue,\r | |
88 | IN OUT UINTN* Size,\r | |
89 | OUT VOID** Value\r | |
90 | );\r | |
91 | \r | |
d8dc9f0a OM |
92 | /**\r |
93 | Return the value of the variable defined by its VariableName and VendorGuid\r | |
94 | \r | |
95 | @param VariableName A Null-terminated string that is the name of the vendor's\r | |
96 | variable.\r | |
97 | @param VendorGuid A unique identifier for the vendor.\r | |
98 | @param DefaultValue Value returned by the function if the variable does not exist\r | |
99 | @param DataSize On input, the size in bytes of the return Data buffer.\r | |
100 | On output the size of data returned in Data.\r | |
101 | @param Value Value read from the UEFI Variable or copy of the default value\r | |
102 | if the UEFI Variable does not exist\r | |
103 | \r | |
104 | @retval EFI_SUCCESS All drivers have been connected\r | |
105 | @retval EFI_NOT_FOUND No handles match the search.\r | |
106 | @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to store the matching results.\r | |
107 | \r | |
108 | **/\r | |
4aa24170 | 109 | EFI_STATUS\r |
110 | GetEnvironmentVariable (\r | |
111 | IN CONST CHAR16* VariableName,\r | |
c0b2e477 | 112 | IN EFI_GUID* VendorGuid,\r |
4aa24170 | 113 | IN VOID* DefaultValue,\r |
114 | IN OUT UINTN* Size,\r | |
115 | OUT VOID** Value\r | |
116 | );\r | |
117 | \r | |
118 | EFI_STATUS\r | |
119 | BootOptionFromLoadOptionIndex (\r | |
120 | IN UINT16 LoadOptionIndex,\r | |
121 | OUT BDS_LOAD_OPTION** BdsLoadOption\r | |
122 | );\r | |
123 | \r | |
124 | EFI_STATUS\r | |
125 | BootOptionFromLoadOptionVariable (\r | |
126 | IN CHAR16* BootVariableName,\r | |
127 | OUT BDS_LOAD_OPTION** BdsLoadOption\r | |
128 | );\r | |
129 | \r | |
130 | EFI_STATUS\r | |
131 | BootOptionToLoadOptionVariable (\r | |
132 | IN BDS_LOAD_OPTION* BdsLoadOption\r | |
133 | );\r | |
134 | \r | |
135 | UINT16\r | |
136 | BootOptionAllocateBootIndex (\r | |
137 | VOID\r | |
138 | );\r | |
139 | \r | |
6bab33c7 | 140 | /**\r |
141 | Start an EFI Application from a Device Path\r | |
142 | \r | |
143 | @param ParentImageHandle Handle of the calling image\r | |
144 | @param DevicePath Location of the EFI Application\r | |
145 | \r | |
146 | @retval EFI_SUCCESS All drivers have been connected\r | |
147 | @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found\r | |
148 | @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.\r | |
149 | \r | |
150 | **/\r | |
151 | EFI_STATUS\r | |
152 | BdsStartEfiApplication (\r | |
153 | IN EFI_HANDLE ParentImageHandle,\r | |
2755d844 | 154 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r |
155 | IN UINTN LoadOptionsSize,\r | |
156 | IN VOID* LoadOptions\r | |
6bab33c7 | 157 | );\r |
158 | \r | |
4aa24170 | 159 | EFI_STATUS\r |
160 | BdsLoadImage (\r | |
161 | IN EFI_DEVICE_PATH *DevicePath,\r | |
162 | IN EFI_ALLOCATE_TYPE Type,\r | |
163 | IN OUT EFI_PHYSICAL_ADDRESS* Image,\r | |
164 | OUT UINTN *FileSize\r | |
165 | );\r | |
166 | \r | |
cc053ee6 OM |
167 | /**\r |
168 | * Call BS.ExitBootServices with the appropriate Memory Map information\r | |
169 | */\r | |
170 | EFI_STATUS\r | |
171 | ShutdownUefiBootServices (\r | |
172 | VOID\r | |
173 | );\r | |
174 | \r | |
0c72676d OM |
175 | /**\r |
176 | Locate an EFI application in a the Firmware Volumes by its name\r | |
177 | \r | |
178 | @param EfiAppGuid Guid of the EFI Application into the Firmware Volume\r | |
179 | @param DevicePath EFI Device Path of the EFI application\r | |
180 | \r | |
181 | @return EFI_SUCCESS The function completed successfully.\r | |
182 | @return EFI_NOT_FOUND The protocol could not be located.\r | |
183 | @return EFI_OUT_OF_RESOURCES There are not enough resources to find the protocol.\r | |
184 | \r | |
185 | **/\r | |
186 | EFI_STATUS\r | |
187 | LocateEfiApplicationInFvByName (\r | |
188 | IN CONST CHAR16* EfiAppName,\r | |
189 | OUT EFI_DEVICE_PATH **DevicePath\r | |
190 | );\r | |
191 | \r | |
192 | /**\r | |
193 | Locate an EFI application in a the Firmware Volumes by its GUID\r | |
194 | \r | |
195 | @param EfiAppGuid Guid of the EFI Application into the Firmware Volume\r | |
196 | @param DevicePath EFI Device Path of the EFI application\r | |
197 | \r | |
198 | @return EFI_SUCCESS The function completed successfully.\r | |
199 | @return EFI_NOT_FOUND The protocol could not be located.\r | |
200 | @return EFI_OUT_OF_RESOURCES There are not enough resources to find the protocol.\r | |
201 | \r | |
202 | **/\r | |
203 | EFI_STATUS\r | |
204 | LocateEfiApplicationInFvByGuid (\r | |
205 | IN CONST EFI_GUID *EfiAppGuid,\r | |
206 | OUT EFI_DEVICE_PATH **DevicePath\r | |
207 | );\r | |
208 | \r | |
a355a365 | 209 | #endif\r |