Subject: Apple Xserve support
To: None <port-macppc@netbsd.org>
From: Matt Thomas <matt@3am-software.com>
List: port-macppc
Date: 07/09/2002 22:14:53
Well, I got the Xserve to boot NetBSD/macppc -current today.
I had to tweak a few things (to match a GMAC id, make brgphy.c
match the BCM5421 phy id), and new PCI device names, etc.

But it wasn't that difficult.  The system is now booting off the
local disk straight into NetBSD.  I still have no idea what the
unconfigured Ethernet is but it's not in OFW.  One issue is that
even pciide is report the drive is using DMA, doing a dd only gets
a little of 6MB/s and spends all of its time in system during the
dd.

Even with that it is quite fast.  Building a kernel on it took
3m47s compared to 5m33s on a QuickSilver 733 (no L3 cache).  I'm
hoping the DDR RAM really helps with performance.

I've appended a dmesg and a dump of the OFW tree and some interesting
nodes.

NetBSD 1.6D (GENERIC) #2: Wed Jul 10 00:06:24 UTC 2002
     mthomas@muck1:/u1/obj/sys/arch/macppc/compile/GENERIC
total memory = 1792 MB
avail memory = 1637 MB
using 3072 buffers containing 91852 KB of memory
mainbus0 (root)
cpu0 at mainbus0: 7455 (Revision 2.1), ID 0 (primary)
cpu0: HID0 8450c0bc<EMCP,TBEN,NAP,DPM,ICE,DCE,SGE,BTIC,LRSTK,FOLD,BHT>
cpu0: 1000.00 MHz
cpu0: 256KB L2 cache, 2MB L3 backside cache
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Bridge (rev. 0x00)
Apple Computer product 0x1645 (ethernet network, revision 0x15) at pci0 dev 
16 function 0 not configured
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
ppb0 at pci1 dev 13 function 0: Intel product 0xb154 (rev. 0x00)
pci2 at ppb0 bus 1
pci2: i/o space, memory space enabled
obio0 at pci2 dev 7 function 0: addr 0x80000000
zsc0 at obio0 offset 0x13000: irq 22,23
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
i2s at obio0 offset 0x10000 not configured
adb0 at obio0 offset 0x16000 irq 47: pm_adb_op: timeout. command = 0x0
0 targets
aed0 at adb0 addr 0: ADB Event device
apm0 at adb0: battery flags 0x1, 0% charged
wdc0 at obio0 offset 0x1f000 irq 19: DMA transfer
atapibus0 at wdc0 channel 0: 2 targets
cd0 at atapibus0 drive 0: <LG CD-ROM CRN-8245B, , AHT9> type 5 cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
ata4 conf[0] = 0x10919465, cyc = 4 (60 ns), act = 8 (120 ns), inact = 3
cd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) 
(using DMA data transfers)
ohci0 at pci2 dev 8 function 0: Apple Computer KeyLargo USB Controller 
(rev. 0x00)
ohci0: interrupting at irq 27
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ohci1 at pci2 dev 9 function 0: Apple Computer KeyLargo USB Controller 
(rev. 0x00)
ohci1: interrupting at irq 28
ohci1: OHCI version 1.0
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: Apple Computer OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ppb1 at pci1 dev 17 function 0: Intel product 0xb154 (rev. 0x00)
pci3 at ppb1 bus 2
pci3: i/o space, memory space enabled
pciide0 at pci1 dev 21 function 0: Promise Ultra100TX2v2/ATA Bus Master IDE 
Accelerator (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel configured to native-PCI mode
pciide0: using irq 58 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <IBM-IC35L060AVVA07-0>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 58644 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 120103200 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA 
data transfers)
pciide0: secondary channel configured to native-PCI mode
pciide1 at pci1 dev 27 function 0: Promise Ultra100TX2v2/ATA Bus Master IDE 
Accelerator (rev. 0x02)
pciide1: bus-master DMA support present
pciide1: primary channel configured to native-PCI mode
pciide1: using irq 63 for native-PCI interrupt
pciide1: secondary channel configured to native-PCI mode
uninorth2 at mainbus0
pci4 at uninorth2 bus 0
pci4: i/o space, memory space enabled
pchb2 at pci4 dev 11 function 0
pchb2: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
Apple Computer product 0x0033 (undefined subclass 0x00) at pci4 dev 13 
function 0 not configured
fwohci0 at pci4 dev 14 function 0: Apple Computer UniNorth Firewire (rev. 0x01)
fwohci0: interrupting at irq 40
fwohci0: OHCI 1.1, 00:03:93:ff:fe:b5:d6:ea, 400Mb/s, 2048 max_rec, 8 iso_ctx
gem0 at pci4 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x00)
gem0: interrupting at irq 41
gem0: Ethernet address 00:03:93:b5:d6:ea, 10KB RX fifo, 4KB TX fifo
brgphy0 at gem0 phy 0: BCM5421 1000BASE-T media interface, rev. 1
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
fw0 at fwohci0: 00:03:93:ff:fe:b5:d6:ea:0a:02:20:00:00:00:00:00
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

