[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VDMA & PCI



>Here's one I'll be NOBODY can answer, but I'll give it a shot ...

Ok, Monish Shah isn't the only one that can be tempted:

>
>what happens to VDMA (virtual DMA) services on a bus mastering transfer?  My
>understanding was that the VDMA internals intercepted I/O to the DMA controller
>and converted logical addresses to physical.  On PCI bus mastering, there is no
>effective I/O to trap to the DMA controller.  I would imagine this would render
>VDMA useless in these cases.

If you are refering to the VDS (Virtual DMA Services) as implemented on
DOS, Windows 3.11 etc, then here are a few comments:

VDS was designed to allow DOS programs that used DMA to run under a
protected mode environment where memory could be (a) relocated and (b)
fragmented by a protected mode memory controller. It exists in one form or
another in both Windows and EMM386.

The way VDS works is:

(a) If the application is not "VDS aware", then any I/O to the 8237 DMA
controllers on the motherboard will be intercepted. If the application's
DMA target memory is just relocated, then VDS will translate from the
logical to physical adresses, and program the 8237s with the correct
physical address. If the application memory is fragmented, VDS will set up
the DMA to happen to the VDS driver's own internal buffer (typically 16K),
and copy the results to/from the logical application space. If the DMA
transfer is greater than 16K, you get the famous "DMA buffer too small"
message as in a Windows DOS box.

(b) If the application is "VDS aware", it can call a series of functions,
via the Int 4B chain, that allow it to find the actual physical address(es)
of a logical memory space, switch on and off the 8237 virtualisation etc.

In the case of a bus mastering controller (either AT bus or PCI):

(a) The motherboard 8237s would not be used, so the virtualisation would
indeed be useless.

(b) But the controller's driver software would need to use the VDS calls to
get the physical addresses of any area it wanted to perform DMA to, and
program the bus master hardware accordingly.

VDS is described more fully in several  documents on the Microsoft Web
site, notably PW0519.


Hope this helps,

Sandy McGuffog




,