Rev 4347 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4347 | Rev 4348 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | * @brief ARM32 architecture specific functions. |
33 | * @brief ARM32 architecture specific functions. |
34 | */ |
34 | */ |
35 | 35 | ||
36 | #include <arch.h> |
36 | #include <arch.h> |
37 | #include <config.h> |
37 | #include <config.h> |
38 | #include <arch/console.h> |
- | |
39 | #include <genarch/fb/fb.h> |
38 | #include <genarch/fb/fb.h> |
40 | #include <genarch/fb/visuals.h> |
39 | #include <genarch/fb/visuals.h> |
41 | #include <genarch/drivers/dsrln/dsrlnin.h> |
40 | #include <genarch/drivers/dsrln/dsrlnin.h> |
42 | #include <genarch/drivers/dsrln/dsrlnout.h> |
41 | #include <genarch/drivers/dsrln/dsrlnout.h> |
43 | #include <genarch/srln/srln.h> |
42 | #include <genarch/srln/srln.h> |
44 | #include <sysinfo/sysinfo.h> |
43 | #include <sysinfo/sysinfo.h> |
- | 44 | #include <console/console.h> |
|
45 | #include <ddi/irq.h> |
45 | #include <ddi/irq.h> |
46 | #include <arch/drivers/gxemul.h> |
46 | #include <arch/drivers/gxemul.h> |
47 | #include <print.h> |
47 | #include <print.h> |
48 | #include <config.h> |
48 | #include <config.h> |
49 | #include <interrupt.h> |
49 | #include <interrupt.h> |
Line 60... | Line 60... | ||
60 | init.cnt = bootinfo->cnt; |
60 | init.cnt = bootinfo->cnt; |
61 | 61 | ||
62 | for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); ++i) { |
62 | for (i = 0; i < min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS); ++i) { |
63 | init.tasks[i].addr = bootinfo->tasks[i].addr; |
63 | init.tasks[i].addr = bootinfo->tasks[i].addr; |
64 | init.tasks[i].size = bootinfo->tasks[i].size; |
64 | init.tasks[i].size = bootinfo->tasks[i].size; |
65 | strncpy(init.tasks[i].name, bootinfo->tasks[i].name, |
65 | str_cpy(init.tasks[i].name, CONFIG_TASK_NAME_BUFLEN, |
66 | CONFIG_TASK_NAME_BUFLEN); |
66 | bootinfo->tasks[i].name); |
67 | } |
67 | } |
68 | } |
68 | } |
69 | 69 | ||
70 | /** Performs arm32 specific initialization before mm is initialized. */ |
70 | /** Performs arm32 specific initialization before mm is initialized. */ |
71 | void arch_pre_mm_init(void) |
71 | void arch_pre_mm_init(void) |
Line 126... | Line 126... | ||
126 | */ |
126 | */ |
127 | void arch_post_smp_init(void) |
127 | void arch_post_smp_init(void) |
128 | { |
128 | { |
129 | #ifdef CONFIG_ARM_KBD |
129 | #ifdef CONFIG_ARM_KBD |
130 | /* |
130 | /* |
131 | * Initialize the msim/GXemul keyboard port. Then initialize the serial line |
131 | * Initialize the GXemul keyboard port. Then initialize the serial line |
132 | * module and connect it to the msim/GXemul keyboard. Enable keyboard interrupts. |
132 | * module and connect it to the GXemul keyboard. |
133 | */ |
133 | */ |
- | 134 | dsrlnin_instance_t *dsrlnin_instance |
|
134 | indev_t *kbrdin = dsrlnin_init((dsrlnin_t *) gxemul_kbd, GXEMUL_KBD_IRQ); |
135 | = dsrlnin_init((dsrlnin_t *) gxemul_kbd, GXEMUL_KBD_IRQ); |
135 | if (kbrdin) |
136 | if (dsrlnin_instance) { |
- | 137 | srln_instance_t *srln_instance = srln_init(); |
|
136 | srln_init(kbrdin); |
138 | if (srln_instance) { |
- | 139 | indev_t *sink = stdin_wire(); |
|
- | 140 | indev_t *srln = srln_wire(srln_instance, sink); |
|
- | 141 | dsrlnin_wire(dsrlnin_instance, srln); |
|
- | 142 | } |
|
- | 143 | } |
|
137 | 144 | ||
138 | /* |
145 | /* |
139 | * This is the necessary evil until the userspace driver is entirely |
146 | * This is the necessary evil until the userspace driver is entirely |
140 | * self-sufficient. |
147 | * self-sufficient. |
141 | */ |
148 | */ |
Line 199... | Line 206... | ||
199 | void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
206 | void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller) |
200 | { |
207 | { |
201 | return addr; |
208 | return addr; |
202 | } |
209 | } |
203 | 210 | ||
- | 211 | /** Acquire console back for kernel. */ |
|
- | 212 | void arch_grab_console(void) |
|
- | 213 | { |
|
- | 214 | #ifdef CONFIG_FB |
|
- | 215 | fb_redraw(); |
|
- | 216 | #endif |
|
- | 217 | } |
|
- | 218 | ||
- | 219 | /** Return console to userspace. */ |
|
- | 220 | void arch_release_console(void) |
|
- | 221 | { |
|
- | 222 | } |
|
- | 223 | ||
204 | /** @} |
224 | /** @} |
205 | */ |
225 | */ |