Subject: kern/19269: alignment error in wd(4)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hamajima@ydc.co.jp>
List: netbsd-bugs
Date: 12/05/2002 00:37:37
>Number:         19269
>Category:       kern
>Synopsis:       alignment error in wd(4)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 04 07:38:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     HAMAJIMA Katsuomi
>Release:        NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD 1.6K (LROUTER) #2: Tue Dec  3 01:03:44 JST 2002 root@lr:/usr/src/sys/arch/hpcmips/compile/LROUTER
Architecture: mipsel
Machine: hpcmips

LASER5 L-BOARD (NEC VR4122 rev0.3 180.633MHz)
pciide0 at pci0 dev 16 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc2)
pciide0: bus-master DMA support present
pciide0: primary channel configured to native-PCI mode
pciide0: using pciintr 0:16:0 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST330630A>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 29188 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 59777640 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
wd0(pciide0:0:0): using PIO mode 3
pciide0: secondary channel configured to native-PCI mode
pciide0: disabling secondary channel (no drives)

>Description:
L-Router does not work with DMA mode, so pciide(4) use PIO mode.

# /sbin/fdisk wd0
trap: address error (store) in kernel mode
status=0xf803, cause=0x14, epc=0x8017d898, vaddr=0xc3770a12
curproc == NULL ksp=0xc4125a60
Stopped at      0x8017d898:     sw      v0,0(s1)
db> t
__bs_rm_4+48 (801fbd80,b00001f0,0,c3770a12) ra 8017ab94 sz 40
wdc_ata_bio_intr+34c (801fbd80,b00001f0,0,c3770a12) ra 80056f08 sz 48
wdcintr+144 (801fbd80,b00001f0,0,c3770a12) ra 80188794 sz 32
pciide_pci_intr+54 (801fbd80,b00001f0,0,c3770a12) ra 801807a4 sz 40
config_connected_call+28 (801fbd80,b00001f0,0,c3770a12) ra 80193a54 sz 24
hpcin_intr+44 (801fbd80,b00001f0,0,c3770a12) ra 80194cd4 sz 32
vrgiu_intr+88 (801fbd80,b00001f0,0,c3770a12) ra 80192258 sz 40
vrip_intr+c4 (801fbd80,b00001f0,0,c3770a12) ra 8017bf10 sz 48
cpu_intr+cc (801fbd80,b00001f0,0,c3770a12) ra 8015691c sz 40
mips3_KernIntr+84 (c4124000,0,988e,80204fa8) ra 8000115c sz 128
cpu_switch+64 (c4124000,0,988e,80204fa8) ra 800ebed4 sz 24
mi_switch+1dc (c4124000,0,988e,80204fa8) ra 800eb614 sz 48
ltsleep+238 (c4124000,0,988e,80204fa8) ra 800e439c sz 48
physio+25c (80177774,0,988e,80204fa8) ra 80177ee8 sz 72
wdread+60 (80177774,0,988e,80204fa8) ra 80125af8 sz 40
spec_read+d8 (80177774,0,988e,80204fa8) ra 800c9dd8 sz 80
ufsspec_read+58 (80177774,0,988e,80204fa8) ra 80120e04 sz 24
VOP_READ+40 (80a72cb0,c4125e78,0,c0006f00) ra 801203f0 sz 48
80120344+ac (80a72cb0,c4125e78,0,c0006f00) ra 800fbd08 sz 40
dofileread+bc (80a72cb0,c4125e78,0,10000a12) ra 800fbc30 sz 96
sys_read+a0 (80a72cb0,c4125e78,0,10000a12) ra 8015cdd0 sz 56
syscall_plain+1d0 (80a72cb0,c4125e78,0,10000a12) ra 8015676c sz 80
mips3_SystemCall+b0 (80a72cb0,c4125e78,0,10000a12) ra 30115000 sz 0
PC 0x30115000: not in kernel space
0+30115000 (80a72cb0,c4125e78,0,10000a12) ra 0 sz 0
User-level: curproc NULL
(symbol name is hand translation. if symbol was wrong, I am sorry.)

__bs_rm_4() is bus_space_read_multi_4() in hpcmips.
vaddr=0xc3770a12 is not align for VR4122.

>How-To-Repeat:
run on L-Router
	# /sbin/fdisk wd0

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: