Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Fri, 17 Mar 2000 13:56:55 +0000 (GMT) | Subject | Re: DMA to user space |
| |
Hi,
On Thu, 16 Mar 2000 08:22:38 -0500 (EST), "Richard B. Johnson" <root@chaos.analogic.com> said:
>> I'm writing a driver for a strange DMA device and I would like to be able >> to do DMA directly into the user's buffer. Is this possible?
> No. Not a "user-buffer".
The raw IO code in 2.3 allows you to do dma from user buffers to any block device.
> It may be possible to memory-map something that's > DMA..able to user space, but even that's not guaranteed. To have something > DMA..able in the ix86 machines, it needs to be:
> (1) Physical, below 16 Megabytes
This only applies to ISA devices. PCI devices can access all of memory (although the driver needs to support dual address cycles or PCI64 to access memory above 4GB).
> (2) DATA alignment must be such that a 64k block is not crossed > during a DMA transfer. The ix86 machines use a page register > to access 64k pages.
Only ISA, again.
> (3) You need access to the DMA controller which the kernel isn't > going to give you, without a fight iopl(3), etc., from user- > space.
The question was not about doing it from user mode. It was about accessing user space from a kernel-mode driver.
--Stephen
- 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/
| |