[U-Boot] [PATCH 4/4] powerpc: Add LINK_OFF calls in early C-code.

Scott Wood scottwood at freescale.com
Mon Jan 10 19:24:02 CET 2011


On Sun, 9 Jan 2011 21:48:47 +0100
Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:

> Wolfgang Denk <wd at denx.de> wrote on 2011/01/09 21:29:04:
> >
> > Dear Joakim Tjernlund,
> >
> > In message <1292838435-14958-4-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> > > Only these 2 call sites depends on fixups for my mpc8321 based
> > > board.
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > > ---
> > >  arch/powerpc/cpu/mpc83xx/cpu_init.c |    2 +-
> > >  arch/powerpc/lib/board.c            |    2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > > index 7a1cae7..88d9dd8 100644
> > > --- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > > +++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
> > > @@ -507,7 +507,7 @@ int prt_83xx_rsr(void)
> > >     sep = " ";
> > >     for (i = 0; i < n; i++)
> > >        if (rsr & bits[i].mask) {
> > > -         printf("%s%s", sep, bits[i].desc);
> > > +         printf("%s%s", sep, LINK_OFF(bits[i].desc));
> > >           sep = ", ";
> > >        }
> >
> >
> > Is my understanding correct that these changes are sufficient only for
> > your board, and only for your current configuration?  And that your
> > code would break (resp. require more LINK_OFF fixups) if you would -
> > for example - decide to enable CONFIG_DISPLAY_AER_FULL in your board
> > configuration (cf. print_83xx_arb_event() above in the same source
> > file) ?
> 
> It would break only if link address != load address. That is, if you
> want to use my new CONFIG_SYS_TRUE_PIC feature and be able to load
> u-boot at any address regardless of link address you would
> have to add LINK_OFF calls into print_83xx_arb_event() too if
> you want to use it.

Doesn't this add a requirement for future generic pre-relocation code to
comply with, to avoid breaking your board?

-Scott



More information about the U-Boot mailing list