Barrelfish
Functions
vspace.h File Reference

Vspace definitions. More...

Functions

genvaddr_t vspace_lvaddr_to_genvaddr (lvaddr_t lvaddr)
 Translate a lvaddr_t to genvaddr_t.
 
lvaddr_t vspace_genvaddr_to_lvaddr (genvaddr_t genvaddr)
 Translate a genvaddr_t to lvaddr_t.
 
errval_t vspace_current_init (bool init_domain)
 Initialize the current vspace structure. More...
 
errval_t vspace_init (struct vspace *vspace, struct pmap *pmap)
 Initialize a vspace. More...
 
errval_t vspace_destroy (struct vspace *vspace)
 Destroy a vspace.
 
struct vregion * vspace_get_region (struct vspace *vspace, const void *addr)
 Get the region corresponding to the given virtual address. More...
 
errval_t vspace_pagefault_handler (struct vspace *vspace, lvaddr_t addr, vm_fault_type_t type)
 Page fault handler. More...
 

Detailed Description

Vspace definitions.

Function Documentation

errval_t vspace_current_init ( bool  init_domain)

Initialize the current vspace structure.

This code is coupled with pmap_current_init()

struct vregion* vspace_get_region ( struct vspace *  vspace,
const void *  addr 
)

Get the region corresponding to the given virtual address.

Parameters
addrThe virtual address
errval_t vspace_init ( struct vspace *  vspace,
struct pmap *  pmap 
)

Initialize a vspace.

Parameters
vspaceThe vspace to initialize
pmapThe pmap to associate with the vspace

Initializes a vspace, associating it with a pmap

errval_t vspace_pagefault_handler ( struct vspace *  vspace,
lvaddr_t  lvaddr,
vm_fault_type_t  type 
)

Page fault handler.

Parameters
pointThe vspace page fault occured in
addrThe faulting address
typeThe fault type

Lookup the appropriate vregion and forward the fault to it