Rev 4346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4346 | Rev 4347 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | #include <userspace.h> |
48 | #include <userspace.h> |
49 | #include <console/console.h> |
49 | #include <console/console.h> |
50 | #include <proc/uarg.h> |
50 | #include <proc/uarg.h> |
51 | #include <syscall/syscall.h> |
51 | #include <syscall/syscall.h> |
52 | #include <ddi/irq.h> |
52 | #include <ddi/irq.h> |
53 | #include <ddi/device.h> |
- | |
54 | #include <arch/bootinfo.h> |
53 | #include <arch/bootinfo.h> |
55 | #include <genarch/drivers/legacy/ia32/io.h> |
54 | #include <genarch/drivers/legacy/ia32/io.h> |
56 | #include <genarch/drivers/ega/ega.h> |
55 | #include <genarch/drivers/ega/ega.h> |
57 | #include <genarch/kbrd/kbrd.h> |
56 | #include <genarch/kbrd/kbrd.h> |
58 | #include <genarch/srln/srln.h> |
57 | #include <genarch/srln/srln.h> |
Line 160... | Line 159... | ||
160 | #ifdef CONFIG_EGA |
159 | #ifdef CONFIG_EGA |
161 | ega_init(EGA_BASE, EGA_VIDEORAM); |
160 | ega_init(EGA_BASE, EGA_VIDEORAM); |
162 | #endif |
161 | #endif |
163 | 162 | ||
164 | #ifdef CONFIG_NS16550 |
163 | #ifdef CONFIG_NS16550 |
165 | devno_t devno_ns16550 = device_assign_devno(); |
- | |
166 | indev_t *kbrdin_ns16550 |
164 | indev_t *kbrdin_ns16550 |
167 | = ns16550_init((ns16550_t *) NS16550_BASE, devno_ns16550, NS16550_IRQ, NULL, NULL); |
165 | = ns16550_init((ns16550_t *) NS16550_BASE, NS16550_IRQ, NULL, NULL); |
168 | if (kbrdin_ns16550) |
166 | if (kbrdin_ns16550) |
169 | srln_init(kbrdin_ns16550); |
167 | srln_init(kbrdin_ns16550); |
170 | 168 | ||
171 | sysinfo_set_item_val("kbd", NULL, true); |
169 | sysinfo_set_item_val("kbd", NULL, true); |
172 | sysinfo_set_item_val("kbd.devno", NULL, devno_ns16550); |
- | |
173 | sysinfo_set_item_val("kbd.inr", NULL, NS16550_IRQ); |
170 | sysinfo_set_item_val("kbd.inr", NULL, NS16550_IRQ); |
174 | sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); |
171 | sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550); |
175 | sysinfo_set_item_val("kbd.address.physical", NULL, |
172 | sysinfo_set_item_val("kbd.address.physical", NULL, |
176 | (uintptr_t) NS16550_BASE); |
173 | (uintptr_t) NS16550_BASE); |
177 | sysinfo_set_item_val("kbd.address.kernel", NULL, |
174 | sysinfo_set_item_val("kbd.address.kernel", NULL, |
178 | (uintptr_t) NS16550_BASE); |
175 | (uintptr_t) NS16550_BASE); |
179 | #endif |
176 | #endif |
180 | 177 | ||
181 | #ifdef CONFIG_I8042 |
178 | #ifdef CONFIG_I8042 |
182 | devno_t devno_i8042 = device_assign_devno(); |
- | |
183 | indev_t *kbrdin_i8042 = i8042_init((i8042_t *) I8042_BASE, devno_i8042, IRQ_KBD); |
179 | indev_t *kbrdin_i8042 = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
184 | if (kbrdin_i8042) |
180 | if (kbrdin_i8042) |
185 | kbrd_init(kbrdin_i8042); |
181 | kbrd_init(kbrdin_i8042); |
186 | 182 | ||
187 | sysinfo_set_item_val("kbd", NULL, true); |
183 | sysinfo_set_item_val("kbd", NULL, true); |
188 | sysinfo_set_item_val("kbd.devno", NULL, devno_i8042); |
- | |
189 | sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
184 | sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD); |
190 | sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); |
185 | sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); |
191 | sysinfo_set_item_val("kbd.address.physical", NULL, |
186 | sysinfo_set_item_val("kbd.address.physical", NULL, |
192 | (uintptr_t) I8042_BASE); |
187 | (uintptr_t) I8042_BASE); |
193 | sysinfo_set_item_val("kbd.address.kernel", NULL, |
188 | sysinfo_set_item_val("kbd.address.kernel", NULL, |