- if ((Status == EFI_ACCESS_DENIED) && (ShimLoaded())) {
- FindVolumeAndFilename(DevicePaths[DevicePathIndex], &DeviceVolume, &loader);
- if (DeviceVolume != NULL) {
- Status = ReadFile(DeviceVolume->RootDir, loader, &File, &ImageSize);
- ImageData = File.Buffer;
- } else {
- Status = EFI_NOT_FOUND;
- Print(L"Error: device volume not found!\n");
- } // if/else
- if (Status != EFI_NOT_FOUND) {
- ReturnStatus = Status = start_image(SelfImageHandle, loader, ImageData, ImageSize, FullLoadOptions,
- DeviceVolume, FileDevicePath(DeviceVolume->DeviceHandle, loader));
-// ReturnStatus = Status = start_image(SelfImageHandle, loader, ImageData, ImageSize, FullLoadOptions,
-// DeviceVolume, DevicePaths[DevicePathIndex]);
- }
- if (ReturnStatus == EFI_SUCCESS) {
- UseMok = TRUE;
- } // if
- } // if (UEFI SB failed; use shim)