Subversion Repositories HelenOS

Rev

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

Rev 4060 Rev 4103
Line 150... Line 150...
150
void arch_post_smp_init(void)
150
void arch_post_smp_init(void)
151
{
151
{
152
#ifdef SKI
152
#ifdef SKI
153
    srln_init(stdin);
153
    srln_init(stdin);
154
    ski_console_init(&srlnin);
154
    ski_console_init(&srlnin);
155
#endif      
155
#endif
156
 
156
   
157
#ifdef I460GX
157
#ifdef I460GX
158
#ifdef CONFIG_EGA
158
#ifdef CONFIG_EGA
159
    ega_init(EGA_BASE, EGA_VIDEORAM);
159
    ega_init(EGA_BASE, EGA_VIDEORAM);
160
#endif
160
#endif
161
 
161
   
162
    devno_t devno = device_assign_devno();
162
    devno_t devno = device_assign_devno();
163
    inr_t inr;
163
    inr_t inr;
164
 
164
   
165
#ifdef CONFIG_NS16550
165
#ifdef CONFIG_NS16550
166
    inr = NS16550_IRQ;
166
    inr = NS16550_IRQ;
167
    srln_init(stdin);
167
   
168
    (void) ns16550_init((ns16550_t *)NS16550_BASE, devno, inr, NULL, NULL,
168
    indev_t *kbrdin = ns16550_init(ns16550_t *) NS16550_BASE, devno, inr, NULL, NULL);
169
        &srlnin);
169
    if (kbrdin)
-
 
170
        srln_init(kbrdin);
-
 
171
   
170
    sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550);
172
    sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550);
171
    sysinfo_set_item_val("kbd.address.physical", NULL,
173
    sysinfo_set_item_val("kbd.address.physical", NULL,
172
        (uintptr_t) NS16550_BASE);
174
        (uintptr_t) NS16550_BASE);
173
    sysinfo_set_item_val("kbd.address.kernel", NULL,
175
    sysinfo_set_item_val("kbd.address.kernel", NULL,
174
        (uintptr_t) NS16550_BASE);
176
        (uintptr_t) NS16550_BASE);
175
#else
177
#else
176
    inr = IRQ_KBD;
178
    inr = IRQ_KBD;
-
 
179
    /*
-
 
180
     * Initialize the i8042 controller. Then initialize the keyboard
177
    kbrd_init(stdin);
181
     * module and connect it to i8042. Enable keyboard interrupts.
-
 
182
     */
178
    (void) i8042_init((i8042_t *)I8042_BASE, devno, inr, &kbrdin);
183
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, irq);
-
 
184
    if (kbrdin) {
-
 
185
        kbrd_init(kbrdin);
179
    trap_virtual_enable_irqs(1 << inr);
186
        trap_virtual_enable_irqs(1 << inr);
-
 
187
    }
-
 
188
   
180
    sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY);
189
    sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY);
181
    sysinfo_set_item_val("kbd.address.physical", NULL,
190
    sysinfo_set_item_val("kbd.address.physical", NULL,
182
        (uintptr_t) I8042_BASE);
191
        (uintptr_t) I8042_BASE);
183
    sysinfo_set_item_val("kbd.address.kernel", NULL,
192
    sysinfo_set_item_val("kbd.address.kernel", NULL,
184
        (uintptr_t) I8042_BASE);
193
        (uintptr_t) I8042_BASE);
185
#endif
194
#endif
186
    sysinfo_set_item_val("kbd", NULL, true);
195
    sysinfo_set_item_val("kbd", NULL, true);
187
    sysinfo_set_item_val("kbd.devno", NULL, devno);
196
    sysinfo_set_item_val("kbd.devno", NULL, devno);
188
    sysinfo_set_item_val("kbd.inr", NULL, inr);
197
    sysinfo_set_item_val("kbd.inr", NULL, inr);
189
#endif
198
#endif
190
 
199
   
191
    sysinfo_set_item_val("ia64_iospace", NULL, true);
200
    sysinfo_set_item_val("ia64_iospace", NULL, true);
192
    sysinfo_set_item_val("ia64_iospace.address", NULL, true);
201
    sysinfo_set_item_val("ia64_iospace.address", NULL, true);
193
    sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET);
202
    sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET);
194
}
203
}
195
 
204