Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

xpcReserveMemoryRegion

Return virtual address that corresponds to physical address and mark region as readable/writable

Prototype

void * xpcReserveMemoryRegion(const void *physical, 
uint32_T numBytes, uint32_T access)

Arguments

physical

Starting address of the memory region to be reserved. Typically, you obtain this address 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_USERREADWRITE (read/write).

Return

The xpcReserveMemoryRegion function returns the virtual address to use to access the physical 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.

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).

Was this topic helpful?