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

Function LoadEFIImage

rEFIt_UEFI/refit/main.cpp:287–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285
286
287static 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
312static EFI_STATUS StartEFIImage(IN EFI_DEVICE_PATH *DevicePath,

Callers 2

StartEFIImageFunction · 0.85
StartLoaderMethod · 0.85

Calls 2

VerifySecureBootImageFunction · 0.85
LoadEFIImageListFunction · 0.85

Tested by

no test coverage detected