[U-Boot-Users] Re: BDM4GDB

Petter Larsen pla at morecom.no
Tue Mar 18 16:34:05 CET 2003


Hello

I solved the issue by using a standard kernel 2.4.20, and not the kernel
that I have from Montavista.

It failed when loading the symbols from the vmlinux file, but that is
now fixed.

I know have another question:

On our board, a AXX155E which is an Integrated Access Device for use in
fibre optic networks, and combine IP- and TDM-traffic, we have ported
the PPCBoot 2.0.0 to use for the ROM and bootloader.

BDM4GDB has the possibilities to initialise the board, and does not need
to have a ROM and bootloader, as far as I have understand.

But I have PPCBoot working, and then I thought that I could use all the
features of PPCBoot instead of initialising the board through the
mpc.init file. Am I right?

Here is my scenario:


(gdb) set mpcbdm_adapter 2

(gdb) target mpcbdm 0
MPCBDM version 1.2.3 / 2001/10/25
got access rights for printer port 0 addr 0x378..0x37A
disabled power at port 0
adapter version 2 initialized
*** init
Target cpu PVR=0x00500000 PARTNUM=0x05 MASKNUM=0x02 REV_NUM=0x0000
Target cpu is a 'XPC860 Rev. D.4'
BDM initialized
0x100 in ?? ()

(gdb) mpcbdm spr SYPCR
E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!SYPCR :=
(SWTC|16BMT|24BME||28SWF|SWE|SWRI|SWP)
IMMR + 0x4:System Protection Control Register, UM283
SYPCR = 0x7fffffff = (SWTC=0x7fff|BMT=0xff|BME|SWF|SWE|SWRI|SWP)

(gdb) mpcbdm spr SYPCR = 0xffffff88
E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!(gdb) 

(gdb)mpcbdm spr SYPCR
SYPCR := (SWTC|16BMT|24BME||28SWF|SWE|SWRI|SWP)
IMMR + 0x4:System Protection Control Register, UM283
SYPCR = 0x7fffffff =
(SWTC=0x7fff|BMT=0xff|BME|SWF|SWE|SWRI|SWP)E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!E!
(gdb)



Something is terrible wrong here, is it not?

I try to set the SYPCR register for disabling the watchdog.
It results in a lot of E!E!E and that the register is not being set at
all. Se the above result.

I found out that this happens when PPCBoot has started. Is this right?
Should it be like this?
If I do a "mpcbdm reset" and hurry to set the SYPCR register before the
PPCBoot starts, I can set the register. If I do this, PPCBoot does not
start...


The next thing I thought I should do is to load the kernel in to PPCBoot
with tftp. This works. Then I should load the symbols from the same file
inside gdb with the command "symbol-file /usr/src/linux-2.4.20/vmlinux"
Next I would set an early breakpoint to halt the kernel in an early
place. Does anybody know where the earliest place I can set my
breakpoint?

The loading from PPCBoot take place as you see under,

=>imi 100000

## Checking Image at 00100000 ...
   Image Name:   Linux 2.4.20
   Image Type:   PowerPC Linux Kernel Image (uncompressed)
   Data Size:    7336579 Bytes =  6.10 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
=> 
=>bootm 100000
## Booting image at 00100000 ...
   Image Name:   Linux 2.4.20
   Image Type:   PowerPC Linux Kernel Image (uncompressed)
   Data Size:    7336579 Bytes =  6.10 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
OK
## Current stack ends at 0x03F0FC20 => set upper limit to 0x00800000
## cmdline at 0x007FFF00 ... 0x007FFF13
bd address  = 0x03F0FFC4
memstart    = 0x00000000
memsize     = 0x04000000
flashstart  = 0x0C000000
flashsize   = 0x00800000
flashoffset = 0x00090000
sramstart   = 0x00000000
sramsize    = 0x00000000
immr_base   = 0xFF000000
bootflags   = 0x00000001
intfreq     =     50 MHz
busfreq     =     50 MHz
ethaddr     = 00:08:74:3D:9F:00
IP addr     = 64.28.25.242
baudrate    = 115200 bps
No initrd
## Transferring control to Linux (at address 00000000) ...


Here it hangs, and this is why I want to debug...

Anybody that can help me?


Best regards
Petter Larsen
Consultant
moreCom as


On Tue, 2003-03-18 at 00:06, Wolfgang Denk wrote:
> Dear Petter,
> 
> in message <1047486990.5675.164.camel at pla> you wrote:
> > 
> > Thanks for the debuggers. I have manged to get the right connector and I
> > belive it is working...
> 
> Sorry for the delay...
> 
> > I think we may have made the init file for the BDM4GDB right.
> > 
> > It is attached.
> 
> Thanks.
> 
> > But when the debugger loads the kernel, which take a while and I have to
> > push "enter" a lot, the file seems to finish to load, but immediately
> > after the debugger seg faults...
> 
> Strange. It works fine here.
> 
> > I run the debugger under Red Hat 8. Is this fine?
> 
> Yes.
> 
> > I also tried to build the compiler from source, "BuildGDB gdb" It build
> > but it did not work. If I tried to do a "mpcbdm spr SYPCR = 0xffffff88"
> > I got this failure: "Invalid SPR" after I have connected to target. The
> > debugger on the CD-ROM does not have this failure. 
> > 
> > See a snip of the output under from the debugger from your CD-ROM and
> > our init file:
> > 
> > [root at pla root]#./powerpc-linux-gdb -x  axx155e.init
> > 
> > I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!
> > I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!
> > I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!
> > I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!
> > E!E!Loading section .setup.init, size 0xb0 lma 0xc05a6730
> > I!E!E!E!E!E!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!Loading section
> > .initcall.init, size 0xa0 lma 0xc05a67e0
> > I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!I!Start address 0xc0000000 , load
> > size 1727720
> > Transfer rate: 66132 bits/sec, 510 bytes/write.
> > Segmentation fault
> 
> I'm afraid I cannot answer this. Please post  your  question  to  the
> BDM4GDB User's mailing list at <bdm4gdb-users at lists.sourceforge.net>;
> probably Frank Przybylski <Frank.Przybylski at vas-gmbh.de> will provide
> an explanation, he knows better than me.
> 
> Viele Grüße,
> 
> Wolfgang Denk




More information about the U-Boot mailing list