Changeset 6095342 in mainline
- Timestamp:
- 2005-12-10T01:28:08Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aace6624
- Parents:
- fcfac420
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rfcfac420 r6095342 175 175 ln -sfn ../../genarch/include/ generic/include/genarch 176 176 177 depend: archlinks Makefile.depend 178 179 Makefile.depend: 177 depend: archlinks 180 178 -makedepend $(DEFS) $(CFLAGS) -f - $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) >Makefile.depend 2>/dev/null 181 179 #$(CC) $(DEFS) $(CFLAGS) -M $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend -
arch/ia64/include/ski/ski.h
rfcfac420 r6095342 38 38 39 39 extern void ski_init_console(void); 40 extern void ski_putchar(const char ch); 41 extern __s32 ski_getchar(void); 40 extern void poll_keyboard(void); 42 41 43 42 #endif -
arch/ia64/src/drivers/it.c
rfcfac420 r6095342 30 30 31 31 #include <arch/drivers/it.h> 32 #include <arch/ drivers/keyboard.h>32 #include <arch/ski/ski.h> 33 33 #include <arch/interrupt.h> 34 34 #include <arch/register.h> -
arch/ia64/src/ia64.c
rfcfac420 r6095342 33 33 #include <arch/barrier.h> 34 34 #include <arch/types.h> 35 #include <arch/drivers/keyboard.h>36 35 37 36 #include <console/console.h> … … 44 43 45 44 ski_init_console(); 46 keyboard_init();47 45 it_init(); 48 46 } -
arch/ia64/src/ski/ski.c
rfcfac420 r6095342 28 28 29 29 #include <arch/ski/ski.h> 30 #include <console/console.h> 31 #include <console/chardev.h> 30 32 31 /** Initialize debug console 32 * 33 * Issue SSC (Simulator System Call) to 34 * to open debug console. 35 */ 36 void ski_init_console(void) 37 { 38 __asm__ ( 39 "mov r15=%0\n" 40 "break 0x80000\n" 41 : 42 : "i" (SKI_INIT_CONSOLE) 43 : "r15", "r8" 44 ); 45 } 33 static chardev_t ski_console; 34 static bool kb_disable; 46 35 47 36 /** Display character on debug console … … 52 41 * @param ch Character to be printed. 53 42 */ 54 void ski_ putchar(const char ch)43 void ski_write(chardev_t *d, const char ch) 55 44 { 56 45 __asm__ ( … … 91 80 return (__s32)ch; 92 81 } 82 83 /** Ask keyboard if a key was pressed. */ 84 void poll_keyboard(void) 85 { 86 char ch; 87 88 if (kb_disable) 89 return; 90 91 ch = ski_getchar(); 92 if(ch == '\r') 93 ch = '\n'; 94 if (ch) 95 chardev_push_character(&ski_console, ch); 96 } 97 98 /* Called from getc(). */ 99 static void ski_kb_enable(chardev_t *) 100 { 101 kb_disable = false; 102 } 103 104 /* Called from getc(). */ 105 static void ski_kb_disable(chardev_t *d) 106 { 107 kb_disable = true; 108 } 109 110 111 static chardev_operations_t ski_ops = { 112 .resume = ski_kb_enable, 113 .suspend = ski_kb_disable, 114 .write = ski_write 115 }; 116 117 118 /** Initialize debug console 119 * 120 * Issue SSC (Simulator System Call) to 121 * to open debug console. 122 */ 123 void ski_init_console(void) 124 { 125 __asm__ ( 126 "mov r15=%0\n" 127 "break 0x80000\n" 128 : 129 : "i" (SKI_INIT_CONSOLE) 130 : "r15", "r8" 131 ); 132 133 chardev_initialize("ski_console", &ski_console, &ski_ops); 134 stdin = &ski_console; 135 stdout = &ski_console; 136 } -
arch/mips32/src/drivers/arc.c
rfcfac420 r6095342 189 189 } 190 190 191 static intkbd_polling_enabled;191 static bool kbd_polling_enabled; 192 192 static chardev_t console; 193 193 … … 221 221 static void arc_enable(chardev_t *dev) 222 222 { 223 kbd_polling_enabled = 1;223 kbd_polling_enabled = true; 224 224 } 225 225 226 226 static void arc_disable(chardev_t *dev) 227 227 { 228 kbd_polling_enabled = 0;228 kbd_polling_enabled = false; 229 229 } 230 230 … … 247 247 chardev_t * arc_console(void) 248 248 { 249 kbd_polling_enabled = 1;249 kbd_polling_enabled = true; 250 250 251 251 chardev_initialize("arc_console", &console, &arc_ops); -
arch/mips32/src/drivers/serial.c
rfcfac420 r6095342 34 34 35 35 static chardev_t console; 36 37 36 static serial_t sconf[SERIAL_MAX]; 37 static bool kb_enabled; 38 38 39 39 static void serial_write(chardev_t *d, const char ch) … … 52 52 static void serial_enable(chardev_t *d) 53 53 { 54 kb_enabled = true; 54 55 } 55 56 56 57 static void serial_disable(chardev_t *d) 57 58 { 59 kb_enabled = false; 58 60 } 59 61 … … 108 110 chardev_initialize("serial_console", &console, &serial_ops); 109 111 console.data = sd; 112 kb_enabled = true; 110 113 111 114 // exc_register(2, "serial_drvr", serial_interrupt); -
arch/ppc32/src/console.c
rfcfac420 r6095342 29 29 #include <putchar.h> 30 30 #include <genarch/ofw/ofw.h> 31 #include <console/chardev.h> 32 #include <console/console.h> 31 33 32 34 /** Print one character. … … 34 36 * @param ch Character to be printed. 35 37 */ 36 void putchar(const char ch)38 static void ofw_write(chardev_t *d, const char ch) 37 39 { 38 40 ofw_putchar(ch); 39 41 } 42 43 chardev_t ofw_console; 44 static chardev_operations_t ofw_ops = { 45 .write = ofw_write 46 }; 47 48 /** Initialize console to use ofw output */ 49 void console_init(void) 50 { 51 chardev_initialize("ofw_out", &ofw_console, &ofw_ops); 52 stdout = &ofw_console; 53 }
Note:
See TracChangeset
for help on using the changeset viewer.