DOS/32 Advanced DOS Extender - Technical Reference



9.0 - DOS/32 Advanced - Physical Memory Mapping

DOS/32 Advanced DOS Extender supports Physical Memory Mapping through its built-in DPMI functions 0800h and 0801h. However the programmers should take a note when using these functions as they are implemented differently than those available in DOS/4G(W) Extenders.

As defined by DPMI specification, when mapping physical memory region into linear memory using function 0800h, the DPMI host should recognize calls to this functions which map already mapped physical memory regions and perform no action, instead reporting the linear address of the linear memory which maps physical memory. However, DOS/4G(W) DPMI server does not seem to do this and will map the same physical memory regions twice (or as many times as this function is called) into different linear memory at different addresses.

An example would be a program which maps Linear Framebuffer of a Video card located at 0xE8000000 two times. DOS/4G(W) DOS Extenders will report one linear address the first time DPMI function 0800h is called, and another, completely different linear address the second time. This will result in that the program will use two different linear addresses when accessing one and the same physical address of memory.

DOS/32 Advanced built-in DPMI will act differently, and will always check whether the physical memory region being mapped by the application has already been mapped. If that is the case, DOS/32 Advanced will report the linear address of the previously mapped memory block. Please note that this behavior of DOS/32 Advanced ADPMI does not impact the compatibility with DOS/4G(W) Extenders and is completely transparent to the application which uses Physical Memory Mapping. On the other hand this will also save you the valuable linear memory and Page Tables.

Please note that Physical Memory Mapping will require allocation of additional Page Tables when running under VCPI. If you are not planning to use DPMI functions 0800h and 0801h in your programs, and you want to free up some of DOS memory, you may lower the number of the Page Tables reserved by the DOS Extender for Physical Memory Mapping, VCPI PhysTables, by using the SUNSYS Setup Utility program.

 


Copyright Supernar Systems, Ltd. 1996-2005
All Rights Reserved.