diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-16 20:05:06 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-16 20:05:06 +0000 |
commit | 06dcaf09e6c0eae0b3a3c8d84adb663d03a53a4b (patch) | |
tree | 931cf314d5a87d1d3dcd6e5c366b5ce58270a6aa /cpukit/sapi/src | |
parent | 2011-03-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-06dcaf09e6c0eae0b3a3c8d84adb663d03a53a4b.tar.bz2 |
2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1729/cpukit
* configure.ac, sapi/include/confdefs.h, sapi/src/exinit.c,
score/Makefile.am, score/preinstall.am,
score/cpu/i386/rtems/score/cpu.h, score/cpu/sparc/cpu_asm.S,
score/cpu/sparc/rtems/score/cpu.h,
score/include/rtems/score/basedefs.h,
score/include/rtems/score/context.h,
score/include/rtems/score/percpu.h, score/src/percpu.c,
score/src/thread.c, score/src/threadcreateidle.c: Add next step in
SMP support. This adds an allocated array of the Per_CPU structures
to support multiple cpus vs a single instance of the structure which
is still used if SMP support is disabled. Configuration support is
also added to explicitly enable or disable SMP. But SMP can only be
enabled for the CPUs which will support it initially -- SPARC and
i386. With the stub BSP support, a BSP can be run as a single core
SMP system from an RTEMS data structure standpoint.
* aclocal/check-smp.m4, aclocal/enable-smp.m4,
score/include/rtems/bspsmp.h, score/include/rtems/score/smplock.h,
score/src/smp.c, score/src/smplock.c: New files.
Diffstat (limited to 'cpukit/sapi/src')
-rw-r--r-- | cpukit/sapi/src/exinit.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index 2cbddfa1da..a431669641 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -1,7 +1,7 @@ /* * Initialization Manager * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -57,6 +57,11 @@ #include <rtems/posix/posixapi.h> #endif +#if defined(RTEMS_SMP) + #include <rtems/bspsmp.h> + #include <rtems/score/percpu.h> +#endif + Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ]; void rtems_initialize_data_structures(void) @@ -114,6 +119,10 @@ void rtems_initialize_data_structures(void) */ _Workspace_Handler_initialization(); + #if defined(RTEMS_SMP) + _SMP_Handler_initialize(); + #endif + _User_extensions_Handler_initialization(); _ISR_Handler_initialization(); @@ -150,6 +159,13 @@ void rtems_initialize_data_structures(void) _POSIX_API_Initialize(); #endif + /* + * Discover and initialize the secondary cores in an SMP system. + */ + #if defined(RTEMS_SMP) + _SMP_Processor_count = bsp_smp_initialize( rtems_smp_maximum_processors ); + #endif + _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING ); /* |