From owner-freebsd-ppc@FreeBSD.ORG Tue Oct 2 20:56:38 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35D8F106564A for ; Tue, 2 Oct 2012 20:56:38 +0000 (UTC) (envelope-from mrezny@hexaneinc.com) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx1.freebsd.org (Postfix) with ESMTP id 93FF78FC0C for ; Tue, 2 Oct 2012 20:56:36 +0000 (UTC) X-Originating-IP: 217.70.178.133 Received: from mfilter3-d.gandi.net (mfilter3-d.gandi.net [217.70.178.133]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 9156AA80AD for ; Tue, 2 Oct 2012 22:56:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter3-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter3-d.gandi.net (mfilter3-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id eQYAS-GwxMBh for ; Tue, 2 Oct 2012 22:56:18 +0200 (CEST) X-Originating-IP: 89.24.3.97 Received: from 97-3.gprs.tmcz.cz (97-3.gprs.tmcz.cz [89.24.3.97]) (Authenticated sender: mrezny@hexaneinc.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5B15EA8076 for ; Tue, 2 Oct 2012 22:56:18 +0200 (CEST) From: Matthew Rezny Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Tue, 2 Oct 2012 22:56:16 +0200 Message-Id: <043DCE91-69E9-4E02-9DE3-54326327879F@hexaneinc.com> To: freebsd-ppc@freebsd.org Mime-Version: 1.0 (Apple Message framework v1085) X-Mailer: Apple Mail (2.1085) Subject: FreeBSD9 running CPUs slow on PowerMac7,2 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 20:56:38 -0000 I have a first revision PowerMac G5 dual 2.0GHz. For some reason, it = boots up at 1.3Ghz under FreeBSD and I can't figure out why. Suggestions = are welcome. dmesg is included at the end of this message. I have had this machine since it was new, running OS X most of its life. = Early last year, I tested some ppc64 snapshot ISOs that Nathan helpfully = shared. It initially crashed on boot, but later versions improved and = eventually I installed some version of FreeBSD8 onto a spare disk. I was = loosely following 8-STABLE, recompiling about once a month to see what = the progress was. Early versions did not recognize all the memory or = some PCI cards, but later builds had all the essentially required and I = started to see sensor support, though fan control wasn't there yet. I = was not going further than testing with this machine at that time = because I couldn't get X.org to work so it wasn't much of a desktop. Eventually, I retired this machine from regular service and, after a = some months sitting off, had the time to try dedicating it to running = FreeBSD. Unfortunately, when I returned to it I found the spare disk I = had used was throwing SMART errors, so I started fresh. While replacing = the disk, I took the opportunity to tear down the machine and clean all = the years of dust out of the crevices, and also lubricate all the fan = bearings which meant I pulled the motherboard to get to the PSU. If I = swapped CPUs around I could have created a slight problem for myself, = but I was careful to put everything back exactly. I tried to boot the FreeBSD 9.0 Release PPC64 CD, and quickly found it = doesn't work using the C key but runs fine from OpenFirmware prompt. It = got about one screen of text past the copyright and then a panic that = keeps scrolling by. I found a post on the mailing list a couple months = ago from someone with the same generation hardware stating he got the = same crash unless all PCI cards were removed. Using the 9.1-RC1 CD = worked for him, so I tried it and found it works for me to. I went ahead = and did an install but noticed something odd in the dmesg on the next = reboot; CPU speed is shown as 1304Mhz instead of 2000MHz. I am certain = that when I was running 8-STABLE the CPU speed was shown as 2000MHz on = boot, but unfortunately I don't have any logs to confirm since that disk = is dead. I considered the possibility I messed up something on the motherboard, = maybe bumped the battery and cleared the settings. I know the = motherboard will runs the CPUs at a lowered speed if something is wrong, = and 1.3Ghz is the low speed point for a 2.0Ghz machine. However, booting = a OS X install DVD (tried both 10.4 and 10.5 at varies points) shows the = system running 2.0GHz in System Profiler. I ran Apple Hardware Test, = both normal and extended tests, off the original DVD and it found no = problems. I booted up Apple Service Diagnostic 2.5.8 (newest for the = machine) and ran through the full battery of tests with no errors. I = went to the Thermal Calibration in ASD (necessary when CPUs are = replaced/swapped) and it said calibration was NOT needed, but I told it = to run anyway. After all that, same result, FreeBSD 9.1-RC1 boots at = 1.3GHz. As one final check, I booted Yellow Dog Linux 5.0.2 (ancient, = but had it on DVD) and that shows 2000MHz CPU speed when booting. Also, = OpenFirmware says 2000MHz, AHT says 2000MHZ, ASD says low-point is = 1300Mhz, high-point 2000MHz, max 2000MHz. I saw recent mention on mailing list about PowerBook booting at half = speed and solution was to adjust the sysctl dev.cpu.0.freq, but that is = for a G4. I looked but I don't have any dev.cpu.X.freq sysctls. I = checked the cpufreq module to see the methods for G4 and G5 are = different, and for G5 it only attaches if the CPU found is 970FX, 970MP = or 970GX, not plain PPC970. I modified sys/powerpc/cpufreq/pcr.c to try = attaching on plain 970, but of course it fails and I still don't get the = sysctl. So, how is FreeBSD9 knocking the CPUs down to the low set-point when it = boots and how do I fix this? I'm at a loss. Before sending this message, = I checked out 9-STABLE and built a fresh GENERIC64 kernel but behavior = is the same. I touched the hardware same time I changed the software, = but I've done all I can think of to confirm the hardware is proper so = that leaves me to conclude something must have changed somewhere between = 8 and 9, but I've no idea what and when. The following dmesg is from the = fresh built kernel, but I got exactly the same with stock 9.1-RC1 = kernel. Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.1-PRERELEASE #1: Tue Oct 2 21:14:01 CEST 2012 root@juggernaut:/usr/obj/usr/src/sys/GENERIC64 powerpc cpu0: IBM PowerPC 970 revision 2.2, 1304.53 MHz cpu0: Features dc000000 cpu0: HID0 511081 real memory =3D 8572198912 (8175 MB) avail memory =3D 8122523648 (7746 MB) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0: dev=3Dff887e10 (BSP) cpu1: dev=3Dff889150 kbd0 at kbdmux0 nexus0: cpulist0: on nexus0 cpu0: on cpulist0 cpu1: on cpulist0 powermac_nvram0: on nexus0 powermac_nvram0: bank0 generation 768, bank1 generation 767 unin0: on nexus0 unin0: Version 179 iichb0: mem 0xf8001000-0xf8001fff irq 42 on = unin0 iicbus0: on iichb0 iicbus0: at addr 0xca ds17750: at addr 0x94 on iicbus0 max66900: at addr 0x98 on iicbus0 max66901: at addr 0x9c on iicbus0 iicbus0: at addr 0xd2 fcu0: at addr 0x15e on iicbus0 iicbus0: at addr 0x30 ad74170: at addr 0x58 on iicbus0 ad74170: 5 sensors detected. iicbus0: at addr 0xa0 iicbus0: at addr 0x32 ad74171: at addr 0x5a on iicbus0 ad74171: 5 sensors detected. iicbus0: at addr 0xa2 iicbus0: at addr 0x1c0 htpic0: mem 0xf8040000-0xf807ffff irq 184 = on unin0 pcib0: on nexus0 pci0: on pcib0 vgapci0: port 0x400-0x4ff mem = 0xc0000000-0xcfffffff,0xb0000000-0xb000ffff irq 176 at device 16.0 on = pci0 agp0: on hostb0 pcib1: on nexus0 pcib1: 4 HT IRQs on device 1.0 pcib1: 4 HT IRQs on device 2.0 pcib1: 86 HT IRQs on device 3.0 pci1: on pcib1 pcib2: at device 1.0 on pci1 pci2: on pcib2 bge0: mem = 0x90020000-0x9002ffff irq 180 at device 2.0 on pci2 bge0: enabling MBOX workaround for AMD-8131 PCI-X Bridge bge0: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI-X 100 MHz miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, = 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow bge0: Ethernet address: 00:10:18:01:a1:49 bge1: mem = 0x90010000-0x9001ffff irq 181 at device 3.0 on pci2 bge1: enabling MBOX workaround for AMD-8131 PCI-X Bridge bge1: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI-X 100 MHz miibus1: on bge1 brgphy1: PHY 1 on miibus1 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, = 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow bge1: Ethernet address: 00:10:18:0b:be:dd pcib3: at device 2.0 on pci1 pci3: on pcib3 mpt0: mem = 0xa0000000-0xa0003fff,0xa0010000-0xa001ffff irq 182 at device 4.0 on = pci3 mpt0: MPI Version=3D1.5.20.0 pcib4: at device 3.0 on pci1 pci4: on pcib4 macio0: mem 0x80000000-0x8007ffff at device = 7.0 on pci4 openpic0: mem 0x40000-0x7ffff on macio0 macgpio0: mem 0x50-0x8a on macio0 scc0: mem = 0x13000-0x13fff,0x8400-0x84ff,0x8500-0x85ff,0x8600-0x86ff,0x8700-0x87ff = irq 150,133,134,151,135,136 on macio0 uart0: on scc0 uart1: on scc0 iichb1: mem 0x18000-0x18fff irq 154 on macio0 iicbus1: on iichb1 iicbus1: at addr 0x1c0 snapper0: at addr 0x6a on = iicbus1 pcm0: mem 0-0xfff,0-0xff,0x100-0x1ff irq = 158,129,130 on macio0 macio0: failed to reserve resource 0 - 0x1000 (0x1000) for pcm0 device_attach: pcm0 attach returned 6 pmu0: mem 0x16000-0x17fff irq 153 on macio0 ohci0: mem 0x80081000-0x80081fff irq 155 = at device 8.0 on pci4 usbus0 on ohci0 ohci1: mem 0x80080000-0x80080fff irq 156 = at device 9.0 on pci4 usbus1 on ohci1 pcib5: at device 4.0 on pci1 pci5: on pcib5 ohci2: mem 0x80102000-0x80102fff irq 191 = at device 11.0 on pci5 usbus2 on ohci2 ohci3: mem 0x80101000-0x80101fff irq 191 = at device 11.1 on pci5 usbus3 on ohci3 ehci0: mem 0x80100000-0x801000ff irq = 191 at device 11.2 on pci5 usbus4: EHCI version 1.0 usbus4 on ehci0 pcib6: at device 5.0 on pci1 pci6: on pcib6 ata0: mem 0x80204000-0x80207fff irq 167 at = device 13.0 on pci6 fwohci0: <1394 Open Host Controller Interface> mem 0x80200000-0x80200fff = irq 168 at device 14.0 on pci6 fwohci0: OHCI version 1.0 (ROM=3D0) fwohci0: No. of Isochronous channels is 8. fwohci0: EUI64 00:0a:95:ff:fe:a6:ed:76 fwohci0: invalid speed 7 (fixed to 3). fwohci0: Phy 1394a available S800, 3 ports. fwohci0: Link S800, max_rec 4096 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:0a:95:a6:ed:76 fwe0: Ethernet address: 02:0a:95:a6:ed:76 sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: fwohci_intr_core: BUS reset fwohci0: fwohci_intr_core: node_id=3D0x00000000, SelfID Count=3D2, = CYCLEMASTER mode pcib7: at device 6.0 on pci1 pci7: on pcib7 gem0: mem 0x80400000-0x805fffff irq 169 at = device 15.0 on pci7 miibus2: on gem0 brgphy2: PHY 1 on miibus2 brgphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, = 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow gem0: 10kB RX FIFO, 4kB TX FIFO gem0: Ethernet address: 00:0a:95:a6:ed:76 pcib8: at device 7.0 on pci1 pci8: on pcib8 atapci0: mem 0x80600000-0x80601fff = irq 128 at device 12.0 on pci8 pcib1: failed to reserve resource for pcib8 atapci0: 0x10 bytes of rid 0x20 res 4 failed (0, 0xffffffffffffffff). ata2: at channel 0 on atapci0 ata3: at channel 1 on atapci0 ata4: at channel 2 on atapci0 ata5: at channel 3 on atapci0 atapci1: at device 12.1 on pci8 pcib1: failed to reserve resource for pcib8 atapci1: 0x10 bytes of rid 0x20 res 4 failed (0, 0xffffffffffffffff). atapci1: unable to map interrupt device_attach: atapci1 attach returned 6 sc0: on nexus0 sc0: Unknown <16 virtual consoles, flags=3D0x300> Timecounter "timebase" frequency 33333333 Hz quality 0 Event timer "decrementer" frequency 33333333 Hz quality 1000 Timecounters tick every 1.000 msec firewire0: 1 nodes, maxhop <=3D 0 cable IRM irm(0) (me)=20 firewire0: bus manager 0=20 max66900: 2 sensors detected. max66901: 2 sensors detected. usbus0: 12Mbps Full Speed USB v1.0 usbus1: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 uhub0: on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 usbus2: 12Mbps Full Speed USB v1.0 usbus3: 12Mbps Full Speed USB v1.0 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 usbus4: 480Mbps High Speed USB v2.0 ugen4.1: at usbus4 uhub4: on usbus4 uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub2: 3 ports with 3 removable, self powered uhub3: 2 ports with 2 removable, self powered ugen0.2: at usbus0 ukbd0: = on usbus0 kbd1 at ukbd0 ums0: = on usbus0 ums0: 5 buttons and [XY] coordinates ID=3D0 uhub4: 5 ports with 5 removable, self powered fcu0: FCU initialized, RPM shift: 3 fcu0: 7 fans detected! ugen3.2: at usbus3 ukbd1: on usbus3 kbd2 at ukbd1 ums1: on usbus3 ums1: 3 buttons and [XYZ] coordinates ID=3D1 ada0 at ata2 bus 0 scbus3 target 0 lun 0 ada0: ATA-7 SATA 1.x device ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada0: 286188MB (586114704 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad0 ada1 at ata3 bus 0 scbus4 target 0 lun 0 ada1: ATA-8 SATA 2.x device ada1: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) ada1: 239372MB (490234752 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad1 cd0 at ata0 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device=20 cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: cd present [1927744 x 2048 byte records] SMP: AP CPU #1 launched Trying to mount root from ufs:/dev/ada0s3 [rw]...