mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 09:04:07 +02:00
Correct TeImage Header based on PeiCis spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2250 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5b66424456
commit
582c7220f8
@ -299,7 +299,7 @@ PeCoffLoaderGetImageInfo (
|
|||||||
ImageContext->ImageAddress = Hdr.Pe32Plus->OptionalHeader.ImageBase;
|
ImageContext->ImageAddress = Hdr.Pe32Plus->OptionalHeader.ImageBase;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ImageContext->ImageAddress = (PHYSICAL_ADDRESS)(Hdr.Te->ImageBase + sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize);
|
ImageContext->ImageAddress = (PHYSICAL_ADDRESS)(Hdr.Te->ImageBase + Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -260,7 +260,7 @@ Returns:
|
|||||||
if (!(ImageContext->IsTeImage)) {
|
if (!(ImageContext->IsTeImage)) {
|
||||||
ImageContext->ImageAddress = PeHdr.OptionalHeader.ImageBase;
|
ImageContext->ImageAddress = PeHdr.OptionalHeader.ImageBase;
|
||||||
} else {
|
} else {
|
||||||
ImageContext->ImageAddress = (PHYSICAL_ADDRESS) (TeHdr.ImageBase + sizeof (EFI_TE_IMAGE_HEADER) - TeHdr.StrippedSize);
|
ImageContext->ImageAddress = (PHYSICAL_ADDRESS) (TeHdr.ImageBase + TeHdr.StrippedSize - sizeof (EFI_TE_IMAGE_HEADER));
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Initialize the alternate destination address to 0 indicating that it
|
// Initialize the alternate destination address to 0 indicating that it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user