Subversion Repositories HelenOS

Rev

Rev 4346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4346 Rev 4347
Line 63... Line 63...
63
#include <ddi/irq.h>
63
#include <ddi/irq.h>
64
#include <arch/debugger.h>
64
#include <arch/debugger.h>
65
#include <proc/thread.h>
65
#include <proc/thread.h>
66
#include <syscall/syscall.h>
66
#include <syscall/syscall.h>
67
#include <console/console.h>
67
#include <console/console.h>
68
#include <ddi/device.h>
-
 
69
#include <sysinfo/sysinfo.h>
68
#include <sysinfo/sysinfo.h>
70
#include <arch/boot/boot.h>
69
#include <arch/boot/boot.h>
71
 
70
 
72
#ifdef CONFIG_SMP
71
#ifdef CONFIG_SMP
73
#include <arch/smp/apic.h>
72
#include <arch/smp/apic.h>
Line 150... Line 149...
150
}
149
}
151
 
150
 
152
void arch_post_smp_init(void)
151
void arch_post_smp_init(void)
153
{
152
{
154
#ifdef CONFIG_PC_KBD
153
#ifdef CONFIG_PC_KBD
155
    devno_t devno = device_assign_devno();
-
 
156
   
-
 
157
    /*
154
    /*
158
     * Initialize the i8042 controller. Then initialize the keyboard
155
     * Initialize the i8042 controller. Then initialize the keyboard
159
     * module and connect it to i8042. Enable keyboard interrupts.
156
     * module and connect it to i8042. Enable keyboard interrupts.
160
     */
157
     */
161
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD);
158
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
162
    if (kbrdin) {
159
    if (kbrdin) {
163
        kbrd_init(kbrdin);
160
        kbrd_init(kbrdin);
164
        trap_virtual_enable_irqs(1 << IRQ_KBD);
161
        trap_virtual_enable_irqs(1 << IRQ_KBD);
165
    }
162
    }
166
   
163
   
167
    /*
164
    /*
168
     * This is the necessary evil until the userspace driver is entirely
165
     * This is the necessary evil until the userspace driver is entirely
169
     * self-sufficient.
166
     * self-sufficient.
170
     */
167
     */
171
    sysinfo_set_item_val("kbd", NULL, true);
168
    sysinfo_set_item_val("kbd", NULL, true);
172
    sysinfo_set_item_val("kbd.devno", NULL, devno);
-
 
173
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
169
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
174
    sysinfo_set_item_val("kbd.address.physical", NULL,
170
    sysinfo_set_item_val("kbd.address.physical", NULL,
175
        (uintptr_t) I8042_BASE);
171
        (uintptr_t) I8042_BASE);
176
    sysinfo_set_item_val("kbd.address.kernel", NULL,
172
    sysinfo_set_item_val("kbd.address.kernel", NULL,
177
        (uintptr_t) I8042_BASE);
173
        (uintptr_t) I8042_BASE);