Mail Archives: djgpp/1997/10/18/01:03:43
> lets say "fred[70000]" how do you get the PHYSICAL address into an int so
> you can pass that to, say, a dma chip which is ready to accept a 32-bit
> address.
You don't. The physical addres may change from one moment to another. The
memory may be swapped to disk, or not even physically contiguous due to
the paging hardware. The easiest thing to do is to use the 1Mb region for
all your DMA buffers, since it is mapped 1:1. You can also use the XMS
routines to allocate and lock a buffer if using a memory manager which
supports this.
If you plan to limit execution to a certain environment (cwsdpmi, etc) you
may be able to access the page tables and determine what you need to know.
- Raw text -