_PhysIntoV86

include vmm.inc

VMMCall _PhysIntoV86, <PhysPage, VM, VMLinPgNum, nPages, flags>

or      eax, eax                ; nonzero if mapped, zero if an error
jz      not_mapped
 

Maps the specified physical pages in the V86 address space. This service is similar to the _MapIntoV86 service, but takes physical page numbers instead of memory handles. Virtual devices use this service to associate physical device memory (such as the video memory) with a particular virtual machine. Uses EAX, ECX, EDX, and Flags.

PhysPage
Physical page number of the start of the region to map. A physical page number is a physical address shifted right by 12 bits.
VM
Handle of the virtual machine for which the memory is mapped.
VMLinPgNum
Linear page number in the virtual machine's address space. The service maps the first physical page to the corresponding linear address in the V86 address space. This parameter must be in the range 10h through 10Fh.
nPages
Number of pages to map.
flags
Operation flags. Can be zero or the MAPV86_IGNOREWRAP value. This value enables the caller to treat the high memory area (HMA) simply as an extension of the V86 address space, whether or not wrap is enabled.

If MAPV86_IGNOREWRAP is specified and wrap is enabled, the service updates only the HMA alias mapping for pages in the HMA, not the currently-visible mapping. The HMA corresponds to page numbers 100h through 10Fh.

If more than one physical page is specified, this service maps the pages contiguously. If the physical memory is not contiguous, the virtual device must make individual calls for each page.

Virtual devices must not map physical pages that do not contain actual memory, or that belong to some other device.

For each mapped page, this service sets the P_USER, P_PRES, and P_WRITE bits, but clears the P_DIRTY and P_ACC bits.

See Also

_MapIntoV86