I tried sending this from my work account, but our new exchange server isn't
exactly sending mail correctly... Excuse the duplicate post if you see it.
:)

-- Kevin



-----BEGIN PGP SIGNED MESSAGE----- 
Hash: SHA1 

We're working on a custom PCI card, that on occasion requires several 
retries to complete a read (talking to a very slow device). We had a 
small bug that would cause it to retry forever, if the device never 
responded. It seems that our PCI chipset generates an NMI if the PCI 
retry limit is hit. That's OK with us, except that if the read is 
going through procfs_rwmem, we get a kernel trap. 

If we run a test that attempts to do a read from a PCI mmap()ed 
memory register that will retry forever, without using GDB, we get: 

NMI ISA b0, EISA ff 
RAM parity error, likely hardware failure. 

Followed by a bus error. This is exactly what we'd expect to happen, 
and I'm happy with that. If we run the exact same code through gdb 
(which seems to use procfs somehow) we get: 

Fatal trap 19: non-maskable interrupt trap while in kernel mode 
instruction pointer     = 0x8:0xc0306860 
stack pointer           = 0x10:0xede2ce28 
frame pointer           = 0x10:0xede2ce54 
code segment            = base 0x0, limit 0xfffff, type 0x1b 
                        = DPL 0, pres 1, def32 1, gran 1 
processor eflags        = interrupt enabled, IOPL = 0 
current process         = 211 (gdb) 
interrupt mask          = none 

Program received signal SIGEMT, Emulation trap. 
0xc0306860 in generic_bcopy () 
(kgdb) bt 
#0  0xc0306860 in generic_bcopy () 
#1  0xede2cf0c in ?? () 
#2  0xc01dbe55 in procfs_rwmem (curp=0xeca5b560, p=0xeca5b3c0, 
uio=0xede2cf0c) at ../../miscfs/procfs/procfs_mem.c:208 
#3  0xc01dbf48 in procfs_domem (curp=0xeca5b560, p=0xeca5b3c0, 
pfs=0x0, uio=0xede2cf0c) at ../../miscfs/procfs/procfs_mem.c:264 
#4  0xc01b83b9 in ptrace (curp=0xeca5b560, uap=0xede2cf80) at 
../../kern/sys_process.c:399 
#5  0xc0307f29 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 
47, tf_edi = 675283088, tf_esi = 0, tf_ebp = -1077938072, 
      tf_isp = -303902764, tf_ebx = 675283088, tf_edx = 673855764, 
tf_ecx = 1, tf_eax = 26, tf_trapno = 7, tf_err = 2, 
      tf_eip = 673315836, tf_cs = 31, tf_eflags = 518, tf_esp = 
- -1077938148, tf_ss = 47}) at machine/smp.h:190 
#6  0xc02fc3b5 in Xint0x80_syscall () 



Is it supposed to work this way? 



pcib0: <Intel 82443BX host to PCI bridge (AGP disabled)> on 
motherboard 
pci0: <PCI bus> on pcib0 
pcib1: <DEC 21154 PCI-PCI bridge> at device 8.0 on pci0 
pci1: <PCI bus> on pcib1 
ikapci0: <Ikadega cPCI access board> mem 
0xb4000000-0xb7ffffff,0xc0000000-0xdfffffff irq 11 at device 9.0 on 
pci1 




-----BEGIN PGP SIGNATURE----- 
Version: PGP Personal Privacy 6.5.3 

iQA/AwUBOvBFHc0YFqTZRQvqEQKjaQCeM/oZScd+FkHMV63ia0rgC5LAcfQAoKIx 
+1YDufmdbiTBK+J8/IIl46sj 
=LbQh 
-----END PGP SIGNATURE----- 




-- 
Kevin Day
[EMAIL PROTECTED] - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to