_PageCommitPhys

#include <vmm.h>

ULONG EXTERNAL _PageCommitPhys(ULONG page, ULONG npages, ULONG physpg,
    ULONG flags);
 

Commits a specified physical page or range of physical pages to a range of linear addresses.

page and npages
Linear page number to commit the first physical page to, and the number of pages to commit. The entire range of linear addresses must have been reserved by a single call to the _PageReserve service, and none of the linear pages can be already committed.
physpg
Physical page number of the first page to commit. All of the physical pages committed must be either outside the control of the memory manager (for example, a memory-mapped device or video memory) or otherwise under the control of the virtual device driver making the call (for example, previously allocated and locked, or obtained by a previous call to PageCommitContig with the PCC_NOLIN flag). By default, all pages in the linear address region are mapped to the page number specified by physpg. To commit a region of physical pages to a corresponding region of linear addresses, use the PC_INCR flag.
flags
One or more of these values:
PC_INCR The linear pages are mapped to an equal number of contiguous physical pages. That is, the physical page number is incremented for each linear page committed.

If this flag is not specified, all of the linear pages are mapped to the same physical page.

PC_USER The pages are accessible at ring 3.
PC_WRITEABLE The pages are writeable.

Memory committed through this service should not be touched while processing a hardware interrupt, since the page tables mapping the memory may be swapped out. Calling LinPageLock on the range will lock down any associated page tables and allow safe interrupt-time access.