One of the responsibilities of the OS should be to maintain an I/O
addressing space that’s usable by I/O devices independently of the
OS. And DMA for example should be something that is done
between the peripheral and memory, therefore, apart from setting
up that memory, the OS should stay by and large out of it.
In principle, yes, a device driver should always be able to take a
physical address that represents memory available on the bus,
map it to virtual, and use it accordingly. Whatever the PAE is used
for, I’m not going to support using it to keep my video memory out
of the I/O addressing space, for example - if I can’t map my video
memory at init time and use it as I feel fit, I can’t really have a
decent video driver.
The OS should indeed guarantee that bus-visible memory is
ALWAYS visible to bus devices, and that bus devices can move
data in and out of that memory independently of the OS. So, for
example, the Unix concept of direct rendering makes all the sense
in the world: have your video subsystem know about user contexts,
set up a direct pipe between app and video subsystem, and let the
OS stay out of it.
Alberto.
==========================
On 2 May 2002, at 10:19, Peter Wieland wrote:
in the general case there’s no way to ensure that the page you’re about
to transfer from is accessible by the device. Things like 8GB x86 PAE
systems have lots of memory which is inaccessible to the average 32-bit
PCI adapter. And even if your controller can handle 36-bits of physical
address, there’s no guarantee that the bus you’re attached to will do it
(some of them have bugs).
so yes - there is a difference between a common-buffer allocation & just
any old page, even on an x86 system.
-p
-----Original Message-----
From: Girish Gurunathan [mailto:xxxxx@wipro.com]
Sent: Thursday, May 02, 2002 4:31 AM
To: NT Developers Interest List
Subject: [ntdev] Common buffer for PAGE_SIZE memory in DMA
Hi,
In a WDM driver in x86 platform for a Bus Master PCI device with on
board IP 1901 DMAC, I want to transfer 1514 bytes of data to and from
the device. This size is less than PAGE_SIZE and so memory should be
contiguous. Is it ok if I allocate these many bytes in nonpaged pool,
get the physical address of that memory and program the DMAC with this
physical address to transfer the data?
Is there any difference between a “common buffer” of size less than one
page and a non paged pool of the same size for a DMA transfer in Windows
running on x86?
Regards,
Girish
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%
You are currently subscribed to ntdev as: xxxxx@ieee.org
To unsubscribe send a blank email to %%email.unsub%%