[ELDK] gdbserver issues on xilinx PPC440 Virtex5FX with ELDK4.2

Frederic LEGER frederic.leger at esisar.grenoble-inp.fr
Wed Aug 26 10:34:21 CEST 2009


Dear Wolfgang,

The problem has been solved by Brian Hill of Xilinx within an application
note.

http://www.xilinx.com/support/documentation/application_notes/xapp1137.pdf

The Linux kernel does not initialize the PowerPC processor DBCR0 register.
The value
placed here by Xilinx JTAG link "XMD" is not suitable for use with Linux. 
The Linux kernel file /arch/powerpc/kernel/head_44x.S has to be patched for
proper operation. 

I applied the patch successfully on 2.6.27 kernel. ppc-4xx-gdb/gdbserver are
now working as well as gdb alone on target.

This is the code to copy&paste within the file as xilinx appnote describes.

#if !defined(CONFIG_BDI_SWITCH)
/*
* The Abatron BDI JTAG debugger does not tolerate others
* mucking with the debug registers.
*/
lis r2,DBCR0_IDM at h
mtspr SPRN_DBCR0,r2
isync
/* clear any residual debug events */
li r2,-1
mtspr SPRN_DBSR,r2
#endif

Best regards,

Frédéric Léger



-----Message d'origine-----
De : Wolfgang Denk [mailto:wd at denx.de] 
Envoyé : mardi 24 février 2009 19:45
À : Frederic LEGER
Cc : eldk at lists.denx.de
Objet : Re: [ELDK] gdbserver issues on xilinx PPC440 Virtex5FX with ELDK4.2

Dear "Frederic LEGER",

In message <003101c9967f$47ee1c90$3e0414ac at esisar.inpg.fr> you wrote:
>
> First tries were with ELDK 4.2 GLIBC ramdisk.image.gz (1.8Mo) + 
> gdbserver and libs + hello app => crash on break main when "continue" =>
continuing...
> Libs were added after using ${CROSS_COMPILE}ldd against gdb and 
> gdbserver and comes from the ppc_4xx \libs and \usr\libs drawer.
> We tried kernels 2.6.28, 2.6.27rc4 and 2.6.27rc9 from Xilinx git.

It might make sense to try this with the cross-gdb fom ELDK 4.1 ...

> Next try with ELDK4.2 GLIBC ramdisk.image.gz (1.8Mo) + GDB and libs + 
> hello app  => crash on break main & continue.
> Ext2 ramdisk size was 16Mo cause GDB and libs are quite heavy. (we 
> have > 64MB soldered on board) We tried kernels 2.6.27rc9 from Xilinx 
> git.

Ditto.

> Could you please give me your opinion on the behaviour below :  
>
> ${CROSS_COMPILE}gdb --tui helloppcstatic Then under gdb: target remote
> 172.20.20.3:5678
>
> Now, after connecting to target I got:
> Remote debugging using 172.20.20.3:5678 0x10000140 in _start()
> (gdb)

Please try a "show arch" here.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Athens  built  the  Acropolis.  Corinth  was  a   commercial   city,
interested  in  purely  materialistic things. Today we admire Athens, visit
it, preserve the old temples, yet we hardly ever  set  foot  in
Corinth."              - Dr. Harold Urey, Nobel Laureate in chemistry




More information about the eldk mailing list