2009-08-19 STR8132その6
softintr の動作が変な件。
arch/arm/star/star_intr.c の割り込みの __HAVE_FAST_SOFTINTS 部分は、sys/arch/arm/xscale/ixp425_intr.[ch] あたりを参考にしていたのだが、 そもそも xscale を HAVE_FAST_SOFTINT で使っているものは存在しなかった。つまり腐ってやがる。早すぎたんですよ。
というわけで std.star からも __HAVE_FAST_SOFTINTS を削って、softintr 問題は解決。
USBはwrapperだけだから簡単だと思ってちゃっちゃと star_ohci と star_ehci を書く。
NetBSD 5.99.15 (STR81xx) #1138: Wed Aug 19 02:20:22 JST 2009 ryo@falsie:/src/cvs/NetBSD/sys/arch/evbarm/compile/STR81xx total memory = 32768 KB avail memory = 28156 KB mainbus0 (root) cpu0 at mainbus0: FA526 rev 1 (ARMv4 core) cpu0: DC enabled IC enabled WB enabled LABT cpu0: 8KB/16B 2-way Instruction cache cpu0: 8KB/16B 2-way write-back-locking-B Data cache star0 at mainbus0: Star Equuleus Family SoC: STR8100, 250MHz starclk0 at star0 addr 0x79000000-0x79000047 irq 0: Programmable Timer com0 at star0 addr 0x78000000-0x7800001f irq 9: ns16550a, working fifo com0: console ohci0 at star0 addr 0xc4000000-0xc400005b irq 23: USB1.1 Host Controller ohci0: OHCI version 1.0, legacy support usb0 at ohci0: USB revision 1.0 ehci0 at star0 addr 0xcc000000-0xcc00006b irq 24: USB2.0 Host Controller ehci0: ohci or uhci probably not configured usb1 at ehci0: USB revision 2.0 gec0 at star0 addr 0x70000000-0x70000133 irq 18: Gigabit Ethernet Controller gec0: Ethernet address 00:aa:bb:cc:dd:10 ukphy0 at gec0 phy 0: Generic IEEE 802.3u media interface ukphy0: OUI 0x000e4e, model 0x0025, rev. 1 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto gec0: status=00040114 uhub0 at usb0: Star OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1 at usb1: Star EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 ehci0: strange port boot device: <unknown> root on gec0 〜 uhidev0 at uhub0 port 2 configuration 1 interface 0 uhidev0: Dell Dell USB Optical Mouse, rev 2.00/43.01, addr 2, iclass 3/1 ums0 at uhidev0: 3 buttons and Z dir. wsmouse0 at ums0 (mux ignored)
近くに落ちてたDELLのマウスを挿したら、一応ちゃんと見えているので動いているようだ。
でも ehci0: strange port とか言われてる。何か変? テストに適当なUSB2.0 なデバイス何か無いかな。
そして ether の hardware checksum も support。何故か ip4csum-tx だけ動かない。ip4csum-rx および tcp4csum と udp4csum はちゃんと動く。謎。
速度のほうは、
TX=2.50MB/s, RX=2.85MB/s (FAST_SOFTINT, software checksum)だったのが、
TX=2.65MB/s, RX=2.98MB/s (no FAST_SOFTINT, hardware checksum)くらいになった。ちなみに FAST_SOFTINTS 状態だと
TX=2.75MB/s, RX=3.05MB/s (FAST_SOFTINT, hardware checksum) だけど、腐ってるので封印。
EOF