[OpenBIOS] [RFC v2] ppc: SDR1 fixes
Andreas Färber
andreas.faerber at web.de
Sun Nov 21 01:24:08 CET 2010
Am 21.11.2010 um 01:10 schrieb Segher Boessenkool:
>> Signed-off-by: Andreas Färber <andreas.faerber at web.de>
>
> Acked-by: Segher Boessenkool <segher at kernel.crashing.org>
>
> But one change please...
>
>> +#ifdef __powerpc64__
>> + return 1UL << (sdr1 & 0x1f);
>> +#else
>> + return (((sdr1 & 0x1ff) << 10) | 0x3ff) + 1;
>> +#endif
>
> ((sdr1 & 0x1ff) + 1) << 10
>
> looks a bit less silly :-)
>
> I'm not sure you got the size calculations right, but let's assume
> you tested it :-)
I'm not sure either, since my testing - as stated - breaks ppc.
Haven't debugged into ppc64 yet.
I was hoping someone spots an obvious error, because if my code were
correct it would mean a bug hidden somewhere in QEMU... :-/
Andreas
More information about the OpenBIOS
mailing list