[PATCH 02/19] bootwrapper: Set -msoft-float and assembler target options.

Paul Mackerras paulus at samba.org
Tue Mar 13 13:53:09 EST 2007


Scott Wood writes:

> The bootwrapper should be built with the same target options as the
> kernel.  In particular, -msoft-float and the assembler target need to be
> set.

I don't like this patch as it stands because I want to keep the
wrapper independent from the kernel config as far as possible.
We need to compile up the wrapper code in a manner that means that it
can run on any processor, so clearly we need -msoft-float.

> Without the assembler target option, the assembler will use the old
> dedicated mftb/mftbu instructions, rather than mfspr.  This causes the
> boot to hang on e500, which doesn't have the dedicated instructions.

I see mftb being used for udelay in util.S, and udelay being used in
serial_edit_cmdline in serial.c.  It's somewhat bogus that we just
hard-code an assumed timebase frequency in util.S, and also bogus that
we get command line editing for serial consoles but not for OF
consoles (why should they be different?).

It looks to me like we should at least make the platform code provide
udelay (or mdelay), possibly with the aid of a helper function.  We
should also consider whether the command-line editing is generally
useful, or not, and whether the function to do it should be made more
generic.

Paul.



More information about the Linuxppc-dev mailing list