Mail Archives: djgpp/2000/04/19/23:45:44
> On Tue, 4 Apr 2000, batchex wrote:
> > I read in the FAQ section 18.7 that it is possible to map a
> > physical memory range to a program's address space. The
> > restriction to this is the physical address and the address to
> > be mapped to must be page aligned.
For the DPMI 1.0 function 0x508 (as mentioned below), which CWSDPMI supports.
> > a. How do we ensure the mapped to address is page aligned?
Eli replied:
> If you are talking about function 0508h (only supported by DPMI 1.0
> providers), then you need to allocate the memory via function 0504h,
> which always returns page-aligned addresses. This is clearly
> explained in the DPMI 1.0 spec.
While the DPMI spec says this, both 386MAX and CWSDPMI will support a
handle allocated with the DPMI 0.9 calls since they always return
memory page aligned. This is how the page protection stuff works also,
since it is also page aligned.
> > c. If the physical address is a memory mapped i/o, do we need to
> > lock the mapped address?
>
> The DPMI 1.0 spec seems to say that they are already paged in, so I
> think you don't need to lock them.
Correct - mapped memory is always locked.
> > Almost forgot, the function I'm talking about is DPMI 1.0
> > function 0x508 or __djgpp_map_physical_memory().
>
> And that's where you problem lies: most DPMI servers out ther don't
> support DPMI 1.0 or functions 0508h. You might find one or two
> servers which do, but they are not the widely-used ones.
CWSDPMI and 386MAX do support this function on DPMI 0.9 handles, so for
a DOS only environment it might be fun to play with, but won't be portable
to Win type environments.
- Raw text -