Subversion Repositories HelenOS

Rev

Rev 4263 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4263 Rev 4327
Line 78... Line 78...
78
 * @param mi        Pointer to the multiboot information structure.
78
 * @param mi        Pointer to the multiboot information structure.
79
 */
79
 */
80
void arch_pre_main(uint32_t signature, const multiboot_info_t *mi)
80
void arch_pre_main(uint32_t signature, const multiboot_info_t *mi)
81
{
81
{
82
    /* Parse multiboot information obtained from the bootloader. */
82
    /* Parse multiboot information obtained from the bootloader. */
83
    multiboot_info_parse(signature, mi);   
83
    multiboot_info_parse(signature, mi);
84
   
84
   
85
#ifdef CONFIG_SMP
85
#ifdef CONFIG_SMP
86
    /* Copy AP bootstrap routines below 1 MB. */
86
    /* Copy AP bootstrap routines below 1 MB. */
87
    memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET,
87
    memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET,
88
        (size_t) &_hardcoded_unmapped_size);
88
        (size_t) &_hardcoded_unmapped_size);
Line 153... Line 153...
153
#ifdef CONFIG_PC_KBD
153
#ifdef CONFIG_PC_KBD
154
    /*
154
    /*
155
     * Initialize the i8042 controller. Then initialize the keyboard
155
     * Initialize the i8042 controller. Then initialize the keyboard
156
     * module and connect it to i8042. Enable keyboard interrupts.
156
     * module and connect it to i8042. Enable keyboard interrupts.
157
     */
157
     */
158
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
158
    i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
-
 
159
    if (i8042_instance) {
-
 
160
        kbrd_instance_t *kbrd_instance = kbrd_init();
159
    if (kbrdin) {
161
        if (kbrd_instance) {
160
        kbrd_init(kbrdin);
162
            indev_t *sink = stdin_wire();
-
 
163
            indev_t *kbrd = kbrd_wire(kbrd_instance, sink);
-
 
164
            i8042_wire(i8042_instance, kbrd);
161
        trap_virtual_enable_irqs(1 << IRQ_KBD);
165
            trap_virtual_enable_irqs(1 << IRQ_KBD);
-
 
166
        }
162
    }
167
    }
163
   
168
   
164
    /*
169
    /*
165
     * This is the necessary evil until the userspace driver is entirely
170
     * This is the necessary evil until the userspace driver is entirely
166
     * self-sufficient.
171
     * self-sufficient.