Changeset b06e68ef in rtems for c/src/lib/libbsp/hppa1.1
- Timestamp:
- 08/17/95 19:51:51 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 95fbca1
- Parents:
- 3b438fa
- Location:
- c/src/lib/libbsp/hppa1.1/simhppa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
r3b438fa rb06e68ef 22 22 23 23 #include <rtems.h> 24 #include <iosupp.h> 24 #include <clockdrv.h> 25 #include <rtems/ttydrv.h> 26 #include <libcsupport.h> 25 27 26 28 /* … … 66 68 67 69 /* 70 * Todo: this should be put somewhere else 71 */ 72 73 #undef CLOCK_DRIVER_TABLE_ENTRY 74 #define CLOCK_DRIVER_TABLE_ENTRY { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control } 75 rtems_device_driver Clock_control( 76 rtems_device_major_number major, 77 rtems_device_minor_number minor, 78 void *pargp 79 ); 80 81 /* 68 82 * We printf() to a buffer if multiprocessing, *or* if this is set. 69 83 * ref: src/lib/libbsp/hppa/simhppa/iosupp/consupp.c … … 72 86 extern int use_print_buffer; 73 87 88 /* 89 * When not doing printf to a buffer, we do printf thru RTEMS libio 90 * and our tty driver. Set it up so that console is right. 91 */ 92 93 #define CONSOLE_DRIVER_TABLE_ENTRY \ 94 { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control } 95 96 /* 97 * How many libio files we want 98 */ 99 #define BSP_LIBIO_MAX_FDS 20 100 74 101 #define HPPA_INTERRUPT_EXTERNAL_MPCI HPPA_INTERRUPT_EXTERNAL_10 102 103 rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); 75 104 76 105 void bsp_start( void ); -
c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
r3b438fa rb06e68ef 1 1 /* 2 * @(#)bspstart.c 1.14 - 95/05/16 3 * 2 * @(#)bspstart.c 1.16 - 95/06/28 4 3 */ 5 4 … … 25 24 * notice must appear in all copies of this file and its derivatives. 26 25 * 27 * bspstart.c,v 1.2 1995/05/09 20:17:33 joel Exp 28 */ 29 26 * $Id$ 27 */ 28 29 #include <rtems.h> 30 30 #include <bsp.h> 31 #include <rtems/libio.h> 32 31 33 #include <libcsupport.h> 32 34 33 35 #include <string.h> 36 #include <fcntl.h> 34 37 35 38 #ifdef STACK_CHECKER_ON … … 129 132 130 133 /* 134 * Init the RTEMS libio facility to provide UNIX-like system 135 * calls for use by newlib (ie: provide __open, __close, etc) 136 * Uses malloc() to get area for the iops, so must be after malloc init 137 */ 138 139 rtems_libio_init(); 140 141 /* 131 142 * Set up for the libc handling. 143 * XXX; this should allow for case of some other non-clock interrupts 132 144 */ 133 145 … … 218 230 Stack_check_Initialize(); 219 231 #endif 232 } 233 234 /* 235 * After drivers are setup, register some "filenames" 236 * and open stdin, stdout, stderr files 237 * 238 * Newlib will automatically associate the files with these 239 * (it hardcodes the numbers) 240 */ 241 242 void 243 bsp_postdriver_hook(void) 244 { 245 int stdin_fd, stdout_fd, stderr_fd; 246 247 if ((stdin_fd = __open("/dev/tty00", O_RDONLY, 0)) == -1) 248 rtems_fatal_error_occurred('STD0'); 249 250 if ((stdout_fd = __open("/dev/tty00", O_WRONLY, 0)) == -1) 251 rtems_fatal_error_occurred('STD1'); 252 253 if ((stderr_fd = __open("/dev/tty00", O_WRONLY, 0)) == -1) 254 rtems_fatal_error_occurred('STD2'); 255 256 if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2)) 257 rtems_fatal_error_occurred('STIO'); 220 258 } 221 259 … … 290 328 Cpu_table.predriver_hook = NULL; 291 329 292 Cpu_table.postdriver_hook = NULL;330 Cpu_table.postdriver_hook = bsp_postdriver_hook; /* register drivers */ 293 331 294 332 Cpu_table.idle_task = NULL; /* do not override system IDLE task */ … … 343 381 344 382 #ifdef STACK_CHECKER_ON 345 /*346 * Add 1 extension for stack checker347 */383 /* 384 * Add 1 extension for stack checker 385 */ 348 386 349 387 BSP_Configuration.maximum_extensions++; … … 351 389 352 390 #if SIMHPPA_FAST_IDLE 353 /*354 * Add 1 extension for fast idle355 */391 /* 392 * Add 1 extension for fast idle 393 */ 356 394 357 395 BSP_Configuration.maximum_extensions++; 358 396 #endif 397 398 /* 399 * Tell libio how many fd's we want and allow it to tweak config 400 */ 401 402 rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS); 359 403 360 404 /*
Note: See TracChangeset
for help on using the changeset viewer.