public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200.
@ 2005-09-19 17:15 Mathieu Deschamps
  2005-09-19 17:26 ` Andrey P. Vasilyev
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Deschamps @ 2005-09-19 17:15 UTC (permalink / raw)
  To: u-boot

Hello,

I have upgraded U-Boot 1.1.2 to lastest 1.1.3. I still uses the boot.bin 
program to set up the flash and the dram and such while having
defined SKIP_RELOCATE_UBOOT and SKIP_LOWLEVEL_INIT.

Indeed kept undefined I have seen that it breaks everything reaching 
SoC specific lowlevel_init.S in cpu/.../start.S. Imagine reinitializing flash 
while reading init values from it, or reinit the memory controller while 
using it !

It seems that these two were compulsory in my case. But even defined,
my cpu goes in ABORT. 

Any ideas ?

Regards,

Mathieu Deschamps 

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

* [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200.
  2005-09-19 17:15 [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 Mathieu Deschamps
@ 2005-09-19 17:26 ` Andrey P. Vasilyev
  2005-09-20  8:01   ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : fixed ! but Mathieu Deschamps
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey P. Vasilyev @ 2005-09-19 17:26 UTC (permalink / raw)
  To: u-boot

Hello!

On Mon, Sep 19, 2005 at 07:15:27PM +0200, Mathieu Deschamps wrote:
> Hello,
> 
> I have upgraded U-Boot 1.1.2 to lastest 1.1.3. I still uses the boot.bin 
> program to set up the flash and the dram and such while having
> defined SKIP_RELOCATE_UBOOT and SKIP_LOWLEVEL_INIT.

I've tried similar configuration recently. My board has only a
DataFlash, not parallel flash, and I'm forced to use RomBoot to 
initialize CPU and SDRAM.
It works for me.

I've inserted the following options into 
u-boot-1.1.3/include/configs/at91rm9200dk.h (which I'm using as a 
template for my config), and it works:
#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

Also I've commented "bl lowlevel_init" instruction in 
u-boot-1.1.3/cpu/arm920t/start.S because it is undefined with 
SKIP_LOWLEVEL_INIT option set, and causes linking error.

> Indeed kept undefined I have seen that it breaks everything reaching 
> SoC specific lowlevel_init.S in cpu/.../start.S. Imagine reinitializing flash 
> while reading init values from it, or reinit the memory controller while 
> using it !

Strange... As for me, it only breaks linking because of absence 
lowlevel_init.S in compilation with CONFIG_SKIP_LOWLEVEL_INIT set. See 
above for a solution.

-- 
With best regards,
  Andrey Vasilyev

P.S. Sorry for my bad english...

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

