This function attempts to boot for the boot order specified by platform policy. **/
| 114 | |
| 115 | **/ |
| 116 | VOID |
| 117 | BdsBootDeviceSelect ( |
| 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 ( |
no test coverage detected