main.c File Reference

#include <config.h>
#include "core.h"


#define IDT0   ((union descriptor *)(idt[0].va))
#define PALLOC(Paddr, NbPgs)
#define VALLOC(Vaddr, NbPgs)
#define P_ARG   5


void idle_main ()
void _start (t_kinfo *kinfo)
void progopts_bool_assign (char *value, u_int32_t mask)
void var_assign (char *name, char *value)
void launch (int argc, char **argv)
void tcb_dump (t_printf_fn printf_fn, char *s, struct s_tcb_full *tcb)
void tcb_destroy (struct s_tcb_full *tcb)
void as_destroy (struct s_as_full *as)
void cswitch ()


const char version []
int errno
int suberrno
paddr_t pfirst
paddr_t pstart
paddr_t pend
paddr_t pgdt
paddr_t ppt2
vaddr_t vstart
vaddr_t vpt2
u_int32_t old_pt1
char default_wd [MAXPATHLEN] = "/"
char * wd = default_wd
int fs_gate = GATE_RAMFS
u_int32_t progopts
u_int32_t execve_nbstkpgs = 10
t_fdescfdescs = NULL
int nb_fdescs = 0
s_idt idt [MAX_CPUS]
pid_t next_pid = 2LL
vaddr_t copy_vpage1 = (vaddr_t)-1
vaddr_t core_vpage1 = (vaddr_t)-1
vaddr_t core_vpage2 = (vaddr_t)-1
paddr_t core_ppage = (paddr_t)-1
paddr_t core_blankpgdir = (paddr_t)-1
vaddr_t pgflt_vpage1 = (vaddr_t)-1
vaddr_t pgflt_vpage2 = (vaddr_t)-1
vaddr_t tmp_vpage = (vaddr_t)-1
vaddr_t kvbootfs = (vaddr_t)-1
paddr_t raw_except_ppage = (paddr_t)-1
vaddr_t raw_except_vpage = (vaddr_t)-1
int vflg = 0
int tflg = 0
int lineno
int use_npx = 0
char line [MAXARGV *MAXARGLEN+1]

Define Documentation

#define IDT0   ((union descriptor *)(idt[0].va))

#define P_ARG   5

#define PALLOC Paddr,
NbPgs   ) 


assert(pstart + (NbPgs) * PAGESIZE < pend);\
  (Paddr) = pstart;\
  pstart += (NbPgs) * PAGESIZE;\

#define VALLOC Vaddr,
NbPgs   ) 


assert(vstart + (NbPgs) * PAGESIZE < 0xffffffff);\
  (Vaddr) = vstart;\
  vstart += (NbPgs) * PAGESIZE;\

Function Documentation

void _start t_kinfo kinfo  ) 

map and clean xfull gdt

map full idt

allocate tasks for coresrv

allocate tasks for trap

allocate tasks for pgflt

allocate tasks for breakpoint

allocate tasks for dblflt

allocate tasks for stray

allocate tasks for idle

Parse CONFFILE and launch drivers

OK I become the cxt switcher

void as_destroy struct s_as_full *  as  ) 

should be called by cswitch(9)

void cswitch  ) 

void idle_main  ) 

void launch int  argc,
char **  argv

void progopts_bool_assign char *  value,
u_int32_t  mask

void tcb_destroy struct s_tcb_full *  tcb  ) 

should be called by cswitch(9)

void tcb_dump t_printf_fn  printf_fn,
char *  s,
struct s_tcb_full *  tcb

void var_assign char *  name,
char *  value

Variable Documentation

vaddr_t copy_vpage1 = (vaddr_t)-1

paddr_t core_blankpgdir = (paddr_t)-1

paddr_t core_ppage = (paddr_t)-1

vaddr_t core_vpage1 = (vaddr_t)-1

vaddr_t core_vpage2 = (vaddr_t)-1

char default_wd[MAXPATHLEN] = "/"

int errno

u_int32_t execve_nbstkpgs = 10

t_fdesc* fdescs = NULL

int fs_gate = GATE_RAMFS

union descriptor* gdt

struct s_idt idt[MAX_CPUS]

vaddr_t kvbootfs = (vaddr_t)-1


int lineno

int nb_fdescs = 0

pid_t next_pid = 2LL

u_int32_t old_pt1

paddr_t pend

paddr_t pfirst

paddr_t pgdt

vaddr_t pgflt_vpage1 = (vaddr_t)-1

vaddr_t pgflt_vpage2 = (vaddr_t)-1

paddr_t ppt2

u_int32_t progopts

Initial value:

paddr_t pstart

paddr_t raw_except_ppage = (paddr_t)-1

vaddr_t raw_except_vpage = (vaddr_t)-1

int suberrno

int tflg = 0

vaddr_t tmp_vpage = (vaddr_t)-1

int use_npx = 0

const char version[]

int vflg = 0

vaddr_t vpt2

vaddr_t vstart

char* wd = default_wd

Generated on Wed May 24 23:06:00 2006 for LSE/OS by  doxygen 1.4.6