- Timestamp:
- 2008-11-30T21:35:13Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c716d94
- Parents:
- 1baec4b
- Location:
- kernel
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/bootinfo.h
r1baec4b r50b3d30 68 68 unsigned long freq_scale; 69 69 unsigned int wakeup_intno; 70 int hello_configured; 70 71 71 72 } bootinfo_t; -
kernel/arch/ia64/include/drivers/kbd.h
r1baec4b r50b3d30 37 37 38 38 39 typedef enum { 40 KBD_UNKNOWN, 41 KBD_SKI, 42 KBD_LEGACY, 43 KBD_NS16550 44 } kbd_type_t; 39 #define KBD_UNKNOWN 0 40 #define KBD_SKI 1 41 #define KBD_LEGACY 2 42 #define KBD_NS16550 3 43 45 44 46 45 #endif -
kernel/arch/ia64/include/interrupt.h
r1baec4b r50b3d30 54 54 #define VECTOR_TLB_SHOOTDOWN_IPI 0xf0 55 55 #define INTERRUPT_TIMER 255 56 #define IRQ_KBD 24157 #define IRQ_MOUSE 25256 #define IRQ_KBD (0x01+LAGACY_INTERRUPT_BASE) 57 #define IRQ_MOUSE (0x0c+LAGACY_INTERRUPT_BASE) 58 58 #define INTERRUPT_SPURIOUS 15 59 59 #define LAGACY_INTERRUPT_BASE 0x20 -
kernel/arch/ia64/src/ia64.c
r1baec4b r50b3d30 120 120 int i; 121 121 122 122 int myid,myeid; 123 124 myid=ia64_get_cpu_id(); 125 myeid=ia64_get_cpu_eid(); 126 123 127 for(i=0;i<16;i++) 124 128 { … … 131 135 ((uint32_t*)(IOSAPIC+0x00))[0]=0x10+2*i+1; 132 136 srlz_d(); 133 ((uint32_t*)(IOSAPIC+0x10))[0]= 1<<(56-32);137 ((uint32_t*)(IOSAPIC+0x10))[0]=myid<<(56-32) | myeid<<(48-32); 134 138 srlz_d(); 135 139 } … … 170 174 { 171 175 while (1) { 172 i8042_poll();173 176 #ifdef CONFIG_NS16550 174 177 #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN 175 178 ns16550_poll(); 176 179 #endif 180 #else 181 #ifndef CONFIG_I8042_INTERRUPT_DRIVEN 182 i8042_poll(); 183 #endif 177 184 #endif 178 185 thread_usleep(POLL_INTERVAL); … … 182 189 183 190 184 static void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))) 191 void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))); 192 void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused))) 185 193 { 186 194 return; … … 205 213 #ifdef I460GX 206 214 devno_t kbd = device_assign_devno(); 207 devno_t mouse = device_assign_devno();208 215 /* keyboard controller */ 209 i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);210 216 211 217 #ifdef CONFIG_NS16550 212 218 ns16550_init(kbd, NS16550_PORT, NS16550_IRQ,end_of_irq_void,NULL); // as a COM 1 213 219 #else 220 devno_t mouse = device_assign_devno(); 221 i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE); 214 222 #endif 215 223 thread_t *t; … … 281 289 ski_kbd_grab(); 282 290 #else 283 i8042_grab();284 291 #ifdef CONFIG_NS16550 285 292 ns16550_grab(); 293 #else 294 i8042_grab(); 286 295 #endif 287 288 296 #endif 289 297 } … … 295 303 #ifdef SKI 296 304 ski_kbd_release(); 297 i8042_release();298 305 #else 299 306 #ifdef CONFIG_NS16550 300 307 ns16550_release(); 308 #else 309 i8042_release(); 301 310 #endif 302 311 -
kernel/arch/ia64/src/interrupt.c
r1baec4b r50b3d30 263 263 #endif 264 264 265 265 case INTERRUPT_TIMER: 266 { 267 268 irq_t *irq = irq_dispatch_and_lock(ivr.vector); 269 if (irq) { 270 irq->handler(irq, irq->arg); 271 spinlock_unlock(&irq->lock); 272 } else { 273 panic("\nUnhandled Internal Timer Interrupt (%d)\n",ivr.vector); 274 } 275 } 276 break; 277 266 278 default: 267 279 { -
kernel/arch/ia64/src/ski/ski.c
r1baec4b r50b3d30 45 45 #include <synch/spinlock.h> 46 46 #include <arch/asm.h> 47 #include < drivers/kbd.h>47 #include <arch/drivers/kbd.h> 48 48 49 49 #define SKI_KBD_INR 0 -
kernel/arch/ia64/src/smp/smp.c
r1baec4b r50b3d30 115 115 void smp_init(void) 116 116 { 117 if(!bootinfo->hello_configured) return; 118 //If we have not system prepared by hello, we are not able to start AP's 119 //this means we are running on simulator 120 117 121 sapic_init(); 118 122 ipi_broadcast_arch_all(bootinfo->wakeup_intno); -
kernel/genarch/src/kbd/i8042.c
r1baec4b r50b3d30 38 38 39 39 #include <genarch/kbd/i8042.h> 40 #ifdef ia64 41 #include <arch/drivers/kbd.h> 42 #endif 40 43 #include <genarch/kbd/key.h> 41 44 #include <genarch/kbd/scanc.h> … … 185 188 sysinfo_set_item_val("kbd.devno", NULL, kbd_devno); 186 189 sysinfo_set_item_val("kbd.inr", NULL, kbd_inr); 187 190 #ifdef KBD_LEGACY 191 sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY); 192 #endif 188 193 sysinfo_set_item_val("mouse", NULL, true); 189 194 sysinfo_set_item_val("mouse.devno", NULL, mouse_devno); -
kernel/kernel.config
r1baec4b r50b3d30 139 139 ! [ARCH=sparc64] CONFIG_Z8530 (y/n) 140 140 141 # Support for NS16550 serial port 142 ! [ARCH=sparc64|ARCH=ia64] CONFIG_NS16550 (y/n) 141 # Support for NS16550 serial port (On IA64 as a console instead legacy keyboard) 142 ! [ARCH=sparc64] CONFIG_NS16550 (y/n) 143 144 # Support for NS16550 serial port (On IA64 as a console instead legacy keyboard) 145 ! [ARCH=ia64&MACHINE!=ski] CONFIG_NS16550 (n/y) 143 146 144 147 # IOSapic on default address support (including legacy IRQ) 145 ! [ARCH=ia64 ] CONFIG_IOSAPIC (y/n)148 ! [ARCH=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n) 146 149 147 150 # Interrupt-driven driver for Legacy Keyboard? 148 ! [CONFIG_ IOSAPIC=y] CONFIG_I8042_INTERRUPT_DRIVEN (y/n)151 ! [CONFIG_NS16550=n&CONFIG_IOSAPIC=y&MACHINE!=ski] CONFIG_I8042_INTERRUPT_DRIVEN (y/n) 149 152 150 153 # Interrupt-driven driver for NS16550? 151 ! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y) ] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n)154 ! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y)&MACHINE!=ski] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n) 152 155 153 156 # Virtually indexed D-cache support
Note:
See TracChangeset
for help on using the changeset viewer.