Subject: Re(2): 667mhz->800mhz openfireware hack
To: , <port-macppc@netbsd.org>
From: Benjamin Herrenschmidt <benh@mipsys.com>
List: port-macppc
Date: 07/12/2002 18:08:55
On Thu, Jul 11, 2002, Mark Grimes <mark@openbsd.org> wrote:

>Titanium G4 Quicksilver 2002/DVI (aka Rev D) supports a power-saving mode
>noted by the floor and ceiling of 667MHz and 800MHz.  "force-reduced-speed"
>is either 0 or 1.  MacOSX does things strangely here as I've heard reports
>prior to this hack that some users that dual boot a *BSD with OSX have
>reported that their CPU erratically flips between the two MHz's.  Sometimes
>they boot into BSD at 667, sometimes 800.  I don't know OSX very well but
>I presume the software hacks for affecting change on the OpenFirmware are
>coming from the closed source portion of the OS.
>
>Benjamin, perhaps your particular tibook does not support the power-saver
>mode.  I know Apple did not put this feature in all models, but I'd be
>surprised if at least Rev.C doesn't have it.

No, I know mine doesn't ;) But I've done those tests one a friend
rev C. And have a dump of the entire Open FIrmware of the machine,
I found no reference to the speed switch code in there, it seems to
be entirely done prior to entering OF.

Anyway, I'm still trying to figure out how to implement the dynamic
speed switch, but since I don't have the machine to directly hack
on, it's a bit difficult.

>If you can't trust what OpenFirmware tells you, what can you trust?
>The processor is reported to be running as 0x2faf0800.

Well, looking at OF code, it uses some information provided to it by
the POST code for setting those properties, it doesn't seem to actually
_use_ them, which is why just changing them seem weird. But again,
maybe the POST code itself can also read those property and set the
proper speed at boot time.

>My advice is to perform the hack and test yourself.  The compile time
>differences only slap you in the face.

I'll have some users test it, sure.

Ben.