PHYSICAL ADDRESS MAPPING


Memory mapped devices such as network adapters and displays
sometimes have memory mapped at physical addresses that lie
outside of the normal 1Mb of memory that is addressable in
real mode. Under many implementations of DPMI, all
addresses are linear addresses since they use the paging
mechanism of the 80386. This service can be used by device
drivers to convert a physical address into a linear address.
The linear address can then be used to access the device
memory.

Some implementations of DPMI may not support this call
because it could be used to circumvent system protection.
This call should only be used by programs that absolutely
require direct access to a memory mapped device.

To Call

AX = 0800h
BX:CX = Physical address of memory
SI:DI = Size of region to map in bytes

Returns

If function was successful:
Carry flag is clear.
BX:CX = Linear address that can be used to access the
physical memory

If function was not successful:
Carry flag is set.

Programmer's Notes

o Under DPMI implementations that do not use the
80386 paging mechanism, the function will always
succeed and the address returned will be equal to
the physical address parameter passed into this
function.
o It is up to the caller to build an appropriate
selector to access the memory.
o Do not use this service to access memory that is
mapped in the first megabyte of address space (the
real mode addressable region).