Subversion Repositories HelenOS

Rev

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

Rev 4102 Rev 4148
Line 63... Line 63...
63
#include <arch/syscall.h>
63
#include <arch/syscall.h>
64
#include <arch/debugger.h>
64
#include <arch/debugger.h>
65
#include <syscall/syscall.h>
65
#include <syscall/syscall.h>
66
#include <console/console.h>
66
#include <console/console.h>
67
#include <ddi/irq.h>
67
#include <ddi/irq.h>
68
#include <ddi/device.h>
-
 
69
#include <sysinfo/sysinfo.h>
68
#include <sysinfo/sysinfo.h>
70
 
69
 
71
/** Disable I/O on non-privileged levels
70
/** Disable I/O on non-privileged levels
72
 *
71
 *
73
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
72
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
Line 192... Line 191...
192
}
191
}
193
 
192
 
194
void arch_post_smp_init(void)
193
void arch_post_smp_init(void)
195
{
194
{
196
#ifdef CONFIG_PC_KBD
195
#ifdef CONFIG_PC_KBD
197
    devno_t devno = device_assign_devno();
-
 
198
   
-
 
199
    /*
196
    /*
200
     * Initialize the i8042 controller. Then initialize the keyboard
197
     * Initialize the i8042 controller. Then initialize the keyboard
201
     * module and connect it to i8042. Enable keyboard interrupts.
198
     * module and connect it to i8042. Enable keyboard interrupts.
202
     */
199
     */
203
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD);
200
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
204
    if (kbrdin) {
201
    if (kbrdin) {
205
        kbrd_init(kbrdin);
202
        kbrd_init(kbrdin);
206
        trap_virtual_enable_irqs(1 << IRQ_KBD);
203
        trap_virtual_enable_irqs(1 << IRQ_KBD);
207
    }
204
    }
208
   
205
   
209
    /*
206
    /*
210
     * This is the necessary evil until the userspace driver is entirely
207
     * This is the necessary evil until the userspace driver is entirely
211
     * self-sufficient.
208
     * self-sufficient.
212
     */
209
     */
213
    sysinfo_set_item_val("kbd", NULL, true);
210
    sysinfo_set_item_val("kbd", NULL, true);
214
    sysinfo_set_item_val("kbd.devno", NULL, devno);
-
 
215
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
211
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
216
    sysinfo_set_item_val("kbd.address.physical", NULL,
212
    sysinfo_set_item_val("kbd.address.physical", NULL,
217
        (uintptr_t) I8042_BASE);
213
        (uintptr_t) I8042_BASE);
218
    sysinfo_set_item_val("kbd.address.kernel", NULL,
214
    sysinfo_set_item_val("kbd.address.kernel", NULL,
219
        (uintptr_t) I8042_BASE);
215
        (uintptr_t) I8042_BASE);