Changeset 3a4ae6c in rtems for cpukit/sapi/src/exinit.c


Ignore:
Timestamp:
Sep 11, 1995, 7:35:39 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
ced11f99
Parents:
5072b07
Message:

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/src/exinit.c

    r5072b07 r3a4ae6c  
    2222#include <rtems/system.h>
    2323#include <rtems/config.h>
    24 #include <rtems/copyrt.h>
    25 #include <rtems/clock.h>
    26 #include <rtems/tasks.h>
    2724#include <rtems/debug.h>
    28 #include <rtems/dpmem.h>
    29 #include <rtems/event.h>
    3025#include <rtems/extension.h>
    3126#include <rtems/fatal.h>
    32 #include <rtems/heap.h>
    3327#include <rtems/init.h>
    34 #include <rtems/intthrd.h>
    35 #include <rtems/isr.h>
    36 #include <rtems/intr.h>
    3728#include <rtems/io.h>
    38 #include <rtems/message.h>
    39 #include <rtems/mp.h>
    40 #include <rtems/mpci.h>
    41 #include <rtems/part.h>
    42 #include <rtems/priority.h>
    43 #include <rtems/ratemon.h>
    44 #include <rtems/region.h>
    45 #include <rtems/sem.h>
    46 #include <rtems/signal.h>
    4729#include <rtems/sysstate.h>
    48 #include <rtems/thread.h>
    49 #include <rtems/timer.h>
    50 #include <rtems/tod.h>
    51 #include <rtems/userext.h>
    52 #include <rtems/watchdog.h>
    53 #include <rtems/wkspace.h>
    54 
     30
     31#include <rtems/core/copyrt.h>
     32#include <rtems/core/heap.h>
     33#include <rtems/core/interr.h>
     34#include <rtems/core/intthrd.h>
     35#include <rtems/core/isr.h>
     36#include <rtems/core/mpci.h>
     37#include <rtems/core/priority.h>
     38#include <rtems/core/thread.h>
     39#include <rtems/core/tod.h>
     40#include <rtems/core/userext.h>
     41#include <rtems/core/watchdog.h>
     42#include <rtems/core/wkspace.h>
     43
     44#include <rtems/directives.h>
    5545#include <rtems/sptables.h>
     46
     47#include <rtems/rtems/rtemsapi.h>
    5648
    5749/*PAGE
     
    10496  _ISR_Disable( bsp_level );
    10597
    106   _System_state_Set( SYSTEM_STATE_BEFORE_INITIALIZATION );
     98  if ( cpu_table == NULL )
     99    _Internal_error_Occurred(
     100      INTERNAL_ERROR_CORE,
     101      TRUE,
     102      INTERNAL_ERROR_NO_CONFIGURATION_TABLE
     103    );
     104
     105  /*
     106   *  Initialize the system state based on whether this is an MP system.
     107   */
     108
     109  multiprocessing_table = configuration_table->User_multiprocessing_table;
     110
     111  _System_state_Handler_initialization(
     112    (multiprocessing_table) ? TRUE : FALSE
     113  );
     114
     115  /*
     116   *  Provided just for user convenience.
     117   */
     118
     119  _Configuration_Table    = configuration_table;
     120  _Configuration_MP_table = multiprocessing_table;
     121
     122  /*
     123   *  Internally we view single processor systems as a very restricted
     124   *  multiprocessor system.
     125   */
     126
     127  if ( multiprocessing_table == NULL )
     128    multiprocessing_table =
     129      (void *)&_Initialization_Default_multiprocessing_table;
     130
     131  if ( cpu_table == NULL )
     132    _Internal_error_Occurred(
     133      INTERNAL_ERROR_CORE,
     134      TRUE,
     135      INTERNAL_ERROR_NO_CPU_TABLE
     136    );
    107137
    108138  _CPU_Initialize( cpu_table, _Thread_Dispatch );
     
    114144
    115145  _Debug_Manager_initialization();
    116 
    117   multiprocessing_table = configuration_table->User_multiprocessing_table;
    118   if ( multiprocessing_table == NULL )
    119     multiprocessing_table =
    120       (void *) &_Configuration_Default_multiprocessing_table;
    121 
    122   _Configuration_Handler_initialization(
    123     configuration_table,
    124     multiprocessing_table,
    125     multiprocessing_table->User_mpci_table
    126   );
    127 
    128   _Attributes_Handler_initialization();
    129146
    130147  _Thread_Dispatch_initialization();
     
    143160  _Objects_Handler_initialization(
    144161    multiprocessing_table->node,
     162    multiprocessing_table->maximum_nodes,
    145163    multiprocessing_table->maximum_global_objects
    146164  );
     
    154172  _Thread_Handler_initialization(
    155173    configuration_table->ticks_per_timeslice,
     174    configuration_table->maximum_extensions,
    156175    multiprocessing_table->maximum_proxies
    157176  );
    158177
    159   _MPCI_Handler_initialization();
     178  _MPCI_Handler_initialization(
     179    multiprocessing_table->User_mpci_table
     180  );
     181
     182  _Internal_threads_Initialization();
    160183
    161184/* MANAGERS */
    162 
    163   _Interrupt_Manager_initialization();
    164 
    165   _Multiprocessing_Manager_initialization();
    166 
    167   _RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
    168 
    169   _Timer_Manager_initialization( configuration_table->maximum_timers );
    170185
    171186  _Extension_Manager_initialization( configuration_table->maximum_extensions );
     
    173188  _IO_Manager_initialization(
    174189    configuration_table->Device_driver_table,
    175     configuration_table->number_of_device_drivers
    176   );
    177 
    178   _Event_Manager_initialization();
    179 
    180   _Message_queue_Manager_initialization(
    181     configuration_table->maximum_message_queues
    182   );
    183 
    184   _Semaphore_Manager_initialization(
    185     configuration_table->maximum_semaphores
    186   );
    187 
    188   _Partition_Manager_initialization(
    189     configuration_table->maximum_partitions
    190   );
    191 
    192   _Region_Manager_initialization( configuration_table->maximum_regions );
    193 
    194   _Dual_ported_memory_Manager_initialization(
    195     configuration_table->maximum_ports
    196   );
    197 
    198   _Rate_monotonic_Manager_initialization(
    199     configuration_table->maximum_periods
    200   );
    201 
    202   _Internal_threads_Initialization();
     190    configuration_table->number_of_device_drivers,
     191    configuration_table->maximum_devices
     192  );
     193
     194  _RTEMS_API_Initialize( configuration_table );
    203195
    204196  if ( cpu_table->pretasking_hook )
    205197    (*cpu_table->pretasking_hook)();
     198
     199  _Internal_threads_Start();
    206200
    207201  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
Note: See TracChangeset for help on using the changeset viewer.