next up previous contents index
Next: 17.2.2 svm_alloc: allocate a Up: 17.2 API reference Previous: 17.2 API reference

17.2.1 svm_init: initialize SVM system

 

SYNOPSIS

#include <oskit/svm/svm.h>

void svm_init(oskit_absio_t *pager_absio);

DESCRIPTION

This function initializes the SVM system, turning on base paging support (see Section 10.9.1), and optionally configuring pageout support. The pager_absio argument is optional, and if specified should be a device suitable for use as the swap area for the pager. pager_absio may also be a oskit_blkio_t; the pager will query the object to determine which type it is. Only a single paging area is supported. The initialization code will create an initial set of page tables that maps all of physical memory as readable and writable, except for kernel text which is mapped read-only. A stack redzone is also created, although stack overflows are fatal since there is not enough support to allow recovery. The address range above the end of physical memory is mapped as invalid so that accesses result in a page fault trap (instead of silently returning bogus data).

In the case of a multi-threaded kernel, pager_absio must be a properly wrapped object (see Section 18.4). The current multi-threaded locking strategy is extremely simple; a single lock protects the entire SVM module.

PARAMETERS

pager_absio
An oskit_absio_t * or oskit_blkio_t * that is suitable for use as the swap area.



University of Utah Flux Research Group