Static Public Member Functions | Static Public Attributes

BaseProgram Struct Reference

A simple program that allows to get the UTCB pointer from the stack. More...

#include <baseprogram.h>

Inheritance diagram for BaseProgram:
NovaProgram Sigma0Base ab::AdmissionService ab::DummyFS ab::IPCTest ab::RemoteConfig ab::TestConfig ab::TestIP Cycleburner IdleTest js::TestIP Rocknshine Sigma0 Tutor Vancouver Sigma0

List of all members.

Static Public Member Functions

static Utcbmyutcb (unsigned long esp=0)
 Get the UTCB pointer from the top of the stack, which is laid out as follows:

  • 4: UTCB
  • 8: dummy -12: UTCB -16: TLS -20: function pointer.

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)

Detailed Description

A simple program that allows to get the UTCB pointer from the stack.


Member Function Documentation

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:

  • 4: UTCB
  • 8: dummy -12: UTCB -16: TLS -20: function pointer.

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.


Member Data Documentation

const unsigned BaseProgram::stack_size = (1U << stack_size_shift) [static]
const unsigned BaseProgram::stack_size_shift = 12 [static]

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines