Changeset bd9c3d1 in rtems


Ignore:
Timestamp:
Apr 15, 1998, 8:50:31 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
c0daf807
Parents:
b6394ae
Message:

Numerous changes which in total greatly reduced the amount of source
code in each BSP's bspstart.c. These changes were:

+ confdefs.h now knows libio's semaphore requirements
+ shared/main.c now copies Configuration to BSP_Configuration
+ shared/main.c fills in the Cpu_table with default values

This removed the need for rtems_libio_config() and the constant
BSP_LIBIO_MAX_FDS in every BSP. Plus now the maximum number of open
files can now be set on the gcc command line.

Files:
58 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/libio.c

    rb6394ae rbd9c3d1  
    100100    rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER );
    101101  handlers[handler_index] = *handler;
    102 }
    103 
    104 
    105 void
    106 rtems_libio_config(
    107     rtems_configuration_table *config,
    108     unsigned32                 max_fds
    109 )
    110 {
    111     rtems_libio_number_iops = max_fds;
    112 
    113     /*
    114      * tweak config to reflect # of semaphores we will need
    115      */
    116 
    117     /* one for iop table */
    118     config->RTEMS_api_configuration->maximum_semaphores += 1;
    119     config->RTEMS_api_configuration->maximum_semaphores += max_fds;
    120102}
    121103
  • c/src/exec/sapi/headers/confdefs.h

    rb6394ae rbd9c3d1  
    3939#define CONFIGURE_NEWLIB_EXTENSION 1
    4040#define CONFIGURE_MALLOC_REGION 1
     41
     42#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
     43#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
     44#endif
     45
     46#define CONFIGURE_LIBIO_SEMAPHORES \
     47  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
    4148
    4249/*
     
    478485(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
    479486   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
    480    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
     487   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
     488     CONFIGURE_LIBIO_SEMAPHORES) + \
    481489   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    482490   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
  • c/src/exec/sapi/include/confdefs.h

    rb6394ae rbd9c3d1  
    3939#define CONFIGURE_NEWLIB_EXTENSION 1
    4040#define CONFIGURE_MALLOC_REGION 1
     41
     42#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
     43#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
     44#endif
     45
     46#define CONFIGURE_LIBIO_SEMAPHORES \
     47  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
    4148
    4249/*
     
    478485(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
    479486   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
    480    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
     487   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
     488     CONFIGURE_LIBIO_SEMAPHORES) + \
    481489   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    482490   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
  • c/src/lib/libbsp/a29k/portsw/include/bsp.h

    rb6394ae rbd9c3d1  
    8383 */
    8484
    85 /*
    86  * How many libio files we want
    87  */
    88 
    89 #define BSP_LIBIO_MAX_FDS       20
    90 
    9185/* functions */
    9286
  • c/src/lib/libbsp/a29k/portsw/startup/bspstart.c

    rb6394ae rbd9c3d1  
    125125
    126126  /*
    127    *  Copy the Configuration Table .. so we can change it
    128    */
    129 
    130   BSP_Configuration = Configuration;
    131 
    132   /*
    133    * Tell libio how many fd's we want and allow it to tweak config
    134    */
    135 
    136   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    137 
    138   /*
    139127   *  Need to "allocate" the memory for the RTEMS Workspace and
    140128   *  tell the RTEMS configuration where it is.  This memory is
     
    152140   */
    153141
    154   /*
    155    *  we do not use the pretasking_hook
    156    */
    157 
    158142  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    159 
    160   Cpu_table.predriver_hook = NULL;
    161 
    162143  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    163 
    164   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    165 
    166   Cpu_table.do_zero_of_workspace = TRUE;
    167 
    168144  Cpu_table.interrupt_stack_size = 4096;
    169 
    170   Cpu_table.extra_system_initialization_stack = 0;
    171 
    172   /*
    173    *  Don't forget the other CPU Table entries.
    174    */
    175145
    176146  _settrap( 109,&a29k_enable_sup);
  • c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h

    rb6394ae rbd9c3d1  
    9393  { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control }
    9494
    95 /*
    96  * How many libio files we want
    97  */
    98 #define BSP_LIBIO_MAX_FDS       20
    99 
    10095#define HPPA_INTERRUPT_EXTERNAL_MPCI        HPPA_INTERRUPT_EXTERNAL_10
    10196
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    rb6394ae rbd9c3d1  
    173173#endif
    174174
    175     /*
    176      *  Copy the table
    177      */
    178 
    179     BSP_Configuration = Configuration;
    180 
    181175    BSP_Configuration.work_space_start = (void *)MY_WORK_SPACE;
    182176    if (BSP_Configuration.work_space_size)
     
    190184
    191185    Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
    192 
    193     Cpu_table.predriver_hook = NULL;
    194 
    195186    Cpu_table.postdriver_hook = bsp_postdriver_hook;    /* register drivers */
    196187
    197     Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    198 
    199188    /*
    200189     *  Don't zero out the workspace.  The simulator did it for us.
     
    202191
    203192    Cpu_table.do_zero_of_workspace = FALSE;
    204 
    205193    Cpu_table.interrupt_stack_size = (12 * 1024);
    206 
    207     Cpu_table.extra_mpci_receive_server_stack = 0;
    208194
    209195    /*
     
    245231    BSP_Configuration.maximum_extensions++;
    246232#endif
    247 
    248     /*
    249      * Tell libio how many fd's we want and allow it to tweak config
    250      */
    251 
    252     rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    253233
    254234    /*
  • c/src/lib/libbsp/i386/force386/include/bsp.h

    rb6394ae rbd9c3d1  
    143143 */
    144144
    145 /*
    146  * How many libio files we want
    147  */
    148 
    149 #define BSP_LIBIO_MAX_FDS       20
    150 
    151145/* miscellaneous stuff assumed to exist */
    152146
  • c/src/lib/libbsp/i386/force386/startup/bspstart.c

    rb6394ae rbd9c3d1  
    8888  outport_byte( 0x00, 0x3f );      /* resets VMEbus request level */
    8989
    90   /*
    91    *  we do not use the pretasking_hook.
    92    */
    93 
    9490  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    9591
    96   Cpu_table.predriver_hook = NULL;
    97 
    9892  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    99 
    100   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    101 
    102   Cpu_table.do_zero_of_workspace = TRUE;
    10393
    10494  Cpu_table.interrupt_table_segment = get_ds();
     
    10898  Cpu_table.interrupt_stack_size = 4096;
    10999
    110   Cpu_table.extra_mpci_receive_server_stack = 0;
    111 
    112   /*
    113    *  Copy the table
    114    */
    115 
    116   BSP_Configuration = Configuration;
    117 
    118100  BSP_Configuration.work_space_start = (void *)
    119101     RAM_END - BSP_Configuration.work_space_size;
    120102
    121   /*
    122    * Tell libio how many fd's we want and allow it to tweak config
    123    */
    124 
    125   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    126103}
  • c/src/lib/libbsp/i386/go32/include/bsp.h

    rb6394ae rbd9c3d1  
    139139 */
    140140
    141 /*
    142  * How many libio files we want
    143  */
    144 
    145 #define BSP_LIBIO_MAX_FDS       20
    146 
    147141/* functions */
    148142
  • c/src/lib/libbsp/i386/go32/startup/bspstart.c

    rb6394ae rbd9c3d1  
    106106
    107107  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    108   Cpu_table.predriver_hook = NULL;
    109108  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    110   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    111   Cpu_table.do_zero_of_workspace = TRUE;
    112109  Cpu_table.interrupt_table_segment = 0;/* get_ds(); */
    113110  Cpu_table.interrupt_table_offset = (void *)0;
    114111  Cpu_table.interrupt_stack_size = 4096;
    115   Cpu_table.extra_mpci_receive_server_stack = 0;
    116 
    117   /*
    118    *  Copy the table
    119    */
    120   BSP_Configuration = Configuration;
    121112
    122113  BSP_Configuration.work_space_start = sbrk( Configuration.work_space_size );
     
    128119    _exit( 1 );
    129120  }
    130 
    131   /*
    132    * Tell libio how many fd's we want and allow it to tweak config
    133    */
    134 
    135   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    136121
    137122  rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
  • c/src/lib/libbsp/i386/i386ex/include/bsp.h

    rb6394ae rbd9c3d1  
    113113 */
    114114 
    115 /*
    116  * How many libio files we want
    117  */
    118  
    119 #define BSP_LIBIO_MAX_FDS       20
    120 
    121115/* miscellaneous stuff assumed to exist */
    122116
  • c/src/lib/libbsp/i386/i386ex/startup/bspstart.c

    rb6394ae rbd9c3d1  
    9898
    9999  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    100  
    101   Cpu_table.predriver_hook = NULL;
    102  
    103100  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    104  
    105   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    106  
    107   Cpu_table.do_zero_of_workspace = TRUE;
    108  
    109101  Cpu_table.interrupt_table_segment = get_ds();
    110  
    111102  Cpu_table.interrupt_table_offset = (void *)Interrupt_descriptor_table;
    112  
    113103  Cpu_table.interrupt_stack_size = 4096;  /* STACK_MINIMUM_SIZE */
    114  
    115   Cpu_table.extra_mpci_receive_server_stack = 0;
    116 
    117   /*
    118    *  Copy the table
    119    */
    120 
    121   BSP_Configuration = Configuration;
    122104
    123105#if defined(RTEMS_POSIX_API)
     
    134116  /*   console_reserve_resources( &BSP_Configuration ); */
    135117
    136 
    137   /*
    138    * Tell libio how many fd's we want and allow it to tweak config
    139    */
    140 
    141   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    142 
    143118}
  • c/src/lib/libbsp/i386/pc386/startup/bspstart.c

    rb6394ae rbd9c3d1  
    119119  Cpu_table.extra_mpci_receive_server_stack = 0;
    120120
    121   /* Copy user's table and make necessary adjustments.              */
    122 
    123   BSP_Configuration = Configuration;
    124 
    125121  /* Place RTEMS workspace at top of physical RAM (RAM_END defined in 'bsp.h' */
    126122
    127123  BSP_Configuration.work_space_start =
    128124                          (void *)(RAM_END - BSP_Configuration.work_space_size);
    129 
    130   /* Tell libio how many fd's we want and allow it to tweak config. */
    131 
    132   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    133 
    134 #if 0
    135   rtems_initialize_executive(&BSP_Configuration, &Cpu_table);
    136   /* does not return */
    137 
    138   /*-------------------------------------------------------------------------+
    139   | We only return here if the executive has finished. This happens when the
    140   | task has called exit(). We will then call _exit() which is part of the bsp.
    141   +--------------------------------------------------------------------------*/
    142 
    143   for (;;)
    144     _exit(0);
    145 
    146   /* no cleanup necessary for PC386 */
    147 
    148   return 0;
    149 #endif
    150125} /* bsp_start */
  • c/src/lib/libbsp/i960/cvme961/include/bsp.h

    rb6394ae rbd9c3d1  
    130130 */
    131131
    132 /*
    133  * How many libio files we want
    134  */
    135 
    136 #define BSP_LIBIO_MAX_FDS       20
    137 
    138132/* functions */
    139133
  • c/src/lib/libbsp/i960/cvme961/startup/bspstart.c

    rb6394ae rbd9c3d1  
    107107  i960_soft_reset( Prcb );
    108108
    109   /*
    110    *  we do not use the pretasking_hook.
    111    */
    112 
    113109  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    114 
    115   Cpu_table.predriver_hook = NULL;
    116 
    117110  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    118 
    119   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    120 
    121   Cpu_table.do_zero_of_workspace = TRUE;
    122 
    123111  Cpu_table.interrupt_stack_size = 4096;
    124 
    125   Cpu_table.extra_mpci_receive_server_stack = 0;
    126 
    127112  Cpu_table.Prcb = Prcb;
    128 
    129   /*
    130    *  Copy the table
    131    */
    132 
    133   BSP_Configuration = Configuration;
    134 
    135   /*
    136    * Tell libio how many fd's we want and allow it to tweak config
    137    */
    138 
    139   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    140113
    141114  BSP_Configuration.work_space_start = (void *)
  • c/src/lib/libbsp/m68k/dmv152/include/bsp.h

    rb6394ae rbd9c3d1  
    155155 */
    156156
    157 /*
    158  * How many libio files we want
    159  */
    160 
    161 #define BSP_LIBIO_MAX_FDS       20
    162 
    163157/* functions */
    164158
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    rb6394ae rbd9c3d1  
    117117
    118118  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    119 
    120   Cpu_table.predriver_hook = NULL;
    121 
    122119  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    123 
    124   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    125 
    126120  Cpu_table.do_zero_of_workspace = TRUE;
     121  Cpu_table.interrupt_stack_size = 4096;
    127122
    128123  m68k_get_vbr( vbr );
    129124  Cpu_table.interrupt_vector_table = vbr;
    130 
    131   Cpu_table.interrupt_stack_size = 4096;
    132 
    133   Cpu_table.extra_mpci_receive_server_stack = 0;
    134 
    135   /*
    136    *  Copy the table
    137    */
    138 
    139   BSP_Configuration = Configuration;
    140125
    141126  BSP_Configuration.work_space_start = (void *)
     
    148133  console_reserve_resources( &BSP_Configuration );
    149134
    150   /*
    151    * Tell libio how many fd's we want and allow it to tweak config
    152    */
    153 
    154   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    155 
    156135  /* Clock_exit is done as an atexit() function */
    157136}
  • c/src/lib/libbsp/m68k/efi332/include/bsp.h

    rb6394ae rbd9c3d1  
    131131 */
    132132
    133 /*
    134  * How many libio files we want
    135  */
    136  
    137 #define BSP_LIBIO_MAX_FDS       20
    138 
    139133/* functions */
    140134
  • c/src/lib/libbsp/m68k/efi332/startup/bspstart.c

    rb6394ae rbd9c3d1  
    9393
    9494  Cpu_table.pretasking_hook = bsp_pretasking_hook;
    95 
    96   Cpu_table.predriver_hook = NULL;
    97 
    9895  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    99 
    100   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    101 
    102   Cpu_table.do_zero_of_workspace = TRUE;
    10396
    10497  m68k_get_vbr( vbr );
    10598  Cpu_table.interrupt_vector_table = vbr;
    10699
    107   Cpu_table.interrupt_stack_size = 0;
    108 
    109   Cpu_table.extra_mpci_receive_server_stack = 0;
    110 
    111   /*
    112    *  Copy the table
    113    */
    114 
    115   BSP_Configuration = Configuration;
    116 
    117100  BSP_Configuration.work_space_start = (void *)
    118101    (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
    119 
    120   /*
    121    * Tell libio how many fd's we want and allow it to tweak config
    122    */
    123 
    124   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    125102
    126103  /* Clock_exit is done as an atexit() function */
  • c/src/lib/libbsp/m68k/efi68k/include/bsp.h

    rb6394ae rbd9c3d1  
    133133 */
    134134 
    135 /*
    136  * How many libio files we want
    137  */
    138  
    139 #define BSP_LIBIO_MAX_FDS       20
    140  
    141135/* functions */
    142136
  • c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c

    rb6394ae rbd9c3d1  
    101101
    102102  Cpu_table.pretasking_hook = bsp_pretasking_hook;
    103  
    104   Cpu_table.predriver_hook = NULL;
    105  
    106103  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    107 
    108   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    109 
    110   Cpu_table.do_zero_of_workspace = TRUE;
    111104
    112105  m68k_get_vbr( vbr );
    113106  Cpu_table.interrupt_vector_table = vbr;
    114107
    115   Cpu_table.interrupt_stack_size = 0;
    116 
    117   Cpu_table.extra_mpci_receive_server_stack = 0;
    118 
    119   /*
    120    *  Copy the table
    121    */
    122 
    123   BSP_Configuration = Configuration;
    124 
    125108  BSP_Configuration.work_space_start = (void *)
    126109    (((unsigned int)_end + STACK_SIZE + 0x100) & 0xffffff00);
    127 
    128   /*
    129    * Tell libio how many fd's we want and allow it to tweak config
    130    */
    131 
    132   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    133110
    134111  /* Clock_exit is done as an atexit() function */
  • c/src/lib/libbsp/m68k/gen68302/include/bsp.h

    rb6394ae rbd9c3d1  
    9696 */
    9797
    98 /*
    99  * How many libio files we want
    100  */
    101 
    102 #define BSP_LIBIO_MAX_FDS       20
    103 
    10498/* miscellaneous stuff assumed to exist */
    10599
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    rb6394ae rbd9c3d1  
    9393#endif
    9494
    95 
    96   /*
    97    *  Copy the Configuration Table .. so we can change it
    98    */
    99 
    100   BSP_Configuration = Configuration;
    101 
    102   /*
    103    * Tell libio how many fd's we want and allow it to tweak config
    104    */
    105 
    106   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    107 
    10895  /*
    10996   *  Need to "allocate" the memory for the RTEMS Workspace and
     
    119106   */
    120107
    121   /*
    122    *  we do not use the pretasking_hook
    123    */
    124 
    125108  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    126 
    127   Cpu_table.predriver_hook = NULL;
    128 
    129109  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    130 
    131   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    132 
    133   Cpu_table.do_zero_of_workspace = TRUE;
    134 
    135110  Cpu_table.interrupt_stack_size = 4096;
    136 
    137   Cpu_table.extra_mpci_receive_server_stack = 0;
    138 
    139   /*
    140    *  Don't forget the other CPU Table entries.
    141    */
    142 
    143111}
  • c/src/lib/libbsp/m68k/gen68360/include/bsp.h

    rb6394ae rbd9c3d1  
    9595 */
    9696
    97 /*
    98  * How many libio files we want
    99  */
    100 
    101 #define BSP_LIBIO_MAX_FDS       20
    102 
    10397/* miscellaneous stuff assumed to exist */
    10498
  • c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c

    rb6394ae rbd9c3d1  
    8989#endif
    9090
    91 
    92   /*
    93    *  Copy the Configuration Table .. so we can change it
    94    */
    95 
    96   BSP_Configuration = Configuration;
    97 
    98   /*
    99    * Tell libio how many fd's we want and allow it to tweak config
    100    */
    101 
    102   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    103 
    10491  /*
    10592   *  Need to "allocate" the memory for the RTEMS Workspace and
     
    114101   */
    115102
    116   /*
    117    *  we do not use the pretasking_hook
    118    */
    119 
    120103  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    121 
    122   Cpu_table.predriver_hook = NULL;
    123 
    124104  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    125 
    126   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    127 
    128105  Cpu_table.do_zero_of_workspace = TRUE;
    129 
    130106  Cpu_table.interrupt_stack_size = 4096;
    131 
    132   Cpu_table.extra_mpci_receive_server_stack = 0;
    133 
    134   /*
    135    *  Don't forget the other CPU Table entries.
    136    */
    137107}
  • c/src/lib/libbsp/m68k/idp/include/bsp.h

    rb6394ae rbd9c3d1  
    6868 */
    6969
    70 /*
    71  * How many libio files we want
    72  */
    73 
    74 #define BSP_LIBIO_MAX_FDS       20
    75 
    7670/* miscellaneous stuff assumed to exist */
    7771
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    rb6394ae rbd9c3d1  
    124124 
    125125  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    126 
    127   Cpu_table.predriver_hook = NULL;
    128 
    129126  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    130 
    131   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    132 
    133   Cpu_table.do_zero_of_workspace = TRUE;
    134  
    135127  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
    136  
    137128  Cpu_table.interrupt_stack_size = 4096;
    138129
    139   Cpu_table.extra_mpci_receive_server_stack = 0;
    140 
    141   /*
    142    *  Copy the table
    143    */
    144  
    145   BSP_Configuration = Configuration;
    146  
    147130  BSP_Configuration.work_space_start = (void *)
    148131     (RAM_END - BSP_Configuration.work_space_size);
    149132 
    150   /*
    151    * Tell libio how many fd's we want and allow it to tweak config
    152    */
    153 
    154   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    155 
    156133/*  led_putnum('e'); * for debugging purposes only */
    157134
  • c/src/lib/libbsp/m68k/mvme136/include/bsp.h

    rb6394ae rbd9c3d1  
    139139 */
    140140
    141 /*
    142  * How many libio files we want
    143  */
    144 
    145 #define BSP_LIBIO_MAX_FDS       20
    146 
    147141/* functions */
    148142
  • c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c

    rb6394ae rbd9c3d1  
    107107
    108108  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    109 
    110   Cpu_table.predriver_hook = NULL;
    111 
    112109  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    113 
    114   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    115 
    116   Cpu_table.do_zero_of_workspace = TRUE;
    117 
    118110  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
    119 
    120111  Cpu_table.interrupt_stack_size = 4096;
    121 
    122   Cpu_table.extra_mpci_receive_server_stack = 0;
    123 
    124   /*
    125    *  Copy the table
    126    */
    127 
    128   BSP_Configuration = Configuration;
    129112
    130113  BSP_Configuration.work_space_start = (void *)
    131114     (RAM_END - BSP_Configuration.work_space_size);
    132115
    133   /*
    134    * Tell libio how many fd's we want and allow it to tweak config
    135    */
    136 
    137   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    138116}
  • c/src/lib/libbsp/m68k/mvme147/include/bsp.h

    rb6394ae rbd9c3d1  
    165165 */
    166166
    167 /*
    168  * How many libio files we want
    169  */
    170 
    171 #define BSP_LIBIO_MAX_FDS       20
    172 
    173167/* functions */
    174168
  • c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c

    rb6394ae rbd9c3d1  
    113113
    114114  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    115 
    116   Cpu_table.predriver_hook = NULL;
    117 
    118115  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    119 
    120   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    121 
    122   Cpu_table.do_zero_of_workspace = TRUE;
    123 
    124116  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
    125 
    126117  Cpu_table.interrupt_stack_size = 4096;
    127 
    128   Cpu_table.extra_mpci_receive_server_stack = 0;
    129 
    130   /*
    131    *  Copy the table
    132    */
    133 
    134   BSP_Configuration = Configuration;
    135118
    136119  BSP_Configuration.work_space_start = (void *)
    137120     (RAM_END - BSP_Configuration.work_space_size);
    138121
    139   /*
    140    * Tell libio how many fd's we want and allow it to tweak config
    141    */
    142 
    143   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    144122}
  • c/src/lib/libbsp/m68k/mvme147s/include/bsp.h

    rb6394ae rbd9c3d1  
    229229 */
    230230
    231 /*
    232  * How many libio files we want
    233  */
    234 
    235 #define BSP_LIBIO_MAX_FDS       20
    236 
    237231/* functions */
    238232
  • c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c

    rb6394ae rbd9c3d1  
    172172
    173173  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    174 
    175   Cpu_table.predriver_hook = NULL;
    176 
    177174  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    178 
    179   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    180 
    181   Cpu_table.do_zero_of_workspace = TRUE;
    182 
    183175  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
    184 
    185176  Cpu_table.interrupt_stack_size = 4096;
    186 
    187   Cpu_table.extra_mpci_receive_server_stack = 0;
    188 
    189   /*
    190    *  Copy the table
    191    */
    192 
    193   BSP_Configuration = Configuration;
    194177
    195178  BSP_Configuration.work_space_start = (void *)
    196179     (RAM_END - BSP_Configuration.work_space_size);
    197180
    198   /*
    199    * Tell libio how many fd's we want and allow it to tweak config
    200    */
    201 
    202   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    203181}
  • c/src/lib/libbsp/m68k/mvme162/include/bsp.h

    rb6394ae rbd9c3d1  
    271271 */
    272272
    273 /*
    274  * How many libio files we want
    275  */
    276 
    277 #define BSP_LIBIO_MAX_FDS       20
    278 
    279273/* miscellaneous stuff assumed to exist */
    280274
  • c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c

    rb6394ae rbd9c3d1  
    130130
    131131  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    132 
    133   Cpu_table.predriver_hook = NULL;
    134 
    135132  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    136 
    137   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    138 
    139   Cpu_table.do_zero_of_workspace = TRUE;
    140 
    141133  Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
    142 
    143134  Cpu_table.interrupt_stack_size = 4096;
    144 
    145   Cpu_table.extra_mpci_receive_server_stack = 0;
    146 
    147   /*
    148    *  Copy the table
    149    */
    150 
    151   BSP_Configuration = Configuration;
    152 
    153   /*
    154    * Tell libio how many fd's we want and allow it to tweak config
    155    */
    156 
    157   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    158135
    159136  BSP_Configuration.work_space_start = (void *)
  • c/src/lib/libbsp/m68k/ods68302/include/bsp.h

    rb6394ae rbd9c3d1  
    110110 */
    111111
    112 /*
    113  * How many libio files we want
    114  */
    115 
    116 #define BSP_LIBIO_MAX_FDS       20
    117 
    118112/* miscellaneous stuff assumed to exist */
    119113
  • c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c

    rb6394ae rbd9c3d1  
    9292#endif
    9393
    94 
    95   /*
    96    *  Copy the Configuration Table .. so we can change it
    97    */
    98 
    99   BSP_Configuration = Configuration;
    100 
    101   /*
    102    * Tell libio how many fd's we want and allow it to tweak config
    103    */
    104 
    105   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    106 
    10794  /*
    10895   *  Need to "allocate" the memory for the RTEMS Workspace and
     
    118105   */
    119106
    120   /*
    121    *  we do not use the pretasking_hook
    122    */
    123 
    124107  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    125 
    126   Cpu_table.predriver_hook = NULL;
    127 
    128108  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    129 
    130   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    131 
    132   Cpu_table.do_zero_of_workspace = TRUE;
    133 
    134109  Cpu_table.interrupt_stack_size = 4096;
    135 
    136   Cpu_table.extra_mpci_receive_server_stack = 0;
    137 
    138   /*
    139    *  Don't forget the other CPU Table entries.
    140    */
    141110}
  • c/src/lib/libbsp/mips/p4000/include/bsp.h

    rb6394ae rbd9c3d1  
    103103 */
    104104
    105 /*
    106  * How many libio files we want
    107  */
    108 
    109 #define BSP_LIBIO_MAX_FDS       20
    110 
    111105/* miscellaneous stuff assumed to exist */
    112106
  • c/src/lib/libbsp/mips/p4000/startup/bspstart.c

    rb6394ae rbd9c3d1  
    102102
    103103  /*
    104    *  Copy the Configuration Table .. so we can change it
    105    */
    106 
    107   BSP_Configuration = Configuration;
    108 
    109   /*
    110    * Tell libio how many fd's we want and allow it to tweak config
    111    */
    112 
    113   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    114 
    115   /*
    116104   *  Need to "allocate" the memory for the RTEMS Workspace and
    117105   *  tell the RTEMS configuration where it is.  This memory is
     
    119107   */
    120108
    121   BSP_Configuration.work_space_start = (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
     109  BSP_Configuration.work_space_start =
     110       (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
    122111
    123112  /*
     
    125114   */
    126115
    127   /*
    128    *  we do not use the pretasking_hook
    129    */
    130 
    131116  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    132 
    133   Cpu_table.predriver_hook = NULL;
    134 
    135117  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    136 
    137   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    138 
    139   Cpu_table.do_zero_of_workspace = TRUE;
    140 
    141118  Cpu_table.interrupt_stack_size = 4096;
    142 
    143   Cpu_table.extra_mpci_receive_server_stack = 0;
    144 
    145   /*
    146    *  Don't forget the other CPU Table entries.
    147    */
    148 
    149119}
  • c/src/lib/libbsp/mips64orion/p4000/include/bsp.h

    rb6394ae rbd9c3d1  
    103103 */
    104104
    105 /*
    106  * How many libio files we want
    107  */
    108 
    109 #define BSP_LIBIO_MAX_FDS       20
    110 
    111105/* miscellaneous stuff assumed to exist */
    112106
  • c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c

    rb6394ae rbd9c3d1  
    102102
    103103  /*
    104    *  Copy the Configuration Table .. so we can change it
    105    */
    106 
    107   BSP_Configuration = Configuration;
    108 
    109   /*
    110    * Tell libio how many fd's we want and allow it to tweak config
    111    */
    112 
    113   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    114 
    115   /*
    116104   *  Need to "allocate" the memory for the RTEMS Workspace and
    117105   *  tell the RTEMS configuration where it is.  This memory is
     
    119107   */
    120108
    121   BSP_Configuration.work_space_start = (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
     109  BSP_Configuration.work_space_start =
     110       (void *)((unsigned64)((&end) + LIBC_HEAP_SIZE + 0x2000) & ~0x7);
    122111
    123112  /*
     
    125114   */
    126115
    127   /*
    128    *  we do not use the pretasking_hook
    129    */
    130 
    131116  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    132 
    133   Cpu_table.predriver_hook = NULL;
    134 
    135117  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    136 
    137   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    138 
    139   Cpu_table.do_zero_of_workspace = TRUE;
    140 
    141118  Cpu_table.interrupt_stack_size = 4096;
    142 
    143   Cpu_table.extra_mpci_receive_server_stack = 0;
    144 
    145   /*
    146    *  Don't forget the other CPU Table entries.
    147    */
    148 
    149119}
  • c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h

    rb6394ae rbd9c3d1  
    8282 */
    8383
    84 /*
    85  * How many libio files we want
    86  */
    87 
    88 #define BSP_LIBIO_MAX_FDS       20
    89 
    9084/* functions */
    9185
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c

    rb6394ae rbd9c3d1  
    7979 */
    8080
    81 int bsp_start(
    82   int argc,
    83   char **argv,
    84   char **environp
    85 )
     81void bsp_start( void )
    8682{
    87   if ((argc > 0) && argv && argv[0])
    88     rtems_progname = argv[0];
    89   else
    90     rtems_progname = "RTEMS";
    91 
    9283  /*
    9384   *  Allocate the memory for the RTEMS Work Space.  This can come from
     
    9788   *  of work space from the last physical address on the CPU board.
    9889   */
    99 
    100   /*
    101    *  Copy the Configuration Table .. so we can change it
    102    */
    103 
    104   BSP_Configuration = Configuration;
    105 
    106   /*
    107    * Tell libio how many fd's we want and allow it to tweak config
    108    */
    109 
    110   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    11190
    11291  /*
     
    122101   */
    123102
    124   /*
    125    *  we do not use the pretasking_hook
    126    */
    127 
    128103  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    129 
    130   Cpu_table.predriver_hook = NULL;
    131 
    132104  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    133 
    134   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    135 
    136   Cpu_table.do_zero_of_workspace = TRUE;
    137 
    138105  Cpu_table.interrupt_stack_size = 4096;
    139 
    140   Cpu_table.extra_mpci_receive_server_stack = 0;
    141 
    142   /*
    143    *  Don't forget the other CPU Table entries.
    144    */
    145 
    146   /*
    147    *  Start RTEMS
    148    */
    149 
    150   rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
    151 
    152   bsp_cleanup();
    153 
    154   return 0;
    155106}
  • c/src/lib/libbsp/powerpc/papyrus/include/bsp.h

    rb6394ae rbd9c3d1  
    108108 */
    109109 
    110 /*
    111  * How many libio files we want
    112  */
    113  
    114 #define BSP_LIBIO_MAX_FDS       20
    115 
    116110/* functions */
    117111
  • c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c

    rb6394ae rbd9c3d1  
    108108
    109109  /*
    110    *  Copy the Configuration Table .. so we can change it
    111    */
    112 
    113   BSP_Configuration = Configuration;
    114 
    115   /*
    116    * Tell libio how many fd's we want and allow it to tweak config
    117    */
    118 
    119   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    120 
    121   /*
    122110   *  Need to "allocate" the memory for the RTEMS Workspace and
    123111   *  tell the RTEMS configuration where it is.  This memory is
     
    133121
    134122  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    135 
    136   Cpu_table.predriver_hook = NULL;
    137 
    138123  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    139 
    140   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    141 
    142   Cpu_table.do_zero_of_workspace = TRUE;
    143 
    144124  Cpu_table.interrupt_stack_size = 4 * 1024;
    145125
    146   Cpu_table.extra_mpci_receive_server_stack = 0;
    147 
    148   /*
    149    *  Don't forget the other CPU Table entries.
    150    */
    151 
    152126  Cpu_table.clicks_per_usec = 10;
    153 
    154127  Cpu_table.serial_per_sec = 10000000;
    155 
    156128  Cpu_table.serial_external_clock = 1;
    157 
    158129  Cpu_table.serial_xon_xoff = 0;
    159 
    160130  Cpu_table.serial_cts_rts = 1;
    161 
    162131  Cpu_table.serial_rate = 9600;
    163 
    164132  Cpu_table.timer_average_overhead = 2;
    165 
    166133  Cpu_table.timer_least_valid = 3;
    167134}
  • c/src/lib/libbsp/powerpc/psim/include/bsp.h

    rb6394ae rbd9c3d1  
    123123extern int   end;        /* last address in the program */
    124124
    125 /*
    126  * How many libio files we want
    127  */
    128  
    129 #define BSP_LIBIO_MAX_FDS       20
    130 
    131125/* functions */
    132126
  • c/src/lib/libbsp/powerpc/psim/startup/bspstart.c

    rb6394ae rbd9c3d1  
    189189
    190190  Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
    191 
    192   Cpu_table.predriver_hook = NULL; /* bsp_spurious_initialize;*/
    193 
    194191  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    195192
    196   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    197 
    198   /*
     193  /*
     194   *  Is this true?
     195   *
    199196   *  PSIM does zero out memory BUT only when IT begins execution.  Thus
    200197   *  if we want to have a clean slate in the workspace each time we
    201198   *  begin execution of OUR application, then we must zero the workspace.
     199   *
     200   *  It is true that it takes simulated time to clear the memory.
    202201   */
    203202
    204203  Cpu_table.do_zero_of_workspace = FALSE;
    205204
    206   /*
    207    *  This should be enough interrupt stack.
    208    */
    209 
    210205  Cpu_table.interrupt_stack_size = (12 * 1024);
    211206
    212207  /*
    213    *  SIS does not support MP configurations so there is really no way
    214    *  to check this out.
    215    */
    216 
    217   Cpu_table.extra_mpci_receive_server_stack = 0;
    218 
    219   /*
    220208   *  The monitor likes the exception table to be at 0x0.
    221209   */
    222210
    223211  Cpu_table.exceptions_in_RAM = TRUE;
    224 
    225   /*
    226    *  Copy the table and allocate memory for the RTEMS Workspace
    227    */
    228 
    229   BSP_Configuration = Configuration;
    230212
    231213#if defined(RTEMS_POSIX_API)
     
    283265      (int) &PSIM_INSTRUCTIONS_PER_MICROSECOND;
    284266  }
    285 
    286   /*
    287    *  Initialize RTEMS. main() will finish it up and start multitasking.
    288    */
    289 
    290   rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
    291267}
  • c/src/lib/libbsp/sh/gensh1/include/bsp.h

    rb6394ae rbd9c3d1  
    109109
    110110/*
    111  * How many libio files we want
    112  */
    113 
    114 #define BSP_LIBIO_MAX_FDS       20
    115 
    116 /*
    117111 * FIXME: Should this go to libcpu/sh/sh7032 ?
    118112 */
  • c/src/lib/libbsp/sh/gensh1/startup/bspstart.c

    rb6394ae rbd9c3d1  
    6868void bsp_pretasking_hook(void)
    6969{
    70     bsp_libc_init((&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
     70    bsp_libc_init(&HeapStart, sizeof(unsigned32) * (&HeapEnd - &HeapStart), 0);
    7171 
    7272#ifdef RTEMS_DEBUG
     
    100100
    101101  /*
    102    *  Copy the Configuration Table .. so we can change it
    103    */
    104 
    105   BSP_Configuration = Configuration;
    106 
    107   /*
    108102   *  Need to "allocate" the memory for the RTEMS Workspace and
    109103   *  tell the RTEMS configuration where it is.  This memory is
     
    132126
    133127  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
    134 
    135   Cpu_table.predriver_hook = NULL;
    136 
    137128  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    138 
    139   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    140 
    141   Cpu_table.do_zero_of_workspace = TRUE;
    142129
    143130#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
     
    145132#endif
    146133
    147   Cpu_table.extra_mpci_receive_server_stack = 0;
    148 
    149   /*
    150    *  Don't forget the other CPU Table entries.
    151    */
    152 
    153   /*
    154    * Tell libio how many fd's we want and allow it to tweak config
    155    */
    156 
    157   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    158134}
  • c/src/lib/libbsp/shared/main.c

    rb6394ae rbd9c3d1  
    2525extern void bsp_cleanup( void );
    2626
     27extern rtems_configuration_table  Configuration;
    2728extern rtems_configuration_table  BSP_Configuration;
    2829extern rtems_cpu_table            Cpu_table;
     
    4748  int status;
    4849
    49   /* the atexit hook will be before the static destructor list's entry
    50      point */
     50  /*
     51   *  Set default values for the CPU Table fields all ports must have.
     52   *  These values can be overridden in bsp_start() but they are
     53   *  right most of the time.
     54   */
     55
     56  Cpu_table.pretasking_hook                 = NULL;
     57  Cpu_table.predriver_hook                  = NULL;
     58  Cpu_table.postdriver_hook                 = NULL;
     59  Cpu_table.idle_task                       = NULL;
     60  Cpu_table.do_zero_of_workspace            = TRUE;
     61  Cpu_table.interrupt_stack_size            = RTEMS_MINIMUM_STACK_SIZE;
     62  Cpu_table.extra_mpci_receive_server_stack = 0;
     63  Cpu_table.stack_allocate_hook             = NULL;
     64  Cpu_table.stack_free_hook                 = NULL;
     65
     66
     67  /*
     68   *  Copy the configuration table so we and the BSP wants to change it.
     69   */
     70
     71  BSP_Configuration = Configuration;
     72
     73  /*
     74   *  The atexit hook will be before the static destructor list's entry
     75   *  point.
     76   */
     77
    5178  bsp_start();
     79
     80  /*
     81   *  Initialize RTEMS but do NOT start multitasking.
     82   */
    5283
    5384  bsp_isr_level =
    5485    rtems_initialize_executive_early( &BSP_Configuration, &Cpu_table );
    5586
     87  /*
     88   *  Call main() and get the global constructors invoked if there
     89   *  are any.
     90   */
     91
    5692  status = main(argc, argv);
    5793
     94  /*
     95   *  Perform any BSP specific shutdown actions.
     96   */
     97
    5898  bsp_cleanup(); 
     99
     100  /*
     101   *  Now return to the start code.
     102   */
    59103
    60104  return status;
  • c/src/lib/libbsp/sparc/erc32/include/bsp.h

    rb6394ae rbd9c3d1  
    143143 */
    144144 
    145 /*
    146  * How many libio files we want
    147  */
    148  
    149 #define BSP_LIBIO_MAX_FDS       20
    150  
    151145 
    152146/* miscellaneous stuff assumed to exist */
  • c/src/lib/libbsp/sparc/erc32/startup/bspstart.c

    rb6394ae rbd9c3d1  
    199199
    200200  Cpu_table.pretasking_hook = bsp_pretasking_hook;    /* init libc, etc. */
    201 
    202   Cpu_table.predriver_hook = NULL; /* bsp_spurious_initialize;*/
    203 
    204201  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    205 
    206   Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    207202
    208203  /*
     
    211206   *  begin execution of OUR application, then we must zero the workspace.
    212207   */
    213 
    214208  Cpu_table.do_zero_of_workspace = TRUE;
    215209
     
    219213
    220214  Cpu_table.interrupt_stack_size = (24 * 1024);
    221 
    222   /*
    223    *  SIS does not support MP configurations so there is really no way
    224    *  to check this out.
    225    */
    226 
    227   Cpu_table.extra_mpci_receive_server_stack = 0;
    228 
    229   /*
    230    *  Copy the table and allocate memory for the RTEMS Workspace
    231    */
    232 
    233   BSP_Configuration = Configuration;
    234215
    235216#if defined(RTEMS_POSIX_API)
     
    274255
    275256  CPU_SPARC_CLICKS_PER_TICK = BSP_Configuration.microseconds_per_tick;
    276 
    277   /*
    278    *  Initialize RTEMS. main() will finish it up and start multitasking.
    279    */
    280 
    281   rtems_libio_config( &BSP_Configuration, BSP_LIBIO_MAX_FDS );
    282257}
  • c/src/lib/libbsp/unix/posix/include/bsp.h

    rb6394ae rbd9c3d1  
    7373 */
    7474 
    75 /*
    76  * How many libio files we want
    77  */
    78 
    79 #define BSP_LIBIO_MAX_FDS       20
    80 
    8175/* functions */
    8276
  • c/src/lib/libbsp/unix/posix/startup/bspstart.c

    rb6394ae rbd9c3d1  
    129129
    130130    /*
    131      *  Copy the table
     131     *  Copy the table (normally done in shared main).
    132132     */
    133133
     
    215215    Cpu_table.extra_mpci_receive_server_stack = 0;
    216216
    217   /*
    218    * Tell libio how many fd's we want and allow it to tweak config
    219    */
    220 
    221   rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
    222 
    223   /*
    224    * Add 1 extension for MPCI_fatal
    225    */
    226 
    227   if (BSP_Configuration.User_multiprocessing_table)
    228       BSP_Configuration.maximum_extensions++;
    229 
    230   CPU_CLICKS_PER_TICK = 1;
    231 
    232   /*
    233    *  Start most of RTEMS
    234    *  main() will start the rest
    235    */
    236 
    237   bsp_isr_level = rtems_initialize_executive_early(
    238     &BSP_Configuration,
    239     &Cpu_table
    240   );
     217    /*
     218     * Add 1 extension for MPCI_fatal
     219     */
     220
     221    if (BSP_Configuration.User_multiprocessing_table)
     222        BSP_Configuration.maximum_extensions++;
     223
     224    CPU_CLICKS_PER_TICK = 1;
     225
     226    /*
     227     *  Start most of RTEMS
     228     *  main() will start the rest
     229     */
     230
     231    bsp_isr_level = rtems_initialize_executive_early(
     232      &BSP_Configuration,
     233      &Cpu_table
     234    );
    241235}
  • c/src/lib/libc/libio.c

    rb6394ae rbd9c3d1  
    100100    rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER );
    101101  handlers[handler_index] = *handler;
    102 }
    103 
    104 
    105 void
    106 rtems_libio_config(
    107     rtems_configuration_table *config,
    108     unsigned32                 max_fds
    109 )
    110 {
    111     rtems_libio_number_iops = max_fds;
    112 
    113     /*
    114      * tweak config to reflect # of semaphores we will need
    115      */
    116 
    117     /* one for iop table */
    118     config->RTEMS_api_configuration->maximum_semaphores += 1;
    119     config->RTEMS_api_configuration->maximum_semaphores += max_fds;
    120102}
    121103
  • cpukit/libcsupport/src/libio.c

    rb6394ae rbd9c3d1  
    100100    rtems_fatal_error_occurred( RTEMS_INVALID_NUMBER );
    101101  handlers[handler_index] = *handler;
    102 }
    103 
    104 
    105 void
    106 rtems_libio_config(
    107     rtems_configuration_table *config,
    108     unsigned32                 max_fds
    109 )
    110 {
    111     rtems_libio_number_iops = max_fds;
    112 
    113     /*
    114      * tweak config to reflect # of semaphores we will need
    115      */
    116 
    117     /* one for iop table */
    118     config->RTEMS_api_configuration->maximum_semaphores += 1;
    119     config->RTEMS_api_configuration->maximum_semaphores += max_fds;
    120102}
    121103
  • cpukit/sapi/include/confdefs.h

    rb6394ae rbd9c3d1  
    3939#define CONFIGURE_NEWLIB_EXTENSION 1
    4040#define CONFIGURE_MALLOC_REGION 1
     41
     42#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
     43#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
     44#endif
     45
     46#define CONFIGURE_LIBIO_SEMAPHORES \
     47  (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)
    4148
    4249/*
     
    478485(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
    479486   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
    480    CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
     487   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \
     488     CONFIGURE_LIBIO_SEMAPHORES) + \
    481489   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
    482490   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
Note: See TracChangeset for help on using the changeset viewer.