summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-17 01:57:24 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-09-17 01:57:24 +0000
commitdb0b7ad5f450cc5fdcfc12d88411ba00b0cf118f (patch)
tree2e16124873c5689fe6db5fe9ab70a3930e0e1e02 /MdeModulePkg
parent14b21de9647ce6d0c714e9d458678cf1f4605c8f (diff)
downloadedk2-platforms-db0b7ad5f450cc5fdcfc12d88411ba00b0cf118f.tar.xz
Make ASSERT statement more meaningful.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c8
-rw-r--r--MdeModulePkg/Core/Pei/Image/Image.c8
2 files changed, 8 insertions, 8 deletions
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;