Rev 4342 | Rev 4344 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4342 | Rev 4343 | ||
---|---|---|---|
Line 146... | Line 146... | ||
146 | 146 | ||
147 | void arch_pre_smp_init(void) |
147 | void arch_pre_smp_init(void) |
148 | { |
148 | { |
149 | } |
149 | } |
150 | 150 | ||
151 | - | ||
152 | #ifdef I460GX |
- | |
153 | #define POLL_INTERVAL 50000 /* 50 ms */ |
- | |
154 | /** Kernel thread for polling keyboard. */ |
- | |
155 | static void i8042_kkbdpoll(void *arg) |
- | |
156 | { |
- | |
157 | while (1) { |
- | |
158 | #ifdef CONFIG_NS16550 |
- | |
159 | #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN |
- | |
160 | ns16550_poll(); |
- | |
161 | #endif |
- | |
162 | #else |
- | |
163 | #ifndef CONFIG_I8042_INTERRUPT_DRIVEN |
- | |
164 | i8042_poll(); |
- | |
165 | #endif |
- | |
166 | #endif |
- | |
167 | thread_usleep(POLL_INTERVAL); |
- | |
168 | } |
- | |
169 | } |
- | |
170 | #endif |
- | |
171 | - | ||
172 | void arch_post_smp_init(void) |
151 | void arch_post_smp_init(void) |
173 | { |
152 | { |
174 | thread_t *t; |
- | |
175 | - | ||
176 | /* |
153 | /* |
177 | * Create thread that polls keyboard. |
154 | * Create thread that polls keyboard. |
178 | */ |
155 | */ |
179 | #ifdef SKI |
156 | #ifdef SKI |
180 | t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
157 | thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
181 | if (!t) |
158 | if (!t) |
182 | panic("Cannot create kkbdpoll."); |
159 | panic("Cannot create kkbdpoll."); |
183 | thread_ready(t); |
160 | thread_ready(t); |
184 | #endif |
161 | #endif |
185 | 162 | ||
Line 190... | Line 167... | ||
190 | ns16550_init(kbd, NS16550_PORT, NS16550_IRQ, NULL, NULL); |
167 | ns16550_init(kbd, NS16550_PORT, NS16550_IRQ, NULL, NULL); |
191 | #else |
168 | #else |
192 | devno_t mouse = device_assign_devno(); |
169 | devno_t mouse = device_assign_devno(); |
193 | i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
170 | i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
194 | #endif |
171 | #endif |
195 | t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
- | |
196 | if (!t) |
- | |
197 | panic("Cannot create kkbdpoll."); |
- | |
198 | thread_ready(t); |
- | |
199 | #endif |
172 | #endif |
200 | 173 | ||
201 | sysinfo_set_item_val("ia64_iospace", NULL, true); |
174 | sysinfo_set_item_val("ia64_iospace", NULL, true); |
202 | sysinfo_set_item_val("ia64_iospace.address", NULL, true); |
175 | sysinfo_set_item_val("ia64_iospace.address", NULL, true); |
203 | sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET); |
176 | sysinfo_set_item_val("ia64_iospace.address.virtual", NULL, IO_OFFSET); |
Line 274... | Line 247... | ||
274 | #endif |
247 | #endif |
275 | } |
248 | } |
276 | 249 | ||
277 | void arch_reboot(void) |
250 | void arch_reboot(void) |
278 | { |
251 | { |
279 | outb(0x64, 0xfe); |
252 | pio_write_8(0x64, 0xfe); |
280 | while (1) |
253 | while (1) |
281 | ; |
254 | ; |
282 | } |
255 | } |
283 | 256 | ||
284 | /** Construct function pointer |
257 | /** Construct function pointer |