Subject: Re: Boot, cpu, testing
To: Loic Hoguin <essen@dev-extend.eu>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 03/15/2007 18:21:59
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Mar 15, 2007, at 16:37, Loic Hoguin wrote:

> OK I'm going to install the last build on my iBook G4 (the one without
> BlueTooth). I already try a few times some weeks ago and I have a few
> questions before beginning:
>
> - I read on the mailing lists here[1][2] some interesting things about
>   booting NetBSD directly ; but since I wasn't here at the time I may
>   not fully understand what they're trying to accomplish. So here's my
>   question: can NetBSD boot from an iBook G4 with OFW3 without having
>   to type boot in OFW?

Maybe, maybe not. I never tried it but newer OF has a tendency to omit 
initializing the console when booting without user intervention. There 
are tricks to get around that though.

> - Last time I installed it NetBSD reported a 600 Mhz CPU (it is a
>   1.2 Ghz actually). I think OFW don't report the correct values,
>   but is there a way to change the frequency after boot?

It's the other way around - NetBSD actually measures CPU speed and 
reports what it finds without looking at OF ( which will very likely 
report 1.2GHz ). There are several ways Apple used to switch CPU speed, 
I have a patch to support one of them ( so I can switch my 800MHz iBook 
G4 between 600 and 800MHz ) - this may or may not work on yours. I'll 
clean it up and commit.

> - Do you want to test something on this machine? (I already know I
>   have to test radeonfb). The details of the machine are below.

Please mail me the output of dmesg and ofctl -p - I need to verify a 
few things, namely ADB attachment and CPU speed control.

> Plus, I may help trying to fix or improve things. Is there a place 
> where I can see what needs to be done?

hmm, in no particular order ( all -current ):
- - please check if the pmu, nadb, adbkbd etc. drivers do the right thing
- - does backlight control via wsconsctl work correctly?
- - what kind of thermal monitor / fan controller does your iBook use? 
Usually there's a 'fan' node hanging on one of the i2c buses, the 
'compatible' property should give a hint what kind of chip it is. If 
it's unsupported you may want to dig for a datasheet and write a driver 
( easy enough - see src/sys/dev/i2c/adt7647.c and adm1030.c for 
examples )
What we're really lacking is decent power management support though.
Another thing would be to find out how your iBook switches CPU speed. 
Mine uses two gpios on mac-io for this - one switches the bus clock, 
another one the core voltage. Both are easily identified by their 
names.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRfnHB8pnzkX8Yg2nAQI8DwgAuEJ9sIGadEth05nVsDrrl3wr7S/L1slA
ZVr/m9HLOxeEb+bdSW6J4kKOt1dPDLbYzyP4pySuGu7v5hy0kM7+PAMnF6Njvpk3
BQUe65KswkQlvtj/Fc/QbQM9DOiJ1v23IH9gvWUEOdC8tES0NMpjfVLtM3mzhqQ8
IJVTfbp6uPQxlinpgvZaD3IWyg+SiWFwVkk1eBeKBeJeE7QtUhS5aYSi2+bx1DnV
hg4BMgH/gU+LLsKea7/pLtTojngCjaWQIRVUWocr2aHDwH85xwwJ05o7VklxEAJc
wWw0cVL3Rp2afp+V3g7dYbxJzZbenU5E9Cs7XwfQsbV/Cthb5FJs0Q==
=20dV
-----END PGP SIGNATURE-----