diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 8033b449d9..5b15a1edb7 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1120,11 +1120,11 @@ CoreStartImage ( return EFI_INVALID_PARAMETER; } + // + // The image to be started must have the machine type supported by DxeCore. + // + ASSERT (EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Image->Machine)); if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Image->Machine)) { - // - // The image to be started must have the machine type supported by DxeCore. - // - ASSERT (FALSE); return EFI_UNSUPPORTED; } diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index 84c9e4b5bf..1a6ba313c2 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -434,11 +434,11 @@ PeiLoadImage ( AuthenticationState ); if (!EFI_ERROR (Status)) { + // + // The image to be started must have the machine type supported by PeiCore. + // + ASSERT (EFI_IMAGE_MACHINE_TYPE_SUPPORTED (PeCoffLoaderGetMachineType ((VOID *) (UINTN) ImageAddress))); if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (PeCoffLoaderGetMachineType ((VOID *) (UINTN) ImageAddress))) { - // - // The image to be started must have the machine type supported by PeiCore. - // - ASSERT (FALSE); return EFI_UNSUPPORTED; } return Status;