Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Oct 2012 10:33:55 +0200
From:      Matthew Rezny <mrezny@hexaneinc.com>
To:        Andreas Tobler <andreast-list@fgznet.ch>
Cc:        Justin Hibbits <chmeeedalf@gmail.com>, freebsd-ppc@freebsd.org
Subject:   Re: FreeBSD9 running CPUs slow on PowerMac7,2
Message-ID:  <B76D891F-71F7-4F4F-BD21-BF1302FEE1F2@hexaneinc.com>
In-Reply-To: <506BBE8C.5090404@fgznet.ch>
References:  <823A5C42-D1B8-49BF-BDB8-F551167AC6C0@hexaneinc.com> <20121002224117.339ac8b1@narn.knownspace> <506BBE8C.5090404@fgznet.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you very much Justin and Andreas! That would explains the problem, =
and I just tested to confirm the system boots full speed when not =
stopping at the OF prompt. Good to have this solved, though I hope to be =
able to better solve it.

When I was trying 8.x previous, the boot from CD with C worked. Once I =
had an installed system, I could choose that disk as the startup disk in =
OS X and reboot to FreeBSD temporarily. When I tried to boot the 9.0 CD, =
something was read from the disk but then then half the colors go =
inverse while it keeps flashing the missing boot folder icon. So, to get =
the CD booted I had to do so from the OF prompt. I had left it stopping =
at the prompt for now due to the difficulty in even getting to this =
point.

I don't have a Mac keyboard, nor do I have anything with a "Windows" key =
to plug into it, so armed with a stack of true 101 key keyboard, I can't =
invoke any boot time option that needs the cmd/apple key. This machine =
also has the issue that the boot selector accessed by holding alt/option =
simply does not work, never has since it was new. So, to get to an OF =
prompt, I had to boot a OS X install DVD, bring up Terminal and use =
nvram tool to set auto-boot?=3Dfalse. I was reluctant to change that =
back since it took such effort to set it in the first place, but in =
retrospect I guess I could have saved many hours of trying other things =
had I even thought to change that. Is there any way to change OD =
variable from FreeBSD as can be done under OS X with nvram command? That =
would make it easier to get the prompt back when needed as long as the =
system is still booting.

Now I'm running at full speed, 2000.20Mhz according to dmesg. It also =
seems my guess at the source of the issue is probably right, the loader =
gets something screwed up before the kernel even starts and then the =
kernel is helpless to fix it. The loader behaves different depending how =
it's invoked, and that seems like a bug worth fixing. Unfortunately, I =
know little about the loader and feel unprepared to tackle it since I =
have only one machine such machine and thus no easy way to debug things =
running from OpenFirmware. I had already looked at the loader code with =
an eye to get ZFS booting and decided I'm not ready to tackle it yet.

Having proper support in cpufreq for the SMU-less G5s would be =
beneficial in that it would allow power control as well as give a way to =
resolve this for cases where booting from the OF prompt may be =
necessary. Also, I have enough experience on other platforms with GPIO =
and I2C to feel confident messing with such things on this machine. I =
noticed there is an assortment of GPIOs with no driver attached, and =
numerous I2C devices also without drivers attached. I already made a =
list of the chips on the I2C bus with the intent to look them up later. =
The individual GPIO looks uninteresting for this going by the names =
Apple uses. I think everything interesting is sitting on I2C. All the =
monitoring chips are now supported, DS1775 and MAX6690 for temperature, =
AD7417 for voltage and current. That leaves a few other chips to look at =
and the labels Apple seems to confirm their purpose. There are two =
called i2c-hwclock, cy2213 "High Frequency Programmable PECL Clock =
Generator" and cy28508  "Power PC System Clock", which I suspect are =
controlling both CPU and bus clocks. There is a pair of pca9556s labeled =
i2c-cpu-voltage, which are basically GPIO expanders and I suspect are =
controlling CPU voltage, one per chip. There are also a pair of serial =
EEPROMs, labeled cpuid, which I think are on each CPU board and just =
contain the parameters to identify the chip to the motherboard. There's =
one more device labeled 'cereal' but I couldn't find a part number for =
the chip. Is anyone working on these?

On 3 Oct, 2012, at 6:26, Andreas Tobler wrote:

> On 03.10.12 04:41, Justin Hibbits wrote:
>> On Wed, 3 Oct 2012 01:17:08 +0200
>> Matthew Rezny <mrezny@hexaneinc.com> wrote:
>>=20
>>> Tue Oct 2 22:49:53 UTC 2012 Jason bacon wrote:
>>>> Did you try enabling powerd?  ( powerd_enable=3D"YES" in rc.conf,
>>>> "man powerd" )
>>>>=20
>>>> I had this issue with an iBook some time ago, and Nathan W. pointed
>>>> out that Macs boot at the lower CPU freq, so you have to change it
>>>> manually with sysctl or run powerd to control it automatically.
>>>=20
>>> I do have that in rc.conf, but powerd has no way to control the
>>> clockrate without cpufreq available.
>>>=20
>>> # powerd
>>> powerd: lookup freq: No such file or directory
>>>=20
>>> _______________________________________________
>>> freebsd-ppc@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
>>> To unsubscribe, send any mail to =
"freebsd-ppc-unsubscribe@freebsd.org"
>>=20
>> Andreas Tobler posted something related to this a while back on the
>> list.  His suggestion at the time was to autoboot to FreeBSD, and not
>> boot via the Open Firmware prompt.  If you're already doing that, I'm
>> clueless.
>>=20
>> The relevant link I found is
>> =
http://freebsd.1045724.n5.nabble.com/Fan-Power-controls-td4170991.html
>=20
> Justin is right here. The only option you have is autoboot to get the =
full CPU frequency.
> These machines have a complicated way to setup the full CPU frequency =
and I do not know if it is worth hacking here when one can get the value =
with autobooting.
>=20
> Here in the last section 'Booting into FreeBSD' you find how to do =
this.
>=20
> http://people.freebsd.org/~nwhitehorn/ppcinstall.txt
>=20
> Hope this helps.
> Andreas
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B76D891F-71F7-4F4F-BD21-BF1302FEE1F2>