Kernel Panic during memcpy_toio to PCI card

From: Donepudi, Suneeta (sdonepudi@3eti.com)
Date: Fri Nov 01 2002 - 15:06:59 EST


Hi,

I would like help in diagnosing a kernel panic while accessing a PCI device.

Everything runs fine for sometime and in about 1/2 hour I get a Kernel Panic
message saying :

"Unable to handle kernel paging request at virtual address 0xc2821000"

Analysis with Ksymoops shows that it is happening during a memcpy_toio()
with the PCI card. The PCI card uses three Base Address Registers with
virtual addresses mapped as follows (after ioremap has been issued):

BAR0 = 0xc280f000
BAR1 = 0xc2811000
BAR2 = 0xc2822000

It seems like the kernel panic is complaining about an address which is a
combination of BAR1 (lower bytes) and BAR2 (upper bytes). It should really
be accessing the BAR1 address at the point the crash occurred.

I put the following if-statement just before the memcpy_toio():
-----------------------------------------------------------
if (((long int)pci_bar1) == 0xc2821000)
{
        printk (KERN_ERR "Illegal address for BAR1\n");
        return -1;
}
memcpy_toio (pci_bar1, in_ptr, len);
------------------------------------------------------------

It still caused the crash in the same manner and at the same location.
Could someone help me with pointers to where I should start looking ?
Disabling interrupts around the memcpy_toio() did not make any
difference. Is this a hardware problem with the PCI card ? We are using
a Xilinx core with out FPGA build into it.
Is there a book I could read to learn more about debugging this in the
Kernel ?

Thanks a bunch,
Suneeta

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:21 EST