NAME | SYNOPSIS | FEATURES | DESCRIPTION | RESTRICTIONS | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <mem/chMem.h>int pageMap(KnPage * page, VmFlags flags, VmAddr * addr, VmSize * size, VmOffset * offset);
PXM_EXT
This system call is strictly reserved for internal use only. It MUST NOT be used by any application.
The pageMap call contiguously maps the page list specified by the page argument in the supervisor address space The flags argument consists of two parts:
The K_KNPAGE_TYPE bit field which specifies the type of page list:
For getAcc , pullIn or dcGetPages page lists
For pushOutAsyn page lists
The K_NOWAITFORMEMORY flag; if this flag is set, the call will return immediately with the K_ENOMEM error if there is no virtual address space available. If not set, it will wait for virtual memory to become available. This flag must be set if the pageMap call is invoked from interrupt level.
The pageMap call sets the addr output argument to the virtual address to which the page list is mapped. It also sets the size output argument to the size of the data, and the offset output argument to the offset of the first page of the list. In the case of a pullIn up-call, or of a dcGetPages, the output argument size is set to the number of pages in the list multiplied by the page size. In the case of a pushOutAsyn up-call, pageMap gives a valid data size which is less than or equal to the number of pages of the list mutiplied by the page size (the last page of the list may be partially valid).
The pageUnmap nucleus call unmaps a list of pages specified by the page argument which were previously mapped through the pageMap call.
It should be noted that the list of pages may be freely split and joined, either before invoking pageMap or pageUnmap . The lists provided are always sorted incrementally by offset.
The current implementation is only applicable to trusted supervisor actors.
If successful, K_OK is returned, otherwise an error code is returned.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RESTRICTIONS | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO