24 |
|
|
25 |
#include <string.h> |
#include <string.h> |
26 |
|
|
27 |
|
#include <hurd/cap.h> |
28 |
|
|
29 |
#include <l4.h> |
#include <l4.h> |
30 |
|
|
31 |
#include "output.h" |
#include "output.h" |
39 |
#define BUG_ADDRESS "<bug-hurd@gnu.org>" |
#define BUG_ADDRESS "<bug-hurd@gnu.org>" |
40 |
|
|
41 |
|
|
42 |
typedef __l4_rootserver_t rootserver_t; |
struct wortel_module |
43 |
|
{ |
44 |
|
const char *name; |
45 |
|
|
46 |
|
/* Low and high address of the module. */ |
47 |
|
l4_word_t start; |
48 |
|
l4_word_t end; |
49 |
|
|
50 |
|
/* The command line, in raw, uninterpreted form. */ |
51 |
|
char *args; |
52 |
|
|
53 |
|
/* The container capability in the physical memory server for this |
54 |
|
module. Valid for all modules except for the physical memory |
55 |
|
server itself. */ |
56 |
|
hurd_cap_scid_t mem_cont; |
57 |
|
|
58 |
|
/* The following informartion is only valid if a task will be |
59 |
|
created from the module. */ |
60 |
|
|
61 |
|
/* The entry point of the executable. */ |
62 |
|
l4_word_t ip; |
63 |
|
|
64 |
|
/* The task control capability for this module. Only valid if this |
65 |
|
is not the task server task itself. */ |
66 |
|
hurd_cap_scid_t task_ctrl; |
67 |
|
|
68 |
|
/* Main thread of the task made from this module. */ |
69 |
|
l4_thread_id_t main_thread; |
70 |
|
|
71 |
|
/* Server thread of the task made from this module. */ |
72 |
|
l4_thread_id_t server_thread; |
73 |
|
}; |
74 |
|
|
75 |
|
|
76 |
|
enum wortel_module_type |
77 |
|
{ |
78 |
|
MOD_PHYSMEM = 0, |
79 |
|
MOD_TASK, |
80 |
|
MOD_ROOT_FS, |
81 |
|
MOD_NUMBER |
82 |
|
}; |
83 |
|
|
84 |
|
|
85 |
|
extern const char *mod_names[MOD_NUMBER]; |
86 |
|
|
87 |
/* For the boot components, find_components() must fill in the start |
/* For the boot components, find_components() must fill in the start |
88 |
and end address of the ELF images in memory. The end address is |
and end address of the ELF images in memory. The end address is |
89 |
one more than the last byte in the image. */ |
one more than the last byte in the image. */ |
90 |
extern rootserver_t physmem; |
extern struct wortel_module mods[MOD_NUMBER]; |
91 |
|
|
92 |
|
extern unsigned int mods_count; |
93 |
|
|
94 |
/* Find the kernel, the initial servers and the other information |
/* Find the module information required for booting (start, end, args). */ |
|
required for booting. */ |
|
95 |
void find_components (void); |
void find_components (void); |
96 |
|
|
97 |
int main (int argc, char *argv[]); |
int main (int argc, char *argv[]); |