]>
Commit | Line | Data |
---|---|---|
a355a365 | 1 | /** @file\r |
2 | *\r | |
c0b2e477 | 3 | * Copyright (c) 2013, 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 | typedef UINT8* EFI_LOAD_OPTION;\r |
19 | \r | |
20 | /**\r | |
21 | This is defined by the UEFI specs, don't change it\r | |
22 | **/\r | |
23 | typedef struct {\r | |
24 | UINT16 LoadOptionIndex;\r | |
25 | EFI_LOAD_OPTION LoadOption;\r | |
26 | UINTN LoadOptionSize;\r | |
27 | \r | |
28 | UINT32 Attributes;\r | |
29 | UINT16 FilePathListLength;\r | |
30 | CHAR16 *Description;\r | |
31 | EFI_DEVICE_PATH_PROTOCOL *FilePathList;\r | |
32 | \r | |
33 | VOID* OptionalData;\r | |
34 | UINTN OptionalDataSize;\r | |
35 | } BDS_LOAD_OPTION;\r | |
36 | \r | |
6bab33c7 | 37 | /**\r |
38 | Connect a Device Path and return the handle of the driver that support this DevicePath\r | |
39 | \r | |
40 | @param DevicePath Device Path of the File to connect\r | |
41 | @param Handle Handle of the driver that support this DevicePath\r | |
42 | @param RemainingDevicePath Remaining DevicePath nodes that do not match the driver DevicePath\r | |
43 | \r | |
44 | @retval EFI_SUCCESS A driver that matches the Device Path has been found\r | |
45 | @retval EFI_NOT_FOUND No handles match the search.\r | |
46 | @retval EFI_INVALID_PARAMETER DevicePath or Handle is NULL\r | |
47 | \r | |
48 | **/\r | |
49 | EFI_STATUS\r | |
50 | BdsConnectDevicePath (\r | |
51 | IN EFI_DEVICE_PATH_PROTOCOL* DevicePath,\r | |
52 | OUT EFI_HANDLE *Handle,\r | |
53 | OUT EFI_DEVICE_PATH_PROTOCOL **RemainingDevicePath\r | |
54 | );\r | |
55 | \r | |
a355a365 | 56 | /**\r |
57 | Connect all DXE drivers\r | |
58 | \r | |
59 | @retval EFI_SUCCESS All drivers have been connected\r | |
60 | @retval EFI_NOT_FOUND No handles match the search.\r | |
61 | @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to store the matching results.\r | |
62 | \r | |
63 | **/\r | |
64 | EFI_STATUS\r | |
65 | BdsConnectAllDrivers (\r | |
66 | VOID\r | |
67 | );\r | |
68 | \r | |
c0b2e477 | 69 | EFI_STATUS\r |
70 | GetGlobalEnvironmentVariable (\r | |
71 | IN CONST CHAR16* VariableName,\r | |
72 | IN VOID* DefaultValue,\r | |
73 | IN OUT UINTN* Size,\r | |
74 | OUT VOID** Value\r | |
75 | );\r | |
76 | \r | |
4aa24170 | 77 | EFI_STATUS\r |
78 | GetEnvironmentVariable (\r | |
79 | IN CONST CHAR16* VariableName,\r | |
c0b2e477 | 80 | IN EFI_GUID* VendorGuid,\r |
4aa24170 | 81 | IN VOID* DefaultValue,\r |
82 | IN OUT UINTN* Size,\r | |
83 | OUT VOID** Value\r | |
84 | );\r | |
85 | \r | |
86 | EFI_STATUS\r | |
87 | BootOptionFromLoadOptionIndex (\r | |
88 | IN UINT16 LoadOptionIndex,\r | |
89 | OUT BDS_LOAD_OPTION** BdsLoadOption\r | |
90 | );\r | |
91 | \r | |
92 | EFI_STATUS\r | |
93 | BootOptionFromLoadOptionVariable (\r | |
94 | IN CHAR16* BootVariableName,\r | |
95 | OUT BDS_LOAD_OPTION** BdsLoadOption\r | |
96 | );\r | |
97 | \r | |
98 | EFI_STATUS\r | |
99 | BootOptionToLoadOptionVariable (\r | |
100 | IN BDS_LOAD_OPTION* BdsLoadOption\r | |
101 | );\r | |
102 | \r | |
103 | UINT16\r | |
104 | BootOptionAllocateBootIndex (\r | |
105 | VOID\r | |
106 | );\r | |
107 | \r | |
76d17c31 | 108 | /**\r |
109 | Start a Linux kernel from a Device Path\r | |
110 | \r | |
111 | @param LinuxKernel Device Path to the Linux Kernel\r | |
112 | @param Parameters Linux kernel arguments\r | |
113 | \r | |
114 | @retval EFI_SUCCESS All drivers have been connected\r | |
115 | @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found\r | |
116 | @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.\r | |
117 | \r | |
118 | **/\r | |
119 | EFI_STATUS\r | |
120 | BdsBootLinuxAtag (\r | |
121 | IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r | |
122 | IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r | |
123 | IN CONST CHAR8* Arguments\r | |
124 | );\r | |
125 | \r | |
a355a365 | 126 | /**\r |
127 | Start a Linux kernel from a Device Path\r | |
128 | \r | |
129 | @param LinuxKernel Device Path to the Linux Kernel\r | |
6bab33c7 | 130 | @param Parameters Linux kernel arguments\r |
a355a365 | 131 | @param Fdt Device Path to the Flat Device Tree\r |
132 | \r | |
133 | @retval EFI_SUCCESS All drivers have been connected\r | |
134 | @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found\r | |
135 | @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.\r | |
136 | \r | |
137 | **/\r | |
138 | EFI_STATUS\r | |
76d17c31 | 139 | BdsBootLinuxFdt (\r |
a355a365 | 140 | IN EFI_DEVICE_PATH_PROTOCOL* LinuxKernelDevicePath,\r |
656416bc | 141 | IN EFI_DEVICE_PATH_PROTOCOL* InitrdDevicePath,\r |
142 | IN CONST CHAR8* Arguments,\r | |
a355a365 | 143 | IN EFI_DEVICE_PATH_PROTOCOL* FdtDevicePath\r |
144 | );\r | |
145 | \r | |
6bab33c7 | 146 | /**\r |
147 | Start an EFI Application from a Device Path\r | |
148 | \r | |
149 | @param ParentImageHandle Handle of the calling image\r | |
150 | @param DevicePath Location of the EFI Application\r | |
151 | \r | |
152 | @retval EFI_SUCCESS All drivers have been connected\r | |
153 | @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found\r | |
154 | @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.\r | |
155 | \r | |
156 | **/\r | |
157 | EFI_STATUS\r | |
158 | BdsStartEfiApplication (\r | |
159 | IN EFI_HANDLE ParentImageHandle,\r | |
2755d844 | 160 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r |
161 | IN UINTN LoadOptionsSize,\r | |
162 | IN VOID* LoadOptions\r | |
6bab33c7 | 163 | );\r |
164 | \r | |
a355a365 | 165 | /**\r |
166 | Start an EFI Application from any Firmware Volume\r | |
167 | \r | |
168 | @param EfiApp EFI Application Name\r | |
169 | \r | |
170 | @retval EFI_SUCCESS All drivers have been connected\r | |
171 | @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found\r | |
172 | @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.\r | |
173 | \r | |
174 | **/\r | |
175 | EFI_STATUS\r | |
176 | BdsLoadApplication (\r | |
177 | IN EFI_HANDLE ParentImageHandle,\r | |
2755d844 | 178 | IN CHAR16* EfiApp,\r |
179 | IN UINTN LoadOptionsSize,\r | |
180 | IN VOID* LoadOptions\r | |
a355a365 | 181 | );\r |
182 | \r | |
4aa24170 | 183 | EFI_STATUS\r |
184 | BdsLoadImage (\r | |
185 | IN EFI_DEVICE_PATH *DevicePath,\r | |
186 | IN EFI_ALLOCATE_TYPE Type,\r | |
187 | IN OUT EFI_PHYSICAL_ADDRESS* Image,\r | |
188 | OUT UINTN *FileSize\r | |
189 | );\r | |
190 | \r | |
a355a365 | 191 | #endif\r |