forked from Imagelibrary/rtems
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/src/exinit.c, score/include/rtems/system.h, score/src/isr.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* sapi/include/confdefs.h, sapi/include/rtems/config.h,
|
||||||
|
sapi/include/rtems/init.h, sapi/src/exinit.c,
|
||||||
|
score/include/rtems/system.h, score/src/isr.c: Move
|
||||||
|
interrupt_stack_size field from CPU Table to Configuration Table.
|
||||||
|
Eliminate CPU Table from all ports. Delete references to CPU Table in
|
||||||
|
all forms.
|
||||||
|
|
||||||
2007-12-04 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2007-12-04 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* sapi/include/rtems/config.h: Add accessory macros for Configuration
|
* sapi/include/rtems/config.h: Add accessory macros for Configuration
|
||||||
|
|||||||
@@ -162,21 +162,6 @@ extern int rtems_telnetd_maximum_ptys;
|
|||||||
#define CONFIGURE_STACK_CHECKER_EXTENSION 0
|
#define CONFIGURE_STACK_CHECKER_EXTENSION 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Interrupt Stack Space
|
|
||||||
*
|
|
||||||
* NOTE: There is currently no way for the application to override
|
|
||||||
* the interrupt stack size set by the BSP.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
|
|
||||||
#undef CONFIGURE_INTERRUPT_STACK_MEMORY
|
|
||||||
#define CONFIGURE_INTERRUPT_STACK_MEMORY 0
|
|
||||||
#else
|
|
||||||
#ifndef CONFIGURE_INTERRUPT_STACK_MEMORY
|
|
||||||
#define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Idle task body configuration
|
* Idle task body configuration
|
||||||
@@ -208,6 +193,28 @@ extern int rtems_telnetd_maximum_ptys;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interrupt stack size configuration
|
||||||
|
*
|
||||||
|
* By default, the interrupt stack will be of minimum size.
|
||||||
|
* The BSP or application may override this value.
|
||||||
|
*/
|
||||||
|
#ifndef CONFIGURE_INTERRUPT_STACK_SIZE
|
||||||
|
#ifdef BSP_INTERRUPT_STACK_SIZE
|
||||||
|
#define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE
|
||||||
|
#else
|
||||||
|
#define CONFIGURE_INTERRUPT_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* XXX try to get to the point where all BSP support allocating the
|
||||||
|
* XXX memory from the Workspace
|
||||||
|
*/
|
||||||
|
#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)
|
||||||
|
#undef CONFIGURE_INTERRUPT_STACK_SIZE
|
||||||
|
#define CONFIGURE_INTERRUPT_STACK_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Task stack allocator configuration
|
* Task stack allocator configuration
|
||||||
*/
|
*/
|
||||||
@@ -1098,7 +1105,7 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
|
|||||||
( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \
|
( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \
|
||||||
((PRIORITY_MAXIMUM+1) * sizeof(Chain_Control)) + /* Ready chains */ \
|
((PRIORITY_MAXIMUM+1) * sizeof(Chain_Control)) + /* Ready chains */ \
|
||||||
256 + /* name/ptr table overhead */ \
|
256 + /* name/ptr table overhead */ \
|
||||||
CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
|
CONFIGURE_INTERRUPT_STACK_SIZE + /* interrupt stack */ \
|
||||||
CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \
|
CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1246,6 +1253,7 @@ rtems_configuration_table Configuration = {
|
|||||||
CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */
|
CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */
|
||||||
CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */
|
CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */
|
||||||
CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */
|
CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */
|
||||||
|
CONFIGURE_INTERRUPT_STACK_SIZE, /* interrupt stack size */
|
||||||
CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */
|
CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */
|
||||||
CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */
|
CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */
|
||||||
CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */
|
CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */
|
||||||
|
|||||||
@@ -121,6 +121,12 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
uint32_t idle_task_stack_size;
|
uint32_t idle_task_stack_size;
|
||||||
|
|
||||||
|
/** This field specifies the size of the interrupt stack. If less than or
|
||||||
|
* equal to the minimum stack size, then the interrupt stack will be of
|
||||||
|
* minimum stack size.
|
||||||
|
*/
|
||||||
|
uint32_t interrupt_stack_size;
|
||||||
|
|
||||||
/** The BSP may want to provide it's own stack allocation routines.
|
/** The BSP may want to provide it's own stack allocation routines.
|
||||||
* In this case, the BSP will provide this stack allocation hook.
|
* In this case, the BSP will provide this stack allocation hook.
|
||||||
*/
|
*/
|
||||||
@@ -192,6 +198,9 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
|
|||||||
#define rtems_configuration_get_idle_task_stack_size() \
|
#define rtems_configuration_get_idle_task_stack_size() \
|
||||||
(_Configuration_Table->idle_task_stack_size)
|
(_Configuration_Table->idle_task_stack_size)
|
||||||
|
|
||||||
|
#define rtems_configuration_get_interrupt_stack_size() \
|
||||||
|
(_Configuration_Table->interrupt_stack_size)
|
||||||
|
|
||||||
#define rtems_configuration_get_stack_allocate_hook() \
|
#define rtems_configuration_get_stack_allocate_hook() \
|
||||||
(_Configuration_Table->stack_allocate_hook)
|
(_Configuration_Table->stack_allocate_hook)
|
||||||
|
|
||||||
@@ -220,8 +229,12 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
|
|||||||
#define rtems_configuration_get_user_extension_table() \
|
#define rtems_configuration_get_user_extension_table() \
|
||||||
(_Configuration_Table->user_extension_table)
|
(_Configuration_Table->user_extension_table)
|
||||||
|
|
||||||
#define rtems_configuration_get_user_multiprocessing_table() \
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
(_Configuration_Table->User_multiprocessing_table)
|
#define rtems_configuration_get_user_multiprocessing_table() \
|
||||||
|
(_Configuration_Table->User_multiprocessing_table)
|
||||||
|
#else
|
||||||
|
#define rtems_configuration_get_user_multiprocessing_table() NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
#define rtems_configuration_get_rtems_api_configuration() \
|
#define rtems_configuration_get_rtems_api_configuration() \
|
||||||
(_Configuration_Table->RTEMS_api_configuration)
|
(_Configuration_Table->RTEMS_api_configuration)
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ extern const rtems_multiprocessing_table
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rtems_interrupt_level rtems_initialize_executive_early(
|
rtems_interrupt_level rtems_initialize_executive_early(
|
||||||
rtems_configuration_table *configuration_table,
|
rtems_configuration_table *configuration_table
|
||||||
rtems_cpu_table *cpu_table
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -62,8 +62,7 @@
|
|||||||
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
|
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
|
||||||
|
|
||||||
rtems_interrupt_level rtems_initialize_executive_early(
|
rtems_interrupt_level rtems_initialize_executive_early(
|
||||||
rtems_configuration_table *configuration_table,
|
rtems_configuration_table *configuration_table
|
||||||
rtems_cpu_table *cpu_table
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level bsp_level;
|
rtems_interrupt_level bsp_level;
|
||||||
@@ -85,18 +84,6 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
INTERNAL_ERROR_NO_CONFIGURATION_TABLE
|
INTERNAL_ERROR_NO_CONFIGURATION_TABLE
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( cpu_table == NULL )
|
|
||||||
_Internal_error_Occurred(
|
|
||||||
INTERNAL_ERROR_CORE,
|
|
||||||
TRUE,
|
|
||||||
INTERNAL_ERROR_NO_CPU_TABLE
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Grab our own copy of the user's CPU table.
|
|
||||||
*/
|
|
||||||
_CPU_Table = *cpu_table;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provide pointers just for later convenience.
|
* Provide pointers just for later convenience.
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +92,7 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
/*
|
/*
|
||||||
* Initialize any target architecture specific support as early as possible
|
* Initialize any target architecture specific support as early as possible
|
||||||
*/
|
*/
|
||||||
_CPU_Initialize( cpu_table, _Thread_Dispatch );
|
_CPU_Initialize( _Thread_Dispatch );
|
||||||
|
|
||||||
#if defined(RTEMS_MULTIPROCESSING)
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -187,34 +187,6 @@ extern const char _RTEMS_version[];
|
|||||||
*/
|
*/
|
||||||
extern const char _Copyright_Notice[];
|
extern const char _Copyright_Notice[];
|
||||||
|
|
||||||
/**
|
|
||||||
* The following defines the CPU dependent information table.
|
|
||||||
*/
|
|
||||||
SCORE_EXTERN rtems_cpu_table _CPU_Table;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Macros to access CPU Table fields required by ALL ports.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** This macro assists in accessing the CPU Specific Configuration Table. */
|
|
||||||
#define rtems_cpu_configuration_get_table() (&_CPU_Table)
|
|
||||||
|
|
||||||
/** This macro assists in accessing the pretasking BSP hook. */
|
|
||||||
#define rtems_cpu_configuration_get_pretasking_hook() \
|
|
||||||
(_CPU_Table.pretasking_hook)
|
|
||||||
|
|
||||||
/** This macro assists in accessing the predriver BSP hook. */
|
|
||||||
#define rtems_cpu_configuration_get_predriver_hook() \
|
|
||||||
(_CPU_Table.predriver_hook)
|
|
||||||
|
|
||||||
/** This macro assists in accessing the postdriver BSP hook. */
|
|
||||||
#define rtems_cpu_configuration_get_postdriver_hook() \
|
|
||||||
(_CPU_Table.postdriver_hook)
|
|
||||||
|
|
||||||
/** This macro assists in accessing the interrupt stack size. */
|
|
||||||
#define rtems_cpu_configuration_get_interrupt_stack_size() \
|
|
||||||
(_CPU_Table.interrupt_stack_size)
|
|
||||||
|
|
||||||
/** This macro defines the maximum length of a Classic API name. */
|
/** This macro defines the maximum length of a Classic API name. */
|
||||||
#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
|
#define RTEMS_MAXIMUM_NAME_LENGTH sizeof(rtems_name)
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include <rtems/score/stack.h>
|
#include <rtems/score/stack.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
|
#include <rtems/config.h>
|
||||||
|
|
||||||
/* _ISR_Handler_initialization
|
/* _ISR_Handler_initialization
|
||||||
*
|
*
|
||||||
@@ -45,19 +46,20 @@ void _ISR_Handler_initialization( void )
|
|||||||
|
|
||||||
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
|
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
|
||||||
|
|
||||||
if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE )
|
if ( _Configuration_Table->interrupt_stack_size < STACK_MINIMUM_SIZE )
|
||||||
_Internal_error_Occurred(
|
_Internal_error_Occurred(
|
||||||
INTERNAL_ERROR_CORE,
|
INTERNAL_ERROR_CORE,
|
||||||
TRUE,
|
TRUE,
|
||||||
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
|
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
|
||||||
);
|
);
|
||||||
|
|
||||||
_CPU_Interrupt_stack_low =
|
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
|
||||||
_Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size );
|
_Configuration_Table->interrupt_stack_size
|
||||||
|
);
|
||||||
|
|
||||||
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
|
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
|
||||||
_CPU_Interrupt_stack_low,
|
_CPU_Interrupt_stack_low,
|
||||||
_CPU_Table.interrupt_stack_size
|
_Configuration_Table->interrupt_stack_size
|
||||||
);
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user