cfg.h File Reference

config script stuff More...

#include <l4/sys/types.h>
#include <l4/dm_generic/types.h>
#include <l4/env/env.h>
#include "kquota.h"

Go to the source code of this file.

Data Structures

struct  cfg_module_t
struct  cfg_mem_t
struct  cfg_cap_t
struct  cfg_task_t

Defines

#define CFG_MAX_MODULE   16
#define CFG_MAX_MEM   4
#define CFG_MAX_TASK   16
#define CFG_M_DMA_ABLE   0x00000001
#define CFG_M_CONTIGUOUS   0x00000002
#define CFG_M_DIRECT_MAPPED   0x00000004
#define CFG_M_NOSUPERPAGES   0x00000008
#define CAP_TYPE_ALLOW   1
#define CAP_TYPE_DENY   2
#define CFG_INTEGRITY_ID   1
#define CFG_INTEGRITY_PARENT_ID   2
#define CFG_INTEGRITY_SERVICE_ID   3
#define CFG_F_TEMPLATE   0x00000001
 this is a template
#define CFG_F_MEMDUMP   0x00000002
 dump memory
#define CFG_F_DIRECT_MAPPED   0x00000004
 sections are mapped 1:1
#define CFG_F_ALLOW_KILL   0x00000008
 allow killing other apps
#define CFG_F_ALLOW_VGA   0x00000010
 allow access to vga memory
#define CFG_F_SLEEP   0x00000020
 sleep before continue
#define CFG_F_NO_SIGMA0   0x00000040
 dont page other regions
#define CFG_F_ALLOW_CLI   0x00000080
 task may execute cli/sti
#define CFG_F_SHOW_APP_AREAS   0x00000100
 show app areas before start
#define CFG_F_STOP   0x00000200
 stop app just before start
#define CFG_F_NOSUPERPAGES   0x00000400
 don't use superpages
#define CFG_F_INTERPRETER   0x00000800
 interpret using libld-l4.s.so
#define CFG_F_ALL_WRITABLE   0x00001000
 all sections writable
#define CFG_F_L4ENV_BINARY   0x00002000
 l4env binary with infopage
#define CFG_F_ALLOW_BIOS   0x00004000
 allow access to BIOS memory
#define CFG_F_HASH_BINARY   0x00008000
 hash sections of binary
#define CFG_F_HASH_MODULES   0x00010000
 hash multi-boot modules, too

Functions

int cfg_new_task (const char *fname, const char *args)
 Create new config task.
void cfg_new_task_template (void)
 Create a task template.
int cfg_new_module (const char *fname, const char *args, l4_addr_t low, l4_addr_t high)
 Create new module for current config task.
int cfg_new_mem (l4_size_t size, l4_addr_t low, l4_addr_t high, l4_umword_t flags)
 Create new memory region for current config task.
int cfg_new_ioport (int low, int high)
 Add I/O ports low.
cfg_task_t ** cfg_next_task (void)
 Return next config task.
int cfg_task_no (unsigned int no)
 Set task number of task we currently working on.
int cfg_task_prio (unsigned int prio)
 Set priority of task we currently working on.
int cfg_task_mcp (unsigned int mcp)
 Set priority of task we currently working on.
int cfg_task_flag (unsigned int flag)
int cfg_task_fprov (const char *fname)
 Set task's file provider.
int cfg_task_dsm (const char *fname)
 Set task's dataspace manager.
int cfg_task_caphandler (const char *fname)
 Set caphandler of a task.
int cfg_task_kquota (const char *name)
int cfg_task_ipc (const char *name, int type)
 Set the task caps.
int cfg_task_integrity_id (const char *id64, int type)
 Set (parent) ID used in integrity database in external service.
int cfg_lookup_name (const char *name, l4_threadid_t *id)
 Lookup a name by names but check for numerical versions first, task.thread must use hex numbers.
