summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-04 22:19:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-04 22:19:19 +0000
commit6aa25dac92e92c95e3c133e0bc330bd3f4b7e9dd (patch)
tree96ef3d0f465b080c486145f027544cefefe68e89 /cpukit/sapi
parent2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-6aa25dac92e92c95e3c133e0bc330bd3f4b7e9dd.tar.bz2
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.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r--cpukit/sapi/include/confdefs.h40
-rw-r--r--cpukit/sapi/include/rtems/config.h17
-rw-r--r--cpukit/sapi/include/rtems/init.h3
-rw-r--r--cpukit/sapi/src/exinit.c17
4 files changed, 42 insertions, 35 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 4f7cb1887a..35ca7038a7 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -162,21 +162,6 @@ extern int rtems_telnetd_maximum_ptys;
#define CONFIGURE_STACK_CHECKER_EXTENSION 0
#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
@@ -209,6 +194,28 @@ extern int rtems_telnetd_maximum_ptys;
#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
*/
@@ -1098,7 +1105,7 @@ itron_initialization_tasks_table ITRON_Initialization_tasks[] = {
( CONFIGURE_MEMORY_FOR_TASKS(1) + /* IDLE */ \
((PRIORITY_MAXIMUM+1) * sizeof(Chain_Control)) + /* Ready chains */ \
256 + /* name/ptr table overhead */ \
- CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \
+ CONFIGURE_INTERRUPT_STACK_SIZE + /* interrupt stack */ \
CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \
)
@@ -1246,6 +1253,7 @@ rtems_configuration_table Configuration = {
CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */
CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */
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_DEALLOCATOR, /* stack deallocator */
CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index 6dd52f08eb..b5b804ac7c 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -121,6 +121,12 @@ typedef struct {
*/
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.
* 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() \
(_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() \
(_Configuration_Table->stack_allocate_hook)
@@ -220,8 +229,12 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
#define rtems_configuration_get_user_extension_table() \
(_Configuration_Table->user_extension_table)
-#define rtems_configuration_get_user_multiprocessing_table() \
- (_Configuration_Table->User_multiprocessing_table)
+#if defined(RTEMS_MULTIPROCESSING)
+ #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() \
(_Configuration_Table->RTEMS_api_configuration)
diff --git a/cpukit/sapi/include/rtems/init.h b/cpukit/sapi/include/rtems/init.h
index a0f854d992..a3e604fc80 100644
--- a/cpukit/sapi/include/rtems/init.h
+++ b/cpukit/sapi/include/rtems/init.h
@@ -57,8 +57,7 @@ extern const rtems_multiprocessing_table
*/
rtems_interrupt_level rtems_initialize_executive_early(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
+ rtems_configuration_table *configuration_table
);
/*
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index c25c5ec173..db2fdb26e2 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -62,8 +62,7 @@
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
rtems_interrupt_level rtems_initialize_executive_early(
- rtems_configuration_table *configuration_table,
- rtems_cpu_table *cpu_table
+ rtems_configuration_table *configuration_table
)
{
rtems_interrupt_level bsp_level;
@@ -85,18 +84,6 @@ rtems_interrupt_level rtems_initialize_executive_early(
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.
*/
@@ -105,7 +92,7 @@ rtems_interrupt_level rtems_initialize_executive_early(
/*
* Initialize any target architecture specific support as early as possible
*/
- _CPU_Initialize( cpu_table, _Thread_Dispatch );
+ _CPU_Initialize( _Thread_Dispatch );
#if defined(RTEMS_MULTIPROCESSING)
/*