diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 0e9424eca1..b0bc8e71f0 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1113,6 +1113,18 @@ CoreLoadImageCommon ( } if (SourceSize > 0) { + if (DeviceHandle != NULL) { + Status = CoreOpenProtocol ( + DeviceHandle, + &gEfiFirmwareVolume2ProtocolGuid, + NULL, + NULL, + NULL, + EFI_OPEN_PROTOCOL_TEST_PROTOCOL + ); + ImageIsFromFv = !EFI_ERROR (Status); + } + Status = EFI_SUCCESS; } else { Status = EFI_LOAD_ERROR;