[08bae5e6] | 1 | /* confdefs.h |
---|
| 2 | * |
---|
| 3 | * This include file contains the configuration table template that will |
---|
| 4 | * be used by the single processor tests to define its default configuration |
---|
| 5 | * parameters. |
---|
| 6 | * |
---|
[03f2154e] | 7 | * COPYRIGHT (c) 1989-1997. |
---|
[08bae5e6] | 8 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 9 | * Copyright assigned to U.S. Government, 1994. |
---|
[08bae5e6] | 10 | * |
---|
[98e4ebf5] | 11 | * The license and distribution terms for this file may be |
---|
| 12 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 13 | * http://www.OARcorp.com/rtems/license.html. |
---|
[08bae5e6] | 14 | * |
---|
| 15 | * $Id$ |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
| 19 | #define __CONFIGURATION_TEMPLATE_h |
---|
| 20 | |
---|
| 21 | #ifdef __cplusplus |
---|
| 22 | extern "C" { |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
| 26 | extern rtems_driver_address_table Device_drivers[]; |
---|
| 27 | extern rtems_configuration_table Configuration; |
---|
| 28 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
[2eba45d] | 29 | #ifdef RTEMS_POSIX_API |
---|
[be1c11ed] | 30 | extern posix_api_configuration_table Configuration_POSIX_API; |
---|
[2eba45d] | 31 | #endif |
---|
[08bae5e6] | 32 | |
---|
| 33 | /* |
---|
| 34 | * Default User Initialization Task Table. This table guarantees that |
---|
| 35 | * one user initialization table is defined. |
---|
| 36 | */ |
---|
| 37 | |
---|
[be1c11ed] | 38 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 39 | |
---|
| 40 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 41 | |
---|
| 42 | /* |
---|
| 43 | * The user is defining their own table information and setting the |
---|
| 44 | * appropriate variables. |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | #else |
---|
[08bae5e6] | 48 | |
---|
| 49 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
| 50 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) |
---|
| 51 | #endif |
---|
| 52 | |
---|
| 53 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
| 54 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
| 55 | #endif |
---|
| 56 | |
---|
| 57 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
| 58 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
| 59 | #endif |
---|
| 60 | |
---|
| 61 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
| 62 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
| 63 | #endif |
---|
| 64 | |
---|
| 65 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
| 66 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
| 67 | #endif |
---|
| 68 | |
---|
| 69 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
| 70 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
| 71 | #endif |
---|
| 72 | |
---|
| 73 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 74 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
| 75 | #endif |
---|
| 76 | |
---|
| 77 | #ifdef CONFIGURE_INIT |
---|
| 78 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 79 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 80 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 81 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 82 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 83 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 84 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 85 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 86 | } |
---|
| 87 | }; |
---|
| 88 | #endif |
---|
| 89 | |
---|
[d9a0689e] | 90 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
| 91 | |
---|
| 92 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
| 93 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
| 94 | |
---|
[be1c11ed] | 95 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 96 | |
---|
| 97 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
| 98 | |
---|
| 99 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
| 100 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
| 101 | |
---|
[08bae5e6] | 102 | #endif |
---|
| 103 | |
---|
| 104 | /* |
---|
| 105 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
| 106 | * choosen by that test. There is always a null driver entry. |
---|
| 107 | */ |
---|
| 108 | |
---|
| 109 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 110 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 111 | |
---|
| 112 | #ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER |
---|
| 113 | #include <timerdrv.h> |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
| 117 | #include <stubdrv.h> |
---|
| 118 | #endif |
---|
| 119 | |
---|
| 120 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 121 | |
---|
| 122 | #ifdef CONFIGURE_INIT |
---|
| 123 | rtems_driver_address_table Device_drivers[] = { |
---|
| 124 | #ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
---|
| 125 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 126 | #endif |
---|
| 127 | #ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER |
---|
| 128 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 129 | #endif |
---|
| 130 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
| 131 | STUB_DRIVER_TABLE_ENTRY, |
---|
| 132 | #endif |
---|
| 133 | NULL_DRIVER_TABLE_ENTRY |
---|
| 134 | }; |
---|
| 135 | #endif |
---|
| 136 | |
---|
| 137 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
| 138 | |
---|
| 139 | /* |
---|
| 140 | * Default the number of devices per device driver. This value may be |
---|
| 141 | * overridden by the user. |
---|
| 142 | */ |
---|
| 143 | |
---|
| 144 | #ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES |
---|
| 145 | |
---|
| 146 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
| 147 | #define CONFIGURE_MAXIMUM_DEVICES 20 |
---|
| 148 | #endif |
---|
| 149 | |
---|
| 150 | #endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ |
---|
| 151 | |
---|
| 152 | /* |
---|
| 153 | * Default Configuration Table. This table contains the most values set in |
---|
| 154 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
| 155 | * customize the environment. |
---|
| 156 | */ |
---|
| 157 | |
---|
| 158 | #ifdef CONFIGURE_MPTEST |
---|
| 159 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
| 160 | |
---|
| 161 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 162 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 163 | #endif |
---|
| 164 | |
---|
| 165 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
| 166 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
| 167 | #endif |
---|
| 168 | |
---|
| 169 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
| 170 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
| 171 | #endif |
---|
| 172 | |
---|
| 173 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
| 174 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
| 175 | #endif |
---|
| 176 | |
---|
| 177 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
| 178 | #include <mpci.h> |
---|
| 179 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
| 180 | #endif |
---|
| 181 | |
---|
| 182 | #ifdef CONFIGURE_INIT |
---|
| 183 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
| 184 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 185 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ |
---|
| 186 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 187 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 188 | CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ |
---|
| 189 | }; |
---|
| 190 | #endif |
---|
| 191 | |
---|
| 192 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
| 193 | |
---|
| 194 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
| 195 | |
---|
| 196 | #else |
---|
| 197 | |
---|
| 198 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
| 199 | |
---|
| 200 | #endif /* CONFIGURE_MPTEST */ |
---|
| 201 | |
---|
| 202 | /* |
---|
| 203 | * Default Configuration Table. This table contains the most values set in |
---|
| 204 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
| 205 | * customize the environment. |
---|
| 206 | */ |
---|
| 207 | |
---|
| 208 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
| 209 | |
---|
| 210 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
| 211 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
| 212 | #endif |
---|
| 213 | |
---|
| 214 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 215 | #define CONFIGURE_MAXIMUM_TASKS 10 |
---|
| 216 | #endif |
---|
| 217 | |
---|
| 218 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
| 219 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
| 220 | #endif |
---|
| 221 | |
---|
| 222 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
| 223 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 224 | #endif |
---|
| 225 | |
---|
| 226 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
| 227 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 228 | #endif |
---|
| 229 | |
---|
| 230 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
| 231 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
| 232 | #endif |
---|
| 233 | |
---|
| 234 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
| 235 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
| 236 | #endif |
---|
| 237 | |
---|
| 238 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
| 239 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 240 | #endif |
---|
| 241 | |
---|
| 242 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
| 243 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 244 | #endif |
---|
| 245 | |
---|
| 246 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
| 247 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
| 248 | #endif |
---|
| 249 | |
---|
| 250 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 251 | #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 252 | #endif |
---|
| 253 | |
---|
| 254 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 255 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 256 | #endif |
---|
| 257 | |
---|
| 258 | #ifndef CONFIGURE_INITIAL_EXTENSIONS |
---|
| 259 | #define CONFIGURE_INITIAL_EXTENSIONS NULL |
---|
| 260 | #endif |
---|
| 261 | |
---|
[2eba45d] | 262 | /* |
---|
| 263 | * POSIX API Configuration Parameters |
---|
| 264 | */ |
---|
| 265 | |
---|
| 266 | #ifdef RTEMS_POSIX_API |
---|
| 267 | |
---|
| 268 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 269 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 10 |
---|
| 270 | #endif |
---|
| 271 | |
---|
| 272 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
[da33d26] | 273 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
[2eba45d] | 274 | #endif |
---|
| 275 | |
---|
| 276 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
| 277 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
| 278 | #endif |
---|
| 279 | |
---|
[da33d26] | 280 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
| 281 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
| 282 | #endif |
---|
| 283 | |
---|
[eb0551f] | 284 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
| 285 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
| 286 | #endif |
---|
| 287 | |
---|
[be1c11ed] | 288 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
| 289 | |
---|
| 290 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
[5240c71c] | 291 | |
---|
[be1c11ed] | 292 | /* |
---|
| 293 | * The user is defining their own table information and setting the |
---|
| 294 | * appropriate variables. |
---|
| 295 | */ |
---|
| 296 | |
---|
| 297 | #else |
---|
| 298 | |
---|
| 299 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
| 300 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
[5240c71c] | 301 | #endif |
---|
| 302 | |
---|
| 303 | #ifdef CONFIGURE_INIT |
---|
[be1c11ed] | 304 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
| 305 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT } |
---|
[5240c71c] | 306 | }; |
---|
[2eba45d] | 307 | #endif |
---|
| 308 | |
---|
[be1c11ed] | 309 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME POSIX_Initialization_threads |
---|
[5240c71c] | 310 | |
---|
[be1c11ed] | 311 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
| 312 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
| 313 | sizeof(posix_initialization_threads_table) |
---|
[5240c71c] | 314 | |
---|
| 315 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 316 | |
---|
[be1c11ed] | 317 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
| 318 | |
---|
| 319 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
| 320 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
| 321 | |
---|
| 322 | #endif |
---|
| 323 | |
---|
[5240c71c] | 324 | #endif /* RTEMS_POSIX_API */ |
---|
| 325 | |
---|
[3652ad35] | 326 | /* |
---|
| 327 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
| 328 | * The model is to estimate the memory required for each configured item, |
---|
| 329 | * sum the memory requirements and insure that there is at least 32K greater |
---|
| 330 | * than that for things not directly addressed such as: |
---|
| 331 | * |
---|
| 332 | * + stacks greater than minimum size |
---|
| 333 | * + FP contexts |
---|
| 334 | * + API areas (should be optional) |
---|
| 335 | * + messages |
---|
| 336 | * + object name and local pointer table overhead |
---|
| 337 | * + per node memory requirements |
---|
| 338 | * + executive fixed requirements (including at least internal threads |
---|
| 339 | * and the Ready chains) |
---|
| 340 | * |
---|
| 341 | * NOTE: Eventually this should take into account some of the above. |
---|
| 342 | * Basically, this is a "back of the envelope" estimate for |
---|
| 343 | * memory requirements. It could be more accurate. |
---|
| 344 | */ |
---|
[08bae5e6] | 345 | |
---|
| 346 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
[3652ad35] | 347 | |
---|
| 348 | #define CONFIGURE_OBJECT_TABLE_STUFF \ |
---|
| 349 | ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) ) |
---|
| 350 | |
---|
| 351 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \ |
---|
| 352 | ((_tasks) * \ |
---|
| 353 | ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \ |
---|
| 354 | STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \ |
---|
| 355 | CONFIGURE_OBJECT_TABLE_STUFF)) \ |
---|
| 356 | ) |
---|
| 357 | |
---|
| 358 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
| 359 | ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 360 | |
---|
| 361 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
| 362 | ((_semaphores) * \ |
---|
| 363 | ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 364 | |
---|
| 365 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
| 366 | ( (_queues) * \ |
---|
| 367 | ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 368 | |
---|
| 369 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
| 370 | ( (_partitions) * \ |
---|
| 371 | ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 372 | |
---|
| 373 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
| 374 | ( (_regions) * \ |
---|
| 375 | ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 376 | |
---|
| 377 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
| 378 | ( (_ports) * \ |
---|
| 379 | ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 380 | |
---|
| 381 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
| 382 | ( (_periods) * \ |
---|
| 383 | ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 384 | |
---|
| 385 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
| 386 | ( (_extensions) * \ |
---|
| 387 | ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) ) |
---|
| 388 | |
---|
| 389 | #define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \ |
---|
| 390 | (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) ) |
---|
| 391 | |
---|
| 392 | #ifdef CONFIGURE_MPTEST |
---|
| 393 | |
---|
| 394 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
| 395 | |
---|
| 396 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
| 397 | ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) ) ) |
---|
| 398 | |
---|
| 399 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
| 400 | ((_global_objects) * ( sizeof(Objects_MP_Control) ) ) |
---|
| 401 | |
---|
| 402 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
| 403 | ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
| 404 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \ |
---|
| 405 | ) |
---|
| 406 | |
---|
| 407 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
| 408 | |
---|
| 409 | #else |
---|
| 410 | |
---|
| 411 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
| 412 | |
---|
| 413 | #endif |
---|
[08bae5e6] | 414 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
[3652ad35] | 415 | (( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \ |
---|
| 416 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ |
---|
| 417 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \ |
---|
| 418 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
| 419 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
| 420 | CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \ |
---|
| 421 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
| 422 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
| 423 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \ |
---|
| 424 | CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \ |
---|
| 425 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
[4f7fd59] | 426 | (96*1024) \ |
---|
[3652ad35] | 427 | ) & 0xffff8000) |
---|
[08bae5e6] | 428 | #endif |
---|
| 429 | |
---|
[b61e6e1] | 430 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
| 431 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
[4f7fd59] | 432 | #define CONFIGURE_GNAT_KEYS 1 |
---|
[b61e6e1] | 433 | |
---|
| 434 | /* 20 are required to run all tests in the ACVC */ |
---|
| 435 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
| 436 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
| 437 | #endif |
---|
| 438 | |
---|
| 439 | #else |
---|
[4f7fd59] | 440 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
| 441 | #define CONFIGURE_GNAT_KEYS 0 |
---|
| 442 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
| 443 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
[b61e6e1] | 444 | #endif |
---|
| 445 | |
---|
| 446 | |
---|
[08bae5e6] | 447 | #ifdef CONFIGURE_INIT |
---|
[e6d4b1d] | 448 | |
---|
| 449 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
[08bae5e6] | 450 | CONFIGURE_MAXIMUM_TASKS, |
---|
| 451 | CONFIGURE_MAXIMUM_TIMERS, |
---|
| 452 | CONFIGURE_MAXIMUM_SEMAPHORES, |
---|
| 453 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
| 454 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
| 455 | CONFIGURE_MAXIMUM_REGIONS, |
---|
| 456 | CONFIGURE_MAXIMUM_PORTS, |
---|
| 457 | CONFIGURE_MAXIMUM_PERIODS, |
---|
[d9a0689e] | 458 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
| 459 | CONFIGURE_INIT_TASK_TABLE |
---|
[e6d4b1d] | 460 | }; |
---|
| 461 | |
---|
[2eba45d] | 462 | #ifdef RTEMS_POSIX_API |
---|
| 463 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
[b61e6e1] | 464 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
[4f7fd59] | 465 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
| 466 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
| 467 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
| 468 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
| 469 | CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_GNAT_KEYS, |
---|
[eb0551f] | 470 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
[be1c11ed] | 471 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
| 472 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
[2eba45d] | 473 | }; |
---|
| 474 | #endif |
---|
| 475 | |
---|
[e6d4b1d] | 476 | rtems_configuration_table Configuration = { |
---|
| 477 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
| 478 | CONFIGURE_EXECUTIVE_RAM_SIZE, |
---|
[08bae5e6] | 479 | CONFIGURE_MAXIMUM_USER_EXTENSIONS, |
---|
| 480 | CONFIGURE_MICROSECONDS_PER_TICK, |
---|
| 481 | CONFIGURE_TICKS_PER_TIMESLICE, |
---|
[e6d4b1d] | 482 | CONFIGURE_MAXIMUM_DEVICES, |
---|
[08bae5e6] | 483 | sizeof (Device_drivers)/ |
---|
| 484 | sizeof(rtems_driver_address_table), /* number of device drivers */ |
---|
| 485 | Device_drivers, /* pointer to driver table */ |
---|
| 486 | CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ |
---|
[e6d4b1d] | 487 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
| 488 | &Configuration_RTEMS_API, /* pointer to RTEMS API config */ |
---|
[2eba45d] | 489 | #ifdef RTEMS_POSIX_API |
---|
| 490 | &Configuration_POSIX_API /* pointer to POSIX API config */ |
---|
| 491 | #else |
---|
| 492 | NULL /* pointer to POSIX API config */ |
---|
| 493 | #endif |
---|
[08bae5e6] | 494 | }; |
---|
| 495 | #endif |
---|
| 496 | |
---|
| 497 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
| 498 | |
---|
| 499 | #ifdef __cplusplus |
---|
| 500 | } |
---|
| 501 | #endif |
---|
| 502 | |
---|
| 503 | #endif |
---|
| 504 | /* end of include file */ |
---|