add directory study
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
|
||||
|
||||
<h2>Physical Address Mapping
|
||||
<img src="../0.9.gif" alt="[0.9]" width=22 height=17></h2>
|
||||
|
||||
Converts a physical address into a linear address. This function
|
||||
allows device drivers running under DPMI hosts which use paging to
|
||||
reach physical memory that is associated with their devices above the
|
||||
1 MB boundary Examples of such devices are the Weitek numeric
|
||||
coprocessor (usually mapped at 3 GB), buffers that hold scanner bit
|
||||
maps, and high-end displays that can be configured to make display
|
||||
memory appear in extended memory.<p>
|
||||
|
||||
<b>Call With</b><br>
|
||||
<img src="r/ax+bx+cx+si+di.gif" alt="" width=245 height=59><br>
|
||||
|
||||
AX = 0800H<br>
|
||||
BX:CX = physical address of memory<br>
|
||||
SI:DI = size of region to map (bytes)<p>
|
||||
|
||||
<b>Returns</b><br>
|
||||
<img src="r/ax+bx+cx+c.gif" alt="" width=245 height=59><br>
|
||||
|
||||
<i>if function successful</i><br>
|
||||
Carry flag = clear<br>
|
||||
BX:CX = linear address that can be used to access the
|
||||
physical memory<br>
|
||||
|
||||
<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>8003H</td><td>system integrity (DPMI host memory
|
||||
region)</td></tr>
|
||||
<tr><td>8021H</td><td>invalid value (address is below 1 MB
|
||||
boundary)</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Notes</h2><ul>
|
||||
|
||||
|
||||
<li>It is the caller's responsibility to allocate and initialize a
|
||||
descriptor for access to the memory.<p>
|
||||
|
||||
<li>This function should only be used by clients that absolutely
|
||||
require direct access to a memory mapped device at physical addresses
|
||||
above 1 MB. Clients should not use this function to access memory
|
||||
below the 1 MB boundary (the real mode addressable region). See also
|
||||
<a href="310200.html">Int 31H Functions 0002H</a>, <a
|
||||
href="310508.html">0508H</a>, and <a href="310509.html">0509H</a>.<p>
|
||||
|
||||
<li>When this function is called, the DPMI host either creates page
|
||||
table entries that directly map the physical addresses requested and
|
||||
returns the linear address of the created page table entries, or else
|
||||
just returns the linear address of the memory region that is already
|
||||
used to map the requested device. For example, if the client attempts
|
||||
to map a Weitek coprocessor and the host already has a linear region
|
||||
set up to map the Weitek chip and virtualize it, it would simply
|
||||
return the linear address of the existing region. If the host does
|
||||
not virtualize the Weitek chip, it would create 16 page table entries
|
||||
that map the 64 KB Weitek address space and return a linear address
|
||||
corresponding to the new page table entries.<p>
|
||||
|
||||
<li>If the host is not virtualizing the device, it must disable any
|
||||
memory caching on the mapped pages; in particular, on the 80486 the
|
||||
host must set the PCD (page cache disable) bit in the page table
|
||||
entries.<p>
|
||||
|
||||
<li>The host is permitted to fail any memory mapping call. However,
|
||||
the host should support this function whenever possible, to achieve
|
||||
compatibility with application programs that use memory-mapped devices
|
||||
of which the host is not aware. Useful guidelines are that the host
|
||||
should fail any attempt to map addresses below 1 MB, or addresses
|
||||
which the host considers to be general-purpose RAM memory. Attempts
|
||||
to map any other physical address should succeed, since the host
|
||||
should either (a) already know about the device and be able to return
|
||||
a linear address used to access the device, or (b) assume the program
|
||||
is attempting to map a legitimate device of which the host has no
|
||||
knowledge.<p>
|
||||
|
||||
<li>Programs and device drivers which need to perform DMA I/O to
|
||||
physical addresses in a virtualized hardware environment should use
|
||||
the Virtual DMA Services (see the Glossary entry for the Virtual DMA
|
||||
Services Specification). Also see page 10 of the DPMI execution
|
||||
environment section.<p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user