Subject: NetBSD 3.0 boots on PowerMac G5!
To: None <port-macppc@netbsd.org>
From: Sanjay Lal <sanjayl@kymasys.com>
List: port-macppc
Date: 06/07/2006 11:28:23
I am very happy to report that NetBSD 3.0 has been ported to the  
PowerMac G5 and successfully boots into single user mode using the  
built in memory disk.

This is still very much work in progress as a lot of driver support  
is needed including drivers for the SATA controller on the G5, SMP  
support, support for the PMU to control the fans etc. I have added  
support for the U3 north bridge including PCI bus probing and  
configuration.

I am in the process of cleaning up the code and will post the diffs  
shortly. I'd appreciate it if folks could volunteer and help out with  
the driver support.

Thanks,
Sanjay Lal
Kyma Systems
http://www.kymasys.com

Here are the bootup messages:

boot enet:,netbsd
CLIENT: 000a95c926ba 192.168.1.103
SERVER: 000fb5fb2b46 192.168.1.4
Transfer FILE: netbsd
TFTP-actual=3d9ee4 TFTP-adler32=10616b0 load-size=3d9ee4 adler32=10616b0

Loading ELF
Early G5 console initialized
[ Kernel symbol table missing! ]
ofmaplen: 440 bytes
openfirmware_entry: 0xff846d38
About to call pmap_bootstrap(), startK: 0x00100000, endK: 0x00502000
Allocating 0x100000 bytes for pmap_pvo_table
uvm_page_physload: 0x00003000 -> 0x00100000
uvm_page_physload: 0x00602000 -> 0x01000000
uvm_page_physload: 0x02000000 -> 0x3fbf9000
Done calling uvm_page_physload()
Loading SR for kernel pmap
Loading 0x01000006 into SDR1
Invalidating ALL TLB entries......
Enabling DR|IR|ME|RI.....
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
     The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

pmap_kenter_pa: 0xd45b8000, 0x3fbf9000
pmap_kenter_pa: 0xd45b9000, 0x3fbfa000
pmap_kenter_pa: 0xd45ba000, 0x3fbfb000
NetBSD 3.0 (POWERMAC_G5) #116: Wed Jun  7 11:08:23 PDT 2006
	sanjayl@kyma-serv1.kymasys.com:/home/sanjayl/WORKSPACE/kyma/netbsd/ 
