MdeModulePkg: remove PE/COFF header workaround for ELILO on IPF
Now that Itanium support has been dropped, we can remove the various occurrences of the ELILO on Itanium PE/COFF header workaround. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=816 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1032,7 +1032,6 @@ SmmInsertImageRecord (
|
||||
IMAGE_PROPERTIES_RECORD *ImageRecord;
|
||||
CHAR8 *PdbPointer;
|
||||
IMAGE_PROPERTIES_RECORD_CODE_SECTION *ImageRecordCodeSection;
|
||||
UINT16 Magic;
|
||||
|
||||
DEBUG ((DEBUG_VERBOSE, "SMM InsertImageRecord - 0x%x\n", DriverEntry));
|
||||
DEBUG ((DEBUG_VERBOSE, "SMM InsertImageRecord - 0x%016lx - 0x%08x\n", DriverEntry->ImageBuffer, DriverEntry->NumberOfPage));
|
||||
@@ -1076,21 +1075,7 @@ SmmInsertImageRecord (
|
||||
//
|
||||
// Get SectionAlignment
|
||||
//
|
||||
if (Hdr.Pe32->FileHeader.Machine == IMAGE_FILE_MACHINE_IA64 && Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
|
||||
//
|
||||
// NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value
|
||||
// in the PE/COFF Header. If the MachineType is Itanium(IA64) and the
|
||||
// Magic value in the OptionalHeader is EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
||||
// then override the magic value to EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||
//
|
||||
Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC;
|
||||
} else {
|
||||
//
|
||||
// Get the magic value from the PE/COFF Optional Header
|
||||
//
|
||||
Magic = Hdr.Pe32->OptionalHeader.Magic;
|
||||
}
|
||||
if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
|
||||
if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
|
||||
SectionAlignment = Hdr.Pe32->OptionalHeader.SectionAlignment;
|
||||
} else {
|
||||
SectionAlignment = Hdr.Pe32Plus->OptionalHeader.SectionAlignment;
|
||||
|
Reference in New Issue
Block a user