User`s guide
xpcReser veMemoryRegion
Purpose Return virtual address that corresponds to physical address and mark
region as readable/writable
Prototype void * xpcReserveMemory Region(const void
*physical, uint32_T
numBytes, uint32_T acce ss)
Arguments
physical
Starting address of the memory region to be
reserved. This is typically obtained from one of the
PCI base address registers.
numBytes
Size of region to be located, in bytes.
access
Type of access, limited to XPC_RT_PG_ USER READWRITE
(read/write).
Return The x pcRe serveMemoryRegion function returns the virtual address to
use to access the p hysical address.
Description 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.
It is safe to call this function m u l tipl e times with the same address. A
call to this function with an already reserved area returns the same
virtual address.
The needed size differs f rom board to board. You can obtain the
correct number of bytes from the register programming manual of the
particular board. This size is typically a multiple of a page (4096 bytes).
11-11