0 > dev /  ok
0 > ls
ff87ceb0: /cpus
ff87d160:   /PowerPC,G4@0
ff87d558:     /l2-cache
ff87d790:       /l2-cache
ff87e418: /chosen
ff87e630: /memory@0
ff87e8d0: /openprom
ff87ea78:   /client-services
ff87fd60: /rom@ff800000
ff87ff60:   /boot-rom@fff00000
ff880190:   /macos
ff880298: /options
ff8803a0: /aliases
ff882670: /packages
ff882750:   /deblocker
ff8830e8:   /disk-label
ff883bb0:   /obp-tftp
ff88d490:   /telnet
ff88dd90:   /mac-parts
ff88f640:   /mac-files
ff8925f8:   /hfs-plus-files
ff897678:   /fat-files
ff899470:   /iso-9660-files
ff89a2d0:   /bootinfo-loader
ff89bf68:   /xcoff-loader
ff89ca00:   /pe-loader
ff89d450:   /elf-loader
ff89eaf8:   /usb-hid-class
ff8a1688:   /usb-ms-class
ff8a42d8:   /usb-audio-class
ff911e50:   /sbp2-disk
ff9148a8:   /ata-disk
ff916de8:   /atapi-disk
ff918f78:   /bootpath-search
ff91f8f8:   /terminal-emulator
ff91fa08: /firewire-disk-mode
ff935438: /pseudo-hid
ff935538:   /keyboard
ff935c30:   /mouse
ff9361c8:   /eject-key
ff936698: /pseudo-sound
ff9369c8: /multiboot
ff94a040: /diagnostics
ff94a120: /nvram@fff04000
ff94ad70: /uni-n@f8000000
ff94b038:   /i2c@f8001000
ff94bb50:     /lm87
ff94c6d0:     /temp-monitor@192
ff94cdd0:     /cereal
ff94d500: /pci@f0000000
ff9aad80:   /pci106b,8@10
ff94e730: /pci@f2000000
ff94f988:   /pci-bridge@d
ff9533c0:     /mac-io@7
ff959e80:       /interrupt-controller@40000
ff95a0d0:       /gpio@50
ff95a300:         /extint-gpio1@9
ff95a5f0:         /programmer-switch@11
ff95a880:         /ringDetect-gpio@8
ff95ab58:         /keySwitch-gpio@c
ff95ade0:         /systemMonitor-gpio@12
ff95b020:         /indicatorSwitch-gpio@15
ff95b748:         /indicatorLED-gpio@20
ff95ba28:         /virtual-sound
ff95bb40:       /escc-legacy@12000
ff95bdb0:         /ch-a@12004
ff95bfb0:         /ch-b@12000
ff95c1b0:       /escc@13000
ff95c438:         /ch-a@13020
ff95ce88:         /ch-b@13000
ff95d808:       /i2s@10000
ff95da38:         /i2s-a@10000
ff95dd68:           /sound
ff95de90:       /timer@15000
ff95e088:       /via-pmu@16000
ff961758:         /pmu-i2c
ff962598:           /9554@140
ff963038:             /drive-power@0
ff9632c0:             /drive-fail@1
ff963588:             /drive-inuse@2
ff963810:             /drive-present@3
ff963aa0:             /drive-switch@4
ff963d28:             /drive-reset@5
ff963fa8:             /drive-power@6
ff964228:             /drive-inuse@7
ff9644a8:           /9554@142
ff964f48:             /drive-power@0
ff9651d0:             /drive-fail@1
ff965498:             /drive-inuse@2
ff965720:             /drive-present@3
ff9659b0:             /drive-switch@4
ff965c38:             /drive-reset@5
ff965eb8:             /drive-power@6
ff966138:             /drive-inuse@7
ff9663b8:           /9554@144
ff966e58:             /drive-power@0
ff9670e0:             /drive-fail@1
ff9673a8:             /drive-inuse@2
ff967630:             /drive-present@3
ff9678c0:             /drive-switch@4
ff967b48:             /drive-reset@5
ff967dc8:             /drive-power@6
ff968048:             /drive-inuse@7
ff9682c8:           /9554@146
ff968d68:             /drive-power@0
ff968ff0:             /drive-fail@1
ff9692b8:             /drive-inuse@2
ff969540:             /drive-present@3
ff9697d0:             /drive-switch@4
ff969a58:             /drive-reset@5
ff969cd8:             /drive-power@6
ff969f58:             /drive-inuse@7
ff96a1d8:           /9554M@148
ff96ae90:         /rtc
ff96b588:         /power-mgt
ff9acf88:           /usb-power-mgt
ff96b898:       /i2c@18000
ff96c350:         /cereal
ff96ca98:       /ata-4@1f000
ff96f7d8:         /disk
ff97bea8:     /usb@8
ff983b30:     /usb@9
ff950aa0:   /pci-bridge@11
ff98b8c0:   /AppleKiwi@15
ff98ca88:     /ata-6@0
ff98fa08:       /disk
ff9900c0:     /ata-6@1
ff993040:       /disk
ff9936f8:   /AppleKiwi@1b
ff9948c0:     /ata-6@0
ff997840:       /disk
ff997ef8:     /ata-6@1
ff99ae78:       /disk
ff951bb8: /pci@f4000000
ff99b818:   /firewire@e
ff9a5a00:   /ethernet@f
ff9ad358:     /ethernet-phy
ff952e10: /vsp@f9000000
ff953100:   /veo@f9080000
ff953260:   /veo@f9180000
  ok
