[U-Boot-Users] [Patch] Disable icache before call the first line of kernel in do_bootelf().

Wolfgang Denk wd at denx.de
Mon Aug 13 17:50:47 CEST 2007


Dear Mike,

in message <200708131052.44472.vapier at gentoo.org> you wrote:
> 
> so using weak hooks is OK now ?  i think it'd be good to migrate all of the

It always has been OK - just nobody bothered to use it. [And I didn't
even know about it when I started working on PPCBoot.]

> ugly boote/bootm/etc... cruft to external weaks and let arches define their
> own

Yes, a few #ifdef's can be eliminated that way.

> > > int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> > > {
> > >         ulong   addr, rc;
> > >         int     rcode = 0;
> > >
> > >         if (argc < 2) {
> > >                 printf ("Usage:\n%s\n", cmdtp->usage);
> > >                 return 1;
> > >         }
> > >
> > >         addr = simple_strtoul(argv[1], NULL, 16);
> > >         printf ("## Starting application at 0x%08lX ...\n", addr);
> > >
> > >         if (icache_status()){
> > >                icache_disable();
> > >         }
> > >         if (dcache_status()) {
> > >                dcache_disable();
> > >         }
> >
> > This is not in the official tree, and it will not make it  there.  It
> > will probably not even build for many boards.
> 
> it's called pseudo code ... of course code that has "..." in it wont build > :p

The only "..." I see was in the printf() format string, where it
doesn't hurt compilation.

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
Swap read error.  You lose your mind.




More information about the U-Boot mailing list