A simple program that allows to get the UTCB pointer from the stack. More...
#include <baseprogram.h>
Static Public Member Functions | |
static Utcb * | myutcb (unsigned long esp=0) |
Get the UTCB pointer from the top of the stack, which is laid out as follows:
| |
static unsigned | mycpu () |
Return my CPU number. | |
static unsigned long | add_mappings (Utcb *utcb, unsigned long addr, unsigned long size, unsigned long hotspot, unsigned rights) |
add mappings to a UTCB. | |
static void | revoke_all_mem (void *address, unsigned long size, unsigned rights, bool myself) |
Revoke all memory for a given virtual region. | |
static Crd | request_mapping (char *start, unsigned long size, unsigned long hotspot) |
Request the mapping for a memory area. | |
Static Public Attributes | |
static const unsigned | stack_size_shift = 12 |
static const unsigned | stack_size = (1U << stack_size_shift) |
A simple program that allows to get the UTCB pointer from the stack.
static unsigned long BaseProgram::add_mappings | ( | Utcb * | utcb, | |
unsigned long | addr, | |||
unsigned long | size, | |||
unsigned long | hotspot, | |||
unsigned | rights | |||
) | [inline, static] |
add mappings to a UTCB.
static unsigned BaseProgram::mycpu | ( | ) | [inline, static] |
Return my CPU number.
static Utcb* BaseProgram::myutcb | ( | unsigned long | esp = 0 |
) | [inline, static] |
Get the UTCB pointer from the top of the stack, which is laid out as follows:
This layout is chosen to make the stack 16-byte aligned.
static Crd BaseProgram::request_mapping | ( | char * | start, | |
unsigned long | size, | |||
unsigned long | hotspot | |||
) | [inline, static] |
Request the mapping for a memory area.
static void BaseProgram::revoke_all_mem | ( | void * | address, | |
unsigned long | size, | |||
unsigned | rights, | |||
bool | myself | |||
) | [inline, static] |
Revoke all memory for a given virtual region.
const unsigned BaseProgram::stack_size = (1U << stack_size_shift) [static] |
const unsigned BaseProgram::stack_size_shift = 12 [static] |