NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::EventTest ab::IPCTest ab::RemoteConfig ab::TestConfig ab::TestIP App App Cycleburner EchoService EchoService Hello LogDiskMan Rocknshine ServiceProgram Sigma0 SServiceProgram< Session, A, Base > SServiceProgram< EchoClient, EchoService, BASE_SSERVICE > Tutor WvProgram WvProgram Sigma0

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:
static phy_cpu_no mycpu ()
 Return my CPU number.
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 phy_cpu_no BaseProgram::mycpu ( )
inlinestatic

Return my CPU number.

static Utcb* BaseProgram::myutcb ( unsigned long  esp = 0)
inlinestatic

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 
)
inlinestatic

Request the mapping for a memory area.

static void BaseProgram::revoke_all_mem ( void *  address,
unsigned long  size,
unsigned  rights,
bool  myself 
)
inlinestatic

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: