NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sigma0.cc File Reference
#include "nul/motherboard.h"
#include "host/keyboard.h"
#include "host/screen.h"
#include "host/dma.h"
#include "host/hostpci.h"
#include "nul/program.h"
#include "nul/generic_service.h"
#include "service/elf.h"
#include "service/logging.h"
#include "sigma0/sigma0.h"
#include "nul/service_fs.h"
#include <nul/service_events.h>
#include "s0_admission.h"
#include "parent_protocol.h"
#include "s0_modules.h"

Classes

struct  Sigma0
 Sigma0 application class. More...
struct  Sigma0::PutcData
struct  Sigma0::DiskData
struct  Sigma0::ConsoleData

Macros

#define S0_DEFAULT_CMDLINE   "namespace::/s0 name::/s0/timer name::/s0/fs/rom name::/s0/admission name::/s0/fs/embedded quota::guid"
#define LOG_VERBOSE(X,...)   do { if (verbose & VERBOSE_INFO) Logging::printf(X, __VA_ARGS__); } while (0)
#define PT_FUNC_NORETURN(NAME, CODE)
#define PT_FUNC(NAME, CODE,...)

Enumerations

enum  { VERBOSE_ERRORS = 0, VERBOSE_INFO = 1 }
enum  {
  MAXCPUS = Config::MAX_CPUS, MAXPCIDIRECT = 64, MAXMODULES = 1 << Config::MAX_CLIENTS_ORDER, CPUGSI = 0,
  MEM_OFFSET = 1ul << 31, CLIENT_HIP = 0xBFFFF000U, CLIENT_BOOT_UTCB = CLIENT_HIP - 0x1000, CLIENT_PT_SHIFT = Config::CAP_RESERVED_ORDER,
  CLIENT_PT_ORDER = CLIENT_PT_SHIFT + Config::MAX_CLIENTS_ORDER, CLIENT_PT_OFFSET = 1U << (CLIENT_PT_ORDER+1)
}

Functions

 PARAM_HANDLER (mac_prefix,"mac_prefix:value=0x42000000 - override the MAC prefix.")
 PARAM_HANDLER (mac_host,"mac_host:value - override the host part of the MAC.")
 PARAM_HANDLER (verbose,"verbose - print additional information during runtime")
 PARAM_ALIAS (S0_DEFAULT,"an alias for the default sigma0 parameters"," ioio hostacpi pcicfg mmconfig atare"" hostreboot:0 hostreboot:1 hostreboot:2 hostreboot:3"" service_tracebuffer service_per_cpu_timer service_romfs service_embeddedromfs boot_s0_services script") struct ModuleInfo
 static_assert ((CLIENT_PT_OFFSET &((1U<< (CLIENT_PT_ORDER+1))-1))==0,"Capability space misconfiguration")
 PARAM_HANDLER (boot_s0_services,"Start embedded services running as separate task which are essential to sigma0, e.g. admission service.")
void do_exit (const char *msg)

Variables

Motherboardglobal_mb
Sigma0sigma0
Semaphoreconsolesem
unsigned mac_prefix = 0x42000000
unsigned mac_host
enum { ... }  verbose

Macro Definition Documentation

#define LOG_VERBOSE (   X,
  ... 
)    do { if (verbose & VERBOSE_INFO) Logging::printf(X, __VA_ARGS__); } while (0)
#define PT_FUNC (   NAME,
  CODE,
  ... 
)
Value:
static void NAME##_wrapper(unsigned pid, Sigma0 *tls, Utcb *utcb) __attribute__((regparm(1))) \
{ tls->NAME(pid, utcb); asmlinkage_protect("g"(tls), "g"(utcb)); } \
\
void __attribute__((always_inline)) NAME(unsigned pid, Utcb *utcb) __VA_ARGS__ \
{ CODE; }
#define PT_FUNC_NORETURN (   NAME,
  CODE 
)
Value:
static void NAME##_wrapper(unsigned pid, Sigma0 *tls, Utcb *utcb) __attribute__((regparm(1), noreturn)) \
{ tls->NAME(pid, utcb); } \
\
void __attribute__((always_inline, noreturn)) NAME(unsigned pid, Utcb *utcb) \
{ CODE; }
#define S0_DEFAULT_CMDLINE   "namespace::/s0 name::/s0/timer name::/s0/fs/rom name::/s0/admission name::/s0/fs/embedded quota::guid"

Enumeration Type Documentation

anonymous enum
Enumerator:
VERBOSE_ERRORS 
VERBOSE_INFO 
anonymous enum
Enumerator:
MAXCPUS 
MAXPCIDIRECT 
MAXMODULES 
CPUGSI 
MEM_OFFSET 
CLIENT_HIP 
CLIENT_BOOT_UTCB 
CLIENT_PT_SHIFT 
CLIENT_PT_ORDER 
CLIENT_PT_OFFSET 

Function Documentation

void do_exit ( const char *  msg)
PARAM_ALIAS ( S0_DEFAULT  ,
"an alias for the default sigma0 parameters"  ,
" ioio hostacpi pcicfg mmconfig atare"" hostreboot:0 hostreboot:1 hostreboot:2 hostreboot:3"" service_tracebuffer service_per_cpu_timer service_romfs service_embeddedromfs boot_s0_services script"   
)
PARAM_HANDLER ( mac_prefix  )
PARAM_HANDLER ( mac_host  ,
"mac_host:value - override the host part of the MAC."   
)
PARAM_HANDLER ( verbose  ,
"verbose - print additional information during runtime"   
)
PARAM_HANDLER ( boot_s0_services  ,
"Start embedded services running as separate task which are essential to  sigma0,
e.g.admission service."   
)
static_assert ( (CLIENT_PT_OFFSET &((1U<< (CLIENT_PT_ORDER+1))-1))  = =0,
"Capability space misconfiguration"   
)

Variable Documentation

Semaphore* consolesem
Motherboard* global_mb
unsigned mac_host
unsigned mac_prefix = 0x42000000
Sigma0* sigma0
enum { ... } verbose