Subversion Repositories HelenOS

Rev

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

Rev 4342 Rev 4344
Line 36... Line 36...
36
 
36
 
37
#include <arch/types.h>
37
#include <arch/types.h>
38
 
38
 
39
#include <arch/pm.h>
39
#include <arch/pm.h>
40
 
40
 
41
#include <arch/drivers/ega.h>
41
#include <genarch/drivers/legacy/ia32/io.h>
42
#include <genarch/drivers/ega/ega.h>
42
#include <genarch/drivers/ega/ega.h>
43
#include <arch/drivers/vesa.h>
43
#include <arch/drivers/vesa.h>
44
#include <genarch/kbd/i8042.h>
44
#include <genarch/kbd/i8042.h>
45
#include <arch/drivers/i8254.h>
45
#include <arch/drivers/i8254.h>
46
#include <arch/drivers/i8259.h>
46
#include <arch/drivers/i8259.h>
Line 60... Line 60...
60
#include <arch/debugger.h>
60
#include <arch/debugger.h>
61
#include <proc/thread.h>
61
#include <proc/thread.h>
62
#include <syscall/syscall.h>
62
#include <syscall/syscall.h>
63
#include <console/console.h>
63
#include <console/console.h>
64
#include <ddi/device.h>
64
#include <ddi/device.h>
-
 
65
#include <sysinfo/sysinfo.h>
65
 
66
 
66
#ifdef CONFIG_SMP
67
#ifdef CONFIG_SMP
67
#include <arch/smp/apic.h>
68
#include <arch/smp/apic.h>
68
#endif
69
#endif
69
 
70
 
Line 122... Line 123...
122
    }
123
    }
123
}
124
}
124
 
125
 
125
void arch_post_smp_init(void)
126
void arch_post_smp_init(void)
126
{
127
{
127
    devno_t kbd = device_assign_devno();
-
 
128
    devno_t mouse = device_assign_devno();
128
    devno_t devno = device_assign_devno();
129
    /* keyboard controller */
129
    /* keyboard controller */
130
    i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
130
    (void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD);
-
 
131
 
-
 
132
    /*
-
 
133
     * This is the necessary evil until the userspace driver is entirely
-
 
134
     * self-sufficient.
-
 
135
     */
-
 
136
    sysinfo_set_item_val("kbd", NULL, true);
-
 
137
    sysinfo_set_item_val("kbd.devno", NULL, devno);
-
 
138
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
131
}
139
}
132
 
140
 
133
void calibrate_delay_loop(void)
141
void calibrate_delay_loop(void)
134
{
142
{
135
    i8254_calibrate_delay_loop();
143
    i8254_calibrate_delay_loop();
Line 163... Line 171...
163
#ifdef CONFIG_FB
171
#ifdef CONFIG_FB
164
    vesa_redraw();
172
    vesa_redraw();
165
#else
173
#else
166
    ega_redraw();
174
    ega_redraw();
167
#endif
175
#endif
168
   
-
 
169
    i8042_grab();
-
 
170
}
176
}
171
 
177
 
172
/** Return console to userspace
178
/** Return console to userspace
173
 *
179
 *
174
 */
180
 */
175
void arch_release_console(void)
181
void arch_release_console(void)
176
{
182
{
177
    i8042_release();
-
 
178
}
183
}
179
 
184
 
180
/** Construct function pointer
185
/** Construct function pointer
181
 *
186
 *
182
 * @param fptr   function pointer structure
187
 * @param fptr   function pointer structure