Ignore:
Timestamp:
Aug 17, 1995, 7:51:51 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
95fbca1
Parents:
3b438fa
Message:

Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@…) including the following major additions:

+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables

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  
    2222
    2323#include <rtems.h>
    24 #include <iosupp.h>
     24#include <clockdrv.h>
     25#include <rtems/ttydrv.h>
     26#include <libcsupport.h>
    2527
    2628/*
     
    6668
    6769/*
     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 }
     75rtems_device_driver Clock_control(
     76  rtems_device_major_number major,
     77  rtems_device_minor_number minor,
     78  void *pargp
     79);
     80
     81/*
    6882 * We printf() to a buffer if multiprocessing, *or* if this is set.
    6983 * ref: src/lib/libbsp/hppa/simhppa/iosupp/consupp.c
     
    7286extern int use_print_buffer;
    7387
     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
    74101#define HPPA_INTERRUPT_EXTERNAL_MPCI        HPPA_INTERRUPT_EXTERNAL_10
     102
     103rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
    75104
    76105void bsp_start( void );
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    r3b438fa rb06e68ef  
    11/*
    2  *      @(#)bspstart.c  1.14 - 95/05/16
    3  *     
     2 *      @(#)bspstart.c  1.16 - 95/06/28
    43 */
    54
     
    2524 *  notice must appear in all copies of this file and its derivatives.
    2625 *
    27  *  bspstart.c,v 1.2 1995/05/09 20:17:33 joel Exp
    28  */
    29 
     26 *  $Id$
     27 */
     28
     29#include <rtems.h>
    3030#include <bsp.h>
     31#include <rtems/libio.h>
     32
    3133#include <libcsupport.h>
    3234
    3335#include <string.h>
     36#include <fcntl.h>
    3437
    3538#ifdef STACK_CHECKER_ON
     
    129132
    130133    /*
     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    /*
    131142     * Set up for the libc handling.
     143     * XXX; this should allow for case of some other non-clock interrupts
    132144     */
    133145
     
    218230    Stack_check_Initialize();
    219231#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
     242void
     243bsp_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');
    220258}
    221259
     
    290328    Cpu_table.predriver_hook = NULL;
    291329
    292     Cpu_table.postdriver_hook = NULL;
     330    Cpu_table.postdriver_hook = bsp_postdriver_hook;    /* register drivers */
    293331
    294332    Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
     
    343381
    344382#ifdef STACK_CHECKER_ON
    345   /*
    346    * Add 1 extension for stack checker
    347    */
     383    /*
     384     * Add 1 extension for stack checker
     385     */
    348386
    349387    BSP_Configuration.maximum_extensions++;
     
    351389
    352390#if SIMHPPA_FAST_IDLE
    353   /*
    354    * Add 1 extension for fast idle
    355    */
     391    /*
     392     * Add 1 extension for fast idle
     393     */
    356394
    357395    BSP_Configuration.maximum_extensions++;
    358396#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);
    359403
    360404    /*
Note: See TracChangeset for help on using the changeset viewer.