NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NovaProgram Class Reference

Contains common code for nova programms. More...

#include <program.h>

Inheritance diagram for NovaProgram:
BaseProgram CapAllocator InternalCapAllocator 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

Public Member Functions

 NovaProgram ()
- Public Member Functions inherited from CapAllocator
 CapAllocator (unsigned long cap_, unsigned long cap_start, unsigned long cap_order)
unsigned alloc_cap (unsigned count=1)
void dealloc_cap (unsigned cap, unsigned count=1)

Static Public Member Functions

static void exit (const char *msg)
 Default exit function.
- Static Public Member Functions inherited from BaseProgram
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.

Protected Member Functions

Utcballoc_utcb ()
 Alloc a region of virtual memory to put an EC into.
template<class C >
 __attribute__ ((nonnull(6))) unsigned create_ec_helper(C *tls
 Create an EC and setup the stack.
void init_mem (Hip *hip)
 Init the memory map from the HIP as we get them from sigma0.
void __attribute__ ((noreturn)) block_forever()
 Block ourself.

Protected Attributes

Hip_hip
unsigned _cap_block
RegionList< 512 > _free_virt
RegionList< 512 > _free_phys
RegionList< 512 > _virt_phys
phy_cpu_no cpunr
phy_cpu_no unsigned excbase
phy_cpu_no unsigned Utcb ** utcb_out
phy_cpu_no unsigned Utcb void * func
phy_cpu_no unsigned Utcb void
unsigned long 
cap = ~0UL
phy_cpu_no unsigned Utcb void
unsigned long bool 
local

Private Types

enum  { VIRT_START = 0x1000, UTCB_PAD = 0x1000 }

Additional Inherited Members

- Public Attributes inherited from CapAllocator
unsigned long _cap_
unsigned long _cap_start
unsigned long _cap_order
- Static Public Attributes inherited from BaseProgram
static const unsigned stack_size_shift = 12
static const unsigned stack_size = (1U << stack_size_shift)

Detailed Description

Contains common code for nova programms.

Member Enumeration Documentation

anonymous enum
private
Enumerator:
VIRT_START 
UTCB_PAD 

Constructor & Destructor Documentation

NovaProgram::NovaProgram ( )
inline

Member Function Documentation

template<class C >
NovaProgram::__attribute__ ( (nonnull(6))  )
protected

Create an EC and setup the stack.

Returns
The EC cap.
Parameters
tlsPointer passed to func as the first parameter
void NovaProgram::__attribute__ ( (noreturn)  )
inlineprotected

Block ourself.

Reimplemented in Cycleburner, and Tutor.

Utcb* NovaProgram::alloc_utcb ( )
inlineprotected

Alloc a region of virtual memory to put an EC into.

static void NovaProgram::exit ( const char *  msg)
inlinestatic

Default exit function.

void NovaProgram::init_mem ( Hip hip)
inlineprotected

Init the memory map from the HIP as we get them from sigma0.

Member Data Documentation

unsigned NovaProgram::_cap_block
protected
RegionList<512> NovaProgram::_free_phys
protected
RegionList<512> NovaProgram::_free_virt
protected
Hip* NovaProgram::_hip
protected
RegionList<512> NovaProgram::_virt_phys
protected
phy_cpu_no unsigned Utcb void unsigned long NovaProgram::cap = ~0UL
protected
phy_cpu_no NovaProgram::cpunr
protected
phy_cpu_no unsigned NovaProgram::excbase
protected
phy_cpu_no unsigned Utcb void* NovaProgram::func
protected
phy_cpu_no unsigned Utcb void unsigned long bool NovaProgram::local
protected
phy_cpu_no unsigned Utcb** NovaProgram::utcb_out
protected

The documentation for this class was generated from the following file: