Subject: Debugging / SPL-levels / AT91RM9200 success
To: None <port-arm@netbsd.org, tech-kern@netbsd.org>
From: Sami Kantoluoto <sami.kantoluoto@embedtronics.fi>
List: tech-kern
Date: 03/02/2007 16:30:42
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline

Hi,

I'm porting NetBSD to run our embedded hardware and it has Atmel's AT91RM9200
CPU. So far I've following running:

- debug uart
- interrupt controller
- timer
- ethernet mac
- OHCI
- CF ("PCMCIA")
- multiuser

With current the system was quite unstable (paniced quite often under heavy
load) so I tried netbsd-4 and it looked stable. 

But I do have problems with Compact Flash "driver" or it looks like so.
I'm currently using AT91RM9200's pin change interrupt to capture the
interrupt (I have to see if the interrupt line is connected to real
IRQ pin) so I get quite a many of them when accessing the CF (I call
the pcmcia interrupt [callback] only when pin is in appropriate state
after the pin change).

Anyway, under heavy CF I/O NetBSD may just hang or if I try to terminate
e.g. 'dd if=/dev/w0c bs=64k', the shell just hangs or so. So I'm wondering
if there's a good way to verify the SPL levels are working correctly etc.
Or any other ideas to check?


PS. I must admit that NetBSD indeed is very portable and relatively easy
to understand (or I just think so). I haven't done any real NetBSD porting
before and was able to get new port running multiuser in 2 - 3  days. Of
course it was great help that NetBSD had been ported to quite similar
processors before (e.g. EP93XX port).


Thanks,

     -sk


--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="dmesg.boot"

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 4.0_BETA2 (MPCSA_GENERIC) #0: Wed Feb 28 04:05:03 EET 2007
	skanto@haapana:/tmp/nb4arm/obj/sys/arch/evbarm/compile/MPCSA_GENERIC
total memory = 65536 KB
avail memory = 61000 KB
mainbus0 (root)
cpu0 at mainbus0: ARM920T rev 0 (ARM9TDMI core)
cpu0: DC enabled IC enabled WB enabled EABT
cpu0: 16KB/32B 64-way Instruction cache
cpu0: 16KB/32B 64-way write-back-locking-A Data cache
apb0 at mainbus0: sclk 32.768 kHz, mclk 20.000 MHz, pclk 180.000 MHz, mstclk 45.000 MHz
at91_aic0 at apb0 addr 0xfffff000-0xfffff1ff
stmr0 at apb0 addr 0xfffffd00-0xfffffeff
at91_gpio0 at apb0 addr 0xfffff400-0xfffffbff intr 2
gpio0 at at91_gpio0: port A: 17 pins
gpio1 at at91_gpio0: port B: 20 pins
gpio2 at at91_gpio0: port C: 9 pins
gpio3 at at91_gpio0: port D: 22 pins
ohci0 at apb0 addr 0x300000-0x3fffff intr 23
at91_dbgu0 at apb0 addr 0xfffff200-0xfffff3ff
at91_dbgu0: console (maj 111  min 0  cn_dev 28416)
at91_cf0 at apb0 addr 0x50000000-0x508fffff intr 4
pcmcia0 at at91_cf0
emac0 at apb0 addr 0xfffbc000-0xfffbffff intr 24
OUI 0x0010a1 model 0x0005 rev 0 at emac0 phy 1 not configured
OUI 0x0010a1 model 0x0005 rev 0 at emac0 phy 2 not configured
OUI 0x0010a1 model 0x0005 rev 0 at emac0 phy 3 not configured
OUI 0x0010a1 model 0x0005 rev 0 at emac0 phy 4 not configured
ukphy0 at emac0 phy 5: Generic IEEE 802.3u media interface
ukphy0: OUI 0x0010a1, model 0x0005, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
at91_ohci_callback
ohci0: OHCI version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Atmel OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pcmcia0: CIS version PCMCIA 2.0 or 2.1
pcmcia0: CIS info: KINGSTON, CF512, 
pcmcia0: Manufacturer code 0xa, product 0x0
pcmcia0: function 0: fixed disk(ata), ccr addr 200 mask f
pcmcia0: function 0, config table entry 0: memory card; irq mask 0; memspace 0-7ff; mwait_required rdybsy_active powerdown
pcmcia0: function 0, config table entry 1: I/O card; irq mask ffff; iomask 4, iospace 0-f; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 2: I/O card; irq mask 4000; iomask a, iospace 1f0-1f7 3f6-3f7; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 3: I/O card; irq mask 4000; iomask a, iospace 170-177 376-377; memspace 0-7ff; rdybsy_active io8 io16 irqshare irqpulse irqlevel powerdown
wdc0 at pcmcia0 function 0: <KINGSTON, CF512, >
wdc0: i/o mapped mode
atabus0 at wdc0 channel 0
wd0 at atabus0 drive 0: <KINGSTON>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 495 MB, 1006 cyl, 16 head, 63 sec, 512 bytes/sect x 1014048 sectors
wd0: drive supports PIO mode 4
umass0 at uhub0 port 2 configuration 1 interface 0
umass0: Kingston DataTraveler 2.0, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Kingston, DataTraveler 2.0, 1.04> disk removable
sd0: 980 MB, 3920 cyl, 16 head, 32 sec, 512 bytes/sect x 2007040 sectors
boot device: <unknown>
root on sd0c dumps on sd0b
WARNING: CHECK AND RESET THE DATE!
init: copying out path `/sbin/init' 11
arplookup: unable to enter address for 10.2.254.139@00:0d:10:81:0b:4e on emac0 (host is not on local network)

--AqsLC8rIMeq19msA--