ARM Packages: Removed trailing spaces
Trailing spaces create issue/warning when generating/applying patches. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15833 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
62d441fb17
commit
3402aac7d9
@@ -11,7 +11,7 @@ define /r GetMaxMem()
|
||||
define /r GetWord(Addr)
|
||||
{
|
||||
unsigned long data;
|
||||
|
||||
|
||||
if( (Addr & 0x2) == 0 )
|
||||
{
|
||||
data = dword(Addr);
|
||||
@@ -68,7 +68,7 @@ unsigned long imgstart;
|
||||
$printf "debug type is %x",debugtype$;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
debugrva = dword(imgstart + debugdirentryrva + 0x14);
|
||||
dwarfsig = dword(imgstart + debugrva);
|
||||
if(dwarfsig != 0x66727764)
|
||||
@@ -81,7 +81,7 @@ unsigned long imgstart;
|
||||
|
||||
baseofcode = imgstart + dword(filehdrstart + 0x28);
|
||||
baseofdata = imgstart + dword(filehdrstart + 0x2c);
|
||||
|
||||
|
||||
if( (baseofcode < baseofdata) && (baseofcode != 0) )
|
||||
{
|
||||
elfbase = baseofcode;
|
||||
@@ -132,7 +132,7 @@ unsigned long imgstart;
|
||||
$printf "debug type is %x",debugtype$;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
debugrva = dword(imgstart + debugdirentryrva + 0x14);
|
||||
debugrva = debugrva - strippedsize;
|
||||
dwarfsig = dword(imgstart + debugrva);
|
||||
@@ -142,16 +142,16 @@ unsigned long imgstart;
|
||||
$printf "found %x", dwarfsig$;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if( dwarfsig == 0x66727764 )
|
||||
{
|
||||
elfpath = (char *)(imgstart + debugrva + 0xc);
|
||||
$printf "looking for elf path at 0x%x", elfpath$;
|
||||
$printf "looking for elf path at 0x%x", elfpath$;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
elfpath = (char *)(imgstart + debugrva + 0x10);
|
||||
$printf "looking for elf path at 0x%x", elfpath$;
|
||||
$printf "looking for elf path at 0x%x", elfpath$;
|
||||
}
|
||||
|
||||
// elf base is baseofcode (we hope that for TE images it's not baseofdata)
|
||||
@@ -181,7 +181,7 @@ unsigned long secstart;
|
||||
}
|
||||
else if(sectiontype == 0x12) // TE
|
||||
{
|
||||
ProcessTE(secstart+0x4);
|
||||
ProcessTE(secstart+0x4);
|
||||
}
|
||||
}
|
||||
.
|
||||
@@ -247,7 +247,7 @@ define /r LoadPeiSec()
|
||||
$fopen 50, 'C:\loadfiles.inc'$;
|
||||
|
||||
fvlen = dword(fvbase + 0x20);
|
||||
|
||||
|
||||
// first ffs file is after fv header, use headerlength field
|
||||
//ffsoffset = (dword(fvbase + 0x30) & 0xffff0000) >> 16;
|
||||
ffsoffset = (dword(fvbase + 0x30) & 0xffff0000) / 0x10000;
|
||||
@@ -257,21 +257,21 @@ define /r LoadPeiSec()
|
||||
while(ffsoffset < (fvbase+fvlen))
|
||||
{
|
||||
// process ffs file and increment by ffs file size field
|
||||
ProcessFfsFile(ffsoffset);
|
||||
ProcessFfsFile(ffsoffset);
|
||||
ffsfilesize = (dword(ffsoffset + 0x14) & 0x00ffffff);
|
||||
if(ffsfilesize == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
ffsoffset = ffsoffset + ffsfilesize;
|
||||
|
||||
|
||||
|
||||
// align to next 8 byte boundary
|
||||
if( (ffsoffset & 0x7) != 0 )
|
||||
{
|
||||
ffsoffset = ffsoffset + (0x8 - (ffsoffset & 0x7));
|
||||
}
|
||||
|
||||
|
||||
} // end fv ffs loop
|
||||
|
||||
$vclose 50$;
|
||||
@@ -283,21 +283,21 @@ define /r FindSystemTable(TopOfRam)
|
||||
unsigned long TopOfRam;
|
||||
{
|
||||
unsigned long offset;
|
||||
|
||||
|
||||
$printf "FindSystemTable"$;
|
||||
$printf "top of mem is %x",TopOfRam$;
|
||||
|
||||
|
||||
offset = TopOfRam;
|
||||
|
||||
|
||||
// align to highest 4MB boundary
|
||||
offset = offset & 0xFFC00000;
|
||||
|
||||
|
||||
// start at top and look on 4MB boundaries for system table ptr structure
|
||||
while(offset > 0)
|
||||
{
|
||||
//$printf "checking %x",offset$;
|
||||
//$printf "value is %x",dword(offset)$;
|
||||
|
||||
|
||||
// low signature match
|
||||
if(dword(offset) == 0x20494249)
|
||||
{
|
||||
@@ -314,13 +314,13 @@ unsigned long TopOfRam;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(offset < 0x400000) break;
|
||||
offset = offset - 0x400000;
|
||||
offset = offset - 0x400000;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
.
|
||||
@@ -344,15 +344,15 @@ unsigned long SystemTable;
|
||||
unsigned long dbgptr;
|
||||
unsigned long dbginfo;
|
||||
unsigned long loadedimg;
|
||||
|
||||
|
||||
$printf "FindDebugInfo"$;
|
||||
|
||||
|
||||
dbgentries = 0;
|
||||
CfgTableEntries = dword(SystemTable + 0x40);
|
||||
ConfigTable = dword(SystemTable + 0x44);
|
||||
|
||||
|
||||
$printf "config table is at %x (%d entries)", ConfigTable, CfgTableEntries$;
|
||||
|
||||
|
||||
// now search for debug info entry with guid 49152E77-1ADA-4764-B7A2-7AFEFED95E8B
|
||||
// 0x49152E77 0x47641ADA 0xFE7AA2B7 0x8B5ED9FE
|
||||
for(i=0; i<CfgTableEntries; i++)
|
||||
@@ -374,15 +374,15 @@ unsigned long SystemTable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(dbgentries == 0)
|
||||
{
|
||||
$printf "no debug entries found"$;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$printf "debug table at %x (%d entries)", dbgptr, dbgentries$;
|
||||
|
||||
|
||||
for(i=0; i<dbgentries; i++)
|
||||
{
|
||||
dbginfo = dword(dbgptr + (i*4));
|
||||
@@ -402,11 +402,11 @@ define /r LoadDxe()
|
||||
{
|
||||
unsigned long maxmem;
|
||||
unsigned long systbl;
|
||||
|
||||
|
||||
$printf "LoadDxe"$;
|
||||
|
||||
|
||||
$fopen 50, 'C:\loadfiles.inc'$;
|
||||
|
||||
|
||||
maxmem = GetMaxMem();
|
||||
systbl = FindSystemTable(maxmem);
|
||||
if(systbl != 0)
|
||||
@@ -414,7 +414,7 @@ define /r LoadDxe()
|
||||
$printf "found system table at %x",systbl$;
|
||||
FindDebugInfo(systbl);
|
||||
}
|
||||
|
||||
|
||||
$vclose 50$;
|
||||
}
|
||||
.
|
||||
@@ -432,19 +432,19 @@ define /r LoadRuntimeDxe()
|
||||
unsigned long RuntimeDebugInfo;
|
||||
unsigned long DebugInfoOffset;
|
||||
unsigned long imgbase;
|
||||
|
||||
|
||||
$printf "LoadRuntimeDxe"$;
|
||||
|
||||
|
||||
$fopen 50, 'C:\loadfiles.inc'$;
|
||||
|
||||
|
||||
RuntimeDebugInfo = 0x80000010;
|
||||
|
||||
|
||||
if(RuntimeDebugInfo != 0)
|
||||
{
|
||||
numentries = dword(RuntimeDebugInfo);
|
||||
|
||||
|
||||
$printf "runtime debug info is at %x (%d entries)", RuntimeDebugInfo, numentries$;
|
||||
|
||||
|
||||
DebugInfoOffset = RuntimeDebugInfo + 0x4;
|
||||
for(i=0; i<numentries; i++)
|
||||
{
|
||||
@@ -457,7 +457,7 @@ define /r LoadRuntimeDxe()
|
||||
DebugInfoOffset = DebugInfoOffset + 0x4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$vclose 50$;
|
||||
}
|
||||
.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
//
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
//
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
//
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
//
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// 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
|
||||
@@ -23,20 +23,20 @@ define /R unsigned char * find_system_table(mem_start, mem_size)
|
||||
unsigned long mem_size;
|
||||
{
|
||||
unsigned char *mem_ptr;
|
||||
|
||||
|
||||
mem_ptr = mem_start + mem_size;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
mem_ptr -= 0x400000; // 4 MB
|
||||
|
||||
|
||||
if (strncmp(mem_ptr, "IBI SYST", 8) == 0)
|
||||
{
|
||||
return *(unsigned long *)(mem_ptr + 8); // EfiSystemTableBase
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} while (mem_ptr > mem_start);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
.
|
||||
@@ -48,7 +48,7 @@ define /R unsigned char * find_debug_info_table_header(system_table)
|
||||
unsigned char *configuration_table;
|
||||
unsigned long index;
|
||||
unsigned char debug_table_guid[16];
|
||||
|
||||
|
||||
// Fill in the debug table's guid
|
||||
debug_table_guid[ 0] = 0x77;
|
||||
debug_table_guid[ 1] = 0x2E;
|
||||
@@ -66,20 +66,20 @@ define /R unsigned char * find_debug_info_table_header(system_table)
|
||||
debug_table_guid[13] = 0xD9;
|
||||
debug_table_guid[14] = 0x5E;
|
||||
debug_table_guid[15] = 0x8B;
|
||||
|
||||
|
||||
configuration_table_entries = *(unsigned long *)(system_table + 64);
|
||||
configuration_table = *(unsigned long *)(system_table + 68);
|
||||
|
||||
|
||||
for (index = 0; index < configuration_table_entries; index++)
|
||||
{
|
||||
if (compare_guid(configuration_table, debug_table_guid) == 0)
|
||||
{
|
||||
return *(unsigned long *)(configuration_table + 16);
|
||||
}
|
||||
|
||||
|
||||
configuration_table += 20;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
.
|
||||
@@ -94,7 +94,7 @@ define /R int valid_pe_header(header)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
.
|
||||
@@ -103,9 +103,9 @@ define /R unsigned long pe_headersize(header)
|
||||
unsigned char *header;
|
||||
{
|
||||
unsigned long *size;
|
||||
|
||||
|
||||
size = header + 0x00AC;
|
||||
|
||||
|
||||
return *size;
|
||||
}
|
||||
.
|
||||
@@ -115,15 +115,15 @@ define /R unsigned char *pe_filename(header)
|
||||
{
|
||||
unsigned long *debugOffset;
|
||||
unsigned char *stringOffset;
|
||||
|
||||
|
||||
if (valid_pe_header(header))
|
||||
{
|
||||
debugOffset = header + 0x0128;
|
||||
stringOffset = header + *debugOffset + 0x002C;
|
||||
|
||||
|
||||
return stringOffset;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
.
|
||||
@@ -141,7 +141,7 @@ define /R int char_is_valid(c)
|
||||
define /R write_symbols_file(filename, mem_start, mem_size)
|
||||
unsigned char *filename;
|
||||
unsigned char *mem_start;
|
||||
unsigned long mem_size;
|
||||
unsigned long mem_size;
|
||||
{
|
||||
unsigned char *system_table;
|
||||
unsigned char *debug_info_table_header;
|
||||
@@ -154,40 +154,40 @@ define /R write_symbols_file(filename, mem_start, mem_size)
|
||||
unsigned char *debug_filename;
|
||||
unsigned long header_size;
|
||||
int status;
|
||||
|
||||
|
||||
system_table = find_system_table(mem_start, mem_size);
|
||||
if (system_table == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
status = fopen(88, filename, "w");
|
||||
|
||||
|
||||
debug_info_table_header = find_debug_info_table_header(system_table);
|
||||
|
||||
|
||||
debug_info_table = *(unsigned long *)(debug_info_table_header + 8);
|
||||
debug_info_table_size = *(unsigned long *)(debug_info_table_header + 4);
|
||||
|
||||
|
||||
for (index = 0; index < (debug_info_table_size * 4); index += 4)
|
||||
{
|
||||
debug_image_info = *(unsigned long *)(debug_info_table + index);
|
||||
|
||||
debug_image_info = *(unsigned long *)(debug_info_table + index);
|
||||
|
||||
if (debug_image_info == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
loaded_image_protocol = *(unsigned long *)(debug_image_info + 4);
|
||||
|
||||
|
||||
image_base = *(unsigned long *)(loaded_image_protocol + 32);
|
||||
|
||||
|
||||
debug_filename = pe_filename(image_base);
|
||||
header_size = pe_headersize(image_base);
|
||||
|
||||
|
||||
$fprintf 88, "%s 0x%08x\n", debug_filename, image_base + header_size$;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
fclose(88);
|
||||
}
|
||||
.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
//
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// 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
|
||||
|
Reference in New Issue
Block a user