Fatal trap 19: non-maskable interrupt trap while in kernel mode

Hidetoshi Shimokawa simokawa at crater.dragonflybsd.org
Sun Nov 7 03:07:37 PST 2004


At Fri, 5 Nov 2004 12:19:13 -0800 (PST),
Matthew Dillon wrote:
> 
>     I think what is going on is that the probe code is unmasking the
>     transmit and receive channel interrupts in order to probe the number
>     of available channels, without first clearing any 'garbage' status
>     pending on those channel(s).  Such status might occur from, e.g. the BIOS
>     playing with the firewire controller before booting the system.
>     This could result in an immediate interrupt which crashes the machine
>     before the driver has had a chance to program the interrupt vector.
>
> 
>     If that is what is going on, then this patch should fix the problem.
>     But it needs to be tested.  It doesn't crash my test box but we need to
>     find out if it fixes the reported problem.

During the boot, interrputs are disabled and this shouldn't be a problem.
And the interrupt vector is already initialized in fwohci_pci_attach()
before fwochi_init() is called.
It's a good idea that we should mask IT/IR interrupt before probing channels
but it should have nothing to do with this problem.

As interrupts are disable during the boot, it must not be a usual interrupt
but a NMI. I think it's a PCI bus problem rather than RAM.

Try the following patch,

Index: fwohci_pci.c
===================================================================
RCS file: /home/dcvs/src/sys/bus/firewire/fwohci_pci.c,v
retrieving revision 1.15
diff -u -r1.15 fwohci_pci.c
--- fwohci_pci.c	18 Jul 2004 12:37:03 -0000	1.15
+++ fwohci_pci.c	7 Nov 2004 19:47:52 -0000
@@ -238,6 +238,7 @@
 		PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN;
 #if 1
 	cmd &= ~PCIM_CMD_MWRICEN; 
+	cmd &= ~(PCIM_CMD_SERRESPEN | PCIM_CMD_PERRESPEN);
 #endif
 	pci_write_config(self, PCIR_COMMAND, cmd, 2);
 


>     Gabor, from your latest email it looks like neither NetBSD nor OpenBSD
>     are running a firewire driver, so it is possible that they also have
>     the bug but it isn't being hit.

I suppose their code doesn't enable above flags.

>     If you have the ability to download an ISO and burn it onto a CD to
>     boot/test the fix I could generate an ISO image for you to try with this
>     patch.  It may or may not work but it is worth a shot.


/\ Hidetoshi Shimokawa
\/  simokawa at xxxxxxxxxxx







More information about the Kernel mailing list