On 09/08/15 11:06, Haojian Zhuang wrote:
Hi Peter & Philip,
JTAG works on my hikey platform. Great thanks for your work.
But it seems that there're still some issues on supporting aarch64.
- After linux booted, I use "halt" command to stop kernel. Then use
"reg" command. ===== arm v8 registers (34) x0 (/64): 0x0000000039613818 (dirty)
<snip> (65) sp (/64): 0x000000003D2979D0 (66) pc (/64): 0x00000000004ACAD0 (67) CPSR (/32): 0x200000C5
PC value is wrong. I think that it should be 0xffffffc000xxxxxx.
I believe the register view is chopping off the top 32-bits.
I *think*, based on some experiments I have done, that the low order bits are trustworthy so the register dump might still be useful for a *really* desperate developers who just want to know where the machine crashed.
There are more recent versions of the armv8 patches than the one Pete used. These correctly show the registers but are broken in other serious ways (for example will not halt the hikey).
As time permits I'll try to merge together the best of both builds but don't count on my finding the time...
- How to load symbol table when I debug firmware or linux kernel?
Use gdb for that (see gdbinit file in openocd-code). However with the register state broken I'd stick to assembler level debug for now...