void cfg_setup_input (const char *cfg_buffer, int size)
void cfg_done (void)
int cfg_parse (void)
int cfg_parse_init (void)
 Init config stuff before begin with parsing.
int cfg_job (unsigned int flag, unsigned int number)
int load_config_script (const char *fname_and_arg, l4_threadid_t fprov_id, const l4dm_dataspace_t *cfg_ds, l4_addr_t cfg_addr, l4_size_t cfg_size, l4_taskid_t owner, l4_uint32_t flags, int *is_binary, l4_taskid_t task_ids[])
 Load config script from dataspace image.
int load_config_script_from_file (const char *fname_and_arg, l4_threadid_t fprov_id, l4_taskid_t owner, l4_uint32_t flags, l4_taskid_t task_ids[])
int cfg_init (void)
 Init cfg stuff.

Variables

unsigned int cfg_verbose
unsigned int cfg_fiasco_symbols
unsigned int cfg_fiasco_lines
char cfg_binpath [L4ENV_MAXPATH]
char cfg_libpath [L4ENV_MAXPATH]
char cfg_modpath [L4ENV_MAXPATH]


Detailed Description

config script stuff

Date:
2001
Author:
Frank Mehnert <fm3@os.inf.tu-dresden.de>

Function Documentation

int cfg_init ( void   ) 

Init cfg stuff.

int cfg_new_ioport ( int  low,
int  high 
)

Add I/O ports low.

.high to I/O permission bitmap.

int cfg_new_mem ( l4_size_t  size,
l4_addr_t  low,
l4_addr_t  high,
l4_umword_t  flags 
)

Create new memory region for current config task.

int cfg_new_module ( const char *  fname,
const char *  args,
l4_addr_t  low,
l4_addr_t  high 
)

Create new module for current config task.

int cfg_new_task ( const char *  fname,
const char *  args 
)

Create new config task.

void cfg_new_task_template ( void   ) 

Create a task template.

cfg_task_t** cfg_next_task ( void   ) 

Return next config task.

int cfg_parse_init ( void   ) 

Init config stuff before begin with parsing.

int cfg_task_caphandler ( const char *  name  ) 

Set caphandler of a task.

int cfg_task_dsm ( const char *  dsm_name  ) 

Set task's dataspace manager.

int cfg_task_fprov ( const char *  fprov_name  ) 

Set task's file provider.

int cfg_task_integrity_id ( const char *  id64,
int  type 
)

Set (parent) ID used in integrity database in external service.

int cfg_task_ipc ( const char *  name,
int  type 
)

Set the task caps.

int cfg_task_mcp ( unsigned int  mcp  ) 

Set priority of task we currently working on.

int cfg_task_no ( unsigned int  no  ) 

Set task number of task we currently working on.

int cfg_task_prio ( unsigned int  prio  ) 

Set priority of task we currently working on.

int load_config_script ( const char *  fname_and_arg,
l4_threadid_t  fprov_id,
const l4dm_dataspace_t *  cfg_ds,
l4_addr_t  cfg_addr,
l4_size_t  cfg_size,
l4_taskid_t  owner,
l4_uint32_t  ext_flags,
int *  is_binary,
l4_taskid_t  task_ids[] 
)

Load config script from dataspace image.

Before loading, the dataspace is sent to the exec server which for ELF check. If it is a valid ELF binary, it is directly loaded.

Parameters:
fname_and_arg file name of the config script
fprov_id file provider to retrieve the config script from
cfg_ds dataspace of the config script (optionally)
cfg_addr address the dataspace is attached to
cfg_size size of the dataspace
owner owner of the new application
ext_flags external Flags (see <l4/loader/loader.h>
is_binary is that an ELF binary?
Return values:
task_ids IDs of started tasks

< interpret using libld-l4.s.so

< dump memory

< sleep before continue

< this is a template

< stop app just before start

< interpret using libld-l4.s.so

< this is a template

< this is a template


L4 Loader Reference Manual, part of DROPS  © 2000-2003