[U-Boot] [PATCH] powerpc: do not fixup NULL ptrs

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Nov 4 11:47:32 CET 2010


Wolfgang Denk <wd at denx.de> wrote on 2010/11/04 10:57:42:
>
> Dear Joakim Tjernlund,
>
> In message <OF5324EC0A.37C044B2-ONC12577D1.0031F002-C12577D1.00326E3D at transmode.se> you wrote:
> >
> > > 4 nops after _start does the trick, i.e. the board is up and running fine.
> ...
> > How is this going? If nothing else I think you should send
> > a patch for 83xx, adding the 4 nop's as your(and mine) board is
> > broken otherwise. Freescale guys seems busy with other things so
> > I think this is the best thing to do.
>
> I don't like the idea of adding such code without any understanding
> why it would be needed for some boards, while it is not needed for
> others.

Sure, but until freescale or someone else with eq. and motivation
researches it, we are stuck. I am not sure anyone else has tried
83xx based boards yet. If someone has please report. Also
include weather booted from NAND or NOR, CPU type(e300cX) and
what reset vector is used.

>
> Is it really needed at _start?  Or can these NOPs be anywhere, and are
> just needed to adjust some alignment?

no, the nops has to be directly after _start:
	. = EXC_OFF_SYS_RESET

	.globl	_start
_start: /* time t 0 */
	nop
	nop
	nop
	nop

My theory is that e300c2(no FPU) CPUs configured for low
boot vector, 0x100, really uses 0x110 instead.

>
> When building for example for the MPC8315ERDB board, I see this
> strange alignment here:
>
>    -> grep _start_of_vectors System.map
>    fe0001a8 T _start_of_vectors
>
> Adding 4 NOPs will move this nicely to the next exception vector
> address at 0x200.

ehh no. It will just move _start_of_vectors 16 bytes as
start_of_vectors doesn't have any alignment.

>
> Eventually this is an alignment problem (but then, the
> "STD_EXCEPTION(0x200, ...)" is supposed to align the respective code
> to 0x200, and indeed we see
>
>    fe0001a8 T _start_of_vectors
>    fe000200 t MachineCheck
>    fe000300 t DataStorage
>    fe000400 t InstStorage
>    ...
>
> Given the fact that _start_of_vectors is not used anywhere in the 83xx
> code, all this is a pretty big mystery to me.

It is probably some leftover. Either remove is for all ppc's. It only
seems to be used by mpc85xx and ppc4xx so the majority doesn't use it.



More information about the U-Boot mailing list