Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
A little more G5 support
Hello,
I did some more hackery, the POWERMAC_G5_11_2 should be somewhat more useful now.
The bad news - svwsata still doesn't work right. For some reason the
interrupt never gets deasserted so the CPU spends most of its time
spinning in interrupts, that's why it's still commented out. It doesn't
seem to be the interrupt code itself, since other devices on the same
bus Just Work(tm).
The good news:
- most hardware sensors are now supported and the smu driver knows how
to control fans based on their readings. No more 747 takeoff sound.
- in order to do that I made the uni_n, ki2c, obio etc. drivers work on
G5, fiddled with a bunch of drivers in devs/i2c/ and added support
for direct config based on OpenFirmware to all macppc-specific
i2c-controllers
Here's what dmesg looks like on mine, with some debug goop left in:
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
2017 The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 8.99.3 (GLENDEVERON) #118: Sun Oct 1 01:00:34 EDT 2017
ml@blackbush:/stuff/build/obj/sys/arch/macppc/compile/GLENDEVERON
total memory = 2048 MB
oea_startup: failed to allocate DEAD ZONE: error=12
avail memory = 1960 MB
timecounter: Timecounters tick every 10.000 msec
found U3/U4 HT PIC at f8040000
dev e1517890 nirq 85 pos 00000090
devreg 0053106b
OpenPIC Version 1.2: Supports 4 CPUs and 124 interrupt sources.
bootpath:
mainbus0 (root)
cpu0 at mainbus0: 970MP (Revision 1.1), ID 0 (primary)
cpu0: HID0 0x913081<DOZE,DPM,NHR,TBCTRL,EXTBEN,ENATTN> 0x80000000<EMCP>, powersave: 1
cpu1 at mainbus0: ID 1
cpu1: processor off-line; multiprocessor support not present in kernel
memory0 at mainbus0: len=1024
spdmem0 at memory0
spdmem0: DDR2 SDRAM, no parity or ECC, 1GB, 667MHz (PC2-5300)
spdmem0: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem0: tAA-tRCD-tRP-tRAS: 5-5-5-15
spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem1 at memory0
spdmem1: DDR2 SDRAM, no parity or ECC, 1GB, 667MHz (PC2-5300)
spdmem1: 14 rows, 10 cols, 2 ranks, 4 banks/chip, 3.00ns cycle time
spdmem1: tAA-tRCD-tRP-tRAS: 5-5-5-15
spdmem1: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem2 at memory0
spdmem2: DDR2 SDRAM, no parity or ECC, 1GB, 667MHz (PC2-5300)
spdmem2: 14 rows, 10 cols, 1 ranks, 8 banks/chip, 3.00ns cycle time
spdmem2: tAA-tRCD-tRP-tRAS: 5-5-5-15
spdmem2: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
spdmem3 at memory0
spdmem3: DDR2 SDRAM, no parity or ECC, 1GB, 667MHz (PC2-5300)
spdmem3: 14 rows, 10 cols, 1 ranks, 8 banks/chip, 3.00ns cycle time
spdmem3: tAA-tRCD-tRP-tRAS: 5-5-5-15
spdmem3: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
uni_n0 at mainbus0 address 0x00000000
ki2c0 at uni_n0 address 0xf8001000
iic0 at ki2c0: I2C bus
lmtemp0 at iic0 addr 0x4a: temp-monitor LM75 Temperature Sensor
temp-monitor at iic0 addr 0x4b not configured
admtemp0 at iic0 addr 0x4c: MAX6690 temperature sensor: id. 0x4d, rev. 0x09
admtemp1 at iic0 addr 0x4e: MAX6690 temperature sensor: id. 0x4d, rev. 0x09
dart at uni_n0 address 0xf8033000 not configured
mpic at uni_n0 address 0xf8040000 not configured
uninorth0 at mainbus0
pci0 at uninorth0 bus 10
pci0: i/o space, memory space enabled
genfb0 at pci0 dev 0 function 0: vendor 1002 product 7240 (rev. 0x00)
genfb0: framebuffer at 0x98008000, size 1920x1080, depth 8, stride 2048
wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation)
wsmux1: connecting to wsdisplay0
drm at genfb0 not configured
ibmcpc0 at mainbus0
Mapping in config space @ pa 0xf2000000, size: 0x02800000
pci1 at ibmcpc0 bus 4
pci1: i/o space, memory space enabled
pci2 at ibmcpc0 bus 5
pci2: i/o space, memory space enabled
bge0 at pci2 dev 4 function 0: Broadcom BCM5780 Gigabit Ethernet
level
u3_ht_establish_irq: setting IRQ 66 3 to priority 5 80850042
bge0: interrupting at irq 66
bge0: HW config 00000015, 00000015, 00000000, 00000000 00000000
bge0: ASIC BCM5714 B3 (0x8003), Ethernet address 00:14:51:63:47:77
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5780 1000BASE-T/X media interface, rev. 0
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge1 at pci2 dev 4 function 1: Broadcom BCM5780 Gigabit Ethernet
level
u3_ht_establish_irq: setting IRQ 67 3 to priority 5 80850043
bge1: interrupting at irq 67
bge1: NVRAM lock timedout!
bge1: HW config 00000014, 00000014, 00000000, 00000000 00000000
bge1: ASIC BCM5714 B3 (0x8003), Ethernet address 00:14:51:63:47:78
bge1: setting short Tx thresholds
brgphy1 at bge1 phy 1: BCM5780 1000BASE-T/X media interface, rev. 0
brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
pci3 at ibmcpc0 bus 6
pci3: i/o space, memory space enabled
pci4 at ibmcpc0 bus 7
pci4: i/o space, memory space enabled
pci5 at ibmcpc0 bus 8
pci5: i/o space, memory space enabled
pci6 at ibmcpc0 bus 9
pci6: i/o space, memory space enabled
pci7 at ibmcpc0 bus 2
pci7: i/o space, memory space enabled
vendor 106b product 0051 (ethernet network) at pci7 dev 15 function 0 not configured
pci8 at ibmcpc0 bus 1
pci8: i/o space, memory space enabled
obio0 at pci8 dev 7 function 0: addr 0x80000000
zsc0 at obio0 irq 23,24
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
u3_ht_establish_irq: setting IRQ 23 2 to priority 5 80850017
u3_ht_establish_irq: setting IRQ 24 2 to priority 5 80850018
ki2c1 at obio0
iic1 at ki2c1: I2C bus
deq0 at iic1 addr 0x46 Audio Codec (pcm3052)
deq1 at iic1 addr 0x12 Audio Codec (cs8416)
i2s at obio0 offset 0x0 not configured
ohci0 at pci8 dev 11 function 0: vendor 1033 product 0035 (rev. 0x43)
level
u3_ht_establish_irq: setting IRQ 70 3 to priority 5 80850046
ohci0: interrupting at irq 70
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
ohci1 at pci8 dev 11 function 1: vendor 1033 product 0035 (rev. 0x43)
level
u3_ht_establish_irq: setting IRQ 70 3 to priority 5 80850046
ohci1: interrupting at irq 70
ohci1: OHCI version 1.0
usb1 at ohci1: USB revision 1.0
ehci0 at pci8 dev 11 function 2: vendor 1033 product 00e0 (rev. 0x04)
level
u3_ht_establish_irq: setting IRQ 70 3 to priority 5 80850046
ehci0: interrupting at irq 70
ehci0: EHCI version 1.0
ehci0: 2 companion controllers, 3 ports each: ohci0 ohci1
usb2 at ehci0: USB revision 2.0
pci9 at ibmcpc0 bus 3
pci9: i/o space, memory space enabled
vendor 1166 product 0240 (IDE mass storage, interface 0x8f) at pci9 dev 12 function 0 not configured
wdc0 at pci9 dev 13 function 0: interrupting at irq 38
level
u3_ht_establish_irq: setting IRQ 38 3 to priority 5 80850026
atabus0 at wdc0 channel 0
vendor 106b product 0052 (IEEE1394 serial bus, OpenHCI) at pci9 dev 14 function 0 not configured
smu0 at mainbus0 mbox 0x860c gpio 0x62 irq 53u3_ht_establish_irq: setting IRQ 53 2 to priority 5 80850035
smuiic0 at smu0
iic2 at smuiic0: I2C bus
smusat0 at smuiic0
system-clock at smuiic0 address 0xd4 not configured
smuiic1 at smu0
iic3 at smuiic1: I2C bus
using 4 fans for CPU zone
using 1 fans for drive bay zone
using 2 fans for expansion slots zone
vmmask 7f000000 schedmask 7f000000 highmask 7f000000
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "mftb" frequency 33333333 Hz quality 100
uhub0 at usb0: vendor 1033 (0x1033) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
uhub1 at usb1: vendor 1033 (0x1033) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2 at usb2: vendor 1033 (0x1033) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
uhub2: 5 ports with 5 removable, self powered
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-ST DVD-RW GWA-4165B, 76DB8EB84B89, C006> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
cd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66) (using DMA)
ehci0: handing over full speed device on port 1 to ohci0
WARNING: 10 errors while detecting hardware; check system log.
boot device: cpu0
root on bge0
nfs_boot: trying DHCP/BOOTP
uhub3 at uhub0 port 1: Mitsumi Electric (0x5ac) Hub in Apple Extended USB Keyboard (0x1003), class 9/0, rev 1.10/4.10, addr 2
uhub3: 3 ports with 2 removable, bus powered
uhidev0 at uhub3 port 3 configuration 1 interface 0
uhidev0: Mitsumi Electric (0x5ac) Apple Extended USB Keyboard (0x20b), rev 1.10/4.10, addr 3, iclass 3/1
ukbd0 at uhidev0: 8 Variable keys, 6 Array codes
nfs_boot: DHCP next-server: 192.168.0.44
nfs_boot: my_name=glendeveron
nfs_boot: my_addr=192.168.0.24
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=192.168.0.1
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub3 port 3 configuration 1 interface 1
uhidev1: Mitsumi Electric (0x5ac) Apple Extended USB Keyboard (0x20b), rev 1.10/4.10, addr 3, iclass 3/0
uhidev1: 3 report ids
uhid0 at uhidev1 reportid 2: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 3: input=3, output=0, feature=0
uhidev2 at uhub3 port 1 configuration 1 interface 0
uhidev2: Logitech (0x46d) Trackball (0xc404), rev 1.10/2.20, addr 4, iclass 3/1
ums0 at uhidev2: 3 buttons and Z dir
wsmouse0 at ums0 mux 0
root on branca:/stuff/roots/macppc
kern.module.path=/stand/macppc/8.99.3/modules
sockaddr_getsize_by_family: Unhandled address family=0
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
envstat output:
Current CritMax WarnMax WarnMin CritMin Unit
[admtemp0]
BACKSIDE: 43.000 85.000 10.000 degC
KODIAK DIODE: 56.000 85.250 10.000 degC
[admtemp1]
TUNNEL: 39.000 85.000 10.000 degC
TUNNEL HEATSINK: 33.625 85.250 10.000 degC
[lmtemp0]
DRIVE BAY: 31.500 80.000 degC
[smu0]
DRIVE BAY A INTAKE: 999 RPM
BACKSIDE: 1251 RPM
CPU A INTAKE: 729 RPM
CPU B INTAKE: 729 RPM
CPU A EXHAUST: 743 RPM
CPU B EXHAUST: 743 RPM
EXPANSION SLOTS INTAKE: 1795 RPM
[smusat0]
CPU A0 VCORE: 0.001 V
CPU A1 VCORE: 0.001 V
CPU A0 DIODE TEMP: 44.000 degC
CPU A1 DIODE TEMP: 48.000 degC
CPU A0 CORE CURRENT: 0.013 A
CPU A1 CORE CURRENT: 0.020 A
CPU A0 CURR: 0.175 A
CPU A0 VOLTS: 0.000 V
CPU A0 TEMP: 700.000 degC
CPU A1 TEMP: 782.000 degC
CPU A1 CURR: 0.004 A
CPU A1 VOLTS: 0.009 V
CPU A1 CORE REF: 0.000 V
CPU A0 CORE REF: 0.000 V
Most values from smusat0 look bogus but the diode temperatures seem
right, so we're using them to control the CPU fans for now.
My next step will be CPU speed control - I strongly suspect that OF
hands us the processors at half speed, which explains the relatively
low die temperatures.
The assignment of sensors to fans is mostly guesswork, and so are the
temperature ranges and thresholds. Limits in the sensor chips are what
OF put there. I also suspect that at least some of the alarm outputs
are hooked to gpios on obio. For now the smu just checks a bunch of
sensors every 30 seconds and adjusts fan speeds accordingly. Could be
more efficient but for now it works, at least on my machine.
So, if you have a PCIe G5 please try a POWERMAC_G5_11_2 kernel and
report success/failure. If you have different G5 model ( or a PCIe
variant that's not a PowerMac11,2 ) and you can get it to boot please
send me the ofctl -p output.
If you have any information on where the different sensors are actually
located please tell me, so I can adjust if needed. For example, I'm not
sure the TUNNEL thing is actually the CPU cooler. And I have no idea
what the KODIAK DIODE is supposed to be or where it's located. It sure
seems to be the hottest location in my G5. All sensor names are taken
verbatim from OpenFirmware.
SMP support shouldn't be too hard - IPIs are handled by another OpenPIC
variant. But I want to get one core to run cool, quiet and at full
speed before messing with that.
X kinda works with the wsfb driver. Colours are all wrong because for
some reason the OF calls for colour map control don't work. Mine's got
a Radeon X1950, which the radeon driver of course supports, but for
some reason expects to find an x86 BIOS ROM with, which of course
doesn't exist on a mac. May or may not be easy to fix.
have fun
Michael
Home |
Main Index |
Thread Index |
Old Index