Rev 973 | Rev 1037 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 973 | Rev 1027 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | #include <print.h> |
43 | #include <print.h> |
44 | #include <memstr.h> |
44 | #include <memstr.h> |
45 | #include <console/console.h> |
45 | #include <console/console.h> |
46 | #include <interrupt.h> |
46 | #include <interrupt.h> |
47 | #include <console/kconsole.h> |
47 | #include <console/kconsole.h> |
48 | #include <ipc/ns.h> |
- | |
49 | 48 | ||
50 | #ifdef CONFIG_SMP |
49 | #ifdef CONFIG_SMP |
51 | #include <arch/smp/mps.h> |
50 | #include <arch/smp/mps.h> |
52 | #endif /* CONFIG_SMP */ |
51 | #endif /* CONFIG_SMP */ |
53 | 52 | ||
Line 67... | Line 66... | ||
67 | * @param arg Not used. |
66 | * @param arg Not used. |
68 | */ |
67 | */ |
69 | void kinit(void *arg) |
68 | void kinit(void *arg) |
70 | { |
69 | { |
71 | thread_t *t; |
70 | thread_t *t; |
- | 71 | task_t *utask; |
|
72 | 72 | ||
73 | interrupts_disable(); |
73 | interrupts_disable(); |
74 | 74 | ||
75 | #ifdef CONFIG_SMP |
75 | #ifdef CONFIG_SMP |
76 | if (config.cpu_count > 1) { |
76 | if (config.cpu_count > 1) { |
Line 131... | Line 131... | ||
131 | else |
131 | else |
132 | panic("thread_create/kconsole\n"); |
132 | panic("thread_create/kconsole\n"); |
133 | 133 | ||
134 | interrupts_enable(); |
134 | interrupts_enable(); |
135 | 135 | ||
136 | /* Initialize name service */ |
- | |
137 | ns_start(); |
- | |
138 | - | ||
139 | if (config.init_size > 0) { |
136 | if (config.init_size > 0) { |
140 | /* |
137 | /* |
141 | * Create the first user task. |
138 | * Create the first user task. |
142 | */ |
139 | */ |
143 | 140 | ||
144 | if (config.init_addr % FRAME_SIZE) |
141 | if (config.init_addr % FRAME_SIZE) |
145 | panic("config.init_addr is not frame aligned"); |
142 | panic("config.init_addr is not frame aligned"); |
146 | 143 | ||
147 | if (!task_run_program((void *)config.init_addr)) { |
144 | utask = task_run_program((void *)config.init_addr); |
- | 145 | if (utask) |
|
- | 146 | ipc_phone_0 = &utask->answerbox; |
|
- | 147 | else |
|
148 | printf("Userspace not started.\n"); |
148 | printf("Userspace not started.\n"); |
149 | } |
- | |
150 | } |
149 | } |
151 | 150 | ||
152 | #ifdef CONFIG_TEST |
151 | #ifdef CONFIG_TEST |
153 | test(); |
152 | test(); |
154 | #endif /* CONFIG_TEST */ |
153 | #endif /* CONFIG_TEST */ |