1 #ifndef BOOT_MODULES_H_
2 #define BOOT_MODULES_H_
4 #include <barrelfish/barrelfish.h>
5 #include <int_route/int_model.h>
8 struct int_startup_argument;
10 struct driver_argument {
11 struct capref arg_caps;
12 struct int_startup_argument int_arg;
15 typedef errval_t(*module_start_fn)(coreid_t where, struct module_info* mi,
16 char* record, struct driver_argument * int_arg);
18 #define MAX_DRIVER_INSTANCES 16
25 char* args; ///< cmd args as a single string
27 char* cmdargs; ///< Used for pointers in argv
29 char* argv[MAX_CMDLINE_ARGS + 1];
31 module_start_fn start_function;
32 uint8_t allow_multi; ///< allow multiple driver instances
33 uint8_t num_started; ///< keeps track of the number of started domains
34 coreid_t coreoffset; ///< next coreid to start the new instance on
35 struct capref did[MAX_DRIVER_INSTANCES];
39 void init_environ(void);
40 errval_t init_boot_modules(void);
41 struct module_info* find_module(char*);
42 struct module_info* find_corectrl_for_cpu_type(enum cpu_type cpu_type);
44 bool is_started(struct module_info*);
45 bool can_start(struct module_info*);
46 bool is_auto_driver(struct module_info*);
47 void set_start_function(char*, module_start_fn);
48 void set_started(struct module_info*);
49 void set_multi_instance(struct module_info*, uint8_t);
50 void set_core_id_offset(struct module_info*, coreid_t);
51 struct capref *get_did_ptr(struct module_info *);
52 coreid_t get_core_id_offset(struct module_info*);
54 #endif /* BOOT_MODULES_H_ */