How to do DMA transfers under DOS extender or DPMI environment?
===

How can a program use DMA transfers while running under a DOS extender+DPMI environment ? 

I mean how can we *allocate* and get *physical address* of the dma buffer allocated, so as to supply that physical address to the DMA controller, or *PCI bus master device*.

There are two possiblities:

The DOS Extender or DPMI server/host *support virtual memory*. eg [Causeway](http://www.devoresoftware.com/freesource/cwsrc.htm).

The DOS Extender or DPMI server/host *doesn't support virtual memory, but paging* is enabled. eg [DOS32a](http://dos32a.narechk.net/index_en.html).

I'm using Open Watcom C compiler.

The runtime environment is :

           FreeDOS + XMS(no EMS/EMM386) + DOS extender(DOS32a)  

For DJGPP, the solution is [here](http://www.delorie.com/djgpp/v2faq/faq18_13.html)

But will that last mentioned solution ie via XMS, work with DOS32a too?

DOS32a docs say that before switching to protected mode, it allocates *all* of the available extended memory, and then our program can allocate that memory via DPMI function 501h.