mirror of https://github.com/acidanthera/audk.git
MdeModulePkg PeiCore: Add error message to describe PEIM load failure
If PEIM image address doesn't meet with its section alignment, it will load fail. PeiCore adds more debug message to report it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Star Zeng <star.zeng@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
3c3277f21e
commit
63c677e20f
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Pei Core Load Image Support
|
Pei Core Load Image Support
|
||||||
|
|
||||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -506,6 +506,9 @@ LoadAndRelocatePeCoffImage (
|
||||||
//
|
//
|
||||||
Status = PeCoffLoaderLoadImage (&ImageContext);
|
Status = PeCoffLoaderLoadImage (&ImageContext);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
if (ImageContext.ImageError == IMAGE_ERROR_INVALID_SECTION_ALIGNMENT) {
|
||||||
|
DEBUG ((DEBUG_ERROR, "PEIM Image Address 0x%11p doesn't meet with section alignment 0x%x.\n", (VOID*)(UINTN)ImageContext.ImageAddress, ImageContext.SectionAlignment));
|
||||||
|
}
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -612,6 +615,8 @@ PeiLoadImageLoadImage (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG ((DEBUG_INFO, "Loading PEIM %g\n", FileHandle));
|
||||||
|
|
||||||
//
|
//
|
||||||
// If memory is installed, perform the shadow operations
|
// If memory is installed, perform the shadow operations
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue