Subject: Re: Powerbook G4 Performace
To: Michael Lorenz <macallan@netbsd.org>
From: Graham J Lee <leeg@teaching.physics.ox.ac.uk>
List: port-macppc
Date: 03/09/2006 15:48:41
--Apple-Mail-11-403364720
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
On 9 Mar 2006, at 15:34, Michael Lorenz wrote:
> Hello,
>
>> My powerbook is quite slow too: the proc does not run as the desired
>> speed: dmesg says
>>
>> cpu0: 668.73 MHz, 512KB L2 cache
>>
>> when the cpu should run twice as fast...
>
> That's - sadly - quite normal. Apple used at least two different
> ways to
> control CPU speed - by switching bus clock and by having the PMU
> manipulate the core clock frequency. I have a patch sitting around
> which
> supports the former method on my iBook G4 ( early 2004, it doesn't
> work
> on later models where the CPU runs at more than 800MHz ).
> The reason why this happens is that the firmware doesn't start up the
> CPU at full speed and NetBSD just uses what it finds.
>
> To fix this Someone(tm) will have to dig through the Darwin source,
> find
> the part that controls CPU clock via PMU and then adapt our PMU code.
As Someone(tm) who's been spending a lot of time reading Darwin
sources of late, I can tell you that starts in AppleMacRISC2PE; have
a look at MacRISC2CPU.{h,cpp}; then have a look at iokit/Kernel/
IOPMrootDomain.cpp in xnu.
As Someone(tm) who doesn't really know NetBSD I've got no idea how
you'd implement that (nor indeed whether the Darwin sources
completely specify the appropriate code, I believe they do though).
Cheers,
Graham.
--
Graham Lee GPG Key ID: 01D5B9D8
UNIX Systems Manager,
Oxford Physics Practical Course
http://users.ox.ac.uk/~wadh1342 01865 273450
--Apple-Mail-11-403364720
Content-Transfer-Encoding: base64
Content-Type: application/pkcs7-signature;
name=smime.p7s
Content-Disposition: attachment;
filename=smime.p7s
MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGPTCCAvYw
ggJfoAMCAQICEEFDEYfn8afL7eydDm4zq6swDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCWkEx
JTAjBgNVB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