|
Public Types |
enum | Status {
Insert_ok = 0,
Insert_warn_exists,
Insert_warn_attrib_upgrade,
Insert_err_nomem,
Insert_err_exists
} |
| Return status of v_insert. More...
|
enum | Page_attrib {
Page_no_attribs = 0,
Page_writable = Pt_entry::Writable,
Page_noncacheable = Pt_entry::Noncacheable | Pt_entry::Write_through,
Page_user_accessible = Pt_entry::User,
Page_all_attribs
} |
| Attribute masks for page mappings. More...
|
Public Member Functions |
bool | is_privileged (void) |
| Is this task a privileged one?
|
void | make_current () |
void | switchin_context () |
template<typename T> |
T | peek (T const *addr, bool user_space) |
| Read integral type at any virtual address.
|
template<typename T> |
T | peek_user (T const *addr) |
| Read integral type at virtual address in user space.
|
template<typename T> |
void | poke_user (T *addr, T value) |
| Set integral type at virtual address in user space to value.
|
template<typename T> |
void | copy_from_user (T *kdst, T const *usrc, size_t n) |
| Copy integral types from user space to kernel space.
|
template<typename T> |
void | copy_to_user (T *udst, T const *ksrc, size_t n) |
| Copy integral types from kernel space to user space.
|
void | page_map (Address phys, Address virt, Address size, unsigned page_attribs) |
void | page_unmap (Address virt, Address size) |
void | page_protect (Address virt, Address size, unsigned page_attribs) |
Address | kip_address () const |
| Get KIP address.
|
void | kmem_update (void *addr) |
| Update this address space with an entry from the kernel's shared address space.
|
void | remote_update (const Address, const Space *, const Address, size_t) |
| Populate this address space with n PDEs from a remote address space.
|
void | update_small (Address virt, bool flush) |
| Update a page in the small space window from Kmem.
|
bool | is_mappable (Address addr, size_t size) |
| Check if an memory region may be unmapped or overmapped.
|
int | mapped (Address addr, int need_writable) const |
Address | virt_to_phys (Address virt) const |
| Simple page-table lookup.
|
const Pdir * | dir () const |
Space_index | id () const |
| Task number.
|
Space_index | chief () const |
| Chief Number.
|
void * | operator new (size_t size) |
void | operator delete (void *block) |
Address | virt_to_phys_s0 (void *a) const |
| Simple page-table lookup.
|
bool | is_sigma0 (void) const |
| Tests if a task is the sigma0 task.
|
unsigned | get_io_counter (void) |
bool | io_lookup (Address) |
| ~Space () |
| Destructor.
|
Space::Status | v_insert (Address phys, Address virt, size_t size, unsigned page_attribs) |
| Insert a page-table entry, or upgrade an existing entry with new attributes.
|
bool | v_lookup (Address virt, Address *phys=0, Address *size=0, unsigned *page_attribs=0) |
| Look up a page-table entry.
|
bool | v_delete (Address virt, Address size, unsigned page_attribs=0) |
| Delete page-table entries, or some of the entries' attributes.
|
void | ldt_addr (void *addr) |
Address | ldt_addr () const |
void | ldt_size (Mword size) |
Mword | ldt_size () const |
template<> |
void | copy_from_user (Mword *kdst, Mword const *usrc, size_t n) |
template<> |
void | copy_to_user (Mword *udst, Mword const *ksrc, size_t n) |
Static Public Member Functions |
static Space * | id_lookup (Task_num id) |
| Lookup space belonging to a task number.
|
static Space * | current () |
Protected Member Functions |
void | switchin_lipc_kip_pointer () |
| Space (unsigned number) |
| Constructor.
|
Protected Attributes |
Pdir | _dir |
Private Member Functions |
| Space () |
| Space (const Space &) |
void | remove_from_space_index () |
| Remove space from space index.
|
void | switch_ldt () |
void | free_ldt_memory () |
Class Space extends Space_context with insertion and lookup functions.