usr/src/sys/arch/macppc/compile/POWERMAC_G5
total memory = 1024 MB
avail memory = 976 MB
obio_base: 0x80000000
init_interrupt: found OpenPIC @ pa 0x80040000, 0xd5050000
mainbus0 (root)
cpu0 at mainbus0: 970 (Revision 2.2), ID 0 (primary)
cpu0: HID0 , powersave: -1
cpu0: 2000.00 MHz
cpu1 at mainbus0: ID 1
cpu1: processor off-line; multiprocessor support not present in kernel
ibmcpc0 at mainbus0
Mapping in config space @ pa 0xf2000000, size: 0x02800000
pci0 at ibmcpc0 bus 6
pci0: i/o space, memory space enabled
pci1 at ibmcpc0 bus 7
pci1: i/o space, memory space enabled
pci2 at ibmcpc0 bus 1
pci2: i/o space, memory space enabled
obio0 at pci2 dev 7 function 0: addr 0x80000000
mpic at obio0 offset 0x40000 not configured
zsc0 at obio0: 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 25: pm_adb_op: timeout. command = 0x0
pmu: failed to read prim-info
0 targets
aed0 at adb0 addr 0: ADB Event device
fans at obio0 offset 0x4c not configured
ohci0 at pci2 dev 8 function 0: Apple Computer K2 USB Controller  
(rev. 0x00)
ohci0: interrupting at irq 27
ohci0: OHCI version 1.0, legacy support
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 K2 USB Controller  
(rev. 0x00)
ohci1: interrupting at irq 28
ohci1: OHCI version 1.0, legacy support
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
pci3 at ibmcpc0 bus 2
pci3: i/o space, memory space enabled
ohci2 at pci3 dev 11 function 0: NEC USB Host Controller (rev. 0x43)
ohci2: interrupting at irq 63
ohci2: OHCI version 1.0
usb2 at ohci2: USB revision 1.0
uhub2 at usb2
uhub2: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 3 ports with 3 removable, self powered
ohci3 at pci3 dev 11 function 1: NEC USB Host Controller (rev. 0x43)
ohci3: interrupting at irq 63
ohci3: OHCI version 1.0
usb3 at ohci3: USB revision 1.0
uhub3 at usb3
uhub3: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
NEC USB Host Controller (USB serial bus, interface 0x20, revision  
0x04) at pci3 dev 11 function 2 not configured
pci4 at ibmcpc0 bus 3
pci4: i/o space, memory space enabled
Apple Computer K2 UATA Controller (undefined subclass 0x00) at pci4  
dev 13 function 0 not configured
fwohci0 at pci4 dev 14 function 0: Apple Computer K2 Firewire (rev.  
0x00)
fwohci0: interrupting at irq 40
fwohci0: OHCI 1.0, 00:0a:95:ff:fe:c9:26:ba, 800Mb/s, 4096 max_rec, 8  
ir_ctx, 8 it_ctx
pci5 at ibmcpc0 bus 4
pci5: i/o space, memory space enabled
Apple Computer GMAC Ethernet (ethernet network) at pci5 dev 15  
function 0 not configured
pci6 at ibmcpc0 bus 5
pci6: i/o space, memory space enabled
pciide0 at pci6 dev 12 function 0
pciide0: ServerWorks product 0x0240 (rev. 0x00)
pciide0: device disabled (at device)
pciide1 at pci6 dev 12 function 1
pciide1: ServerWorks product 0x0240 (rev. 0x00)
pciide1: device disabled (at device)
md0: internal 2048 KB image area
fw0 at fwohci0: 00:0a:95:ff:fe:c9:26:ba:0b:03:ff:ff:f0:01:00:00
umass0 at uhub2 port 2 configuration 2 interface 0
umass0: VIA Technologies Inc. USB 2.0 Card Reader, rev 2.00/0.03, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 4 luns per target
sd0 at scsibus0 target 0 lun 0: <VIA-P, VT6205-DevA, 2.50> disk  
removable
sd0: drive offline
sd1 at scsibus0 target 0 lun 1: <VIA-P, VT6205-DevB, 2.50> disk  
removable
sd1: fabricating a geometry
sd1: 122 MB, 122 cyl, 64 head, 32 sec, 512 bytes/sect x 250880 sectors
sd2 at scsibus0 target 0 lun 2: <VIA-P, VT6205-DevD, 2.50> disk  
removable
sd2: drive offline
sd3 at scsibus0 target 0 lun 3: <VIA-P, VT6205-DevH, 2.50> disk  
removable
sd3: drive offline
boot device: cpu0
root on md0a dumps on md0b
mountroot: trying ffs...
root file system type: ffs
WARNING: clock gained 13 days -- CHECK AND RESET THE DATE!
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? (I)nstall, (S)hell or (H)alt ? s
#
#
#
# ls
.profile        kern            sysinst         sysinstmsgs.pl  var
bin             mnt             sysinstmsgs.de  targetroot
dev             mnt2            sysinstmsgs.es  tmp
etc             sbin            sysinstmsgs.fr  usr
# ls
.profile        kern            sysinst         sysinstmsgs.pl  var
bin             mnt             sysinstmsgs.de  targetroot
dev             mnt2            sysinstmsgs.es  tmp
etc             sbin            sysinstmsgs.fr  usr
# ls -l
total 3455
-rw-r--r--   1 root  wheel     2826 May 24 18:52 .profile
drwxr-xr-x   2 root  wheel      512 May 24 18:52 bin
drwxr-xr-x   2 root  wheel     8192 May 24 18:52 dev
drwxr-xr-x   2 root  wheel      512 May 24 18:52 etc
drwxr-xr-x   2 root  wheel      512 May 24 18:52 kern
drwxr-xr-x   2 root  wheel      512 May 24 18:52 mnt
drwxr-xr-x   2 root  wheel      512 May 24 18:52 mnt2
drwxr-xr-x   2 root  wheel     1024 May 24 18:52 sbin
-r-xr-xr-x  62 root  wheel  1647364 May 24 18:52 sysinst
-r--r--r--   1 root  wheel    25590 May 24 18:52 sysinstmsgs.de
-r--r--r--   1 root  wheel    24218 May 24 18:52 sysinstmsgs.es
-r--r--r--   1 root  wheel    24295 May 24 18:52 sysinstmsgs.fr
-r--r--r--   1 root  wheel    22058 May 24 18:52 sysinstmsgs.pl
drwxr-xr-x   2 root  wheel      512 May 24 18:52 targetroot
drwxrwxrwt   2 root  wheel      512 May 24 18:52 tmp
drwxr-xr-x   6 root  wheel      512 May 24 18:52 usr
drwxr-xr-x   6 root  wheel      512 May 24 18:52 var
#