CURRENT panics: Fatal trap 12 on atapci1
Trent Nelson
tnelson at alcyon.ltd.uk
Sat Feb 28 07:44:00 PST 2004
I'm getting fatal trap 12 panics as soon as my 5.2-CURRENT kernel comes
across my SiI0680 card (atapci1). For the life of me, I can't seem to
capture dmesg output anymore. Normally, just 'set console=comconsole' at
the loader prompt and tying it up to a 'tip com1' on the other end was
sufficient. That doesn't work, and I've tried -D, -Dh, and -h which don't
work either, kernel output still goes to the video console.
Anyway, I can remote debug in gdb, which I've provided below, as well as
some pciconf output for the card. If anyone can provide some insight with
regards to getting kernel output redirected to the serial console correctly,
I'm all ears.
plum# gdb -k kernel.debug
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
(kgdb) set print pretty
(kgdb) set height 0
(kgdb) target remote /dev/cuaa0
Remote debugging using /dev/cuaa0
Debugger (msg=0x2a "") at atomic.h:263
263 atomic.h: No such file or directory.
in atomic.h
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
(kgdb) b ata_sii_reset
Breakpoint 1 at 0xc045ef1b: file /usr/src/sys/dev/ata/ata-chipset.c, line
1732.
(kgdb) c
Continuing.
Breakpoint 1, ata_sii_reset (ch=0xc7217000)
at /usr/src/sys/dev/ata/ata-chipset.c:1732
1732 ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000001);
(kgdb) l
1727 }
1728
1729 static void
1730 ata_sii_reset(struct ata_channel *ch)
1731 {
1732 ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000001);
1733 DELAY(25000);
1734 ATA_IDX_OUTL(ch, ATA_BMDEVSPEC_1, 0x00000000);
1735 }
1736
(kgdb) p ch
$1 = (struct ata_channel *) 0xc7217000
(kgdb) p *ch
$2 = {
dev = 0xc7205280,
unit = 0,
r_io = {{
res = 0xc7214a00,
offset = 128
}, {
res = 0xc7214a00,
offset = 129
}, {
res = 0xc7214a00,
offset = 130
}, {
res = 0xc7214a00,
offset = 131
}, {
res = 0xc7214a00,
offset = 132
}, {
res = 0xc7214a00,
offset = 133
}, {
res = 0xc7214a00,
offset = 134
}, {
res = 0xc7214a00,
offset = 135
}, {
res = 0xc7214a00,
offset = 138
}, {
res = 0xc7214a00,
offset = 0
}, {
res = 0xc7214a00,
offset = 161
}, {
res = 0xc7214a00,
offset = 2
}, {
res = 0xc7214a00,
offset = 256
}, {
res = 0xc7214a00,
offset = 4
}, {
res = 0xc7214a00,
offset = 0
}, {
res = 0x0,
offset = 0
}},
r_irq = 0x0,
ih = 0x0,
hw = {
reset = 0xc04528a0 <ata_reset>,
transaction = 0xc0451180 <ata_transaction>,
interrupt = 0xc0451b90 <ata_interrupt>
},
dma = 0xc7205180,
flags = 0,
device = {{
channel = 0xc7217000,
unit = 0,
name = 0x0,
param = 0x0,
softc = 0x0,
attach = 0,
detach = 0,
config = 0,
start = 0,
flags = 0,
cmd = 0,
mode = 0,
setmode = 0xc045f710 <ata_sii_setmode>
}, {
channel = 0xc7217000,
unit = 16,
name = 0x0,
param = 0x0,
softc = 0x0,
attach = 0,
detach = 0,
config = 0,
start = 0,
flags = 0,
cmd = 0,
mode = 0,
setmode = 0xc045f710 <ata_sii_setmode>
}},
devices = 0,
state = 0,
reset = 0xc045ef10 <ata_sii_reset>,
locking = 0xc0457830 <ata_pci_locknoop>,
queue_mtx = {
mtx_object = {
lo_class = 0xc06e54a0,
lo_name = 0xc06a58f2 "ATA queue lock",
lo_type = 0xc06a58f2 "ATA queue lock",
lo_flags = 196608,
lo_list = {
tqe_next = 0x0,
tqe_prev = 0x0
},
lo_witness = 0x0
},
mtx_lock = 4,
mtx_recurse = 0
},
ata_queue = {
tqh_first = 0x0,
tqh_last = 0xc7217140
},
running = 0x0
}
(kgdb) s
578 bus_at386.h: No such file or directory.
in bus_at386.h
(kgdb)
rman_get_bustag (r=0xc7214a00) at /usr/src/sys/kern/subr_rman.c:661
661 return (r->r_bustag);
(kgdb) l
656 }
657
658 bus_space_tag_t
659 rman_get_bustag(struct resource *r)
660 {
661 return (r->r_bustag);
662 }
663
664 void
665 rman_set_bushandle(struct resource *r, bus_space_handle_t h)
(kgdb) n
662 }
(kgdb) n
ata_sii_reset (ch=0xc7217000) at bus_at386.h:581
581 bus_at386.h: No such file or directory.
in bus_at386.h
(kgdb) n
589 in bus_at386.h
(kgdb) n
Program received signal SIGSEGV, Segmentation fault.
ata_sii_reset (ch=0xc7217000) at bus_at386.h:589
589 in bus_at386.h
(kgdb) bt
#0 ata_sii_reset (ch=0xc7217000) at bus_at386.h:589
#1 0xc0452b8c in ata_reset (ch=0xc7217000)
at /usr/src/sys/dev/ata/ata-lowlevel.c:570
#2 0xc044e321 in ata_probe (dev=0xc721711c)
at /usr/src/sys/dev/ata/ata-all.c:132
#3 0xc04578e7 in ata_pcisub_probe (dev=0xc721711c)
at /usr/src/sys/dev/ata/ata-pci.c:531
#4 0xc053129e in device_probe_child (dev=0x100, child=0xc7205280)
at device_if.h:21
#5 0xc0531b23 in device_probe_and_attach (dev=0xc7205280)
at /usr/src/sys/kern/subr_bus.c:1508
#6 0xc05325f8 in bus_generic_attach (dev=0x100)
at /usr/src/sys/kern/subr_bus.c:1807
#7 0xc0455dab in ata_pci_attach (dev=0xc717cb80)
at /usr/src/sys/dev/ata/ata-pci.c:202
#8 0xc0531b7f in device_probe_and_attach (dev=0xc717cb80) at device_if.h:39
#9 0xc05325f8 in bus_generic_attach (dev=0x100)
at /usr/src/sys/kern/subr_bus.c:1807
#10 0xc0495761 in pci_attach (dev=0xc717cb80) at
/usr/src/sys/dev/pci/pci.c:907
#11 0xc0531b7f in device_probe_and_attach (dev=0xc71a6400) at device_if.h:39
#12 0xc05325f8 in bus_generic_attach (dev=0x100)
at /usr/src/sys/kern/subr_bus.c:1807
#13 0xc067f03d in legacy_pcib_attach (dev=0xc71a6400)
at /usr/src/sys/i386/pci/pci_bus.c:437
#14 0xc0531b7f in device_probe_and_attach (dev=0xc71a6480) at device_if.h:39
#15 0xc05325f8 in bus_generic_attach (dev=0x100)
at /usr/src/sys/kern/subr_bus.c:1807
#16 0xc06699bb in legacy_attach (dev=0xc71a6580)
at /usr/src/sys/i386/i386/legacy.c:154
#17 0xc0531b7f in device_probe_and_attach (dev=0xc71a6580) at device_if.h:39
#18 0xc05325f8 in bus_generic_attach (dev=0x100)
at /usr/src/sys/kern/subr_bus.c:1807
#19 0xc06718bc in nexus_attach (dev=0xc71a6600)
at /usr/src/sys/i386/i386/nexus.c:236
#20 0xc0531b7f in device_probe_and_attach (dev=0xc71a6600) at device_if.h:39
#21 0xc0533b78 in root_bus_configure () at /usr/src/sys/kern/subr_bus.c:2347
#22 0xc065f609 in configure (dummy=0x0)
at /usr/src/sys/i386/i386/autoconf.c:122
#23 0xc04ea9f5 in mi_startup () at /usr/src/sys/kern/init_main.c:212
(kgdb) quit
The program is running. Exit anyway? (y or n) y
[root at zoom/ttyp0(/home/trent)#] pciconf -lv | grep -C4 atapci1 | tail -n 5
atapci1 at pci0:9:0: class=0x010400 card=0x36801095 chip=0x06801095
rev=0x01 hdr=0x00
vendor = 'Silicon Image Inc (Was: CMD Technology Inc)'
device = 'SiI 0680 (Was: PCI-0648) Ultra ATA133 EIDE Controller'
class = mass storage
subclass = RAID
[root at zoom/ttyp0(/home/trent)#] pciconf -r -b pci0:9:0 0:255
95 10 80 06 07 01 90 02 01 00 04 01 01 40 00 00
01 dc 00 00 01 d8 00 00 01 d4 00 00 01 d0 00 00
01 cc 00 00 00 bf ff df 00 00 00 00 95 10 80 36
00 00 f0 df 60 00 00 00 00 00 00 00 0a 01 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 22 06 00 40 00 64 00 00 00 00 00 00 00 00
08 00 00 00 00 f0 94 00 00 00 00 00 00 e0 90 00
23 00 00 00 23 00 00 00 00 00 11 00 00 00 00 00
00 00 01 0d ff ff ff d0 00 00 00 18 00 00 00 00
01 01 8a 32 c1 10 8a 32 92 43 92 43 0b 40 09 40
01 01 8a 32 c1 10 8a 32 92 43 92 43 0b 40 09 40
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-confi
g.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
# latest information.
#
# An exhaustive list of options and more detailed explanations of the
# device lines is also present in the ../../conf/NOTES and NOTES files.
# If you are in doubt as to the purpose or necessity of a line, check first
# in NOTES.
#
# $FreeBSD$
machine i386
cpu I686_CPU
ident ZOOM
maxusers 512
options SCHED_ULE
#To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints" #Default places to look for devices.
makeoptions DEBUG=-g #Build kernel with gdb(1) debug
symbols
options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options UFS_ACL #Support for access control lists
options UFS_DIRHASH #Improve performance on big
directories
options MD_ROOT #MD is a potential root device
options NFSCLIENT #Network Filesystem Client
options NFSSERVER #Network Filesystem Server
options NFS_ROOT #NFS usable as root device, requires
NFSCLIENT
options MSDOSFS #MSDOS Filesystem
options CD9660 #ISO 9660 Filesystem
options PROCFS #Process filesystem (requires
PSEUDOFS)
options PSEUDOFS #Pseudo-filesystem framework
options COMPAT_43 #Compatible with BSD 4.3 [KEEP
THIS!]
options COMPAT_FREEBSD4 #Compatible with FreeBSD4
options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI
options KTRACE #ktrace(1) support
options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time
extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~128k to driver.
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
# These three options provide support for System V Interface
# Definition-style interprocess communication, in the form of shared
# memory, semaphores, and message queues, respectively.
#
# System V shared memory and tunable parameters
options SYSVSHM # include support for shared memory
options SHMMAXPGS=131072
options SHMALL=131072
options SHMMAX="(SHMMAXPGS*PAGE_SIZE+1)"
# max shared memory segment size (bytes)
options SHMMIN=2 # min shared memory segment size (bytes)
options SHMMNI=64 # max number of shared memory identifiers
options SHMSEG=16 # max shared memory segments per process
# System V semaphores and tunable parameters
options SYSVSEM # include support for semaphores
options SEMMAP=256 # amount of entries in semaphore map
options SEMMNI=256 # number of semaphore identifiers in the
system
options SEMMNS=512 # number of semaphores in the system
options SEMMNU=256 # number of undo structures in the system
options SEMMSL=64 # max number of semaphores per id
options SEMOPM=128 # max number of operations per semop call
options SEMUME=32 # max number of undo entries per process
# System V message queues and tunable parameters
options SYSVMSG # include support for message queues
options MSGMNB=2049 # max characters per message queue
options MSGMNI=64 # max number of message queue identifiers
options MSGSEG=2049 # max number of message segments in the
system
options MSGSSZ=16 # size of a message segment MUST be power of
2
options MSGTQL=256 # max amount of messages in the system
# Debugging for use in -current
options DDB #Enable the kernel debugger
#options INVARIANTS #Enable calls of extra sanity
checking
#options INVARIANT_SUPPORT #Extra sanity checks of internal
structures, required by INVARIANTS
#options WITNESS #Enable checks to detect deadlocks
and cycles
#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for
speed
# To make an SMP kernel, the next two are needed
options SMP # Symmetric MultiProcessor Kernel
device isa
device eisa
device pci
# Floppy drives
device fdc
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device atapicd # ATAPI CDROM drives
device atapifd # ATAPI floppy drives
device atapist # ATAPI tape drives
device atapicam # ATAPI CAM drives
options ATA_STATIC_ID #Static device numbering
# SCSI peripherals
device scbus # SCSI bus (required)
device ch # SCSI media changers
device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct SCSI access)
device ses # SCSI Environmental Services (and SAF-TE)
# System Management Bus (SMB) support
device smbus
device iicbus
device iicbb
device intpm
device viapm
device smb
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard
device psm # PS/2 mouse
device vga # VGA video card driver
device splash # Splash screen and screen saver support
# syscons is the default console driver, resembling an SCO console
device sc
# Enable this for the pcvt (VT220 compatible) console driver
#device vt
#options XSERVER # support for X server on a vt
console
#options FAT_CURSOR # start with block cursor
device agp # support several AGP chipsets
# Floating point support - do not disable.
device npx
# Power management support (see NOTES for more options)
#device apm
# Add suspend/resume support for the i8254.
#device pmtimer
device apic
# PCCARD (PCMCIA) support
# Pcmcia and cardbus bridge support
device cbb # cardbus (yenta) bridge
#device pcic # ExCA ISA and PCI bridges
device pccard # PC Card (16-bit) bus
device cardbus # CardBus (32-bit) bus
# Serial (COM) ports
device sio # 8250, 16[45]50 based serial ports
# Parallel port
device ppc
device ppbus # Parallel port bus (required)
device lpt # Printer
device plip # TCP/IP over parallel
device ppi # Parallel port interface device
#device vpo # Requires scbus and da
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
# Pseudo devices - the number indicates how many units to allocate.
device random # Entropy device
device loop # Network loopback
device ether # Ethernet support
device sl # Kernel SLIP
device ppp # Kernel PPP
device tun # Packet tunnel.
device pty # Pseudo-ttys (telnet etc)
device md # Memory "disks"
device gif # IPv6 and IPv4 tunneling
device faith # IPv6-to-IPv4 relaying (translation)
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
device bpf # Berkeley packet filter
# USB support
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device usb # USB Bus (required)
#device udbp # USB Double Bulk Pipe devices
device ugen # Generic
device uhid # "Human Interface Devices"
device ukbd # Keyboard
device ulpt # Printer
device umass # Disks/Mass storage - Requires scbus and da
device ums # Mouse
device urio # Diamond Rio 500 MP3 player
device uscanner # Scanners
# USB Ethernet, requires mii
device aue # ADMtek USB ethernet
device cue # CATC USB ethernet
device kue # Kawasaki LSI USB Ethernet
Regards,
Trent.
More information about the freebsd-current
mailing list