Changeset c640876 in mainline
- Timestamp:
- 2009-03-12T20:08:43Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- afdd441
- Parents:
- 7ee8c5b
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r7ee8c5b rc640876 334 334 @ "generic" Keyboard or serial line 335 335 @ "none" No input device 336 ! [PLATFORM=ia32|PLATFORM=amd64|PLATFORM=mips32] CONFIG_HID_IN (choice) 336 ! [PLATFORM=ia32|PLATFORM=amd64|(PLATFORM=mips32&MACHINE!=msim)] CONFIG_HID_IN (choice) 337 338 % Input device class 339 @ "serial" Serial line 340 @ "none" No input device 341 ! [MACHINE=ski|MACHINE=serengeti|MACHINE=msim] CONFIG_HID_IN (choice) 342 343 % Output device class 344 @ "serial" Serial line 345 @ "none" No output device 346 ! [MACHINE=ski|MACHINE=serengeti|MACHINE=msim] CONFIG_HID_OUT (choice) 337 347 338 348 % Output device class 339 349 @ "generic" Monitor or serial line 340 350 @ "none" No output device 341 ! [PLATFORM=ia32|PLATFORM=amd64 |(PLATFORM=mips32&MACHINE=msim)] CONFIG_HID_OUT (choice)351 ! [PLATFORM=ia32|PLATFORM=amd64] CONFIG_HID_OUT (choice) 342 352 343 353 % Output device class -
kernel/arch/ia64/include/ski/ski.h
r7ee8c5b rc640876 36 36 #define KERN_ia64_SKI_H_ 37 37 38 #include <arch/types.h>39 38 #include <console/chardev.h> 40 39 … … 43 42 #define SKI_PUTCHAR 31 44 43 45 extern void ski_console_init(chardev_t *); 44 extern indev_t *skiin_init(void); 45 extern void skiout_init(void); 46 46 extern void ski_kbd_grab(void); 47 47 extern void ski_kbd_release(void); -
kernel/arch/ia64/src/asm.S
r7ee8c5b rc640876 52 52 adds r14 = 7, in1 53 53 mov r2 = ar.lc 54 mov r8 = in0 54 mov r8 = in0 ;; 55 55 and r14 = -8, r14 ;; 56 56 cmp.ne p6, p7 = r14, in1 -
kernel/arch/ia64/src/ia64.c
r7ee8c5b rc640876 151 151 { 152 152 #ifdef SKI 153 srln_init(stdin); 154 ski_console_init(&srlnin); 153 indev_t *in; 154 in = skiin_init(); 155 if (in) 156 srln_init(in); 157 skiout_init(); 155 158 #endif 156 159 … … 166 169 inr = NS16550_IRQ; 167 170 168 indev_t *kbrdin = ns16550_init( ns16550_t *) NS16550_BASE, devno, inr, NULL, NULL);171 indev_t *kbrdin = ns16550_init((ns16550_t *) NS16550_BASE, devno, inr, NULL, NULL); 169 172 if (kbrdin) 170 173 srln_init(kbrdin); -
kernel/arch/ia64/src/ski/ski.c
r7ee8c5b rc640876 44 44 #include <arch.h> 45 45 46 static chardev_t *skiout; 47 48 static chardev_t ski_stdout; 46 static indev_t skiin; /**< Ski input device. */ 47 static outdev_t skiout; /**< Ski output device. */ 49 48 50 49 static bool kbd_disabled; … … 58 57 * @param ch Character to be printed. 59 58 */ 60 static void ski_putchar( chardev_t *d, const char ch, bool silent)59 static void ski_putchar(outdev_t *d, const char ch, bool silent) 61 60 { 62 61 if (!silent) { … … 75 74 } 76 75 77 static chardev_operations_t ski_ops = { 76 static indev_operations_t skiin_ops = { 77 .poll = NULL 78 }; 79 80 static outdev_operations_t skiout_ops = { 78 81 .write = ski_putchar 79 82 }; … … 109 112 { 110 113 char ch; 111 ipl_t ipl; 112 113 ipl = interrupts_disable(); 114 115 if (kbd_disabled) { 116 interrupts_restore(ipl); 114 115 if (kbd_disabled) 117 116 return; 118 }119 120 117 ch = ski_getchar(); 121 118 if(ch == '\r') 122 119 ch = '\n'; 123 if (ch && skiout) { 124 chardev_push_character(skiout, ch); 125 interrupts_restore(ipl); 120 if (ch) { 121 indev_push_character(&skiin, ch); 126 122 return; 127 123 } 128 129 interrupts_restore(ipl);130 124 } 131 125 … … 148 142 * to open debug console. 149 143 */ 150 void ski_console_init(chardev_t *devout) 151 { 144 static void ski_init(void) 145 { 146 static bool initialized; 147 148 if (initialized) 149 return; 150 152 151 asm volatile ( 153 152 "mov r15 = %0\n" … … 157 156 : "r15", "r8" 158 157 ); 159 160 skiout = devout; 161 chardev_initialize("ski_stdout", &ski_stdout, &ski_ops); 162 stdout = &ski_stdout; 163 158 159 initialized = true; 160 } 161 162 indev_t *skiin_init(void) 163 { 164 ski_init(); 165 166 indev_initialize("skiin", &skiin, &skiin_ops); 164 167 thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true); 165 if (!t) 166 panic("Cannot create kkbdpoll."); 167 thread_ready(t); 168 if (t) 169 thread_ready(t); 170 else 171 return NULL; 168 172 169 173 sysinfo_set_item_val("kbd", NULL, true); 170 174 sysinfo_set_item_val("kbd.type", NULL, KBD_SKI); 171 175 176 return &skiin; 177 } 178 179 180 void skiout_init(void) 181 { 182 ski_init(); 183 184 outdev_initialize("skiout", &skiout, &skiout_ops); 185 stdout = &skiout; 186 172 187 sysinfo_set_item_val("fb", NULL, false); 173 188 } -
kernel/genarch/include/drivers/ns16550/ns16550.h
r7ee8c5b rc640876 69 69 } ns16550_instance_t; 70 70 71 extern indev_t *ns16550_init(ns16550_t *, devno_t, inr_t, cir_t, void *) 71 extern indev_t *ns16550_init(ns16550_t *, devno_t, inr_t, cir_t, void *); 72 72 73 73 #endif
Note:
See TracChangeset
for help on using the changeset viewer.