Changeset 50b3d30 in mainline
- Timestamp:
- 2008-11-30T21:35:13Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c716d94
- Parents:
- 1baec4b
- Files:
-
- 5 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ia64/loader/gefi/HelenOS/hello.c
r1baec4b r50b3d30 238 238 bootinfo->sys_freq=sys_freq; 239 239 bootinfo->freq_scale=freq_scale; 240 bootinfo->hello_configured=1; 240 241 241 242 -
boot/arch/ia64/loader/main.c
r1baec4b r50b3d30 45 45 } 46 46 47 #define DEFAULT_MEMORY_BASE 0x4000000 48 #define DEFAULT_MEMORY_SIZE 0x4000000 49 #define DEFAULT_LEGACY_IO_BASE 0x00000FFFFC000000 50 #define DEFAULT_LEGACY_IO_SIZE 0x4000000 51 52 #define DEFAULT_FREQ_SCALE 0x0000000100000001 // 1/1 53 #define DEFAULT_SYS_FREQ 100000000 //100MHz 54 47 55 48 56 #ifdef REVISION … … 79 87 80 88 81 82 89 version_print(); 83 90 … … 93 100 printf(" %P: %s image (size %d bytes)\n", components[i].start, 94 101 components[i].name, components[i].size); 102 103 if(!bootinfo->hello_configured) 104 { 105 /* 106 * Load configuration defaults for simulators 107 */ 108 bootinfo->memmap_items=0; 109 110 bootinfo->memmap[bootinfo->memmap_items].base=DEFAULT_MEMORY_BASE; 111 bootinfo->memmap[bootinfo->memmap_items].size=DEFAULT_MEMORY_SIZE; 112 bootinfo->memmap[bootinfo->memmap_items].type=EFI_MEMMAP_FREE_MEM; 113 bootinfo->memmap_items++; 114 115 bootinfo->memmap[bootinfo->memmap_items].base=DEFAULT_LEGACY_IO_BASE; 116 bootinfo->memmap[bootinfo->memmap_items].size=DEFAULT_LEGACY_IO_SIZE; 117 bootinfo->memmap[bootinfo->memmap_items].type=EFI_MEMMAP_IO_PORTS; 118 bootinfo->memmap_items++; 119 120 bootinfo->freq_scale = DEFAULT_FREQ_SCALE; 121 bootinfo->sys_freq = DEFAULT_SYS_FREQ; 122 123 } 124 95 125 96 126 -
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 -
uspace/srv/kbd/Makefile
r1baec4b r50b3d30 60 60 CFLAGS += -DMOUSE_ENABLED 61 61 endif 62 ifeq ($(ARCH), ia64) 63 ARCH_SOURCES += \ 64 arch/$(ARCH)/src/mouse.c \ 65 arch/$(ARCH)/src/scanc.c \ 66 arch/$(ARCH)/src/lkbd.c 67 GENARCH_SOURCES = \ 68 genarch/src/kbd.c 69 CFLAGS += -DMOUSE_ENABLED 70 endif 62 71 ifeq ($(ARCH), amd64) 63 72 ARCH_SOURCES += \ -
uspace/srv/kbd/arch/ia64/src/kbd.c
r1baec4b r50b3d30 59 59 60 60 61 extern int lkbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call); 62 extern int lkbd_arch_init(void); 63 64 65 61 66 #define KEY_F1 0x504f1b 62 67 #define KEY_F2 0x514f1b … … 141 146 kbd_type=sysinfo_value("kbd.type"); 142 147 if(kbd_type==KBD_SKI) ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &ski_kbd); 148 if(kbd_type==KBD_LEGACY) return lkbd_arch_init(); 143 149 if(kbd_type==KBD_NS16550) { 144 150 ns16550_kbd.cmds[0].addr= (void *) (sysinfo_value("kbd.port")+RBR_REG); … … 323 329 //keybuffer_push(keybuffer, ' '); 324 330 //*/ 325 326 331 327 332 if (scan_code) { … … 390 395 if(kbd_type==KBD_SKI) return kbd_ski_process(keybuffer,call); 391 396 if(kbd_type==KBD_NS16550) return kbd_ns16550_process(keybuffer,call); 397 if(kbd_type==KBD_LEGACY) return lkbd_arch_process(keybuffer,call); 392 398 393 399
Note:
See TracChangeset
for help on using the changeset viewer.