Subversion Repositories HelenOS

Rev

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

Rev 4057 Rev 4102
Line 191... Line 191...
191
    }
191
    }
192
}
192
}
193
 
193
 
194
void arch_post_smp_init(void)
194
void arch_post_smp_init(void)
195
{
195
{
-
 
196
#ifdef CONFIG_PC_KBD
196
    devno_t devno = device_assign_devno();
197
    devno_t devno = device_assign_devno();
197
 
198
   
198
        /*
199
    /*
199
     * Initialize the keyboard module and conect it to stdin. Then
200
     * Initialize the i8042 controller. Then initialize the keyboard
200
     * initialize the i8042 controller and connect it to kbrdin. Enable
201
     * module and connect it to i8042. Enable keyboard interrupts.
-
 
202
     */
201
     * keyboard interrupts.
203
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD);
202
         */
204
    if (kbrdin) {
203
    kbrd_init(stdin);
205
        kbrd_init(kbrdin);
204
    (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD, &kbrdin);
-
 
205
    trap_virtual_enable_irqs(1 << IRQ_KBD);
206
        trap_virtual_enable_irqs(1 << IRQ_KBD);
-
 
207
    }
206
 
208
   
207
    /*
209
    /*
208
     * This is the necessary evil until the userspace driver is entirely
210
     * This is the necessary evil until the userspace driver is entirely
209
     * self-sufficient.
211
     * self-sufficient.
210
     */
212
     */
211
    sysinfo_set_item_val("kbd", NULL, true);
213
    sysinfo_set_item_val("kbd", NULL, true);
Line 213... Line 215...
213
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
215
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
214
    sysinfo_set_item_val("kbd.address.physical", NULL,
216
    sysinfo_set_item_val("kbd.address.physical", NULL,
215
        (uintptr_t) I8042_BASE);
217
        (uintptr_t) I8042_BASE);
216
    sysinfo_set_item_val("kbd.address.kernel", NULL,
218
    sysinfo_set_item_val("kbd.address.kernel", NULL,
217
        (uintptr_t) I8042_BASE);
219
        (uintptr_t) I8042_BASE);
-
 
220
#endif
218
}
221
}
219
 
222
 
220
void calibrate_delay_loop(void)
223
void calibrate_delay_loop(void)
221
{
224
{
222
    i8254_calibrate_delay_loop();
225
    i8254_calibrate_delay_loop();
Line 248... Line 251...
248
 *
251
 *
249
 */
252
 */
250
void arch_grab_console(void)
253
void arch_grab_console(void)
251
{
254
{
252
#ifdef CONFIG_FB
255
#ifdef CONFIG_FB
-
 
256
    if (vesa_present())
253
    vesa_redraw();
257
        vesa_redraw();
-
 
258
    else
-
 
259
#endif
-
 
260
#ifdef CONFIG_EGA
-
 
261
        ega_redraw();
254
#else
262
#else
255
    ega_redraw();
263
        {}
256
#endif
264
#endif
257
}
265
}
258
 
266
 
259
/** Return console to userspace
267
/** Return console to userspace
260
 *
268
 *