[OpenBIOS] [PATCH] More complete PowerPC OpenFirmware emulation -- adding bus-frequency

Alexander von Gluck kallisti5 at unixzen.com
Tue Aug 9 23:13:21 CEST 2011

On Tue, 9 Aug 2011 22:18:47 +0200, Andreas Färber wrote:
> Am 09.08.2011 um 11:12 schrieb Mark Cave-Ayland:
>> On 08/08/11 16:07, Alexander von Gluck wrote:
>>> Below is a quick patch to introduce the bus-frequency field for  
>>> each CPU.
>>> This exists on every Apple OpenFirmware i've seen and is expected 
>>> on
>>> Haiku OS.
>>> The change to config/scripts/switch-arch isn't required but lets
>>> you compile openbios using Haiku's PowerPC cross-compiler.
>>> Also included is a extra tracing line for troubleshooting MMU 
>>> issues.
>> This all looks sensible to me, however I'd like to leave this to  
>> either Alex or Andreas to do the final commit as they the current  PPC 
>> maintainers.
> Am a bit busy ATM and out-of-sync with qemu-devel... The [PATCH] as
> such is inacceptable to me (should've been [RFC] or a series of
> [PATCH]es) and is missing an SoB.
> The switch-arch part looked okay, and if you and Blue agree, I'd sign
> off and apply that part - Haiku uses ELF just like Linux.
> In fw_cfg.h there appeared to be some unrelated tab-to-whitespace
> changes and the init.c part surely needs matching QEMU support. Like 
> I
> said earlier, I think fw_cfg is the wrong way to go long-term for
> such  cosmetic stuff (we'd get a huge influx) but I wouldn't object 
> to
> it as  an interim solution if QEMU / Alex G. feel it's okay.
> The value is pretty meaningless on QEMU, so we should critically
> question Haiku's reliance upon it rather than blindly supplying it.

The whitespace changes just fix the white spaces of those variables 
above that don't match anything else. feel free to leave them out.

I can see your argument on blindly supporting it, Haiku checks for it 
cpu frequency and stops booting if it is missing. I could just change 
code to not require it.. but:

  * I'd rather have the information then not (even if it is just 0)
  * the parameter exists on *every* Apple openfirmware implementation
    (i've verified this on a G3 bronze powerbook, G3 iBook, G4 
QuickSilver, G5 iMac)
  * as the parameter exists on all new-world Apple systems, who knows 
what other
    operating systems this breaks compatibility with?

  -- Alex

More information about the OpenBIOS mailing list