Rev 4057 | Rev 4148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 4057 | Rev 4099 | ||
|---|---|---|---|
| Line 111... | Line 111... | ||
| 111 | 111 | ||
| 112 | /* hard clock */ |
112 | /* hard clock */ |
| 113 | i8254_init(); |
113 | i8254_init(); |
| 114 | 114 | ||
| 115 | #ifdef CONFIG_FB |
115 | #ifdef CONFIG_FB |
| 116 | if (vesa_present()) |
116 | if (vesa_present()) |
| 117 | vesa_init(); |
117 | vesa_init(); |
| 118 | else |
118 | else |
| 119 | #endif |
119 | #endif |
| 120 | #ifdef CONFIG_EGA |
120 | #ifdef CONFIG_EGA |
| 121 | ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
121 | ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
| Line 149... | Line 149... | ||
| 149 | } |
149 | } |
| 150 | } |
150 | } |
| 151 | 151 | ||
| 152 | void arch_post_smp_init(void) |
152 | void arch_post_smp_init(void) |
| 153 | { |
153 | { |
| - | 154 | #ifdef CONFIG_PC_KBD |
|
| 154 | devno_t devno = device_assign_devno(); |
155 | devno_t devno = device_assign_devno(); |
| 155 | 156 | ||
| 156 | /* |
157 | /* |
| 157 | * Initialize the keyboard module and conect it to stdin. Then |
- | |
| 158 | * initialize the i8042 controller and connect it to kbrdin. Enable |
158 | * Initialize the i8042 controller. Then initialize the keyboard |
| 159 | * keyboard interrupts. |
159 | * module and connect it to i8042. Enable keyboard interrupts. |
| 160 | */ |
160 | */ |
| - | 161 | indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD); |
|
| - | 162 | if (kbrdin) { |
|
| 161 | kbrd_init(stdin); |
163 | kbrd_init(kbrdin); |
| 162 | (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD, &kbrdin); |
- | |
| 163 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
164 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
| - | 165 | } |
|
| 164 | 166 | ||
| 165 | /* |
167 | /* |
| 166 | * This is the necessary evil until the userspace driver is entirely |
168 | * This is the necessary evil until the userspace driver is entirely |
| 167 | * self-sufficient. |
169 | * self-sufficient. |
| 168 | */ |
170 | */ |
| 169 | sysinfo_set_item_val("kbd", NULL, true); |
171 | sysinfo_set_item_val("kbd", NULL, true); |
| Line 171... | Line 173... | ||
| 171 | sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
173 | sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
| 172 | sysinfo_set_item_val("kbd.address.physical", NULL, |
174 | sysinfo_set_item_val("kbd.address.physical", NULL, |
| 173 | (uintptr_t) I8042_BASE); |
175 | (uintptr_t) I8042_BASE); |
| 174 | sysinfo_set_item_val("kbd.address.kernel", NULL, |
176 | sysinfo_set_item_val("kbd.address.kernel", NULL, |
| 175 | (uintptr_t) I8042_BASE); |
177 | (uintptr_t) I8042_BASE); |
| - | 178 | #endif |
|
| 176 | } |
179 | } |
| 177 | 180 | ||
| 178 | void calibrate_delay_loop(void) |
181 | void calibrate_delay_loop(void) |
| 179 | { |
182 | { |
| 180 | i8254_calibrate_delay_loop(); |
183 | i8254_calibrate_delay_loop(); |
| Line 204... | Line 207... | ||
| 204 | * |
207 | * |
| 205 | */ |
208 | */ |
| 206 | void arch_grab_console(void) |
209 | void arch_grab_console(void) |
| 207 | { |
210 | { |
| 208 | #ifdef CONFIG_FB |
211 | #ifdef CONFIG_FB |
| - | 212 | if (vesa_present()) |
|
| 209 | vesa_redraw(); |
213 | vesa_redraw(); |
| - | 214 | else |
|
| - | 215 | #endif |
|
| - | 216 | #ifdef CONFIG_EGA |
|
| - | 217 | ega_redraw(); |
|
| 210 | #else |
218 | #else |
| 211 | ega_redraw(); |
219 | {} |
| 212 | #endif |
220 | #endif |
| 213 | } |
221 | } |
| 214 | 222 | ||
| 215 | /** Return console to userspace |
223 | /** Return console to userspace |
| 216 | * |
224 | * |