mirror of https://github.com/acidanthera/audk.git
Enhance PeiCore and DxeCore check whether the image machine type is supported when start image.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9266 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3f42faa73d
commit
919df8e6d2
|
@ -1120,6 +1120,14 @@ CoreStartImage (
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Don't profile Objects or invalid start requests
|
// Don't profile Objects or invalid start requests
|
||||||
//
|
//
|
||||||
|
|
|
@ -434,6 +434,13 @@ PeiLoadImage (
|
||||||
AuthenticationState
|
AuthenticationState
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
|
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;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue