Return virtual address that corresponds to physical address and mark region as readable/writable
void * xpcReserveMemoryRegion(const void *
Starting address of the memory region to be reserved. Typically, you obtain this address from one of the PCI base address registers.
Size of region to be located, in bytes.
Type of access, limited to
xpcReserveMemoryRegion function returns
the virtual address to use to access the physical address.
This function reserves a region of physical memory (as returned by the PCI BIOS) and returns the corresponding virtual address. You can later use the virtual address for pointer addressing.
You can call this function multiple times with the same address. A call to this function with an already reserved area returns the same virtual address.
The required size differs from board to board. You can obtain the required number of bytes from the register programming manual of the particular board. This size is typically a multiple of a page (4096 bytes).