Unblock facebook - Loans - Debt Consolidation - iKobo - Problem Mortgage
embedded Linux : how to co-ordinate System.map with PC address [Archive] - DunLUG - Dunedin Linux Users Group

View Full Version : embedded Linux : how to co-ordinate System.map with PC address


linq936@hotmail.com
14-10-2005, 01:16 PM
Hi,
I have a linux kernel build and try to load it to a PowerPC
development board. I use a JTAG debugger to download the kernal.

Linux boot hangs in middle, and in the JTAG debugger I can see that
PC is 0x00001200, from my limited knowledge I should check out
System.map to guess which driver function is the problem.

But this time it is weired, in System.map, there is no address around
that 0x00001200 I can see, all function addresses are above 0xC0000000.

I wonder what is the problem. That knowledge worked for me before, is
it accidently true?

I also run "objdump -S" against the kernel ELF file, it seems true
that all addresses are above 0xc0000000.

Could you give me any suggestion?

Chuck Gales
15-10-2005, 12:52 AM
On Thu, 13 Oct 2005 17:16:14 -0700, linq936 wrote:

> Hi,
> I have a linux kernel build and try to load it to a PowerPC
> development board. I use a JTAG debugger to download the kernal.
>
> Linux boot hangs in middle, and in the JTAG debugger I can see that
> PC is 0x00001200, from my limited knowledge I should check out
> System.map to guess which driver function is the problem.
>
> But this time it is weired, in System.map, there is no address around
> that 0x00001200 I can see, all function addresses are above 0xC0000000.
>
> I wonder what is the problem. That knowledge worked for me before, is
> it accidently true?
>
> I also run "objdump -S" against the kernel ELF file, it seems true
> that all addresses are above 0xc0000000.
>
> Could you give me any suggestion?
What you are seeing is the Physical Address of the PC. This means that
the Kernel has not enabled the MMU yet, so the CPU is still using Physical
Addresses. One of the first things that the kernel does is to enable the
MMU, which will map Physical Addresses at 0x00000000 to Virtual Addresses
at 0xc00000000. When you look at the System.map, you will see the entire
kernel being mapped to the Virtual Address of 0xc00000000.

If you want to translate the Physical Address of 0x1200, just add
0xc0000000 to it (or in this case, 0xc0001200).

Also, 0x00001200 is a PowerPC Exception Vector for an Instruction TLB
Miss. This means that your TLB table is not being initialized correctly
prior to the kernel being executed, so you might want to look at the code
which initializes your TLBs.

Chuck