0 > devalias
pci0                /pci@f0000000
agp                 /pci@f0000000
pci1                /pci@f2000000
pci2                /pci@f4000000
ui2c                /uni-n/i2c
ui2c-serial         /uni-n/i2c/cereal
keyboard            /pseudo-hid/keyboard
mouse               /pseudo-hid/mouse
sound               /pseudo-sound
eject-key           /pseudo-hid/eject-key
nvram               /nvram
enet                /pci@f4000000/ethernet
fw                  /pci@f4000000/firewire
bridge0             /pci@f2000000/@d
pci                 /pci@f2000000/@d
bridge              /pci@f2000000/@d
usb0                /pci@f2000000/@d/usb@8
usb1                /pci@f2000000/@d/usb@9
fwx                 /pci@f2000000/@d/firewire
enetx               /pci@f2000000/@d/ethernet
mac-io              /pci@f2000000/@d/mac-io@7
mpic                /pci@f2000000/@d/mac-io@7/interrupt-controller
hd                  /pci@f2000000/AppleKiwi@15/ata-6@0/disk@0
cd                  /pci@f2000000/@d/mac-io@7/ata-4@1f000/disk@0
zip                 /pci@f2000000/@d/mac-io@7/ata-3@20000/disk@1
ide0                /pci@f2000000/@d/mac-io@7/ata-3@20000/disk@0
ide1                /pci@f2000000/@d/mac-io@7/ata-3@20000/disk@1
ultra0              /pci@f2000000/AppleKiwi@15/ata-6@0/disk@0
ultra1              /pci@f2000000/AppleKiwi@15/ata-6@1/disk@0
scca                /pci@f2000000/@d/mac-io@7/escc/ch-a
sccb                /pci@f2000000/@d/mac-io@7/escc/ch-b
ki2c                /pci@f2000000/@d/mac-io@7/i2c
ki2c-serial         /pci@f2000000/@d/mac-io@7/i2c/cereal
via-pmu             /pci@f2000000/@d/mac-io@7/via-pmu
rtc                 /pci@f2000000/@d/mac-io@7/via-pmu/rtc
pi2c                /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c
ultra2              /pci@f2000000/AppleKiwi@1b/ata-6@0/disk@0
ultra3              /pci@f2000000/AppleKiwi@1b/ata-6@1/disk@0
bridge1             /pci@f2000000/@11
lm87                /uni-n/i2c/lm87
kgpio               /pci@f2000000/@d/mac-io@7/gpio
keyswitch           /pci@f2000000/@d/mac-io@7/gpio/@c
monitor             /pci@f2000000/@d/mac-io@7/gpio/@12
indicator           /pci@f2000000/@d/mac-io@7/gpio/@15
led                 /pci@f2000000/@d/mac-io@7/gpio/@20
9554-0              /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c/@140
9554-1              /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c/@142
9554-2              /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c/@144
9554-3              /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c/@146
9554-M              /pci@f2000000/@d/mac-io@7/via-pmu/pmu-i2c/@148
last-boot           /pci@f4000000/ethernet@f
  ok
