Subject: Well, that was easier than I thought.
To: None <tech-ports@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: tech-ports
Date: 02/18/2006 04:11:44
I finally figured out how to do the PCI mapping:  Just leave the code in
ibm405gp.c alone, because that's doing it already.  (I found this by searching
for the pmm[0] analogue, which turned out to be used there.)

At this point, I think I would benefit from some advice/help on sorting out
remaining issues.

Issue #1:  Secondary ethernet partially not working.  The sip0 interface comes
up with a MAC address of ff:ff:ff:ff:ff:ff.  Of particular note is that, if
I specify it as my root device, my DHCP server sees queries from it at the
"obviously screwed up" address.  I'm not sure what to make of this; it looks
as though we're getting all -1s trying to read from the device, but if it
can send recognizable packets, communication of SOME sort is happening.

Issue #2:  Gratuitous warning from emac driver about "mac-addr" not
being set.  Or, alternatively, a cleaner way to get the mac address.  Since
I know it'll be programmed in, I'd be okay with this, but that may be wrong
on other systems.  Are there systems on which my workaround (having emac_reset
save and then restore the MAC address) would be harmful?

Issue #3:  I don't know what this is:
IBM PPC 405GP PCI Bridge (host bridge, revision 0x21) at pci0 dev 0 function 0 not configured
Since every device I can immediately think of is working, I'm not sure what I'm missing.

Issue #4:  gpio driver
gpio at opb0 addr 0xef600700 not configured
I am not sure what to do about this, not really understanding the gpio
hardware at all.  I think this is just wired up to some LEDs, but I have no
certainty that it's compatible with the obsled driver, and I'd rather not
fry them.  Honestly, though, I mostly haven't tried because the LEDs are inside the case and I haven't felt motivated to take the cover off.

Issue #5:  pbus
pbus at plb0 not configured
I don't know what this is either.

Issue #5:  Need for a NAND flash driver.  I have buy-in from my editor to write
about developing one, if it's not too insane a task.


If I can get these resolved, then the remaining issue will be getting the
code cleaned up enough to submit.

Dmesg output, as things are now, follows.
---
RedBoot> go
+4000000,
01000000-04000000 -> 0133c000-04000000 = 2cc4000
Loaded initial symtab at 0x12a3d30, strtab at 0x12c8c5c, # entries 9366
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    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 3.99.15 (TAMS3011) #0: Sat Feb 18 03:21:12 CST 2006
        seebs@vash.cel.plethora.net:/home/seebs/3011_src/sys/arch/evbppc/compile/TAMS3011
Model: TAMS 3011 IBM PowerPC 405GPr Board
total memory = 65536 KB
avail memory = 45456 KB
plb0 (root)
cpu0 at plb0: 400MHz 405GPr (Revision 9.81)
Instruction cache size 16384 line size 32
Data cache size 16384 line size 32
PVR: owner 509 core family 1 cache 2 version 5 asic 11
ecc0 at plb0 irq 16: ECC controller
opb0 at plb0
com0 at opb0 addr 0xef600300 irq 0: ns16550a, working fifo
com0: console
com1 at opb0 addr 0xef600400 irq 1: ns16550a, working fifo
emac0 at opb0 addr 0xef600800 irq 9WARNING: unable to get mac-addr property from board properties
: 405GP EMAC
emac0: interrupting at irqs 9 .. 15
emac0: unable to get mac-addr property, checking chip
emac0: Ethernet address 00:20:cf:02:ad:0f
ukphy0 at emac0 phy 1: Generic IEEE 802.3u media interface
ukphy0: OUI 0x1000e8, model 0x0003, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
gpio at opb0 addr 0xef600700 not configured
gpiic0 at opb0 addr 0xef600500 irq 2: On-Chip IIC controller
iic0 at gpiic0: I2C bus
xrtc0 at iic0 addr 0x6f: Xicor X1226 Real-time Clock/NVRAM
wdog0 at opb0: 2 second period
pchb0 at plb0
pchb0: IBM PPC 405GP PCI Bridge (rev. 0x21)
pci0 at pchb0
pci0: i/o space, memory space enabled
IBM PPC 405GP PCI Bridge (host bridge, revision 0x21) at pci0 dev 0 function 0 not configured
sip0 at pci0 dev 1 function 0: NatSemi DP83815 10/100 Ethernet, rev 00
sip0: interrupting at irq 28
sip0: Checksum (3f) mismatch (1)sip0: Ethernet address ff:ff:ff:ff:ff:ff
nsphyter0 at sip0 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ohci0 at pci0 dev 2 function 0: NEC USB Host Controller (rev. 0x43)
ohci0: interrupting at irq 29
ohci0: OHCI version 1.0, legacy support
usbd_match
usb0 at ohci0usbd_attach
: USB revision 1.0
uhub0 at usb0
uhub0: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1 at pci0 dev 2 function 1: NEC USB Host Controller (rev. 0x43)
ohci1: interrupting at irq 29
ohci1: OHCI version 1.0, legacy support
usbd_match
usb1 at ohci1usbd_attach
: USB revision 1.0
uhub1 at usb1
uhub1: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 2 function 2: NEC USB Host Controller (rev. 0x04)
ehci0: interrupting at irq 29
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controllers, 3 ports each: ohci0 ohci1
usbd_match
usb2 at ehci0usbd_attach
: USB revision 2.0
uhub2 at usb2
uhub2: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 5 ports with 5 removable, self powered
pbus at plb0 not configured
biomask 1c04 netmask 1c0c ttymask 1c0c
Setting PIT to 400000000/100 = 4000000
usb_event_thread: start
usb_task_thread: start
usb_event_thread: start
usb_event_thread: start
root device:
use one of: emac0 sip0 ddb halt reboot
root device: