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

next in thread | previous in thread | raw e-mail | index | archive | help
On 03.10.12 10:33, Matthew Rezny wrote:
> 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?=false. 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.

Hm, I tried with some dell keyboards, but they all have a windows key. 
And it works to enter of with cmd/win-alt-o-f. Unfortunately I couldn't 
find a keyboard w/o windows key.
It sounds a bit strange that the invocation of the alt key doesn't let 
you select the boot drive. Did you ever reset-all in OF? Also reset the 
PMU? (there is a button on the motherboard named 'Reset PMU'). No 
changes if you try this?

> 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.

Here I can't follow, what exactly does not work with the loader?

> 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?

I tried once, but I gave up. I was looking how the linux people did 
solve the issue and there I learned that they implemented some 
functionality which parses and calls the platform functions in OF to 
adjust the CPU frequency. Effort and win where not in balance for me. 
Iow a very big effort for adjusting the CPU freq in sw. But this is my 
personal view.

You might be right with the chips you mentioned. They might be indeed 
used for controlling this kind of stuff but I do not know the fine 
details. And it could be that it is not that difficult to adjust the 
frequency this way, but as said, I didn't try. A look into the apple 
sources might enlight too?

I'm not sure but I think the cereal chip is a modem. At least its 
device_type claims 'serial'.

Andreas





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?506DE48C.60000>