diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-01-26 10:11:48 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:57 +0100 |
commit | 8ca372e9b47319a034a32250e037247e5b3c4c9e (patch) | |
tree | 3acf412bf7821e7917a7e2b3ef92838e94a4c8ea /cpukit/sapi | |
parent | Use linker set for driver manager initialization (diff) | |
download | rtems-8ca372e9b47319a034a32250e037247e5b3c4c9e.tar.bz2 |
Use linker set for MPCI initialization
Update #2408.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/Makefile.am | 1 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 11 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/init.h | 9 | ||||
-rw-r--r-- | cpukit/sapi/include/rtems/sptables.h | 70 | ||||
-rw-r--r-- | cpukit/sapi/preinstall.am | 4 | ||||
-rw-r--r-- | cpukit/sapi/src/exinit.c | 54 |
6 files changed, 11 insertions, 138 deletions
diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am index 91708095a7..d6da88ceff 100644 --- a/cpukit/sapi/Makefile.am +++ b/cpukit/sapi/Makefile.am @@ -19,7 +19,6 @@ include_rtems_HEADERS += include/rtems/profiling.h include_rtems_HEADERS += include/rtems/rbheap.h include_rtems_HEADERS += include/rtems/rbtree.h include_rtems_HEADERS += include/rtems/scheduler.h -include_rtems_HEADERS += include/rtems/sptables.h include_rtems_HEADERS += include/rtems/timecounter.h include_rtems_HEADERS += include/rtems/timespec.h diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index d73e9b8041..1b48ea92de 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -260,7 +260,7 @@ extern const rtems_configuration_table Configuration; /** * This points to the multiprocessing configuration table. */ - SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table; + extern rtems_multiprocessing_table *_Configuration_MP_table; #endif #if defined(RTEMS_MULTIPROCESSING) @@ -270,7 +270,14 @@ extern const rtems_configuration_table Configuration; * This is the RTEMS Multiprocessing Configuration Table expected to * be generated by confdefs.h. */ - extern rtems_multiprocessing_table Multiprocessing_configuration; + extern rtems_multiprocessing_table Multiprocessing_configuration; + + /* + * This is the default Multiprocessing Configuration Table. + * It is used in single processor configurations. + */ + extern const rtems_multiprocessing_table + _Initialization_Default_multiprocessing_table; #endif diff --git a/cpukit/sapi/include/rtems/init.h b/cpukit/sapi/include/rtems/init.h index b92bf8590e..fa3108ea50 100644 --- a/cpukit/sapi/include/rtems/init.h +++ b/cpukit/sapi/include/rtems/init.h @@ -36,15 +36,6 @@ extern "C" { #include <rtems/config.h> #include <rtems/rtems/intr.h> -#if defined(RTEMS_MULTIPROCESSING) -/** - * The following defines the default Multiprocessing Configuration - * Table. This table is used in a single processor system. - */ -extern const rtems_multiprocessing_table - _Initialization_Default_multiprocessing_table; -#endif - /** * @brief Initializes the system and starts multitasking. * diff --git a/cpukit/sapi/include/rtems/sptables.h b/cpukit/sapi/include/rtems/sptables.h deleted file mode 100644 index 733e613f65..0000000000 --- a/cpukit/sapi/include/rtems/sptables.h +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @file - * - * @brief Pre-Initialized Tables Used when in a Single Processor Configuration - * - * This include file contains the executive's pre-initialized tables - * used when in a single processor configuration. - */ - -/* - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef _RTEMS_SPTABLES_H -#define _RTEMS_SPTABLES_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <rtems/config.h> -#include <rtems/fatal.h> -#include <rtems/init.h> -#include <rtems/io.h> - -#include <rtems/rtems/intr.h> -#include <rtems/rtems/clock.h> -#include <rtems/rtems/tasks.h> -#include <rtems/rtems/dpmem.h> -#include <rtems/rtems/event.h> -#if defined(RTEMS_MULTIPROCESSING) -#include <rtems/rtems/mp.h> -#endif -#include <rtems/rtems/part.h> -#include <rtems/rtems/ratemon.h> -#include <rtems/rtems/region.h> -#include <rtems/rtems/signal.h> -#include <rtems/rtems/timer.h> - -#if defined(RTEMS_MULTIPROCESSING) -/* - * This is the default Multiprocessing Configuration Table. - * It is used in single processor configurations. - */ - #if defined(SAPI_INIT) - const rtems_multiprocessing_table - _Initialization_Default_multiprocessing_table = { - 1, /* local node number */ - 1, /* maximum number nodes in system */ - 0, /* maximum number global objects */ - 0, /* maximum number proxies */ - STACK_MINIMUM_SIZE, /* MPCI receive server stack size */ - NULL, /* pointer to MPCI address table */ - }; - #else - extern const rtems_multiprocessing_table - _Initialization_Default_multiprocessing_table; - #endif -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cpukit/sapi/preinstall.am b/cpukit/sapi/preinstall.am index 8a4e54ffd2..969edfefe7 100644 --- a/cpukit/sapi/preinstall.am +++ b/cpukit/sapi/preinstall.am @@ -82,10 +82,6 @@ $(PROJECT_INCLUDE)/rtems/scheduler.h: include/rtems/scheduler.h $(PROJECT_INCLUD $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/scheduler.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/scheduler.h -$(PROJECT_INCLUDE)/rtems/sptables.h: include/rtems/sptables.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/sptables.h -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/sptables.h - $(PROJECT_INCLUDE)/rtems/timecounter.h: include/rtems/timecounter.h $(PROJECT_INCLUDE)/rtems/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/timecounter.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/timecounter.h diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index dca42d65bf..a52a546fbb 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -20,11 +20,10 @@ #endif /* - * SCORE_INIT and SAPI_INIT are defined so all of the super core and - * super API data will be included in this object file. + * SCORE_INIT is defined so all of the super core + * data will be included in this object file. */ -#define SAPI_INIT #define SCORE_INIT #include <rtems/system.h> @@ -49,8 +48,6 @@ #include <rtems/score/watchdogimpl.h> #include <rtems/score/wkspace.h> -#include <rtems/sptables.h> - static Objects_Information * _Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; @@ -76,31 +73,11 @@ static void rtems_initialize_data_structures(void) * are disabled by boot_card(). */ - #if defined(RTEMS_MULTIPROCESSING) - /* - * Initialize the system state based on whether this is an MP system. - * In an MP configuration, internally we view single processor - * systems as a very restricted multiprocessor system. - */ - _Configuration_MP_table = rtems_configuration_get_user_multiprocessing_table(); - - if ( _Configuration_MP_table == NULL ) { - _Configuration_MP_table = - (void *)&_Initialization_Default_multiprocessing_table; - } else { - _System_state_Is_multiprocessing = true; - } - #endif - /* * Initialize any target architecture specific support as early as possible */ _CPU_Initialize(); - #if defined(RTEMS_MULTIPROCESSING) - _Objects_MP_Handler_early_initialization(); - #endif - _Thread_Dispatch_initialization(); _ISR_Handler_initialization(); @@ -115,21 +92,9 @@ static void rtems_initialize_data_structures(void) _Scheduler_Handler_initialization(); - #if defined(RTEMS_MULTIPROCESSING) - _Objects_MP_Handler_initialization(); - _MPCI_Handler_initialization( RTEMS_TIMEOUT ); - #endif - _SMP_Handler_initialize(); } -static void rtems_initialize_before_drivers(void) -{ - #if defined(RTEMS_MULTIPROCESSING) - _MPCI_Create_server(); - #endif -} - static void rtems_initialize_device_drivers(void) { /* @@ -146,15 +111,6 @@ static void rtems_initialize_device_drivers(void) */ _IO_Initialize_all_drivers(); - #if defined(RTEMS_MULTIPROCESSING) - if ( _System_state_Is_multiprocessing ) { - _MPCI_Initialization(); - _MPCI_Internal_packets_Send_process_packet( - MPCI_PACKETS_SYSTEM_VERIFY - ); - } - #endif - /* * Run the APIs and BSPs postdriver hooks. * @@ -187,12 +143,6 @@ RTEMS_SYSINIT_ITEM( ); RTEMS_SYSINIT_ITEM( - rtems_initialize_before_drivers, - RTEMS_SYSINIT_BEFORE_DRIVERS, - RTEMS_SYSINIT_ORDER_MIDDLE -); - -RTEMS_SYSINIT_ITEM( rtems_initialize_device_drivers, RTEMS_SYSINIT_DEVICE_DRIVERS, RTEMS_SYSINIT_ORDER_MIDDLE |