[OpenBIOS] [PATCH] ppc: force target CPU
mark.cave-ayland at ilande.co.uk
Tue Dec 29 17:43:09 CET 2015
On 22/11/15 11:54, Mark Cave-Ayland wrote:
(Add Hervé to CC)
> On 21/11/15 16:00, Laurent Vivier wrote:
>> With gcc-5.2 default target is power7.
>> As openbios targets PowerMacs G3/G4/G5, force
>> gcc target to be G3 (32bit) or G5 (64bit).
>> Signed-off-by: Laurent Vivier <laurent at vivier.eu>
>> config/scripts/switch-arch | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/config/scripts/switch-arch b/config/scripts/switch-arch
>> index 38d263d..bcf807a 100755
>> --- a/config/scripts/switch-arch
>> +++ b/config/scripts/switch-arch
>> @@ -265,7 +265,7 @@ for ARCH in $arch_list; do
>> select_prefix powerpc powerpc64
>> if [ "$unix" = "no" ]; then
>> - CFLAGS="-m32 -msoft-float -fno-builtin-bcopy -fno-builtin-log2"
>> + CFLAGS="-m32 -mcpu=G3 -msoft-float -fno-builtin-bcopy -fno-builtin-log2"
>> @@ -275,7 +275,7 @@ for ARCH in $arch_list; do
>> select_prefix powerpc64
>> - CFLAGS="-Wa,-a64 -m64 -msoft-float -fno-builtin"
>> + CFLAGS="-Wa,-a64 -m64 -mcpu=G5 -msoft-float -fno-builtin"
> Great work! Andreas, I'd be much happier if you could review/commit this
> (or at least give a Reviewed-by) as this is a little bit out of my area
> of knowledge...
After some further research, there are currently 2 reasons that make me
feel we should be targeting earlier CPUs than the G3 for 32-bit OpenBIOS
builds: firstly there are some people trying to emulate PPC 604 CPUs
with QEMU/KVM which currently hangs in OpenBIOS, and secondly there has
been talk of switching over QEMU's PReP machine from OHW to OpenBIOS
To that end the minimum supported CPU for PPC needs to be 602 and so
with this in mind, I've lightly tested the attached patch which seems to
work here - Cole, does this work on your compiler setup? If so, I think
this is the option I would like to apply upstream.
Hervé, do you have a rebased version of your patchset to switch the QEMU
PReP machine over to OpenBIOS to OHW? And does it work with an OpenBIOS
compiled with these options? If so, it would be good to push for a
switch from OHW to OpenBIOS for PReP during the next QEMU dev cycle.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 872 bytes
Desc: not available
More information about the OpenBIOS