65,7 → 65,6 |
#include <proc/thread.h> |
#include <syscall/syscall.h> |
#include <console/console.h> |
#include <ddi/device.h> |
#include <sysinfo/sysinfo.h> |
#include <arch/boot/boot.h> |
|
111,13 → 110,17 |
|
/* hard clock */ |
i8254_init(); |
|
|
#ifdef CONFIG_FB |
if (vesa_present()) |
if (vesa_present()) |
vesa_init(); |
else |
#endif |
ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
#ifdef CONFIG_EGA |
ega_init(EGA_BASE, EGA_VIDEORAM); /* video */ |
#else |
{} |
#endif |
|
/* Enable debugger */ |
debugger_init(); |
147,28 → 150,28 |
|
void arch_post_smp_init(void) |
{ |
devno_t devno = device_assign_devno(); |
|
#ifdef CONFIG_PC_KBD |
/* |
* Initialize the keyboard module and conect it to stdin. Then |
* initialize the i8042 controller and connect it to kbrdin. Enable |
* keyboard interrupts. |
* Initialize the i8042 controller. Then initialize the keyboard |
* module and connect it to i8042. Enable keyboard interrupts. |
*/ |
kbrd_init(stdin); |
(void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD, &kbrdin); |
trap_virtual_enable_irqs(1 << IRQ_KBD); |
|
indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
if (kbrdin) { |
kbrd_init(kbrdin); |
trap_virtual_enable_irqs(1 << IRQ_KBD); |
} |
|
/* |
* This is the necessary evil until the userspace driver is entirely |
* self-sufficient. |
*/ |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, devno); |
sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
sysinfo_set_item_val("kbd.address.physical", NULL, |
(uintptr_t) I8042_BASE); |
sysinfo_set_item_val("kbd.address.kernel", NULL, |
(uintptr_t) I8042_BASE); |
#endif |
} |
|
void calibrate_delay_loop(void) |
202,9 → 205,14 |
void arch_grab_console(void) |
{ |
#ifdef CONFIG_FB |
vesa_redraw(); |
if (vesa_present()) |
vesa_redraw(); |
else |
#endif |
#ifdef CONFIG_EGA |
ega_redraw(); |
#else |
ega_redraw(); |
{} |
#endif |
} |
|