include vmm.inc VMMcall _PhysIntoV86, <PhysPage, VM, VMLinPgNum, nPages, flags> or eax, eax ; nonzero if mapped, zero if an error jz not_mapped |
The _PhysIntoV86 service 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.
PhysPage
Specifies the 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
Specifies a handle identifying the virtual machine for which the memory is mapped.
VMLinPgNum
Specifies the linear page number of a page in the 1 megabyte V86 address space. This service maps the physical pages starting at the associated given V86 address. This parameter must not specify page number below 10h or above 10Fh.
nPages
Specifies the number of pages to map.
flags
Specifies the operation flags. This parameter must be set to 0.
The EAX register contains a nonzero value if the service is successful. Otherwise, EAX contains zero to indicate an error, such as an invalid virtual machine handle or an illegal map range.
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. The service sets the page type to be identical to the type for the specified protected-mode linear address. This service sets the page type to PG_SYS.
EAX