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

Common code for NOVA programs. More...

#include "service/string.h"
#include "service/cpu.h"
#include "service/logging.h"
#include "sys/hip.h"
#include "sys/syscalls.h"
#include "region.h"
#include "baseprogram.h"
#include "config.h"
#include <nul/capalloc.h>

Classes

class  NovaProgram
 Contains common code for nova programms. More...

Macros

#define ASMFUNCS(X, Y)
 Define the functions needed by asm.s.

Functions

void NORETURN REGPARM (1) idc_reply_and_wait_fast(unsigned long mtr)
unsigned alloc_cap_region (unsigned count, unsigned align_order)
void dealloc_cap_region (unsigned base, unsigned count)

Variables

char __image_start
char __image_end
RegionList< 512 > _cap_region

Detailed Description

Common code for NOVA programs.

Copyright (C) 2008, Bernhard Kauer bk@vm.nosp@m.mon..nosp@m.org Economic rights: Technische Universitaet Dresden (Germany)

This file is part of Vancouver.

Vancouver.nova is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Vancouver.nova is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.

Macro Definition Documentation

#define ASMFUNCS (   X,
 
)
Value:
extern "C" void start(phy_cpu_no cpu, Utcb *utcb) REGPARM(3) NORETURN; \
void start(phy_cpu_no cpu, Utcb *utcb) \
{ \
utcb->head.nul_cpunr = cpu; \
static X x; \
x.run(utcb, &Global::hip); \
do_exit("run returned"); \
} \
void do_exit(const char *msg) \
{ \
Y::exit(msg); \
while (1) \
asm volatile ("ud2a" : : "a"(msg)); \
}

Define the functions needed by asm.s.

Unfortunately this can not be a template.

Function Documentation

unsigned alloc_cap_region ( unsigned  count,
unsigned  align_order 
)
void dealloc_cap_region ( unsigned  base,
unsigned  count 
)
void NORETURN REGPARM ( )

Variable Documentation

char __image_end
char __image_start
RegionList<512> _cap_region