diff options
author | Rebecca Cran <rebecca@os.amperecomputing.com> | 2024-01-29 11:59:16 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-02-27 17:17:38 +0000 |
commit | e59a40b92ce92f17e3d8d99917868c5678d408b7 (patch) | |
tree | b2d0fdd21fe2335025ea16476e283a81dac2c782 /EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm | |
parent | aceb3490a2a350b128156fd4e36e53fc19739e4e (diff) | |
download | edk2-e59a40b92ce92f17e3d8d99917868c5678d408b7.tar.gz edk2-e59a40b92ce92f17e3d8d99917868c5678d408b7.tar.bz2 edk2-e59a40b92ce92f17e3d8d99917868c5678d408b7.zip |
EmbeddedPkg/Scripts/LauterbachT32: Fix EfiLoadDxe.cmm
There have been many changes since EfiLoadDxe.cmm was last updated in
2011. The EFI_SYSTEM_TABLE can no longer be found by scanning memory on
4KB boundaries, so require users pass in its address instead. Update
various offsets so that the debug information can be found and loaded
with a recent version of TRACE32.
Signed-off-by: Rebecca Cran <rebecca@os.amperecomputing.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Diffstat (limited to 'EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm')
-rw-r--r-- | EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm b/EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm index c3aab9d06a..b0d97eec71 100644 --- a/EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm +++ b/EmbeddedPkg/Scripts/LauterbachT32/EfiProcessPeImage.cmm @@ -1,4 +1,5 @@ ;
+; Copyright (c) 2024, Ampere Computing LLC. All rights reserved.<BR>
; Copyright (c) 2011, Hewlett-Packard Company. All rights reserved.<BR>
;
; SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,11 +11,11 @@ &imgstart=&imgstart
print "PE32 image found at &imgstart"
- ; offset from dos hdr to PE file hdr
+ ; offset from dos hdr to PE file hdr (i.e. 'PE\0\0' signature)
&filehdrstart=&imgstart+Data.Long(c:&imgstart+0x3C)
; offset to debug dir in PE hdrs
- &debugdirentryrva=Data.Long(c:&filehdrstart+0xA8)
+ &debugdirentryrva=Data.Long(c:&imgstart+0xf10)
if &debugdirentryrva==0
(
print "no debug dir for image at &imgstart"
@@ -62,7 +63,7 @@ &elfbase=&baseofdata;
)
- print "found path &elfpath"
+ print "found path &elfpath with address &elfbase"
ON ERROR GOSUB
return
data.load.elf &elfpath &elfbase /NOCODE /NOCLEAR
|