forked from Imagelibrary/rtems
@@ -37,7 +37,6 @@
|
|||||||
#include <rtems/score/apiext.h>
|
#include <rtems/score/apiext.h>
|
||||||
#include <rtems/score/apimutex.h>
|
#include <rtems/score/apimutex.h>
|
||||||
#include <rtems/score/copyrt.h>
|
#include <rtems/score/copyrt.h>
|
||||||
#include <rtems/score/cpusetimpl.h>
|
|
||||||
#include <rtems/score/heap.h>
|
#include <rtems/score/heap.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
#include <rtems/score/isr.h>
|
#include <rtems/score/isr.h>
|
||||||
@@ -130,8 +129,6 @@ static void rtems_initialize_data_structures(void)
|
|||||||
|
|
||||||
_SMP_Handler_initialize();
|
_SMP_Handler_initialize();
|
||||||
|
|
||||||
_CPU_set_Handler_initialization();
|
|
||||||
|
|
||||||
/* MANAGERS */
|
/* MANAGERS */
|
||||||
|
|
||||||
_POSIX_API_Initialize();
|
_POSIX_API_Initialize();
|
||||||
|
|||||||
@@ -123,18 +123,6 @@ static inline void _CPU_set_Set(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize the CPU Set Handler
|
|
||||||
*
|
|
||||||
* This routine validates a cpuset sets at least one valid cpu and that
|
|
||||||
* it does not set any invalid cpus.
|
|
||||||
*/
|
|
||||||
#if __RTEMS_HAVE_SYS_CPUSET_H__ && defined( RTEMS_SMP )
|
|
||||||
void _CPU_set_Handler_initialization(void);
|
|
||||||
#else
|
|
||||||
#define _CPU_set_Handler_initialization() do { } while ( 0 )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ extern "C" {
|
|||||||
#define RTEMS_SYSINIT_BSP_START 000200
|
#define RTEMS_SYSINIT_BSP_START 000200
|
||||||
#define RTEMS_SYSINIT_INITIAL_EXTENSIONS 000300
|
#define RTEMS_SYSINIT_INITIAL_EXTENSIONS 000300
|
||||||
#define RTEMS_SYSINIT_DATA_STRUCTURES 000301
|
#define RTEMS_SYSINIT_DATA_STRUCTURES 000301
|
||||||
|
#define RTEMS_SYSINIT_CPU_SET 00030d
|
||||||
#define RTEMS_SYSINIT_USER_EXTENSIONS 000320
|
#define RTEMS_SYSINIT_USER_EXTENSIONS 000320
|
||||||
#define RTEMS_SYSINIT_CLASSIC_TASKS 000340
|
#define RTEMS_SYSINIT_CLASSIC_TASKS 000340
|
||||||
#define RTEMS_SYSINIT_CLASSIC_TIMER 000341
|
#define RTEMS_SYSINIT_CLASSIC_TIMER 000341
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
|
#ifdef __RTEMS_HAVE_SYS_CPUSET_H__
|
||||||
#include <sys/cpuset.h>
|
#include <sys/cpuset.h>
|
||||||
|
#include <rtems/sysinit.h>
|
||||||
#include <rtems/score/cpusetimpl.h>
|
#include <rtems/score/cpusetimpl.h>
|
||||||
#include <rtems/score/assert.h>
|
#include <rtems/score/assert.h>
|
||||||
#include <rtems/score/percpu.h>
|
#include <rtems/score/percpu.h>
|
||||||
@@ -30,7 +31,7 @@ static CPU_set_Control cpuset_default;
|
|||||||
/*
|
/*
|
||||||
* _CPU_set_Handler_initialization
|
* _CPU_set_Handler_initialization
|
||||||
*/
|
*/
|
||||||
void _CPU_set_Handler_initialization()
|
static void _CPU_set_Handler_initialization()
|
||||||
{
|
{
|
||||||
uint32_t cpu_count;
|
uint32_t cpu_count;
|
||||||
uint32_t cpu_index;
|
uint32_t cpu_index;
|
||||||
@@ -50,6 +51,12 @@ void _CPU_set_Handler_initialization()
|
|||||||
CPU_SET_S( (int) cpu_index, cpuset_default.setsize, cpuset_default.set );
|
CPU_SET_S( (int) cpu_index, cpuset_default.setsize, cpuset_default.set );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RTEMS_SYSINIT_ITEM(
|
||||||
|
_CPU_set_Handler_initialization,
|
||||||
|
RTEMS_SYSINIT_CPU_SET,
|
||||||
|
RTEMS_SYSINIT_ORDER_MIDDLE
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _CPU_set_Is_valid
|
* _CPU_set_Is_valid
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -172,6 +172,10 @@ Multiprocessor Communications Interface (MPCI) Table.
|
|||||||
Initializes the @ref{User Extensions Manager} in case it is used by the
|
Initializes the @ref{User Extensions Manager} in case it is used by the
|
||||||
application.
|
application.
|
||||||
|
|
||||||
|
@item RTEMS_SYSINIT_CPU_SET
|
||||||
|
Initializes the global CPU set on SMP configurations in case the application
|
||||||
|
uses this information.
|
||||||
|
|
||||||
@item RTEMS_SYSINIT_BSP_LIBC
|
@item RTEMS_SYSINIT_BSP_LIBC
|
||||||
Depending on the application configuration the IO library and root filesystem
|
Depending on the application configuration the IO library and root filesystem
|
||||||
is initialized. This step is mandatory.
|
is initialized. This step is mandatory.
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ typedef enum {
|
|||||||
INITIAL_EXTENSIONS_POST,
|
INITIAL_EXTENSIONS_POST,
|
||||||
DATA_STRUCTURES_PRE,
|
DATA_STRUCTURES_PRE,
|
||||||
DATA_STRUCTURES_POST,
|
DATA_STRUCTURES_POST,
|
||||||
|
CPU_SET_PRE,
|
||||||
|
CPU_SET_POST,
|
||||||
USER_EXTENSIONS_PRE,
|
USER_EXTENSIONS_PRE,
|
||||||
USER_EXTENSIONS_POST,
|
USER_EXTENSIONS_POST,
|
||||||
CLASSIC_TASKS_PRE,
|
CLASSIC_TASKS_PRE,
|
||||||
@@ -206,6 +208,17 @@ LAST(RTEMS_SYSINIT_DATA_STRUCTURES)
|
|||||||
next_step(DATA_STRUCTURES_POST);
|
next_step(DATA_STRUCTURES_POST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FIRST(RTEMS_SYSINIT_CPU_SET)
|
||||||
|
{
|
||||||
|
/* There is nothing to do in case RTEMS_SMP is not defined */
|
||||||
|
next_step(CPU_SET_PRE);
|
||||||
|
}
|
||||||
|
|
||||||
|
LAST(RTEMS_SYSINIT_CPU_SET)
|
||||||
|
{
|
||||||
|
next_step(CPU_SET_POST);
|
||||||
|
}
|
||||||
|
|
||||||
FIRST(RTEMS_SYSINIT_USER_EXTENSIONS)
|
FIRST(RTEMS_SYSINIT_USER_EXTENSIONS)
|
||||||
{
|
{
|
||||||
assert(_Extension_Information.maximum == 0);
|
assert(_Extension_Information.maximum == 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user