[lkml]   [2000]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DMA to user space

On Thu, 16 Mar 2000 08:22:38 -0500 (EST), "Richard B. Johnson"
<> 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
> to user space, but even that's not guaranteed. To have something
> 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.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:57    [W:0.077 / U:0.492 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site