0 > dev /memory  ok
0 > .properties
name                    memory
device_type             memory
reg                     00000000  10000000
                         10000000  20000000
                         30000000  20000000
                         50000000  20000000
slot-names              0000000f
                         DIMM0/J21
                         DIMM1/J22
                         DIMM2/J23
                         DIMM3/J20
available               00003000 6fbfd000
dimm-info               8008070d 0a014000 04757500 82080001 0e040c01 022000a0
                         75000050 3c502d40 90905050 00000000 00000000 00000000
                         00000000 00000000 00000000 000000bf ce000000 00000000
                         014d3320 36384c33 32323344 544c2d43 4230204c 44022421
                         67540200 59424631 43303500 00000000 00000000 00000000
                         00000000 00000000 8008070d 0a024000 04757500 80080001
                         0e040c01 022000a0 75000050 3c502d40 a0a05050 00000000
                         00000000 00000000 00000000 00000000 00000000 000000de
                         43434154 00000000 02000000 00000000 00000000 00000000
                         00000002 00012500 000000ff ffffffff ffffffff ffffffff
                         ffffffff ffffffff ffffffff ffffffff
                         ... 00000200 bytes total
dimm-types              DDR SDRAM
                         DDR SDRAM
                         DDR SDRAM
                         DDR SDRAM
dimm-speeds             PC2100U-25330
                         PC2100U-25330
                         PC2100U-25330
                         PC2100U-25330

  ok
0 > dev /cpus/PowerPC,G4  ok
0 > .properties
name                    PowerPC,G4

device_type             cpu
reg                     00000000
cpu-version             80010201
state                   running
clock-frequency         3b9ac9fd
bus-frequency           07ec2818
timebase-frequency      01fb0a06
reservation-granule-size00000020
tlb-sets                00000040
tlb-size                00000080
d-cache-size            00008000
i-cache-size            00008000
d-cache-sets            00000080
i-cache-sets            00000080
i-cache-block-size      00000020
d-cache-block-size      00000020
graphics
performance-monitor
altivec
data-streams
l2-cache                ff87d558
l2cr                    80080000
existing                00000000 80000000 80000000 80000000
available               00003000 7fffd000 d0000000 20000000
translations            00000000 00003000 00000000 00000010 80000000 00080000
                         80000000 00000028 80080000 00001000 80080000 00000028
                         80081000 00001000 80081000 00000028 f0000000 00010000
                         f0000000 00000028 f0800000 00001000 f0800000 00000028
                         f0c00000 00001000 f0c00000 00000028 f2000000 00010000
                         f2000000 00000028 f2800000 00001000 f2800000 00000028
                         f2c00000 00001000 f2c00000 00000028 f4000000 00010000
                         f4000000 00000028 f4800000 00001000 f4800000 00000028
                         f4c00000 00001000 f4c00000 00000028 f5000000 00001000
                         f5000000 00000028 f5200000 00200000 f5200000 00000028
                         f8000000 00003000 f8000000 00000028
                         ... 00000130 bytes total
cpu-info                8410c0bc 80080000 80010201 00000600 00000000 00000000
                         00000000 00000000
soft-reset              00000071
gpio-mask               00000001
gpio-value              00000001
performance-monitor-cnt-enable 00000072
timebase-enable         00000073
gpio-parent             ff95a0d0

0 > dev l2-cache  ok
0 > .properties
name                    l2-cache
device_type             cache
i-cache-size            00040000
d-cache-size            00040000
i-cache-sets            00000200
d-cache-sets            00000200
i-cache-line-size       00000040
d-cache-line-size       00000040
cache-unified
clock-frequency         3b9ac9fd
l2-cache                ff87d790

  ok
0 > dev l2-cache  ok
0 > .properties
name                    l2-cache
device_type             cache
i-cache-size            00200000
d-cache-size            00200000
i-cache-sets            00000800
d-cache-sets            00000800
i-cache-line-size       00000080
d-cache-line-size       00000080
cache-unified
clock-frequency         0ee6b27f


-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message