Changeset 8ca372e in rtems


Ignore:
Timestamp:
Jan 26, 2016, 9:11:48 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
1ff8eca
Parents:
6bf44a5
git-author:
Sebastian Huber <sebastian.huber@…> (01/26/16 09:11:48)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/03/16 09:00:57)
Message:

Use linker set for MPCI initialization

Update #2408.

Files:
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c

    r6bf44a5 r8ca372e  
    4747#include <bsp/vpd.h>
    4848
    49 /* for RTEMS_VERSION :-( I dont like the preassembled string */
    50 #include <rtems/sptables.h>
    51 
    5249#define SHOW_MORE_INIT_SETTINGS
    5350
  • c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c

    r6bf44a5 r8ca372e  
    4242#include <rtems/bspIo.h>
    4343#include <rtems/counter.h>
    44 #include <rtems/sptables.h>
    4544
    4645/*
  • cpukit/sapi/Makefile.am

    r6bf44a5 r8ca372e  
    2020include_rtems_HEADERS += include/rtems/rbtree.h
    2121include_rtems_HEADERS += include/rtems/scheduler.h
    22 include_rtems_HEADERS += include/rtems/sptables.h
    2322include_rtems_HEADERS += include/rtems/timecounter.h
    2423include_rtems_HEADERS += include/rtems/timespec.h
  • cpukit/sapi/include/rtems/config.h

    r6bf44a5 r8ca372e  
    261261   *  This points to the multiprocessing configuration table.
    262262   */
    263   SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
     263  extern rtems_multiprocessing_table *_Configuration_MP_table;
    264264#endif
    265265
     
    271271   * be generated by confdefs.h.
    272272   */
    273   extern rtems_multiprocessing_table  Multiprocessing_configuration;
     273  extern rtems_multiprocessing_table Multiprocessing_configuration;
     274
     275  /*
     276   *  This is the default Multiprocessing Configuration Table.
     277   *  It is used in single processor configurations.
     278   */
     279  extern const rtems_multiprocessing_table
     280    _Initialization_Default_multiprocessing_table;
    274281#endif
    275282
  • cpukit/sapi/include/rtems/init.h

    r6bf44a5 r8ca372e  
    3737#include <rtems/rtems/intr.h>
    3838
    39 #if defined(RTEMS_MULTIPROCESSING)
    40 /**
    41  * The following defines the default Multiprocessing Configuration
    42  * Table.  This table is used in a single processor system.
    43  */
    44 extern const rtems_multiprocessing_table
    45   _Initialization_Default_multiprocessing_table;
    46 #endif
    47 
    4839/**
    4940 * @brief Initializes the system and starts multitasking.
  • cpukit/sapi/preinstall.am

    r6bf44a5 r8ca372e  
    8383PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/scheduler.h
    8484
    85 $(PROJECT_INCLUDE)/rtems/sptables.h: include/rtems/sptables.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    86         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/sptables.h
    87 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/sptables.h
    88 
    8985$(PROJECT_INCLUDE)/rtems/timecounter.h: include/rtems/timecounter.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    9086        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/timecounter.h
  • cpukit/sapi/src/exinit.c

    r6bf44a5 r8ca372e  
    2121
    2222/*
    23  *  SCORE_INIT and SAPI_INIT are defined so all of the super core and
    24  *  super API data will be included in this object file.
     23 *  SCORE_INIT is defined so all of the super core
     24 *  data will be included in this object file.
    2525 */
    2626
    27 #define SAPI_INIT
    2827#define SCORE_INIT
    2928
     
    4948#include <rtems/score/watchdogimpl.h>
    5049#include <rtems/score/wkspace.h>
    51 
    52 #include <rtems/sptables.h>
    5350
    5451static Objects_Information *
     
    7774   */
    7875
    79   #if defined(RTEMS_MULTIPROCESSING)
    80     /*
    81      *  Initialize the system state based on whether this is an MP system.
    82      *  In an MP configuration, internally we view single processor
    83      *  systems as a very restricted multiprocessor system.
    84      */
    85     _Configuration_MP_table = rtems_configuration_get_user_multiprocessing_table();
    86 
    87     if ( _Configuration_MP_table == NULL ) {
    88       _Configuration_MP_table =
    89         (void *)&_Initialization_Default_multiprocessing_table;
    90     } else {
    91       _System_state_Is_multiprocessing = true;
    92     }
    93   #endif
    94 
    9576  /*
    9677   * Initialize any target architecture specific support as early as possible
    9778   */
    9879  _CPU_Initialize();
    99 
    100   #if defined(RTEMS_MULTIPROCESSING)
    101     _Objects_MP_Handler_early_initialization();
    102   #endif
    10380
    10481  _Thread_Dispatch_initialization();
     
    11693  _Scheduler_Handler_initialization();
    11794
    118   #if defined(RTEMS_MULTIPROCESSING)
    119     _Objects_MP_Handler_initialization();
    120     _MPCI_Handler_initialization( RTEMS_TIMEOUT );
    121   #endif
    122 
    12395  _SMP_Handler_initialize();
    124 }
    125 
    126 static void rtems_initialize_before_drivers(void)
    127 {
    128   #if defined(RTEMS_MULTIPROCESSING)
    129     _MPCI_Create_server();
    130   #endif
    13196}
    13297
     
    146111   */
    147112  _IO_Initialize_all_drivers();
    148 
    149   #if defined(RTEMS_MULTIPROCESSING)
    150     if ( _System_state_Is_multiprocessing ) {
    151       _MPCI_Initialization();
    152       _MPCI_Internal_packets_Send_process_packet(
    153         MPCI_PACKETS_SYSTEM_VERIFY
    154       );
    155     }
    156   #endif
    157113
    158114  /*
     
    184140  _Thread_Create_idle,
    185141  RTEMS_SYSINIT_IDLE_THREADS,
    186   RTEMS_SYSINIT_ORDER_MIDDLE
    187 );
    188 
    189 RTEMS_SYSINIT_ITEM(
    190   rtems_initialize_before_drivers,
    191   RTEMS_SYSINIT_BEFORE_DRIVERS,
    192142  RTEMS_SYSINIT_ORDER_MIDDLE
    193143);
  • cpukit/score/include/rtems/score/basedefs.h

    r6bf44a5 r8ca372e  
    8080  #undef  SCORE_EXTERN
    8181  #define SCORE_EXTERN  extern
    82 #endif
    83 
    84 /**
    85  *  The following ensures that all data is declared in the space
    86  *  of the initialization routine for either the Initialization Manager
    87  *  or the initialization file for the appropriate API.  It is
    88  *  referenced as "external" in every other file.
    89  */
    90 #ifdef SAPI_INIT
    91   #undef  SAPI_EXTERN
    92   #define SAPI_EXTERN
    93 #else
    94   #undef  SAPI_EXTERN
    95   #define SAPI_EXTERN  extern
    9682#endif
    9783
  • cpukit/score/include/rtems/score/mpciimpl.h

    r6bf44a5 r8ca372e  
    101101
    102102/**
    103  *  @brief Initialize the MPCI handler.
    104  *
    105  *  This routine performs the initialization necessary for this handler.
    106  *
    107  *  @param[in] timeout_status is the value which should be returned to
    108  *             blocking threads when they timeout on a remote operation.
    109  */
    110 void _MPCI_Handler_initialization(
    111   uint32_t   timeout_status
    112 );
    113 
    114 /**
    115  *  @brief Create the MPCI server thread.
    116  *
    117  *  This routine creates the packet receive server used in MP systems.
    118  */
    119 void _MPCI_Create_server( void );
    120 
    121 /**
    122  *  @brief Initialize the MPCI driver.
    123  *
    124  *  This routine initializes the MPCI driver by
    125  *  invoking the user provided MPCI initialization callout.
    126  */
    127 void _MPCI_Initialization ( void );
    128 
    129 /**
    130103 *  This routine registers the MPCI packet processor for the
    131104 *  designated object class.
  • cpukit/score/include/rtems/sysinit.h

    r6bf44a5 r8ca372e  
    3030#define RTEMS_SYSINIT_BSP_START                  000200
    3131#define RTEMS_SYSINIT_INITIAL_EXTENSIONS         000300
    32 #define RTEMS_SYSINIT_DATA_STRUCTURES            000301
     32#define RTEMS_SYSINIT_MP_EARLY                   000301
     33#define RTEMS_SYSINIT_DATA_STRUCTURES            000302
    3334#define RTEMS_SYSINIT_CPU_SET                    00030d
     35#define RTEMS_SYSINIT_MP                         00030e
    3436#define RTEMS_SYSINIT_USER_EXTENSIONS            000320
    3537#define RTEMS_SYSINIT_CLASSIC_TASKS              000340
     
    6062#define RTEMS_SYSINIT_ROOT_FILESYSTEM            000401
    6163#define RTEMS_SYSINIT_DRVMGR                     000500
    62 #define RTEMS_SYSINIT_BEFORE_DRIVERS             000501
     64#define RTEMS_SYSINIT_MP_SERVER                  000501
    6365#define RTEMS_SYSINIT_BSP_PRE_DRIVERS            000600
    6466#define RTEMS_SYSINIT_DRVMGR_LEVEL_1             000700
     
    6769#define RTEMS_SYSINIT_DRVMGR_LEVEL_3             000703
    6870#define RTEMS_SYSINIT_DRVMGR_LEVEL_4             000704
     71#define RTEMS_SYSINIT_MP_FINALIZE                000705
    6972#define RTEMS_SYSINIT_STD_FILE_DESCRIPTORS       000800
    7073
  • cpukit/score/src/mpci.c

    r6bf44a5 r8ca372e  
    2222#include <rtems/score/coresemimpl.h>
    2323#include <rtems/score/interr.h>
     24#include <rtems/score/objectmp.h>
    2425#include <rtems/score/stackimpl.h>
    2526#include <rtems/score/sysstate.h>
     
    2829#include <rtems/score/threadqimpl.h>
    2930#include <rtems/config.h>
     31#include <rtems/sysinit.h>
    3032
    3133RTEMS_STATIC_ASSERT(
     
    3436);
    3537
     38rtems_multiprocessing_table *_Configuration_MP_table;
     39
     40const rtems_multiprocessing_table
     41 _Initialization_Default_multiprocessing_table = {
     42  1,                        /* local node number */
     43  1,                        /* maximum number nodes in system */
     44  0,                        /* maximum number global objects */
     45  0,                        /* maximum number proxies */
     46  STACK_MINIMUM_SIZE,       /* MPCI receive server stack size */
     47  NULL                      /* pointer to MPCI address table */
     48};
     49
    3650/**
    3751 *  This is the core semaphore which the MPCI Receive Server blocks on.
     
    3953CORE_semaphore_Control _MPCI_Semaphore;
    4054
    41 void _MPCI_Handler_initialization(
    42   uint32_t   timeout_status
    43 )
     55static void _MPCI_Handler_early_initialization( void )
     56{
     57  /*
     58   *  Initialize the system state based on whether this is an MP system.
     59   *  In an MP configuration, internally we view single processor
     60   *  systems as a very restricted multiprocessor system.
     61   */
     62  _Configuration_MP_table = rtems_configuration_get_user_multiprocessing_table();
     63
     64  if ( _Configuration_MP_table == NULL ) {
     65    _Configuration_MP_table = RTEMS_DECONST(
     66      rtems_multiprocessing_table *,
     67      &_Initialization_Default_multiprocessing_table
     68    );
     69  } else {
     70    _System_state_Is_multiprocessing = true;
     71  }
     72
     73  _Objects_MP_Handler_early_initialization();
     74}
     75
     76static void _MPCI_Handler_initialization( void )
    4477{
    4578  CORE_semaphore_Attributes   attributes;
    4679  MPCI_Control               *users_mpci_table;
     80
     81  _Objects_MP_Handler_initialization();
    4782
    4883  users_mpci_table = _Configuration_MP_table->User_mpci_table;
     
    87122}
    88123
    89 void _MPCI_Create_server( void )
     124static void _MPCI_Create_server( void )
    90125{
    91126  Thread_Entry_information entry = {
     
    130165}
    131166
    132 void _MPCI_Initialization ( void )
     167static void _MPCI_Initialization( void )
    133168{
    134169  (*_MPCI_table->initialization)();
     
    430465}
    431466
     467static void _MPCI_Finalize( void )
     468{
     469  if ( _System_state_Is_multiprocessing ) {
     470    _MPCI_Initialization();
     471    _MPCI_Internal_packets_Send_process_packet( MPCI_PACKETS_SYSTEM_VERIFY );
     472  }
     473}
     474
     475RTEMS_SYSINIT_ITEM(
     476  _MPCI_Handler_early_initialization,
     477  RTEMS_SYSINIT_MP_EARLY,
     478  RTEMS_SYSINIT_ORDER_MIDDLE
     479);
     480
     481RTEMS_SYSINIT_ITEM(
     482  _MPCI_Handler_initialization,
     483  RTEMS_SYSINIT_MP,
     484  RTEMS_SYSINIT_ORDER_MIDDLE
     485);
     486
     487RTEMS_SYSINIT_ITEM(
     488  _MPCI_Create_server,
     489  RTEMS_SYSINIT_MP_SERVER,
     490  RTEMS_SYSINIT_ORDER_MIDDLE
     491);
     492
     493RTEMS_SYSINIT_ITEM(
     494  _MPCI_Finalize,
     495  RTEMS_SYSINIT_MP_FINALIZE,
     496  RTEMS_SYSINIT_ORDER_MIDDLE
     497);
     498
    432499/* end of file */
  • testsuites/sptests/spsize/size.c

    r6bf44a5 r8ca372e  
    7474 * #include <rtems/copyrt.h>
    7575 * #include <rtems/tables.h>
    76  * #include <rtems/sptables.h>
    7776 */
    7877#define  HEAP_OVHD        16    /* wasted heap space per task stack */
     
    454453
    455454#if defined(RTEMS_MULTIPROCESSING)
    456 /*sptables.h*/  (sizeof _Initialization_Default_multiprocessing_table)  +
     455                (sizeof _Initialization_Default_multiprocessing_table)  +
    457456#endif
    458457                (strlen(_RTEMS_version)+1);
  • testsuites/sptests/spsysinit01/init.c

    r6bf44a5 r8ca372e  
    129129  ROOT_FILESYSTEM_PRE,
    130130  ROOT_FILESYSTEM_POST,
    131   BEFORE_DRIVERS_PRE,
    132   BEFORE_DRIVERS_POST,
    133131  BSP_PRE_DRIVERS_PRE,
    134132  BSP_PRE_DRIVERS_POST,
     
    581579}
    582580
    583 FIRST(RTEMS_SYSINIT_BEFORE_DRIVERS)
    584 {
    585   /* Omit test of build configuration specific pre and post conditions */
    586   next_step(BEFORE_DRIVERS_PRE);
    587 }
    588 
    589 LAST(RTEMS_SYSINIT_BEFORE_DRIVERS)
    590 {
    591   next_step(BEFORE_DRIVERS_POST);
    592 }
    593 
    594581FIRST(RTEMS_SYSINIT_BSP_PRE_DRIVERS)
    595582{
Note: See TracChangeset for help on using the changeset viewer.