続々々 NetBSD on uARM

com(4) が見えないのは pxa255_GPIO.c:pxa255gpioPrvMemAccessF() で GAFR が書き込まれて無くて、src/sys/arch/arm/xscale/pxa2x0_com.c:pxauart_match() でピン設定チェックではじかれてただけだった…。

--- a/pxa255_GPIO.c
+++ b/pxa255_GPIO.c
@@ -96,7 +96,7 @@ static Boolean pxa255gpioPrvMemAccessF(void* userData, UInt32 pa, UInt8 size, Bo
 			case 24:
 			case 25:
 			case 26:
-				val = gpio->AFRs[pa - 21];
+				gpio->AFRs[pa - 21] = val;
 				goto recalc;
 		}

修正したら com(4) が見えるようになった。

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
    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 6.99.17 (UARM_INSTALL) #0: Sun Apr 28 23:34:22 JST 2013
        nonaka@koharu.myhome.local:/usr/obj.evbarm/sys/arch/evbarm/compile/UARM_INSTALL
total memory = 16384 KB
avail memory = 8124 KB
timecounter: Timecounters tick every 10.000 msec
cprng kernel: WARNING insufficient entropy at creation.
mainbus0 (root)
cpu0 at mainbus0 core 0: PXA255/26x step A-0 (XScale V5TE core)
cpu0: DC enabled IC enabled WB enabled LABT branch prediction enabled
cpu0: 16KB/32B 32-way L1 Instruction cache
cpu0: 16KB/32B 32-way write-back-locking L1 Data cache
pxaip0 at mainbus0: Onchip Peripheral Bus
pxaip0: CPU clock = 5.035 MHz
pxaip0: kernel is configured for PXA250, cpu type is PXA250
pxaintc0 at pxaip0 addr 0x40d00000-0x40d0001f: Interrupt Controller
pxagpio0 at pxaip0 addr 0x40e00000-0x40e0006f: GPIO Controller
com0 at pxaip0 addr 0x40100000-0x4010001f intr 22: ns16550a, working fifo
com0: console
com1 at pxaip0 addr 0x40200000-0x4020001f intr 21: ns16550a, working fifo
com2 at pxaip0 addr 0x40700000-0x4070001f intr 20: ns16550a, working fifo
saost0 at pxaip0 addr 0x40a00000-0x40a0001f
saost0: SA-11x0 OS Timer
pxadmac0 at pxaip0 addr 0x40000000-0x400002ff intr 25: DMA Controller
pxartc0 at pxaip0 addr 0x40900000-0x4090000f: Real-time Clock
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
clock: hz=100 stathz=64
timecounter: Timecounter "saost_count" frequency 3686400 Hz quality 100
cprng sysctl: WARNING insufficient entropy at creation.
boot device: <unknown>
md0: internal 3072 KB image area
root on md0a dumps on md0b
mountroot: trying msdos...
mountroot: trying ffs...
root file system type: ffs
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11