/trunk/kernel/kernel.config |
---|
138,17 → 138,20 |
# Support for Z8530 serial port |
! [ARCH=sparc64] CONFIG_Z8530 (y/n) |
# Support for NS16550 serial port |
! [ARCH=sparc64|ARCH=ia64] CONFIG_NS16550 (y/n) |
# Support for NS16550 serial port (On IA64 as a console instead legacy keyboard) |
! [ARCH=sparc64] CONFIG_NS16550 (y/n) |
# Support for NS16550 serial port (On IA64 as a console instead legacy keyboard) |
! [ARCH=ia64&MACHINE!=ski] CONFIG_NS16550 (n/y) |
# IOSapic on default address support (including legacy IRQ) |
! [ARCH=ia64] CONFIG_IOSAPIC (y/n) |
! [ARCH=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n) |
# Interrupt-driven driver for Legacy Keyboard? |
! [CONFIG_IOSAPIC=y] CONFIG_I8042_INTERRUPT_DRIVEN (y/n) |
! [CONFIG_NS16550=n&CONFIG_IOSAPIC=y&MACHINE!=ski] CONFIG_I8042_INTERRUPT_DRIVEN (y/n) |
# Interrupt-driven driver for NS16550? |
! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y)] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n) |
! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y)&MACHINE!=ski] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n) |
# Virtually indexed D-cache support |
! [ARCH=sparc64] CONFIG_VIRT_IDX_DCACHE (y/n) |
/trunk/kernel/genarch/src/kbd/i8042.c |
---|
37,6 → 37,9 |
*/ |
#include <genarch/kbd/i8042.h> |
#ifdef ia64 |
#include <arch/drivers/kbd.h> |
#endif |
#include <genarch/kbd/key.h> |
#include <genarch/kbd/scanc.h> |
#include <genarch/kbd/scanc_pc.h> |
184,7 → 187,9 |
sysinfo_set_item_val("kbd", NULL, true); |
sysinfo_set_item_val("kbd.devno", NULL, kbd_devno); |
sysinfo_set_item_val("kbd.inr", NULL, kbd_inr); |
#ifdef KBD_LEGACY |
sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); |
#endif |
sysinfo_set_item_val("mouse", NULL, true); |
sysinfo_set_item_val("mouse.devno", NULL, mouse_devno); |
sysinfo_set_item_val("mouse.inr", NULL, mouse_inr); |
/trunk/kernel/arch/ia64/include/interrupt.h |
---|
53,8 → 53,8 |
#define VECTOR_TLB_SHOOTDOWN_IPI 0xf0 |
#define INTERRUPT_TIMER 255 |
#define IRQ_KBD 241 |
#define IRQ_MOUSE 252 |
#define IRQ_KBD (0x01+LAGACY_INTERRUPT_BASE) |
#define IRQ_MOUSE (0x0c+LAGACY_INTERRUPT_BASE) |
#define INTERRUPT_SPURIOUS 15 |
#define LAGACY_INTERRUPT_BASE 0x20 |
/trunk/kernel/arch/ia64/include/bootinfo.h |
---|
67,6 → 67,7 |
unsigned long sys_freq; |
unsigned long freq_scale; |
unsigned int wakeup_intno; |
int hello_configured; |
} bootinfo_t; |
/trunk/kernel/arch/ia64/include/drivers/kbd.h |
---|
36,13 → 36,12 |
#define KERN_ia64_KBD_H_ |
typedef enum { |
KBD_UNKNOWN, |
KBD_SKI, |
KBD_LEGACY, |
KBD_NS16550 |
} kbd_type_t; |
#define KBD_UNKNOWN 0 |
#define KBD_SKI 1 |
#define KBD_LEGACY 2 |
#define KBD_NS16550 3 |
#endif |
/** @} |
/trunk/kernel/arch/ia64/src/ia64.c |
---|
119,7 → 119,11 |
uint64_t IOSAPIC = PA2KA((unative_t)(iosapic_base))|FW_OFFSET; |
int i; |
int myid,myeid; |
myid=ia64_get_cpu_id(); |
myeid=ia64_get_cpu_eid(); |
for(i=0;i<16;i++) |
{ |
130,7 → 134,7 |
srlz_d(); |
((uint32_t*)(IOSAPIC+0x00))[0]=0x10+2*i+1; |
srlz_d(); |
((uint32_t*)(IOSAPIC+0x10))[0]=1<<(56-32); |
((uint32_t*)(IOSAPIC+0x10))[0]=myid<<(56-32) | myeid<<(48-32); |
srlz_d(); |
} |
169,11 → 173,14 |
static void i8042_kkbdpoll(void *arg) |
{ |
while (1) { |
i8042_poll(); |
#ifdef CONFIG_NS16550 |
#ifndef CONFIG_NS16550_INTERRUPT_DRIVEN |
ns16550_poll(); |
#endif |
#else |
#ifndef CONFIG_I8042_INTERRUPT_DRIVEN |
i8042_poll(); |
#endif |
#endif |
thread_usleep(POLL_INTERVAL); |
} |
181,7 → 188,8 |
#endif |
static void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))) |
void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))); |
void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))) |
{ |
return; |
} |
204,13 → 212,13 |
#ifdef I460GX |
devno_t kbd = device_assign_devno(); |
devno_t mouse = device_assign_devno(); |
/* keyboard controller */ |
i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
#ifdef CONFIG_NS16550 |
ns16550_init(kbd, NS16550_PORT, NS16550_IRQ,end_of_irq_void,NULL); // as a COM 1 |
#else |
devno_t mouse = device_assign_devno(); |
i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); |
#endif |
thread_t *t; |
t = thread_create(i8042_kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); |
280,11 → 288,11 |
#ifdef SKI |
ski_kbd_grab(); |
#else |
i8042_grab(); |
#ifdef CONFIG_NS16550 |
ns16550_grab(); |
#else |
i8042_grab(); |
#endif |
#endif |
} |
/** Return console to userspace |
294,10 → 302,11 |
{ |
#ifdef SKI |
ski_kbd_release(); |
i8042_release(); |
#else |
#ifdef CONFIG_NS16550 |
ns16550_release(); |
#else |
i8042_release(); |
#endif |
#endif |
/trunk/kernel/arch/ia64/src/ski/ski.c |
---|
44,7 → 44,7 |
#include <proc/thread.h> |
#include <synch/spinlock.h> |
#include <arch/asm.h> |
#include <drivers/kbd.h> |
#include <arch/drivers/kbd.h> |
#define SKI_KBD_INR 0 |
/trunk/kernel/arch/ia64/src/smp/smp.c |
---|
114,6 → 114,10 |
void smp_init(void) |
{ |
if(!bootinfo->hello_configured) return; |
//If we have not system prepared by hello, we are not able to start AP's |
//this means we are running on simulator |
sapic_init(); |
ipi_broadcast_arch_all(bootinfo->wakeup_intno); |
volatile long long brk; |
/trunk/kernel/arch/ia64/src/interrupt.c |
---|
262,7 → 262,19 |
break; |
#endif |
case INTERRUPT_TIMER: |
{ |
irq_t *irq = irq_dispatch_and_lock(ivr.vector); |
if (irq) { |
irq->handler(irq, irq->arg); |
spinlock_unlock(&irq->lock); |
} else { |
panic("\nUnhandled Internal Timer Interrupt (%d)\n",ivr.vector); |
} |
} |
break; |
default: |
{ |