| 285 | |
| 286 | |
| 287 | static EFI_STATUS LoadEFIImage(IN EFI_DEVICE_PATH *DevicePath, |
| 288 | IN CONST XStringW& ImageTitle, |
| 289 | OUT UINTN *ErrorInStep, |
| 290 | OUT EFI_HANDLE *NewImageHandle) |
| 291 | { |
| 292 | EFI_DEVICE_PATH *DevicePaths[2]; |
| 293 | |
| 294 | #ifdef ENABLE_SECURE_BOOT |
| 295 | // Verify secure boot policy |
| 296 | if (gSettings.SecureBoot && gSettings.SecureBootSetupMode) { |
| 297 | // Only verify if in forced secure boot mode |
| 298 | EFI_STATUS Status = VerifySecureBootImage(DevicePath); |
| 299 | if (EFI_ERROR(Status)) { |
| 300 | return Status; |
| 301 | } |
| 302 | } |
| 303 | #endif // ENABLE_SECURE_BOOT |
| 304 | |
| 305 | // Load the image now |
| 306 | DevicePaths[0] = DevicePath; |
| 307 | DevicePaths[1] = NULL; |
| 308 | return LoadEFIImageList(DevicePaths, ImageTitle, ErrorInStep, NewImageHandle); |
| 309 | } |
| 310 | |
| 311 | |
| 312 | static EFI_STATUS StartEFIImage(IN EFI_DEVICE_PATH *DevicePath, |
no test coverage detected