summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems/config.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-12-03 22:23:13 +0000
commit976162a69f6fdfbd2ab507074be7d99a48b4f7f7 (patch)
tree375dac0660e6845642167a2cba304a6812a33d26 /cpukit/sapi/include/rtems/config.h
parent2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-976162a69f6fdfbd2ab507074be7d99a48b4f7f7.tar.bz2
2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/src/malloc.c, libmisc/monitor/mon-command.c, posix/preinstall.am, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c, posix/src/mutexdestroy.c, posix/src/mutexinit.c, posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/include/rtems/sptables.h, sapi/src/exinit.c, score/include/rtems/system.h, score/include/rtems/score/mpci.h, score/src/mpci.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Moved most of the remaining CPU Table fields to the Configuration Table. This included pretasking_hook, predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace, extra_mpci_receive_server_stack, stack_allocate_hook, and stack_free_hook. As a side-effect of this effort some multiprocessing code was made conditional and some style clean up occurred.
Diffstat (limited to 'cpukit/sapi/include/rtems/config.h')
-rw-r--r--cpukit/sapi/include/rtems/config.h61
1 files changed, 51 insertions, 10 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h
index 2a0f5b4bae..6ba5b28804 100644
--- a/cpukit/sapi/include/rtems/config.h
+++ b/cpukit/sapi/include/rtems/config.h
@@ -69,24 +69,28 @@ typedef void *itron_api_configuration_table;
#include <rtems/score/mpci.h>
#endif
+#if defined(RTEMS_MULTIPROCESSING)
/*
* The following records define the Multiprocessor Configuration
* Table. This table defines the multiprocessor system
* characteristics which must be known by RTEMS in a multiprocessor
* system.
*/
-
typedef struct {
- uint32_t node; /* local node number */
- uint32_t maximum_nodes; /* maximum # nodes in system */
- uint32_t maximum_global_objects; /* maximum # global objects */
- uint32_t maximum_proxies; /* maximum # proxies */
-#if defined(RTEMS_MULTIPROCESSING)
+ uint32_t node; /* local node number */
+ uint32_t maximum_nodes; /* maximum # nodes in system */
+ uint32_t maximum_global_objects; /* maximum # global objects */
+ uint32_t maximum_proxies; /* maximum # proxies */
+
+ /** The MPCI Receive server is assumed to have a stack of at least
+ * minimum stack size. This field specifies the amount of extra
+ * stack this task will be given in bytes.
+ */
+ uint32_t extra_mpci_receive_server_stack;
+
rtems_mpci_table *User_mpci_table; /* pointer to MPCI table */
-#else
- void *User_mpci_table; /* pointer to MPCI table */
-#endif
} rtems_multiprocessing_table;
+#endif
/*
* The following records define the Configuration Table. The
@@ -99,19 +103,49 @@ typedef struct {
* + clock ticks per task timeslice
* + required number of each object type for each API configured
*/
-
typedef struct {
void *work_space_start;
uint32_t work_space_size;
uint32_t maximum_extensions;
uint32_t microseconds_per_tick;
uint32_t ticks_per_timeslice;
+
+ /** This element points to the BSP's optional idle task which may override
+ * the default one provided with RTEMS.
+ */
+ void (*idle_task)( void );
+
+ /** This field specifies the size of the IDLE task's stack. If less than or
+ * equal to the minimum stack size, then the IDLE task will have the minimum
+ * stack size.
+ */
+ uint32_t idle_task_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.
+ */
+ void * (*stack_allocate_hook)( uint32_t );
+
+ /** The BSP may want to provide it's own stack free routines.
+ * In this case, the BSP will provide this stack free hook.
+ */
+ void (*stack_free_hook)( void *);
+
+ /** If this element is TRUE, then RTEMS will zero the Executive Workspace.
+ * When this element is FALSE, it is assumed that the BSP or invoking
+ * environment has ensured that memory was cleared before RTEMS was
+ * invoked.
+ */
+ boolean do_zero_of_workspace;
+
uint32_t maximum_drivers;
uint32_t number_of_device_drivers;
rtems_driver_address_table *Device_driver_table;
uint32_t number_of_initial_extensions;
rtems_extensions_table *User_extension_table;
+#if defined(RTEMS_MULTIPROCESSING)
rtems_multiprocessing_table *User_multiprocessing_table;
+#endif
rtems_api_configuration_table *RTEMS_api_configuration;
posix_api_configuration_table *POSIX_api_configuration;
itron_api_configuration_table *ITRON_api_configuration;
@@ -152,6 +186,13 @@ SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
#define rtems_configuration_get_ticks_per_timeslice() \
(_Configuration_Table->ticks_per_timeslice)
+/**
+ * This macro assists in accessing the field which indicates whether
+ * RTEMS is responsible for zeroing the Executive Workspace.
+ */
+#define rtems_configuration_get_do_zero_of_workspace() \
+ (_Configuration_Table->do_zero_of_workspace)
+
#define rtems_configuration_get_maximum_devices() \
(_Configuration_Table->maximum_devices)