MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / BdsBootDeviceSelect

Function BdsBootDeviceSelect

CloverEFI/OsxBdsDxe/BdsEntry.c:116–348  ·  view source on GitHub ↗

This function attempts to boot for the boot order specified by platform policy. **/

Source from the content-addressed store, hash-verified

114
115**/
116VOID
117BdsBootDeviceSelect (
118 VOID
119 )
120{
121 EFI_STATUS Status;
122 LIST_ENTRY *Link;
123 BDS_COMMON_OPTION *BootOption;
124 UINTN ExitDataSize;
125 CHAR16 *ExitData;
126 UINT16 Timeout;
127 LIST_ENTRY BootLists;
128 CHAR16 Buffer[20];
129 BOOLEAN BootNextExist;
130 LIST_ENTRY *LinkBootNext;
131 EFI_EVENT ConnectConInEvent;
132
133 //
134 // Got the latest boot option
135 //
136 BootNextExist = FALSE;
137 LinkBootNext = NULL;
138 ConnectConInEvent = NULL;
139 InitializeListHead (&BootLists);
140
141 //
142 // First check the boot next option
143 //
144 ZeroMem (Buffer, sizeof (Buffer));
145
146 //
147 // Create Event to signal ConIn connection request
148 //
149 if (PcdGetBool (PcdConInConnectOnDemand)) {
150 Status = gBS->CreateEventEx (
151 EVT_NOTIFY_SIGNAL,
152 TPL_CALLBACK,
153 BdsEmptyCallbackFunction,
154 NULL,
155 &gConnectConInEventGuid,
156 &ConnectConInEvent
157 );
158 if (EFI_ERROR(Status)) {
159 ConnectConInEvent = NULL;
160 }
161 }
162
163 if (mBootNext != NULL) {
164 //
165 // Indicate we have the boot next variable, so this time
166 // boot will always have this boot option
167 //
168 BootNextExist = TRUE;
169
170 //
171 // Clear the this variable so it's only exist in this time boot
172 //
173 Status = gRT->SetVariable (

Callers 1

BdsEntryFunction · 0.85

Calls 11

BdsLibBuildOptionFromVarFunction · 0.85
IsListEmptyFunction · 0.85
BdsLibBootViaBootOptionFunction · 0.85
PlatformBdsBootSuccessFunction · 0.85
GetStringByIdFunction · 0.70
ZeroMemFunction · 0.50
UnicodeSPrintFunction · 0.50
DevicePathTypeFunction · 0.50
BdsLibConnectDevicePathFunction · 0.50

Tested by

no test coverage detected