Changeset 105670 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/EmbeddedPkg/Scripts/LauterbachT32/EfiLoadDxe.cmm
- Timestamp:
- Aug 14, 2024 1:16:30 PM (4 months ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-159268 /vendor/edk2/current 103735-103757,103769-103776,129194-164365
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/EmbeddedPkg/Scripts/LauterbachT32/EfiLoadDxe.cmm
r85718 r105670 1 1 ; 2 ; Copyright (c) 2024, Ampere Computing LLC. All rights reserved.<BR> 2 3 ; Copyright (c) 2011, Hewlett-Packard Company. All rights reserved.<BR> 3 4 ; … … 5 6 ; 6 7 7 LOCAL &maxmem &systbl &memsize8 PARAMETERS &systbl 8 9 9 &memsize=0x20000000 ; default to 512MB 10 11 gosub FindSystemTable &memsize 12 ENTRY &systbl 13 14 if &systbl!=0 15 ( 16 print "found system table at &systbl" 17 gosub FindDebugInfo &systbl 18 ) 19 else 20 ( 21 print "ERROR: system table not found, check memory size" 22 ) 10 gosub FindDebugInfo &systbl 23 11 enddo 24 25 FindSystemTable:26 LOCAL &TopOfRam &offset27 ENTRY &TopOfRam28 29 print "FindSystemTable"30 print "top of mem is &TopOfRam$"31 32 &offset=&TopOfRam33 34 ; align to highest 4MB boundary35 &offset=&offset&0xFFC0000036 37 ; start at top and look on 4MB boundaries for system table ptr structure38 while &offset>039 (40 ; low signature match41 if Data.Long(a:&offset)==0x2049424942 (43 ; high signature match44 if Data.Long(a:&offset+4)==0x5453595345 (46 ; less than 4GB?47 if Data.Long(a:&offset+0x0c)==048 (49 ; less than top of ram?50 if Data.Long(a:&offset+8)<&TopOfRam51 (52 return Data.Long(a:&offset+8)53 )54 )55 )56 )57 58 if &offset<0x40000059 (60 return 061 )62 &offset=&offset-0x40000063 )64 65 return 066 67 12 68 13 FindDebugInfo: … … 70 15 ENTRY &SystemTable 71 16 72 print "FindDebugInfo"73 74 17 &dbgentries=0 75 &CfgTableEntries=Data.Long(a:&SystemTable+0x 40)76 &ConfigTable=Data.Long(a:&SystemTable+0x 44)18 &CfgTableEntries=Data.Long(a:&SystemTable+0x68) 19 &ConfigTable=Data.Long(a:&SystemTable+0x70) 77 20 78 21 print "config table is at &ConfigTable (&CfgTableEntries entries)" … … 83 26 while &i<&CfgTableEntries 84 27 ( 85 &offset=&ConfigTable+(&i*0x1 4)28 &offset=&ConfigTable+(&i*0x18) 86 29 if Data.Long(a:&offset)==0x49152E77 87 30 ( … … 121 64 if Data.Long(a:&dbginfo)==1 ; normal debug info type 122 65 ( 123 &loadedimg=Data.Long(a:&dbginfo+4) 124 do EfiProcessPeImage Data.Long(a:&loadedimg+0x20) 66 &loadedimg=Data.Long(a:&dbginfo+8) 67 &imagebaseptr=&loadedimg+0x40 68 &imagebase=Data.Long(a:&imagebaseptr) 69 do ~~~~/EfiProcessPeImage.cmm "&imagebase" 125 70 ) 126 71 )
Note:
See TracChangeset
for help on using the changeset viewer.