Changeset 8a496e46 in rtems
- Timestamp:
- 09/23/98 13:20:34 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 479c86dd
- Parents:
- 362b88e
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/include/rtems/libio.h
r362b88e r8a496e46 158 158 rtems_status_code rtems_termios_ioctl (void *arg); 159 159 int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); 160 voidrtems_termios_dequeue_characters (void *ttyp, int len);160 int rtems_termios_dequeue_characters (void *ttyp, int len); 161 161 void rtems_termios_reserve_resources( 162 162 rtems_configuration_table *configuration, -
c/src/exec/libcsupport/src/termios.c
r362b88e r8a496e46 895 895 * The second argument is the number of characters transmitted so far. 896 896 * This value will always be 1 for devices which generate an interrupt 897 * for each transmitted character. 898 */ 899 void 897 * for each transmitted character. 898 * It returns number of characters left to transmit 899 */ 900 int 900 901 rtems_termios_dequeue_characters (void *ttyp, int len) 901 902 { … … 907 908 rtems_semaphore_release (tty->rawOutBufSemaphore); 908 909 if ( tty->rawOutBufHead == tty->rawOutBufTail ) 909 return ;910 return 0; 910 911 newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE; 911 912 if (newTail == tty->rawOutBufHead) { … … 914 915 */ 915 916 tty->rawOutBufState = rob_idle; 917 nToSend = 0; 916 918 } 917 919 else { … … 927 929 } 928 930 tty->rawOutBufTail = newTail; 929 } 931 932 return nToSend; 933 } 934 935 -
c/src/lib/include/rtems/libio.h
r362b88e r8a496e46 158 158 rtems_status_code rtems_termios_ioctl (void *arg); 159 159 int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); 160 voidrtems_termios_dequeue_characters (void *ttyp, int len);160 int rtems_termios_dequeue_characters (void *ttyp, int len); 161 161 void rtems_termios_reserve_resources( 162 162 rtems_configuration_table *configuration, -
c/src/lib/libbsp/i386/pc386/console/console.c
r362b88e r8a496e46 59 59 int PC386ConsolePort = PC386_CONSOLE_PORT_CONSOLE; 60 60 61 static int conSetAttr(int minor, const struct termios *);62 61 extern BSP_polling_getchar_function_type BSP_poll_char; 63 62 … … 65 64 | External Prototypes 66 65 +--------------------------------------------------------------------------*/ 67 extern void _IBMPC_keyboard_isr(void); 68 extern void _IBMPC_keyboard_isr_on(const rtems_irq_connect_data*); 69 extern void _IBMPC_keyboard_isr_off(const rtems_irq_connect_data*); 70 extern int _IBMPC_keyboard_isr_is_on(const rtems_irq_connect_data*); 71 72 static rtems_irq_connect_data console_isr_data = {PC_386_KEYBOARD, 73 _IBMPC_keyboard_isr, 74 _IBMPC_keyboard_isr_on, 75 _IBMPC_keyboard_isr_off, 76 _IBMPC_keyboard_isr_is_on}; 77 78 66 extern void _IBMPC_keyboard_isr(void); 79 67 extern rtems_boolean _IBMPC_scankey(char *); /* defined in 'inch.c' */ 80 68 extern char BSP_wait_polled_input(void); 81 69 extern void _IBMPC_initVideo(void); 70 71 static int conSetAttr(int minor, const struct termios *); 72 static void isr_on(const rtems_irq_connect_data *); 73 static void isr_off(const rtems_irq_connect_data *); 74 static int isr_is_on(const rtems_irq_connect_data *); 75 76 77 static rtems_irq_connect_data console_isr_data = {PC_386_KEYBOARD, 78 _IBMPC_keyboard_isr, 79 isr_on, 80 isr_off, 81 isr_is_on}; 82 83 static void 84 isr_on(const rtems_irq_connect_data *unused) 85 { 86 return; 87 } 88 89 static void 90 isr_off(const rtems_irq_connect_data *unused) 91 { 92 return; 93 } 94 95 static int 96 isr_is_on(const rtems_irq_connect_data *irq) 97 { 98 return pc386_irq_enabled_at_i8259s(irq->name); 99 } 82 100 83 101 void console_reserve_resources(rtems_configuration_table *conf) … … 204 222 printk("Initialized console on port COM2 9600-8-N-1\n\n"); 205 223 } 206 #define PRINTK_ON_SERIAL 224 #define PRINTK_ON_SERIAL 207 225 #ifdef PRINTK_ON_SERIAL 208 226 /* … … 222 240 static int console_open_count = 0; 223 241 224 static void console_last_close()242 static int console_last_close(int major, int minor, void *arg) 225 243 { 226 244 pc386_remove_rtems_irq_handler (&console_isr_data); 245 246 return 0; 227 247 } 228 248 … … 295 315 else { 296 316 if (--console_open_count == 0) { 297 console_last_close( );317 console_last_close(major, minor, arg); 298 318 } 299 319 } … … 475 495 BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input; 476 496 477 void BSP_emergency_output_init() 478 { 479 _IBMPC_initVideo(); 480 } 481 482 497 -
c/src/lib/libbsp/i386/pc386/console/inch.c
r362b88e r8a496e46 211 211 } /* _IBMPC_scankey */ 212 212 213 void _IBMPC_keyboard_isr_on(const rtems_irq_connect_data* unused)214 {}215 void _IBMPC_keyboard_isr_off(const rtems_irq_connect_data* unused)216 {}217 218 int _IBMPC_keyboard_isr_is_on(const rtems_irq_connect_data* irq)219 {220 return pc386_irq_enabled_at_i8259s (irq->name);221 }222 223 224 225 213 /*-------------------------------------------------------------------------+ 226 214 | Function: _IBMPC_keyboard_isr -
c/src/lib/libbsp/i386/pc386/startup/bspstart.c
r362b88e r8a496e46 37 37 #include <rtems/libio.h> 38 38 #include <libcpu/cpuModel.h> 39 #include <pc386uart.h>40 39 41 40 /*-------------------------------------------------------------------------+ … … 65 64 char *rtems_progname; /* Program name - from main(). */ 66 65 67 extern void debugPollingGetChar();68 69 66 /*-------------------------------------------------------------------------+ 70 67 | External Prototypes 71 68 +--------------------------------------------------------------------------*/ 72 extern void _exit(int); /* define in exit.c */ 73 extern void _IBMPC_initVideo(void); 74 extern void rtems_irq_mngt_init(); 69 extern void rtems_irq_mngt_init(void); 75 70 void bsp_libc_init( void *, unsigned32, int ); 76 71 void bsp_postdriver_hook(void); 77 extern void _IBMPC_initVideo(void);78 72 79 73 /*-------------------------------------------------------------------------+ … … 109 103 } 110 104 111 printk("\n");112 113 105 for(i=2; i<=2048; i++) 114 106 { … … 146 138 +--------------------------------------------------------------------------*/ 147 139 void bsp_start( void ) 148 /* Initialize printk channel */149 _IBMPC_initVideo();150 140 { 151 152 141 /* 153 142 * Calibrate variable for 1ms-loop (see timer.c) 154 143 */ 155 144 Calibrate_loop_1ms(); 145 156 146 /* 157 147 * Initialize printk channel -
c/src/lib/libbsp/i386/pc386/startup/exit.c
r362b88e r8a496e46 38 38 #include <pc386uart.h> 39 39 40 void bsp_cleanup( )40 void bsp_cleanup(void) 41 41 { 42 42 unsigned char ch; … … 57 57 58 58 59 60 61 -
c/src/lib/libbsp/i386/shared/irq/idt.c
r362b88e r8a496e46 46 46 47 47 i386_get_info_from_IDTR (&idt_entry_tbl, &limit); 48 49 /* Convert limit into number of entries */50 limit = (limit + 1) >> 3;51 52 if(index >= limit) {53 return 0;54 }55 48 56 49 /* Convert limit into number of entries */ … … 280 273 281 274 /* 282 return 1;275 * Now, reload all segment registers so the limit takes effect. 283 276 */ 284 277 -
c/src/lib/libbsp/i386/shared/irq/irq_init.c
r362b88e r8a496e46 117 117 int i; 118 118 interrupt_gate_descriptor* idt_entry_tbl; 119 unsigned 119 unsigned int limit; 120 120 unsigned int level; 121 121 122 i386_get_info_from_IDTR (&idt_entry_tbl, &limit); 123 /* Convert limit into number of entries */ 124 limit = (limit + 1) / sizeof(interrupt_gate_descriptor); 122 i386_get_info_from_IDTR(&idt_entry_tbl, &limit); 123 124 /* Convert into number of entries */ 125 limit = (limit + 1)/sizeof(interrupt_gate_descriptor); 126 127 if(limit != IDT_SIZE) { 128 printk("IDT table size mismatch !!! System locked\n"); 129 while(1); 130 } 131 125 132 126 133 _CPU_ISR_Disable(level); … … 129 136 * Init the complete IDT vector table with defaultRawIrq value 130 137 */ 131 for (i = 0; i < limit; i++) {138 for (i = 0; i < IDT_SIZE ; i++) { 132 139 idtHdl[i] = defaultRawIrq; 133 140 idtHdl[i].idtIndex = i; 134 141 } 142 135 143 raw_initial_config.idtSize = IDT_SIZE; 136 144 raw_initial_config.defaultRawEntry = defaultRawIrq; -
c/src/lib/libc/libio.h
r362b88e r8a496e46 158 158 rtems_status_code rtems_termios_ioctl (void *arg); 159 159 int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); 160 voidrtems_termios_dequeue_characters (void *ttyp, int len);160 int rtems_termios_dequeue_characters (void *ttyp, int len); 161 161 void rtems_termios_reserve_resources( 162 162 rtems_configuration_table *configuration, -
c/src/lib/libc/termios.c
r362b88e r8a496e46 895 895 * The second argument is the number of characters transmitted so far. 896 896 * This value will always be 1 for devices which generate an interrupt 897 * for each transmitted character. 898 */ 899 void 897 * for each transmitted character. 898 * It returns number of characters left to transmit 899 */ 900 int 900 901 rtems_termios_dequeue_characters (void *ttyp, int len) 901 902 { … … 907 908 rtems_semaphore_release (tty->rawOutBufSemaphore); 908 909 if ( tty->rawOutBufHead == tty->rawOutBufTail ) 909 return ;910 return 0; 910 911 newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE; 911 912 if (newTail == tty->rawOutBufHead) { … … 914 915 */ 915 916 tty->rawOutBufState = rob_idle; 917 nToSend = 0; 916 918 } 917 919 else { … … 927 929 } 928 930 tty->rawOutBufTail = newTail; 929 } 931 932 return nToSend; 933 } 934 935 -
c/src/lib/libcpu/i386/cpu.c
r362b88e r8a496e46 46 46 47 47 i386_get_info_from_IDTR (&idt_entry_tbl, &limit); 48 49 /* Convert limit into number of entries */50 limit = (limit + 1) >> 3;51 52 if(index >= limit) {53 return 0;54 }55 48 56 49 /* Convert limit into number of entries */ … … 280 273 281 274 /* 282 return 1;275 * Now, reload all segment registers so the limit takes effect. 283 276 */ 284 277 -
c/src/lib/libcpu/i386/idt.c
r362b88e r8a496e46 46 46 47 47 i386_get_info_from_IDTR (&idt_entry_tbl, &limit); 48 49 /* Convert limit into number of entries */50 limit = (limit + 1) >> 3;51 52 if(index >= limit) {53 return 0;54 }55 48 56 49 /* Convert limit into number of entries */ … … 280 273 281 274 /* 282 return 1;275 * Now, reload all segment registers so the limit takes effect. 283 276 */ 284 277 -
cpukit/libcsupport/include/rtems/libio.h
r362b88e r8a496e46 158 158 rtems_status_code rtems_termios_ioctl (void *arg); 159 159 int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len); 160 voidrtems_termios_dequeue_characters (void *ttyp, int len);160 int rtems_termios_dequeue_characters (void *ttyp, int len); 161 161 void rtems_termios_reserve_resources( 162 162 rtems_configuration_table *configuration, -
cpukit/libcsupport/src/termios.c
r362b88e r8a496e46 895 895 * The second argument is the number of characters transmitted so far. 896 896 * This value will always be 1 for devices which generate an interrupt 897 * for each transmitted character. 898 */ 899 void 897 * for each transmitted character. 898 * It returns number of characters left to transmit 899 */ 900 int 900 901 rtems_termios_dequeue_characters (void *ttyp, int len) 901 902 { … … 907 908 rtems_semaphore_release (tty->rawOutBufSemaphore); 908 909 if ( tty->rawOutBufHead == tty->rawOutBufTail ) 909 return ;910 return 0; 910 911 newTail = (tty->rawOutBufTail + len) % RAW_OUTPUT_BUFFER_SIZE; 911 912 if (newTail == tty->rawOutBufHead) { … … 914 915 */ 915 916 tty->rawOutBufState = rob_idle; 917 nToSend = 0; 916 918 } 917 919 else { … … 927 929 } 928 930 tty->rawOutBufTail = newTail; 929 } 931 932 return nToSend; 933 } 934 935 -
make/target.cfg.in
r362b88e r8a496e46 40 40 RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@ 41 41 RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@ 42 RTEMS_HAS_POSIX_1H_API = @RTEMS_HAS_POSIX_1H_API@ 42 43 RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ 43 44 RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
Note: See TracChangeset
for help on using the changeset viewer.