3 * Copyright (c) 2011, ARM Limited. All rights reserved.
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __BDS_ENTRY_H__
16 #define __BDS_ENTRY_H__
18 typedef UINT8
* EFI_LOAD_OPTION
;
21 This is defined by the UEFI specs, don't change it
24 UINT16 LoadOptionIndex
;
25 EFI_LOAD_OPTION LoadOption
;
29 UINT16 FilePathListLength
;
31 EFI_DEVICE_PATH_PROTOCOL
*FilePathList
;
34 UINTN OptionalDataSize
;
38 Connect a Device Path and return the handle of the driver that support this DevicePath
40 @param DevicePath Device Path of the File to connect
41 @param Handle Handle of the driver that support this DevicePath
42 @param RemainingDevicePath Remaining DevicePath nodes that do not match the driver DevicePath
44 @retval EFI_SUCCESS A driver that matches the Device Path has been found
45 @retval EFI_NOT_FOUND No handles match the search.
46 @retval EFI_INVALID_PARAMETER DevicePath or Handle is NULL
50 BdsConnectDevicePath (
51 IN EFI_DEVICE_PATH_PROTOCOL
* DevicePath
,
52 OUT EFI_HANDLE
*Handle
,
53 OUT EFI_DEVICE_PATH_PROTOCOL
**RemainingDevicePath
57 Connect all DXE drivers
59 @retval EFI_SUCCESS All drivers have been connected
60 @retval EFI_NOT_FOUND No handles match the search.
61 @retval EFI_OUT_OF_RESOURCES There is not resource pool memory to store the matching results.
65 BdsConnectAllDrivers (
70 GetEnvironmentVariable (
71 IN CONST CHAR16
* VariableName
,
72 IN VOID
* DefaultValue
,
78 BootOptionFromLoadOptionIndex (
79 IN UINT16 LoadOptionIndex
,
80 OUT BDS_LOAD_OPTION
** BdsLoadOption
84 BootOptionFromLoadOptionVariable (
85 IN CHAR16
* BootVariableName
,
86 OUT BDS_LOAD_OPTION
** BdsLoadOption
90 BootOptionToLoadOptionVariable (
91 IN BDS_LOAD_OPTION
* BdsLoadOption
95 BootOptionAllocateBootIndex (
100 Start a Linux kernel from a Device Path
102 @param LinuxKernel Device Path to the Linux Kernel
103 @param Parameters Linux kernel arguments
105 @retval EFI_SUCCESS All drivers have been connected
106 @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
107 @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
112 IN EFI_DEVICE_PATH_PROTOCOL
* LinuxKernelDevicePath
,
113 IN EFI_DEVICE_PATH_PROTOCOL
* InitrdDevicePath
,
114 IN CONST CHAR8
* Arguments
118 Start a Linux kernel from a Device Path
120 @param LinuxKernel Device Path to the Linux Kernel
121 @param Parameters Linux kernel arguments
122 @param Fdt Device Path to the Flat Device Tree
124 @retval EFI_SUCCESS All drivers have been connected
125 @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
126 @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
131 IN EFI_DEVICE_PATH_PROTOCOL
* LinuxKernelDevicePath
,
132 IN EFI_DEVICE_PATH_PROTOCOL
* InitrdDevicePath
,
133 IN CONST CHAR8
* Arguments
,
134 IN EFI_DEVICE_PATH_PROTOCOL
* FdtDevicePath
138 Start an EFI Application from a Device Path
140 @param ParentImageHandle Handle of the calling image
141 @param DevicePath Location of the EFI Application
143 @retval EFI_SUCCESS All drivers have been connected
144 @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
145 @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
149 BdsStartEfiApplication (
150 IN EFI_HANDLE ParentImageHandle
,
151 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
152 IN UINTN LoadOptionsSize
,
157 Start an EFI Application from any Firmware Volume
159 @param EfiApp EFI Application Name
161 @retval EFI_SUCCESS All drivers have been connected
162 @retval EFI_NOT_FOUND The Linux kernel Device Path has not been found
163 @retval EFI_OUT_OF_RESOURCES There is not enough resource memory to store the matching results.
168 IN EFI_HANDLE ParentImageHandle
,
170 IN UINTN LoadOptionsSize
,
176 IN EFI_DEVICE_PATH
*DevicePath
,
177 IN EFI_ALLOCATE_TYPE Type
,
178 IN OUT EFI_PHYSICAL_ADDRESS
* Image
,