Mail Archives: djgpp/2001/05/11/19:15:36
> Anyway, you _must_ use one of the methods described by the FAQ section
> 18.13 to get a physical address.
I am working on providing some example code which provides an additional
alternative to the methods in the FAQ. In particular, if you are running
under CWSDPMI you can allocate very large buffers via malloc/sbrk, lock
them into memory, and get the physical address of the buffer. The goal
is a routine which you ask for a DMA buffer, and it returns a DJGPP pointer
and physical address map. Since paging is enabled, the DJGPP buffer may
be contiguous but the physical memory you might have "holes" in it and be
forced to scatter gather or use only a portion of the buffer (especially if
you have VCPI enabled).
If the environment is not CWSDPMI the goal would be to transparently use
the other methods as described in the FAQ. I don't have much time for
testing or working on the non-CWSDPMI methods (I suspect someone has
XMS buffer allocation code they could donate). If anyone wants to test
or contribute drop me an email.
- Raw text -