* [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : fixed ! but ...
  2005-09-19 17:26 ` Andrey P. Vasilyev
@ 2005-09-20  8:01   ` Mathieu Deschamps
  2005-09-20  9:36     ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : Anders Larsen
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Deschamps @ 2005-09-20  8:01 UTC (permalink / raw)
  To: u-boot

Hello and Hurrah !

It works, thanks for your answer Andrey :

Indeed I had the same linker trouble and what I decided to do was to
move the ifdef SKIP_LOWLEVEL_INIT inside the cpu_init_crit in order
to keep the 'bl' instr. and its symbol alone thus preventing linker's shouts
(yes it complains about this)

The idea was good nevertheless I did it roughly (my #ifdef #endif embraced 
the whole procedure inners !) and Prog Counter never returned. Today's second 
look at it and I realized that only 'bl lowlevel_init' have to be commented 
or undef conditionnaly. See working patch below.

In the end, I'am wondering if letting still MMU disabled and ICACHE
and DCACHE flushed could harm the rest of the U-Boot process... 

Need of an extra upgrade ?  


Mathieu Deschamps.

PS : Your english is fine for me Andrey. 

===========
--- cpu/arm920t/start.S.orig        2005-09-19 16:35:45.000000000 +0200
+++ cpu/arm920t/start.S     2005-09-20 09:09:33.000000000 +0200
@@ -156,9 +156,7 @@
         * we do sys-critical inits only at reboot,
         * not when booting from ram!
         */
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
        bl      cpu_init_crit
-#endif

 #ifndef CONFIG_SKIP_RELOCATE_UBOOT
 relocate:                              /* relocate U-Boot to RAM           */
@@ -262,9 +260,11 @@
         * find a lowlevel_init.S in your board directory.
         */
        mov     ip, lr
+
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
        bl      lowlevel_init
+#endif
        mov     lr, ip
-
        mov     pc, lr

=========

On Monday 19 September 2005 19:26, Andrey P. Vasilyev wrote:
> Hello!
>
> On Mon, Sep 19, 2005 at 07:15:27PM +0200, Mathieu Deschamps wrote:
> > Hello,
> >
> > I have upgraded U-Boot 1.1.2 to lastest 1.1.3. I still uses the boot.bin
> > program to set up the flash and the dram and such while having
> > defined SKIP_RELOCATE_UBOOT and SKIP_LOWLEVEL_INIT.
>
> I've tried similar configuration recently. My board has only a
> DataFlash, not parallel flash, and I'm forced to use RomBoot to
> initialize CPU and SDRAM.
> It works for me.
>
> I've inserted the following options into
> u-boot-1.1.3/include/configs/at91rm9200dk.h (which I'm using as a
> template for my config), and it works:
> #define CONFIG_SKIP_LOWLEVEL_INIT
> #define CONFIG_SKIP_RELOCATE_UBOOT
>
> Also I've commented "bl lowlevel_init" instruction in
> u-boot-1.1.3/cpu/arm920t/start.S because it is undefined with
> SKIP_LOWLEVEL_INIT option set, and causes linking error.
>
> > Indeed kept undefined I have seen that it breaks everything reaching
> > SoC specific lowlevel_init.S in cpu/.../start.S. Imagine reinitializing
> > flash while reading init values from it, or reinit the memory controller
> > while using it !
>
> Strange... As for me, it only breaks linking because of absence
> lowlevel_init.S in compilation with CONFIG_SKIP_LOWLEVEL_INIT set. See
> above for a solution.

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

* [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 :
  2005-09-20  8:01   ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : fixed ! but Mathieu Deschamps
@ 2005-09-20  9:36     ` Anders Larsen
  2005-10-03 16:53       ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : pending in queue patch leads to unacceptable slowdown Mathieu Deschamps
  0 siblings, 1 reply; 5+ messages in thread
From: Anders Larsen @ 2005-09-20  9:36 UTC (permalink / raw)
  To: u-boot

Mathieu Deschamps <mathieu.deschamps@com2gether.net> schreibt:
>===========
>--- cpu/arm920t/start.S.orig        2005-09-19 16:35:45.000000000 +0200
>+++ cpu/arm920t/start.S     2005-09-20 09:09:33.000000000 +0200
>@@ -156,9 +156,7 @@
>         * we do sys-critical inits only at reboot,
>         * not when booting from ram!
>         */
>-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
>        bl      cpu_init_crit
>-#endif

Calling cpu_init_crit when CONFIG_SKIP_LOWLEVEL_INIT is defined
doesn't look right and is sure to break e.g. the at91rm9200dk.
>
>@@ -262,9 +260,11 @@
>         * find a lowlevel_init.S in your board directory.
>         */
>        mov     ip, lr
>+
>+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
>        bl      lowlevel_init
>+#endif

A slightly different version (making lowlevel_init do noting
when CONFIG_SKIP_LOWLEVEL_INIT is defined) is included in my
"[PATCH 1/5] CSB637 - add KB920x support" submitted on the
2005-08-25 (pending in Wolfgang's queue).

Cheers
 Anders

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

* [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : pending in queue patch leads to unacceptable slowdown
  2005-09-20  9:36     ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : Anders Larsen
@ 2005-10-03 16:53       ` Mathieu Deschamps
  0 siblings, 0 replies; 5+ messages in thread
From: Mathieu Deschamps @ 2005-10-03 16:53 UTC (permalink / raw)
  To: u-boot

Hello,

I'd like to bring your attention on the patch submitted by Anders which is 
pending in the commit queue. On my config it leads to huge slowdown (x10 
slower)  when executing standalone codes in Uboot, whereas its ok under
Linux environnement. 

The problem is set when overriding lowlevel_init function in defining a new 
void one in $(UB-1.1.3)/board/at91rm9200zeph/at91rm9200zeph.c. Indeed, this 
was fine and prevented linker error (undef symb) but it also prevent the I/D 
cache flush and the MMU disabling from happening. 

Is this slowndown happens because of the MMU being activated or because of the 
cache being not flush ? I just can't tell. But in the opposite of Ander's 
reply, calling cpu_init_crit (without calling lowlevel_init of course) has to 
happen even when defining true CONFIG_SKIP_LOWLEVEL_INIT setup. 

Doing so, and testing it for a while it breaks nothing for me.  

In the end, my patch submission on the 20th is valid and workeable 
whether you start standalone application or not (if Linux has started ).



Mathieu Deschamps



On Tuesday 20 September 2005 11:36, you wrote:
> Mathieu Deschamps <mathieu.deschamps@com2gether.net> schreibt:
> >===========
> >--- cpu/arm920t/start.S.orig        2005-09-19 16:35:45.000000000 +0200
> >+++ cpu/arm920t/start.S     2005-09-20 09:09:33.000000000 +0200
> >@@ -156,9 +156,7 @@
> >         * we do sys-critical inits only at reboot,
> >         * not when booting from ram!
> >         */
> >-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
> >        bl      cpu_init_crit
> >-#endif
>
> Calling cpu_init_crit when CONFIG_SKIP_LOWLEVEL_INIT is defined
> doesn't look right and is sure to break e.g. the at91rm9200dk.
>
> >@@ -262,9 +260,11 @@
> >         * find a lowlevel_init.S in your board directory.
> >         */
> >        mov     ip, lr
> >+
> >+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
> >        bl      lowlevel_init
> >+#endif
>
> A slightly different version (making lowlevel_init do noting
> when CONFIG_SKIP_LOWLEVEL_INIT is defined) is included in my
> "[PATCH 1/5] CSB637 - add KB920x support" submitted on the
> 2005-08-25 (pending in Wolfgang's queue).
>
> Cheers
>  Anders

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

end of thread, other threads:[~2005-10-03 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-19 17:15 [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 Mathieu Deschamps
2005-09-19 17:26 ` Andrey P. Vasilyev
2005-09-20  8:01   ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : fixed ! but Mathieu Deschamps
2005-09-20  9:36     ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : Anders Larsen
2005-10-03 16:53       ` [U-Boot-Users] lastest 1.1.3 CONFIG_SKIP problems with arm920t on rm9200 : pending in queue patch leads to unacceptable slowdown Mathieu Deschamps

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