[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: call for help: CPU clock speed on PowerBook5,6

Jochen Voss <voss@seehuhn.de> writes:
> On Sun, Mar 20, 2005 at 03:45:53PM +1030, John Steele Scott wrote:
>> There is not really any proper documentation about this stuff, but
>> the source code for Darwin is available on the Apple developer web
>> site, so you can see exactly what they do.  The package that deals
>> with this stuff used to be called AppleMacRISC2PE.
> I wanted to do so, but I found out that Apple's stuff is published
> under a license which is incompatible with the GPL.  Then I was
> worried about tainting my brain with GPL-incompatible stuff which
> would prevent me from contributing my fixes to the kernel.  Isn't this
> a problem.  If I read Apple's source, see how it works, and rephrase
> the result in my own "words" (well, code), would this be ok then?

Yeah, that should be fine, in fact there is no other way to do it, because the
coding style used in Darwin is quite different to what is used in Linux. Also
Darwin is written in ObjC.

>> A simpler way is to find the code in your open
>> firmware which knows how to change the frequency. On the iBook G4 I
>> have, this is at /cpus/PowerPC,G4@0, I have set-dfs-high,
>> set-dfs-low.
> Sorry, no such luck for me.  The command
>     find /proc/device-tree -name "*dfs*"
> finds nothing.

It doesn't show up in Linux, but if you boot into OpenFirmware you might find
it. In OpenFirmware, try "dev /cpus/PowerPC,G4@0" to change to the CPU node,
and then "words" to show you what commands are available there. If you have
set-dfs-high, you can use "see set-dfs-high" to get some idea of how it

> Do you know whether I can read the current voltage setting using
> the following call?
>     pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, voltage_gpio, 0)
> Would I expect the return value 5 or 1 for high voltage or does
> reading not work like this.  I always get 0, even after I did
>     pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 5)

I can't remember if this is supposed to work, it's possible that that GPIO is



Attachment: pgpMAQoKKp28g.pgp
Description: PGP signature

Reply to: