linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* memset hangs part way through; called from early_init
@ 2006-06-01 17:00 Chris Dumoulin
  2006-06-01 20:32 ` Wolfgang Denk
  2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Dumoulin @ 2006-06-01 17:00 UTC (permalink / raw)
  To: linuxppc-embedded

Hi All,
I'm running a V2Pro-based development board, and I'm working on a linux 2.6.15 port.
Currently, the board hangs in the early_init function. Specifically, at the following line:
memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);

This memset_io() call eventually calls memset() (from arch/ppc/lib/string.S) to zero the
region of memory. Using a BDI2000, I'm able to step through the assembly and see that
within memset, it enters a two-instruction loop where it is writing zeros to consecutive
memory locations. Everything is going fine, but after 10 or 20 iterations of the loop
(it's not consistent), everything blows up.

GDB reports the following:
------------------------------
(gdb) stepi

Program received signal SIG110, Real-time event 110.
0xc000b3e8 in memset ()
(gdb)
------------------------------

The BDI2000 reports the following:
------------------------------
*** MMU: address translation for 0xC000B3E8 failed
*** MMU: address translation for 0xC000B3E4 failed
*** MMU: address translation for 0xC000B3E8 failed
*** MMU: address translation for 0xC000B3E4 failed
*** MMU: address translation for 0xC000B3B0 failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0x00000000 failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0xDEADBEEF failed
*** MMU: address translation for 0xDEADBEEB failed
*** MMU: address translation for 0x00000000 failed
------------------------------

Here is my BDI2000 configuration file:
------------------------------
[INIT]



[TARGET]

JTAGCLOCK   0                   ;use 16 MHz JTAG clock

CPUTYPE     405 		;the used target CPU type

BDIMODE     AGENT   	        ;the BDI working mode (LOADONLY | AGENT)


BREAKMODE   HARD      	        ;SOFT or HARD, HARD uses PPC hardware breakpoint

STEPMODE    HWBP                ;JTAG or HWBP, HWPB uses one or two hardware breakpoints


MMU         XLAT 0xC0000000     ;enable virtual address mode

PTBASE      0x000000f0          ;address where kernel/user stores pointer to page table

STARTUP     RESET




[HOST]

IP          192.9.200.213


FILE        ppcboot.bin

FORMAT      BIN 0xfff80000 ;0x200000

START       0xfff80000 ; 0x200000

LOAD        MANUAL              ;load code MANUAL or AUTO after reset

DEBUGPORT   2001

DUMP        dump.bin            ;Linux: dump.bin must already exist and public writable



[FLASH]

WORKSPACE   0xffffd000

CHIPTYPE    STRATAX16

BUSWIDTH    16

CHIPSIZE    0x400000


[REGS]

IDCR1	0x010	0x011	;MEMCFGADR and MEMCFGDATA

IDCR2	0x012	0x013	;EBCCFGADR and EBCCFGDATA

IDCR3	0x014	0x015	;KIAR and KIDR

FILE    reg405gp.def
------------------------------

Any ideas would be appreciated.

Regards,
Chris Dumoulin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: memset hangs part way through; called from early_init
  2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
@ 2006-06-01 20:32 ` Wolfgang Denk
  2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-06-01 20:32 UTC (permalink / raw)
  To: Chris Dumoulin; +Cc: linuxppc-embedded

In message <200606011700.k51H0WJw014425@www-webmail1.magma.ca> you wrote:
>
> Currently, the board hangs in the early_init function. Specifically, at the following line:
> memset_io(PTRRELOC(&__bss_start), 0, _end - __bss_start);
...
> Any ideas would be appreciated.

See http://www.denx.de/wiki/view/DULG/LinuxCrashesRandomly

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
A princess should not be afraid -- not with a brave knight to protect
her.
	-- McCoy, "Shore Leave", stardate 3025.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Debugging tools
  2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
  2006-06-01 20:32 ` Wolfgang Denk
@ 2006-06-08 23:08 ` David H. Lynch Jr.
  1 sibling, 0 replies; 4+ messages in thread
From: David H. Lynch Jr. @ 2006-06-08 23:08 UTC (permalink / raw)
  To: linuxppc-embedded


    I have encountered one of the rare instances where I need/want more
debugging resources than an LED on an IO port.

    I am looking for some recommendations as well as understanding of
the lighter weight debugging tools that are available.
    I am dealing with a Xilinx V4 PPC405  FPGA. It is hosted in a
computer running Windows XP. Aparently there is a JTAG port
    on the device that emulates a JTAG parallel port on LPT3 on the host
side.

    I was hoping to be able to bring up gdb, download an elf file to the
target and step through a program to see where it is going off the rails.

    A bit of research suggests that there are gdbservers that bridge
between gdb and JTAG. But all the links I have found to rproxy seem to
be broken, and those for gdbproxy seem to be
    for other processors.

  

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Debugging tools
@ 2006-06-09  0:11 Martin, Tim
  0 siblings, 0 replies; 4+ messages in thread
From: Martin, Tim @ 2006-06-09  0:11 UTC (permalink / raw)
  To: dhlii, linuxppc-embedded

>=20
>     I was hoping to be able to bring up gdb, download an elf file to
the
> target and step through a program to see where it is going off the
rails.
>=20

Assuming you have the Xilinx EDK tools installed, there is a program
called xmd that acts as a standalone debugger or can communicate with
gdb over a socket.

>     A bit of research suggests that there are gdbservers that bridge
> between gdb and JTAG. But all the links I have found to rproxy seem to
> be broken, and those for gdbproxy seem to be
>     for other processors.

EDK builds example programs when you use the BSB.  You can download and
debug these programs as a test.  From EDK 7.1, Tools->Software Debugger.

Tim

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-09  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-01 17:00 memset hangs part way through; called from early_init Chris Dumoulin
2006-06-01 20:32 ` Wolfgang Denk
2006-06-08 23:08 ` Debugging tools David H. Lynch Jr.
  -- strict thread matches above, loose matches on Subject: below --
2006-06-09  0:11 Martin, Tim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).