Rev 4342 | Rev 4345 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4342 | Rev 4344 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | #include <arch/types.h> |
37 | #include <arch/types.h> |
38 | 38 | ||
39 | #include <config.h> |
39 | #include <config.h> |
40 | 40 | ||
41 | #include <proc/thread.h> |
41 | #include <proc/thread.h> |
42 | #include <arch/drivers/ega.h> |
42 | #include <genarch/drivers/legacy/ia32/io.h> |
43 | #include <genarch/drivers/ega/ega.h> |
43 | #include <genarch/drivers/ega/ega.h> |
44 | #include <arch/drivers/vesa.h> |
44 | #include <arch/drivers/vesa.h> |
45 | #include <genarch/kbd/i8042.h> |
45 | #include <genarch/kbd/i8042.h> |
46 | #include <arch/drivers/i8254.h> |
46 | #include <arch/drivers/i8254.h> |
47 | #include <arch/drivers/i8259.h> |
47 | #include <arch/drivers/i8259.h> |
Line 61... | Line 61... | ||
61 | #include <arch/debugger.h> |
61 | #include <arch/debugger.h> |
62 | #include <syscall/syscall.h> |
62 | #include <syscall/syscall.h> |
63 | #include <console/console.h> |
63 | #include <console/console.h> |
64 | #include <ddi/irq.h> |
64 | #include <ddi/irq.h> |
65 | #include <ddi/device.h> |
65 | #include <ddi/device.h> |
- | 66 | #include <sysinfo/sysinfo.h> |
|
66 | 67 | ||
67 | 68 | ||
68 | /** Disable I/O on non-privileged levels |
69 | /** Disable I/O on non-privileged levels |
69 | * |
70 | * |
70 | * Clean IOPL(12,13) and NT(14) flags in EFLAGS register |
71 | * Clean IOPL(12,13) and NT(14) flags in EFLAGS register |
Line 171... | Line 172... | ||
171 | } |
172 | } |
172 | } |
173 | } |
173 | 174 | ||
174 | void arch_post_smp_init(void) |
175 | void arch_post_smp_init(void) |
175 | { |
176 | { |
- | 177 | devno_t devno = device_assign_devno(); |
|
176 | /* keyboard controller */ |
178 | /* keyboard controller */ |
177 | i8042_init(device_assign_devno(), IRQ_KBD, device_assign_devno(), IRQ_MOUSE); |
179 | (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD); |
- | 180 | ||
- | 181 | /* |
|
- | 182 | * This is the necessary evil until the userspace driver is entirely |
|
- | 183 | * self-sufficient. |
|
- | 184 | */ |
|
- | 185 | sysinfo_set_item_val("kbd", NULL, true); |
|
- | 186 | sysinfo_set_item_val("kbd.devno", NULL, devno); |
|
- | 187 | sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
|
178 | } |
188 | } |
179 | 189 | ||
180 | void calibrate_delay_loop(void) |
190 | void calibrate_delay_loop(void) |
181 | { |
191 | { |
182 | i8254_calibrate_delay_loop(); |
192 | i8254_calibrate_delay_loop(); |
Line 212... | Line 222... | ||
212 | #ifdef CONFIG_FB |
222 | #ifdef CONFIG_FB |
213 | vesa_redraw(); |
223 | vesa_redraw(); |
214 | #else |
224 | #else |
215 | ega_redraw(); |
225 | ega_redraw(); |
216 | #endif |
226 | #endif |
217 | - | ||
218 | i8042_grab(); |
- | |
219 | } |
227 | } |
220 | 228 | ||
221 | /** Return console to userspace |
229 | /** Return console to userspace |
222 | * |
230 | * |
223 | */ |
231 | */ |
224 | void arch_release_console(void) |
232 | void arch_release_console(void) |
225 | { |
233 | { |
226 | i8042_release(); |
- | |
227 | } |
234 | } |
228 | 235 | ||
229 | /** Construct function pointer |
236 | /** Construct function pointer |
230 | * |
237 | * |
231 | * @param fptr function pointer structure |
238 | * @param fptr function pointer structure |