add directory study
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
|
||||
|
||||
<h2>Map Device in Memory Block
|
||||
<img src="../1.0.gif" alt="[1.0]" width=22 height=17></h2>
|
||||
|
||||
Maps the physical addresses assigned to a device onto the linear
|
||||
addresses of a memory block previously allocated with <a
|
||||
href="310504.html">Int 31H Function 0504H</a>.<p>
|
||||
|
||||
<b>Call With</b><br>
|
||||
<img src="r/ax+ebx+ecx+edx+esi.gif" alt="" width=245 height=59><br>
|
||||
|
||||
AX = 0508H<br>
|
||||
ESI = memory block handle<br>
|
||||
EBX = offset within memory block of page(s) to be
|
||||
mapped (must be page-aligned)<br>
|
||||
ECX = number of pages to map<br>
|
||||
EDX = physical address of device (must be
|
||||
page-aligned)<p>
|
||||
|
||||
<b>Returns</b><br>
|
||||
<img src="r/ax+c.gif" alt="" width=245 height=59><br>
|
||||
|
||||
<i>if function successful</i><br>
|
||||
Carry flag = clear<p>
|
||||
|
||||
<i>if function unsuccessful</i><br>
|
||||
Carry flag = set<br>
|
||||
AX = <a href="errors.html">error code</a>
|
||||
|
||||
<table border=1 cellspacing=0 cellpadding=4>
|
||||
|
||||
<tr><td>8001H</td><td>unsupported function (Device Mapping</td></tr>
|
||||
Capability not supported)
|
||||
<tr><td>8003H</td><td>system integrity (invalid device address)</td></tr>
|
||||
<tr><td>8023H</td><td>invalid handle (in ESI)</td></tr>
|
||||
<tr><td>8025H</td><td>invalid linear address (specified range
|
||||
is not within specified block or EBX/EDX
|
||||
is not page-aligned)</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Notes</h2><ul>
|
||||
|
||||
|
||||
<li>16-bit DPMI hosts will not support this function. A 16-bit client
|
||||
of a 32-bit DPMI 1.0 host can use this function.<p>
|
||||
|
||||
<li>Support of this call by 32-bit DPMI hosts is optional.
|
||||
Application programs or DOS Extenders which require this call in order
|
||||
to run are not DPMI Compliant.<p>
|
||||
|
||||
<li>Any committed or mapped pages resided in the linear address range
|
||||
that is being mapped into will be uncommitted or unmapped
|
||||
automatically by the host.<p>
|
||||
|
||||
<li>All pages created by this call have the mapped bit (bit 2) set in
|
||||
the attributes returned by the Get Page Attributes function (<a
|
||||
href="310506.html">Int 31H Function 0506H</a>).<p>
|
||||
|
||||
<li>This function differs from the Create Physical Address Mapping
|
||||
function (<a href="310800.html">Int 31H Function 0800H</a>) in that
|
||||
this function supports mapping of physical devices within an existing
|
||||
memory block, rather than at an arbitrary linear address. Use of an
|
||||
existing memory block gives 32-bit programs the ability to access
|
||||
physical devices with NEAR pointers, which is often highly desirable
|
||||
for performance reasons.<p>
|
||||
|
||||
<li>Unlike <a href="310800.html">Int 31H Function 0800H</a>, this
|
||||
function allows mapping of addresses below 1 MB that do not lie within
|
||||
RAM available for use by programs; e.g. this function can be used to
|
||||
map the refresh buffers of IBM-compatible display adapters.<p>
|
||||
|
||||
<li>If the DPMI host is not virtualizing the device, it must disable
|
||||
any memory caching on the mapped pages; in particular, on the 486 or
|
||||
later, the PCD (page cache disable) bit must be set in the page table
|
||||
entries.<p>
|
||||
|
||||
<li>DPMI hosts that do not virtualize physical devices can support
|
||||
this function by creating page table entries that map the physical
|
||||
device. The page table entries must be marked as mapped so that the
|
||||
host knows not to attempt freeing of physical memory for the pages
|
||||
when the memory block is freed.<p>
|
||||
|
||||
<li>DPMI hosts are allowed to support this function for some physical
|
||||
devices and not for others, because mapping of virtualized devices
|
||||
requires page aliasing in the host - a complex task. DPMI hosts with
|
||||
partial support for this function may fail the function call on
|
||||
virtualized devices (such as displays), and allow the call on
|
||||
non-virtualized devices (such as the Weitek coprocessors). Allowing
|
||||
the client to map a physical device so that it can be accessed with
|
||||
NEAR references, for example, may help the client achieve considerably
|
||||
better performance.<p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user