Messages in this thread | | | Date | Mon, 08 Mar 1999 14:08:32 +0100 | From | "Albrecht Dreß" <> | Subject | Help: PCI & DMA |
| |
Hi all,
first of all a big THANK YOU to all who helped me with this topic up to now... but the saga is still going on: I try to write a driver for a CompactPCI card which uses PCI bus master DMA, but I can lock the kernel very efficiently :-(
As last test, I disabled all pci->pc memory dma functions for the module, so there is definitely no chance for the module to overwrite any kernel space. Running a test program which only reads data from the main memory via dma (and writes to the pci device) gives different effects depending on the value of the PCI_LATENCY_TIMER:
o with a small value (e. g. 8), I get "holes" (blank or unprintible characters) in the console output. They are scrolled correctly, so they anyhow seem to go into memory. The kernel is locked after some 10 kb of transferred data, sometimes after a message "Uhhuh. NMI received etc.etc." (coming from arch/i386/kernel/traps.c).
o with large values (e. g. 64), it runs smoother, but will also lock up sometimes.
The addresses are o.k. (I think): I use virt_to_bus (), and kmalloc () as decribed in `Linux device drivers'. As kernel space will never get swapped, this should work. Anyway _reading_ from memory should always work even if the contents is not what I want to have. Also, all the data which was transferred before the lockup is correct (the io card is connected to a dsp which checks a crc).
Therefore, I suspect that there might be a hardware problem (as the computer has a CompactPCI bus, and we only have one piece, I can't test it with a different model). Does this sound reasonable for the kernel gurus (in this case I will try to get some support from the vendor of the CompactPCI pc)?
Thanks for any help,
Albrecht.
-- +-----------------------------------------------------------------------------+ | Dr.-Ing. Albrecht Dre\ss ---- | | Max-Planck-Institut f\"ur Radioastronomie |\ / /o o\ | | Technische Abt. Optische Interferometrie | \ / | / | | | Auf dem H\"ugel 69 | \ | \ ---/ | | D-53121 Bonn (Germany) ------------+------+------------------- | | | / | | | Phone (+49) 228 525 319 | / / | | Fax (+49) 228 525 411 |/ / | | Mail ad@mpifr-bonn.mpg.de | +-------------- electrical engineers do it with less resistance --------------+
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |