Re: [edk2] question about the debug scripts for Trace32 and RealView debuggers

Subject: Re: [edk2] question about the debug scripts for Trace32 and RealView debuggers

From: Thirupathiah Annapureddy <writetothiru@gmail.com>

To: edk2-devel@lists.sourceforge.net

Date: 2011-04-28 08:03:39

Hi Andrew,

Thanks for your answer. That explains that the foundation code should
create the system table at 4 MB boundary. But then in my case, it is
not getting created at the 4 MB boundary. What could be the potential
reason for this?

If I manually traverse the System Table using the memory dump, I am
able to find the configuration table and then debug image info headers
for all the relevant components that are being loaded by the Dxe
foundation. Also symboltable (alias sym) command is displaying the
list of the loaded components.

Thanks,

--thiru



> Hi,
>
> I am starting off with UEFI development for our custom ARM based platform.
> I did manage to bring up the EBL very quickly.
>
> Now I am trying to get the Source Level Debugging work for our platform.
> I use the script file trace32_load_symbols.cmm from BeagleBoardPkg.
> This script is trying to find the UEFI sytem table at 4MB offsets
> (&mem_ptr=&mem_ptr-0x400000) from the top of memory working towards
> the start of the memory.
>
> First of all, why does the script look for the system table signature
> at 4MB offsets?

This is how it is defined in the UEFI spec. If you have many GB of
memory you don't want the search to be too slow.
UEFI 2.3 specification (www.uefi.org), Chapter 17 Protocols - Debugger
Support. Section 17.4.1 EFI Debug Support Table - Overview

> In our platform, DXE Core is creating the system table at some
> location which is not aligned to 4MB. Is this normal?
>

No. The EFI_SYSTEM_TABLE_POINTER must be aligned on a 4MB boundary. It
points to the EFI System Table, that then has a pointer to
EFI_DEBUG_IMAGE_INFO_TABLE_HEADER that contains a pointer to
EFI_DEBUG_IMAGE_INFO_TABLE and some status bits that are used to
control access to the EFI_DEBUG_IMAGE_INFO_TABLE when it is being
updated.

Look at CoreInitializeDebugImageInfoTable() in
https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c

Andrew

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel