public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] register init
@ 2005-05-01 15:44 Hinko Kocevar
  2005-05-05  0:05 ` Hinko Kocevar
  0 siblings, 1 reply; 2+ messages in thread
From: Hinko Kocevar @ 2005-05-01 15:44 UTC (permalink / raw)
  To: u-boot

Hello @LL,

i've ported u-boot to trizeps2 cpu module. It can boot and use tftp when 
running under BDI debugger, so I guess basic parts are ported fine. When I try 
to run board standalone it kind of hangs there... no output on serial console.

After few days of debugging I established that lowlevel_init() won't set the 
GAFR0_x register(s) to defined value set in u-boot board config. Under BDI I 
can see that at this point PC jumps to some random address - or throws an 
exception that BDI intercepts, if I set 'VECTOR CATCH 0xde' directive in BDI 
config.

After exception caught by the BDI I can set PC back few instrucions and board 
would boot, console lives!

I've added few nop instructions* after ldr and str invocations that are setting 
GAFRx registers, but that just delays the data abort seen before (eg. it would 
happen when setting MSCx registers).

* As xscale manual suggests for imprecise data aborts.

Further, it is not always the same exception that occurs, it is data abort, 
undefined instruction, and sometimes prefetch aborts are seen also.

And more, when the board boots by itself, which happens once in a while, I can 
see it is looping inside serial - getc() code waiting for input. But there is 
nothing shown on terminal and nothing can be input, since GAFR1_L is not setup 
to provide FFUART function.

I've attached objdump and BDI output while single-stepping around critical section.

Any ideas?

reagrds,
hk

-- 
hinko <dot> kocevar <at> iskramedical <dot> si
Hinko Kocevar, embedded systems developer
Iskra Medical d.o.o., Stegne 23, 1k LJ, SLO-EU

	"A? r?n"	|	[Analects XII:22]
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: single_step-bdi_ML
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050501/e4df42f6/attachment.txt 

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

* [U-Boot-Users] register init
  2005-05-01 15:44 [U-Boot-Users] register init Hinko Kocevar
@ 2005-05-05  0:05 ` Hinko Kocevar
  0 siblings, 0 replies; 2+ messages in thread
From: Hinko Kocevar @ 2005-05-05  0:05 UTC (permalink / raw)
  To: u-boot

Hinko Kocevar wrote:
> After few days of debugging I established that lowlevel_init() won't set 
> the GAFR0_x register(s) to defined value set in u-boot board config. 
> Under BDI I can see that at this point PC jumps to some random address - 
> or throws an exception that BDI intercepts, if I set 'VECTOR CATCH 0xde' 
> directive in BDI config.
> 
> After exception caught by the BDI I can set PC back few instrucions and 
> board would boot, console lives!
> 

I've resolved the issue by moving GAFR register init ahead of GPSR,GPCR and 
GPDR register init... Although PXA datasheet suggests it should be done the 
other way around (as with other PXA based boards) it does not hold true for me.

I guess it is somekind of hardware perk, but I don't have cpu module schematics 
availaable to confirm...


-- 
hinko <dot> kocevar <at> iskramedical <dot> si
Hinko Kocevar, embedded systems developer
Iskra Medical d.o.o., Stegne 23, 1k LJ, SLO-EU

	"A? r?n"	|	[Analects XII:22]

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

end of thread, other threads:[~2005-05-05  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-01 15:44 [U-Boot-Users] register init Hinko Kocevar
2005-05-05  0:05 ` Hinko Kocevar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox