283 | | @findex CONFIGURE_TASK_STACK_ALLOCATOR |
284 | | @item @code{CONFIGURE_TASK_STACK_ALLOCATOR} |
285 | | may point to a user provided routine to allocate task stacks. |
286 | | The default value for this field is NULL which indicates that |
287 | | task stacks will be allocated from the RTEMS Workspace. |
288 | | |
289 | | @findex CONFIGURE_TASK_STACK_DEALLOCATOR |
290 | | @item @code{CONFIGURE_TASK_STACK_DEALLOCATOR} |
291 | | may point to a user provided routine to free task stacks. |
292 | | The default value for this field is NULL which indicates that |
293 | | task stacks will be allocated from the RTEMS Workspace. |
294 | | |
| 380 | @subsection Task Stack Allocator Configuration |
| 381 | |
| 382 | This section defines the task stack allocator configuration parameters |
| 383 | supported by @code{rtems/confdefs.h}. |
| 384 | |
| 385 | @itemize @bullet |
| 386 | |
| 387 | @findex CONFIGURE_TASK_STACK_ALLOCATOR_INIT |
| 388 | @item @code{CONFIGURE_TASK_STACK_ALLOCATOR_INIT} |
| 389 | may be defined to point to a user provided routine to initialize the task stack allocator. |
| 390 | This pointer may be @code{NULL}. The default value is @code{NULL}. |
| 391 | |
| 392 | @findex CONFIGURE_TASK_STACK_ALLOCATOR |
| 393 | @item @code{CONFIGURE_TASK_STACK_ALLOCATOR} |
| 394 | may be defined to point to a user provided routine to allocate a task stack. |
| 395 | This pointer must be not @code{NULL}. If this define is not set, then the task |
| 396 | stack allocation will use the RTEMS Workspace. |
| 397 | |
| 398 | @findex CONFIGURE_TASK_STACK_DEALLOCATOR |
| 399 | @item @code{CONFIGURE_TASK_STACK_DEALLOCATOR} |
| 400 | may be defined to point to a user provided routine to free a task stack. This |
| 401 | pointer must be not @code{NULL}. If this define is not set, then the task |
| 402 | stack allocation will use the RTEMS Workspace. |
| 403 | |
| 404 | @findex CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE |
| 405 | @item @code{CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE} |
| 406 | indicates whether the stack allocator avoids the RTEMS Workspace and uses its |
| 407 | own memory area. If this is defined, then the task stack allocator must use |
| 408 | its own memory area. Otherwise, it may use the RTEMS Workspace. |
| 409 | |
| 410 | @findex CONFIGURE_TASK_STACK_FROM_ALLOCATOR |
| 411 | @item @code{CONFIGURE_TASK_STACK_FROM_ALLOCATOR} |
| 412 | this optional macro can provide the size estimate for one allocation of a |
| 413 | specified quantity of bytes. It should take the worst case per allocation |
| 414 | overhead into account. In case this macro is undefined the allocation estimate |
| 415 | of the standard RTEMS heap will be used. |
| 416 | |
| 417 | @end itemize |
| 418 | |
| 419 | @c |
| 420 | @c |
| 421 | @c |
970 | | void *work_space_start; |
971 | | uintptr_t work_space_size; |
972 | | uint32_t maximum_extensions; |
973 | | uint32_t microseconds_per_tick; |
974 | | uint32_t ticks_per_timeslice; |
975 | | uint32_t scheduler_policy; |
976 | | void (*idle_task)( void ); |
977 | | uint32_t idle_task_stack_size; |
978 | | uint32_t interrupt_stack_size; |
979 | | void * (*stack_allocate_hook)( size_t ); |
980 | | void (*stack_free_hook)( void * ); |
981 | | bool do_zero_of_workspace; |
982 | | uint32_t maximum_drivers; |
983 | | uint32_t number_of_device_drivers; |
984 | | rtems_driver_address_table *Device_driver_table; |
985 | | uint32_t number_of_initial_extensions; |
986 | | rtems_extensions_table *User_extension_table; |
987 | | #if defined(RTEMS_MULTIPROCESSING) |
988 | | rtems_multiprocessing_table *User_multiprocessing_table; |
989 | | #endif |
990 | | rtems_api_configuration_table *RTEMS_api_configuration; |
991 | | posix_api_configuration_table *POSIX_api_configuration; |
| 991 | void *work_space_start; |
| 992 | uintptr_t work_space_size; |
| 993 | uintptr_t stack_space_size; |
| 994 | uint32_t maximum_extensions; |
| 995 | uint32_t microseconds_per_tick; |
| 996 | uint32_t ticks_per_timeslice; |
| 997 | Thread (*idle_task)( uintptr_t ); |
| 998 | uint32_t idle_task_stack_size; |
| 999 | uint32_t interrupt_stack_size; |
| 1000 | rtems_stack_allocate_init_hook stack_allocate_init_hook; |
| 1001 | rtems_stack_allocate_hook stack_allocate_hook; |
| 1002 | rtems_stack_free_hook stack_free_hook; |
| 1003 | bool do_zero_of_workspace; |
| 1004 | bool unified_work_area; |
| 1005 | bool stack_allocator_avoids_work_space; |
| 1006 | uint32_t maximum_drivers; |
| 1007 | uint32_t number_of_device_drivers; |
| 1008 | rtems_driver_address_table *Device_driver_table; |
| 1009 | uint32_t number_of_initial_extensions; |
| 1010 | rtems_extensions_table *User_extension_table; |
| 1011 | #if defined(RTEMS_MULTIPROCESSING) |
| 1012 | rtems_multiprocessing_table *User_multiprocessing_table; |
| 1013 | #endif |
998 | | is the address of the RTEMS RAM Workspace. |
999 | | This area contains items such as the |
1000 | | various object control blocks (TCBs, QCBs, ...) and task stacks. |
1001 | | If the address is not aligned on a four-word boundary, then |
1002 | | RTEMS will invoke the fatal error handler during |
1003 | | @code{rtems_initialize_executive}. |
1004 | | When using the @code{rtems/confdefs.h} mechanism for configuring |
1005 | | an RTEMS application, the value for this field corresponds |
1006 | | to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA} |
1007 | | which defaults to @code{NULL}. Normally, this field should be |
1008 | | configured as @code{NULL} as BSPs will assign memory for the |
1009 | | RTEMS RAM Workspace as part of system initialization. |
| 1020 | is the address of the RTEMS RAM Workspace. This area contains items such as |
| 1021 | the various object control blocks (TCBs, QCBs, ...) and by default the task |
| 1022 | stacks. Normally, this field should be configured as @code{NULL} as BSPs will |
| 1023 | assign memory for the RTEMS RAM Workspace as part of system initialization. |
| 1034 | @item stack_space_size |
| 1035 | is the size reserved for the task stack space in bytes. When using the |
| 1036 | @code{rtems/confdefs.h} mechanism for configuring an RTEMS application, the |
| 1037 | value for this field corresponds to the setting of the macro |
| 1038 | @code{CONFIGURE_STACK_SPACE_SIZE} and is calculated based on the other system |
| 1039 | configuration settings. |
| 1040 | |
| 1041 | @item maximum_extensions; |
| 1042 | is the maximum number of user extensions that can be registered. When using |
| 1043 | the @code{rtems/confdefs.h} mechanism for configuring an RTEMS application, the |
| 1044 | value for this field corresponds to the setting of the macro |
| 1045 | @code{CONFIGURE_MAXIMUM_USER_EXTENSIONS}. |
| 1046 | |
1064 | | @item stack_allocate_hook |
1065 | | may point to a user provided routine to allocate task stacks. |
1066 | | The default is to allocate task stacks from the RTEMS Workspace. |
1067 | | When using the @code{rtems/confdefs.h} mechanism |
1068 | | for configuring an RTEMS application, the value for this field |
| 1085 | @item stack_allocate_init_hook |
| 1086 | may point to a user provided routine to initialize the task stack allocator. |
| 1087 | This pointer may be @code{NULL}. When using the @code{rtems/confdefs.h} |
| 1088 | mechanism for configuring an RTEMS application, the value for this field |
1070 | | @code{CONFIGURE_TASK_STACK_ALLOCATOR}. |
| 1090 | @code{CONFIGURE_TASK_STACK_ALLOCATOR_INIT}. |
| 1091 | |
| 1092 | @item stack_allocate_hook |
| 1093 | must point to a routine to allocate a task stack. This pointer must be not |
| 1094 | @code{NULL}. When using the @code{rtems/confdefs.h} mechanism for configuring |
| 1095 | an RTEMS application, the value for this field corresponds to the setting of |
| 1096 | the macro @code{CONFIGURE_TASK_STACK_ALLOCATOR}. If this define is not set, |
| 1097 | then the default is allocation from the RTEMS Workspace. |
1073 | | may point to a user provided routine to free task stacks. |
1074 | | The default is to allocate task stacks from the RTEMS Workspace. |
1075 | | When using the @code{rtems/confdefs.h} mechanism |
1076 | | for configuring an RTEMS application, the value for this field |
1077 | | corresponds to the setting of the macro |
1078 | | @code{CONFIGURE_TASK_STACK_DEALLOCATOR}. |
| 1100 | must point to a routine to free a task stack. This pointer must be not |
| 1101 | @code{NULL}. When using the @code{rtems/confdefs.h} mechanism for configuring |
| 1102 | an RTEMS application, the value for this field corresponds to the setting of |
| 1103 | the macro @code{CONFIGURE_TASK_STACK_DEALLOCATOR}. If this define is not set, |
| 1104 | then the default is allocation from the RTEMS Workspace. |
1081 | | indicates whether RTEMS should zero the RTEMS Workspace and |
1082 | | C Program Heap as part of its initialization. If set to |
1083 | | TRUE, the Workspace is zeroed. Otherwise, it is not. |
1084 | | When using the @code{rtems/confdefs.h} mechanism |
1085 | | for configuring an RTEMS application, the value for this field |
| 1107 | indicates whether RTEMS should zero the RTEMS Workspace and C Program Heap as |
| 1108 | part of its initialization. If set to @code{true}, the RTEMS Workspace is |
| 1109 | zeroed. Otherwise, it is not. When using the @code{rtems/confdefs.h} |
| 1110 | mechanism for configuring an RTEMS application, the value for this field |
| 1114 | @item unified_work_area |
| 1115 | indicates whether the RTEMS Workspace and C Program Heap use the same heap. If |
| 1116 | set to @code{true}, the RTEMS Workspace and C Program Heap use the same heap. |
| 1117 | Otherwise, they use separate heaps. When using the @code{rtems/confdefs.h} |
| 1118 | mechanism for configuring an RTEMS application, the value for this field |
| 1119 | corresponds to the setting of the macro @code{CONFIGURE_UNIFIED_WORK_AREAS}. A |
| 1120 | unified work area is useful in combination with unlimited objects. |
| 1121 | |
| 1122 | @item stack_allocator_avoids_work_space |
| 1123 | indicates whether the stack allocator avoids the RTEMS Workspace and uses its |
| 1124 | own memory area. If set to @code{true}, the task stack allocator uses its own |
| 1125 | memory area. Otherwise, it uses the RTEMS Workspace. When using the |
| 1126 | @code{rtems/confdefs.h} mechanism for configuring an RTEMS application, the |
| 1127 | value for this field corresponds to the setting of the macro |
| 1128 | @code{CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE}. |
| 1129 | |
1180 | | @item RTEMS_api_configuration |
1181 | | is the address of the RTEMS API Configuration Table. This table |
1182 | | contains information needed by the RTEMS API. This field should be |
1183 | | NULL if the RTEMS API is not used. [NOTE: Currently the RTEMS API |
1184 | | is required to support support components such as BSPs and libraries |
1185 | | which use this API.] This table is built automatically and this |
1186 | | entry filled in, if using the @code{rtems/confdefs.h} application |
1187 | | configuration mechanism. The generated table has the name |
1188 | | @code{Configuration_RTEMS_API}. |
1189 | | |
1190 | | @item POSIX_api_configuration |
1191 | | is the address of the POSIX API Configuration Table. This table |
1192 | | contains information needed by the POSIX API. This field should be |
1193 | | NULL if the POSIX API is not used. This table is built automatically |
1194 | | and this entry filled in, if using the @code{rtems/confdefs.h} application |
1195 | | configuration mechanism. The @code{rtems/confdefs.h} application |
1196 | | mechanism will fill this field in with the address of the |
1197 | | @code{Configuration_POSIX_API} table of POSIX API is configured |
1198 | | and NULL if the POSIX API is not configured. |
1199 | | |