[b96254f] | 1 | /** |
---|
[27f071cd] | 2 | * @file |
---|
[08bae5e6] | 3 | * |
---|
[9ab091e] | 4 | * @brief Configuration Table Template that will be Instantiated |
---|
| 5 | * by an Application |
---|
| 6 | * |
---|
[27f071cd] | 7 | * This include file contains the configuration table template that will |
---|
| 8 | * be instantiated by an application based on the setting of a number |
---|
| 9 | * of macros. The macros are documented in the Configuring a System |
---|
| 10 | * chapter of the Classic API User's Guide |
---|
[b96254f] | 11 | */ |
---|
[28352fae] | 12 | |
---|
| 13 | /* |
---|
[bfe6391] | 14 | * COPYRIGHT (c) 1989-2015. |
---|
[08bae5e6] | 15 | * On-Line Applications Research Corporation (OAR). |
---|
| 16 | * |
---|
[98e4ebf5] | 17 | * The license and distribution terms for this file may be |
---|
| 18 | * found in the file LICENSE in this distribution or at |
---|
[c499856] | 19 | * http://www.rtems.org/license/LICENSE. |
---|
[08bae5e6] | 20 | */ |
---|
| 21 | |
---|
| 22 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
| 23 | #define __CONFIGURATION_TEMPLATE_h |
---|
[8486081] | 24 | |
---|
[9c63d90] | 25 | /* |
---|
| 26 | * Include the executive's configuration |
---|
| 27 | */ |
---|
[58fa947] | 28 | #include <rtems.h> |
---|
[18ff889] | 29 | #include <rtems/ioimpl.h> |
---|
[a853c851] | 30 | #include <rtems/sysinit.h> |
---|
[b2b143f4] | 31 | #include <rtems/score/apimutex.h> |
---|
[48fed9a] | 32 | #include <rtems/score/percpu.h> |
---|
[a853c851] | 33 | #include <rtems/score/userextimpl.h> |
---|
[9fa3cf0d] | 34 | #include <rtems/score/wkspace.h> |
---|
[395a49e1] | 35 | #include <rtems/rtems/barrierdata.h> |
---|
[72a4a42] | 36 | #include <rtems/rtems/dpmemdata.h> |
---|
[257668d] | 37 | #include <rtems/rtems/messagedata.h> |
---|
[f00c5c6] | 38 | #include <rtems/rtems/partdata.h> |
---|
[78bbe59] | 39 | #include <rtems/rtems/ratemondata.h> |
---|
[e8e914b3] | 40 | #include <rtems/rtems/regiondata.h> |
---|
[739df1f5] | 41 | #include <rtems/rtems/semdata.h> |
---|
[b7af3e44] | 42 | #include <rtems/rtems/tasksdata.h> |
---|
[e1b7c188] | 43 | #include <rtems/rtems/timerdata.h> |
---|
[9318cfb0] | 44 | #include <rtems/posix/key.h> |
---|
[fe7aefd5] | 45 | #include <rtems/posix/mqueue.h> |
---|
[54f35888] | 46 | #include <rtems/posix/pthread.h> |
---|
[9318cfb0] | 47 | #include <rtems/posix/semaphore.h> |
---|
[701057e0] | 48 | #include <rtems/posix/shm.h> |
---|
[9318cfb0] | 49 | |
---|
| 50 | #include <limits.h> |
---|
[9c63d90] | 51 | |
---|
[7571a23] | 52 | #ifdef CONFIGURE_DISABLE_BSP_SETTINGS |
---|
| 53 | #undef BSP_DEFAULT_UNIFIED_WORK_AREAS |
---|
| 54 | #undef BSP_IDLE_TASK_BODY |
---|
| 55 | #undef BSP_IDLE_TASK_STACK_SIZE |
---|
| 56 | #undef BSP_INITIAL_EXTENSION |
---|
| 57 | #undef BSP_INTERRUPT_STACK_SIZE |
---|
| 58 | #undef BSP_MAXIMUM_DEVICES |
---|
| 59 | #undef BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 60 | #undef CONFIGURE_BSP_PREREQUISITE_DRIVERS |
---|
| 61 | #undef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 62 | #else |
---|
| 63 | #include <bsp.h> |
---|
| 64 | #endif |
---|
| 65 | |
---|
[9c9b62d8] | 66 | #ifdef RTEMS_NEWLIB |
---|
| 67 | #include <sys/reent.h> |
---|
| 68 | #endif |
---|
| 69 | |
---|
[5877cc3a] | 70 | #ifdef __cplusplus |
---|
| 71 | extern "C" { |
---|
| 72 | #endif |
---|
| 73 | |
---|
[07d71279] | 74 | /* |
---|
| 75 | * Internal defines must be prefixed with _CONFIGURE to distinguish them from |
---|
| 76 | * user-provided options which use a CONFIGURE prefix. |
---|
| 77 | */ |
---|
| 78 | |
---|
[bfe6391] | 79 | /** |
---|
| 80 | * @defgroup Configuration RTEMS Configuration |
---|
| 81 | * |
---|
| 82 | * This module contains all RTEMS Configuration parameters. |
---|
| 83 | * |
---|
| 84 | * The model is to estimate the memory required for each configured item |
---|
| 85 | * and sum those estimates. The estimate can be too high or too low for |
---|
| 86 | * a variety of reasons: |
---|
| 87 | * |
---|
| 88 | * Reasons estimate is too high: |
---|
| 89 | * + FP contexts (not all tasks are FP) |
---|
| 90 | * |
---|
| 91 | * Reasons estimate is too low: |
---|
| 92 | * + stacks greater than minimum size |
---|
| 93 | * + messages |
---|
| 94 | * + application must account for device driver resources |
---|
| 95 | * + application must account for add-on library resource requirements |
---|
| 96 | * |
---|
| 97 | * NOTE: Eventually this may be able to take into account some of |
---|
| 98 | * the above. This procedure has evolved from just enough to |
---|
| 99 | * support the RTEMS Test Suites into something that can be |
---|
| 100 | * used remarkably reliably by most applications. |
---|
| 101 | */ |
---|
| 102 | |
---|
| 103 | /** |
---|
| 104 | * This is the Classic API initialization tasks table. |
---|
| 105 | */ |
---|
[08bae5e6] | 106 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
[bfe6391] | 107 | |
---|
[976162a6] | 108 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[bfe6391] | 109 | /** |
---|
| 110 | * This it the distributed multiprocessing configuration table. |
---|
| 111 | */ |
---|
[976162a6] | 112 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
| 113 | #endif |
---|
[bfe6391] | 114 | |
---|
[5877cc3a] | 115 | /** |
---|
[27f071cd] | 116 | * This macro determines whether the RTEMS reentrancy support for |
---|
| 117 | * the Newlib C Library is enabled. |
---|
[3b89891] | 118 | */ |
---|
[5aecf664] | 119 | #ifdef RTEMS_SCHEDSIM |
---|
| 120 | #undef RTEMS_NEWLIB |
---|
| 121 | #endif |
---|
| 122 | |
---|
[5877cc3a] | 123 | #if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
[07d71279] | 124 | #define _CONFIGURE_NEWLIB_EXTENSION 1 |
---|
[623893c] | 125 | #else |
---|
[07d71279] | 126 | #define _CONFIGURE_NEWLIB_EXTENSION 0 |
---|
[9c63d90] | 127 | #endif |
---|
[623893c] | 128 | |
---|
[5aecf664] | 129 | #ifndef RTEMS_SCHEDSIM |
---|
[efd2965a] | 130 | #include <rtems/libio_.h> |
---|
[d40da79b] | 131 | |
---|
| 132 | #ifdef CONFIGURE_INIT |
---|
[3d36164f] | 133 | #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 134 | RTEMS_SYSINIT_ITEM( |
---|
| 135 | rtems_filesystem_initialize, |
---|
| 136 | RTEMS_SYSINIT_ROOT_FILESYSTEM, |
---|
| 137 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 138 | ); |
---|
[a290fbe9] | 139 | #endif |
---|
[d40da79b] | 140 | #endif |
---|
[5aecf664] | 141 | #endif |
---|
[d40da79b] | 142 | |
---|
[5877cc3a] | 143 | /** |
---|
[27f071cd] | 144 | * This macro defines the number of POSIX file descriptors allocated |
---|
| 145 | * and managed by libio. These are the "integer" file descriptors that |
---|
| 146 | * are used by calls like open(2) and read(2). |
---|
[df49c60] | 147 | */ |
---|
[bd9c3d1] | 148 | #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
[5877cc3a] | 149 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3 |
---|
[bd9c3d1] | 150 | #endif |
---|
| 151 | |
---|
[07d71279] | 152 | /* |
---|
[5c0c0cf] | 153 | * POSIX key count used by the IO library. |
---|
| 154 | */ |
---|
[07d71279] | 155 | #define _CONFIGURE_LIBIO_POSIX_KEYS 1 |
---|
[5c0c0cf] | 156 | |
---|
[43908825] | 157 | #ifdef CONFIGURE_INIT |
---|
[efd2965a] | 158 | rtems_libio_t rtems_libio_iops[CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS]; |
---|
| 159 | |
---|
[5877cc3a] | 160 | /** |
---|
[27f071cd] | 161 | * When instantiating the configuration tables, this variable is |
---|
| 162 | * initialized to specify the maximum number of file descriptors. |
---|
[5877cc3a] | 163 | */ |
---|
[efd2965a] | 164 | const uint32_t rtems_libio_number_iops = RTEMS_ARRAY_SIZE(rtems_libio_iops); |
---|
[43908825] | 165 | #endif |
---|
| 166 | |
---|
[54835ae] | 167 | #ifdef CONFIGURE_SMP_MAXIMUM_PROCESSORS |
---|
[9526b034] | 168 | #warning "CONFIGURE_SMP_MAXIMUM_PROCESSORS has been renamed to CONFIGURE_MAXIMUM_PROCESSORS since RTEMS 5.1" |
---|
[54835ae] | 169 | #define CONFIGURE_MAXIMUM_PROCESSORS CONFIGURE_SMP_MAXIMUM_PROCESSORS |
---|
| 170 | #endif |
---|
| 171 | |
---|
[334e1d2] | 172 | /* Ensure that _CONFIGURE_MAXIMUM_PROCESSORS > 1 only in SMP configurations */ |
---|
| 173 | #if defined(CONFIGURE_MAXIMUM_PROCESSORS) && defined(RTEMS_SMP) |
---|
| 174 | #define _CONFIGURE_MAXIMUM_PROCESSORS CONFIGURE_MAXIMUM_PROCESSORS |
---|
| 175 | #else |
---|
| 176 | #define _CONFIGURE_MAXIMUM_PROCESSORS 1 |
---|
[f95fa387] | 177 | #endif |
---|
| 178 | |
---|
| 179 | /* |
---|
| 180 | * An internal define to indicate that this is an SMP application |
---|
| 181 | * configuration. |
---|
| 182 | */ |
---|
[13097181] | 183 | #ifdef RTEMS_SMP |
---|
| 184 | #if !defined(CONFIGURE_DISABLE_SMP_CONFIGURATION) |
---|
| 185 | #define _CONFIGURE_SMP_APPLICATION |
---|
[334e1d2] | 186 | #elif _CONFIGURE_MAXIMUM_PROCESSORS > 1 |
---|
[13097181] | 187 | #error "CONFIGURE_DISABLE_SMP_CONFIGURATION and CONFIGURE_MAXIMUM_PROCESSORS > 1 makes no sense" |
---|
| 188 | #endif |
---|
[f95fa387] | 189 | #endif |
---|
| 190 | |
---|
| 191 | #ifdef CONFIGURE_SMP_APPLICATION |
---|
[9526b034] | 192 | #warning "CONFIGURE_SMP_APPLICATION is obsolete since RTEMS 5.1" |
---|
[06dcaf0] | 193 | #endif |
---|
| 194 | |
---|
[16939b18] | 195 | /* |
---|
| 196 | * This sets up the resources for the FIFOs/pipes. |
---|
| 197 | */ |
---|
| 198 | |
---|
[bfe6391] | 199 | /** |
---|
| 200 | * This is specified to configure the maximum number of POSIX FIFOs. |
---|
| 201 | */ |
---|
[16939b18] | 202 | #if !defined(CONFIGURE_MAXIMUM_FIFOS) |
---|
| 203 | #define CONFIGURE_MAXIMUM_FIFOS 0 |
---|
| 204 | #endif |
---|
| 205 | |
---|
[bfe6391] | 206 | /** |
---|
| 207 | * This is specified to configure the maximum number of POSIX named pipes. |
---|
| 208 | */ |
---|
[16939b18] | 209 | #if !defined(CONFIGURE_MAXIMUM_PIPES) |
---|
| 210 | #define CONFIGURE_MAXIMUM_PIPES 0 |
---|
| 211 | #endif |
---|
| 212 | |
---|
[07d71279] | 213 | /* |
---|
[bfe6391] | 214 | * This specifies the number of barriers required for the configured |
---|
| 215 | * number of FIFOs and named pipes. |
---|
| 216 | */ |
---|
[16939b18] | 217 | #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0 |
---|
[07d71279] | 218 | #define _CONFIGURE_BARRIERS_FOR_FIFOS \ |
---|
[16939b18] | 219 | (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES)) |
---|
[bfe6391] | 220 | #else |
---|
[07d71279] | 221 | #define _CONFIGURE_BARRIERS_FOR_FIFOS 0 |
---|
[bfe6391] | 222 | #endif |
---|
| 223 | |
---|
| 224 | /** |
---|
| 225 | * @defgroup ConfigFilesystems Filesystems and Mount Table Configuration |
---|
| 226 | * |
---|
| 227 | * @ingroup Configuration |
---|
[29e92b0] | 228 | * |
---|
| 229 | * Defines to control the file system: |
---|
| 230 | * |
---|
[bfe6391] | 231 | * - CONFIGURE_APPLICATION_DISABLE_FILESYSTEM: |
---|
[29e92b0] | 232 | * Disable the RTEMS filesystems. You get an empty DEVFS. |
---|
| 233 | * |
---|
[bfe6391] | 234 | * - CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM: |
---|
[29e92b0] | 235 | * Use the DEVFS as the root file system. Limited functions are |
---|
| 236 | * provided when this is used. |
---|
| 237 | * |
---|
[bfe6391] | 238 | * - CONFIGURE_FILESYSTEM_ALL: |
---|
[29e92b0] | 239 | * Add file filesystems to the default filesystem table. |
---|
| 240 | * |
---|
| 241 | * List of available file systems. You can define as many as you like: |
---|
[bfe6391] | 242 | * - CONFIGURE_FILESYSTEM_IMFS - In Memory File System (IMFS) |
---|
| 243 | * - CONFIGURE_FILESYSTEM_DEVFS - Device File System (DSVFS) |
---|
| 244 | * - CONFIGURE_FILESYSTEM_TFTPFS - TFTP File System, networking enabled |
---|
| 245 | * - CONFIGURE_FILESYSTEM_FTPFS - FTP File System, networking enabled |
---|
| 246 | * - CONFIGURE_FILESYSTEM_NFS - Network File System, networking enabled |
---|
| 247 | * - CONFIGURE_FILESYSTEM_DOSFS - DOS File System, uses libblock |
---|
| 248 | * - CONFIGURE_FILESYSTEM_RFS - RTEMS File System (RFS), uses libblock |
---|
| 249 | * - CONFIGURE_FILESYSTEM_JFFS2 - Journalling Flash File System, Version 2 |
---|
[29e92b0] | 250 | * |
---|
| 251 | * Combinations: |
---|
| 252 | * |
---|
| 253 | * - If nothing is defined the base file system is the IMFS. |
---|
| 254 | * |
---|
[a9df916] | 255 | * - If CONFIGURE_APPLICATION_DISABLE_FILESYSTEM is defined all filesystems |
---|
| 256 | * are disabled by force. |
---|
[29e92b0] | 257 | * |
---|
[a9df916] | 258 | * - If CONFIGURE_USE_DEV_AS_BASE_FILESYSTEM is defined all filesystems |
---|
[29e92b0] | 259 | * are disabled by force and DEVFS is defined. |
---|
| 260 | */ |
---|
[bfe6391] | 261 | /**@{*/ |
---|
[29e92b0] | 262 | |
---|
[d40da79b] | 263 | #ifdef CONFIGURE_INIT |
---|
[29e92b0] | 264 | |
---|
| 265 | /* |
---|
| 266 | * Include all file systems. Do this before checking if the filesystem has |
---|
| 267 | * been disabled. |
---|
| 268 | */ |
---|
| 269 | #ifdef CONFIGURE_FILESYSTEM_ALL |
---|
| 270 | #define CONFIGURE_FILESYSTEM_IMFS |
---|
| 271 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
| 272 | #define CONFIGURE_FILESYSTEM_TFTPFS |
---|
| 273 | #define CONFIGURE_FILESYSTEM_FTPFS |
---|
[59673224] | 274 | #define CONFIGURE_FILESYSTEM_NFS |
---|
[29e92b0] | 275 | #define CONFIGURE_FILESYSTEM_DOSFS |
---|
| 276 | #define CONFIGURE_FILESYSTEM_RFS |
---|
[3c96bee] | 277 | #define CONFIGURE_FILESYSTEM_JFFS2 |
---|
[29e92b0] | 278 | #endif |
---|
| 279 | |
---|
| 280 | /* |
---|
[80c1577] | 281 | * If disabling the file system, give a compile error if the user has |
---|
| 282 | * configured other filesystem parameters. |
---|
[29e92b0] | 283 | */ |
---|
[80c1577] | 284 | #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
[a9df916] | 285 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 286 | #error "Filesystem disabled and a base filesystem configured." |
---|
[80c1577] | 287 | #endif |
---|
| 288 | |
---|
[a9df916] | 289 | #if defined(CONFIGURE_FILESYSTEM_IMFS) || \ |
---|
| 290 | defined(CONFIGURE_FILESYSTEM_DEVFS) || \ |
---|
| 291 | defined(CONFIGURE_FILESYSTEM_TFTPFS) || \ |
---|
| 292 | defined(CONFIGURE_FILESYSTEM_FTPFS) || \ |
---|
| 293 | defined(CONFIGURE_FILESYSTEM_NFS) || \ |
---|
| 294 | defined(CONFIGURE_FILESYSTEM_DOSFS) || \ |
---|
| 295 | defined(CONFIGURE_FILESYSTEM_RFS) || \ |
---|
| 296 | defined(CONFIGURE_FILESYSTEM_JFFS2) |
---|
| 297 | #error "Filesystem disabled and a filesystem configured." |
---|
[9ab091e] | 298 | #endif |
---|
[29e92b0] | 299 | #endif |
---|
| 300 | |
---|
| 301 | /* |
---|
| 302 | * If the base filesystem is DEVFS define it else define IMFS. |
---|
| 303 | * We will have either DEVFS or IMFS defined after this. |
---|
| 304 | */ |
---|
[f89c34bb] | 305 | #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
| 306 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 307 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
| 308 | #endif |
---|
[29e92b0] | 309 | #endif |
---|
| 310 | |
---|
| 311 | #endif |
---|
| 312 | |
---|
[5aecf664] | 313 | #ifndef RTEMS_SCHEDSIM |
---|
[29e92b0] | 314 | /** |
---|
| 315 | * IMFS |
---|
| 316 | */ |
---|
| 317 | #include <rtems/imfs.h> |
---|
| 318 | |
---|
| 319 | /** |
---|
[27f071cd] | 320 | * This specifies the number of bytes per block for files within the IMFS. |
---|
| 321 | * There are a maximum number of blocks per file so this dictates the maximum |
---|
| 322 | * size of a file. This has to be balanced with the unused portion of each |
---|
| 323 | * block that might be wasted. |
---|
[29e92b0] | 324 | */ |
---|
| 325 | #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK |
---|
| 326 | #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ |
---|
| 327 | IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK |
---|
| 328 | #endif |
---|
| 329 | |
---|
| 330 | /** |
---|
[27f071cd] | 331 | * This defines the IMFS file system table entry. |
---|
[9ab091e] | 332 | */ |
---|
[29e92b0] | 333 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \ |
---|
[a9df916] | 334 | defined(CONFIGURE_FILESYSTEM_IMFS) |
---|
| 335 | #define CONFIGURE_FILESYSTEM_ENTRY_IMFS \ |
---|
| 336 | { RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize } |
---|
[29e92b0] | 337 | #endif |
---|
[5aecf664] | 338 | #endif |
---|
[29e92b0] | 339 | |
---|
[12eee4fd] | 340 | #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM |
---|
[249766c5] | 341 | #define CONFIGURE_IMFS_DISABLE_CHMOD |
---|
[12eee4fd] | 342 | #define CONFIGURE_IMFS_DISABLE_CHOWN |
---|
| 343 | #define CONFIGURE_IMFS_DISABLE_UTIME |
---|
| 344 | #define CONFIGURE_IMFS_DISABLE_LINK |
---|
| 345 | #define CONFIGURE_IMFS_DISABLE_SYMLINK |
---|
| 346 | #define CONFIGURE_IMFS_DISABLE_READLINK |
---|
| 347 | #define CONFIGURE_IMFS_DISABLE_RENAME |
---|
| 348 | #define CONFIGURE_IMFS_DISABLE_UNMOUNT |
---|
| 349 | #endif |
---|
| 350 | |
---|
[29e92b0] | 351 | /** |
---|
| 352 | * DEVFS |
---|
[9ab091e] | 353 | */ |
---|
[29e92b0] | 354 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \ |
---|
| 355 | defined(CONFIGURE_FILESYSTEM_DEVFS) |
---|
| 356 | #include <rtems/devfs.h> |
---|
[14fc3a77] | 357 | #define CONFIGURE_FILESYSTEM_ENTRY_DEVFS \ |
---|
| 358 | { RTEMS_FILESYSTEM_TYPE_DEVFS, devFS_initialize } |
---|
[29e92b0] | 359 | #endif |
---|
| 360 | |
---|
[251c94d] | 361 | /** |
---|
| 362 | * FTPFS |
---|
| 363 | */ |
---|
| 364 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \ |
---|
| 365 | defined(CONFIGURE_FILESYSTEM_FTPFS) |
---|
| 366 | #include <rtems/ftpfs.h> |
---|
| 367 | #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS \ |
---|
| 368 | { RTEMS_FILESYSTEM_TYPE_FTPFS, rtems_ftpfs_initialize } |
---|
| 369 | #endif |
---|
[29e92b0] | 370 | |
---|
[251c94d] | 371 | /** |
---|
| 372 | * TFTPFS |
---|
| 373 | */ |
---|
| 374 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \ |
---|
| 375 | defined(CONFIGURE_FILESYSTEM_TFTPFS) |
---|
| 376 | #include <rtems/tftp.h> |
---|
| 377 | #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS \ |
---|
| 378 | { RTEMS_FILESYSTEM_TYPE_TFTPFS, rtems_tftpfs_initialize } |
---|
| 379 | #endif |
---|
[29e92b0] | 380 | |
---|
[251c94d] | 381 | /** |
---|
| 382 | * NFS |
---|
| 383 | */ |
---|
| 384 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) && \ |
---|
| 385 | defined(CONFIGURE_FILESYSTEM_NFS) |
---|
| 386 | #include <librtemsNfs.h> |
---|
| 387 | #define CONFIGURE_FILESYSTEM_ENTRY_NFS \ |
---|
| 388 | { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize } |
---|
[29e92b0] | 389 | #endif |
---|
| 390 | |
---|
| 391 | /** |
---|
| 392 | * DOSFS |
---|
[9ab091e] | 393 | */ |
---|
[29e92b0] | 394 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \ |
---|
| 395 | defined(CONFIGURE_FILESYSTEM_DOSFS) |
---|
| 396 | #include <rtems/dosfs.h> |
---|
[14fc3a77] | 397 | #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS \ |
---|
| 398 | { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize } |
---|
[29e92b0] | 399 | #endif |
---|
| 400 | |
---|
| 401 | /** |
---|
| 402 | * RFS |
---|
[9ab091e] | 403 | */ |
---|
[29e92b0] | 404 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \ |
---|
| 405 | defined(CONFIGURE_FILESYSTEM_RFS) |
---|
| 406 | #include <rtems/rtems-rfs.h> |
---|
[14fc3a77] | 407 | #define CONFIGURE_FILESYSTEM_ENTRY_RFS \ |
---|
| 408 | { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise } |
---|
[29e92b0] | 409 | #endif |
---|
| 410 | |
---|
[3c96bee] | 411 | /** |
---|
| 412 | * JFFS2 |
---|
| 413 | */ |
---|
| 414 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2) && \ |
---|
| 415 | defined(CONFIGURE_FILESYSTEM_JFFS2) |
---|
| 416 | #include <rtems/jffs2.h> |
---|
| 417 | #define CONFIGURE_FILESYSTEM_ENTRY_JFFS2 \ |
---|
| 418 | { RTEMS_FILESYSTEM_TYPE_JFFS2, rtems_jffs2_initialize } |
---|
| 419 | #endif |
---|
| 420 | |
---|
[29e92b0] | 421 | #ifdef CONFIGURE_INIT |
---|
| 422 | |
---|
[84e1742] | 423 | /** |
---|
[27f071cd] | 424 | * DEVFS variables. |
---|
[84e1742] | 425 | * |
---|
[27f071cd] | 426 | * The number of individual devices that may be registered |
---|
| 427 | * in the system or the CONFIGURE_MAXIMUM_DEVICES variable |
---|
| 428 | * is defaulted to 4 when a filesystem is enabled, unless |
---|
| 429 | * the bsp overwrides this. In which case the value is set |
---|
| 430 | * to BSP_MAXIMUM_DEVICES. |
---|
[29e92b0] | 431 | */ |
---|
[3b7c123] | 432 | #ifdef CONFIGURE_FILESYSTEM_DEVFS |
---|
[d40da79b] | 433 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
[84e1742] | 434 | #if defined(BSP_MAXIMUM_DEVICES) |
---|
| 435 | #define CONFIGURE_MAXIMUM_DEVICES BSP_MAXIMUM_DEVICES |
---|
| 436 | #else |
---|
| 437 | #define CONFIGURE_MAXIMUM_DEVICES 4 |
---|
| 438 | #endif |
---|
[d40da79b] | 439 | #endif |
---|
| 440 | #include <rtems/devfs.h> |
---|
| 441 | #endif |
---|
| 442 | |
---|
[29e92b0] | 443 | /** |
---|
| 444 | * Table termination record. |
---|
| 445 | */ |
---|
| 446 | #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL } |
---|
[43f7a90] | 447 | |
---|
[5aecf664] | 448 | #ifndef RTEMS_SCHEDSIM |
---|
[a9df916] | 449 | #if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) && \ |
---|
| 450 | !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 451 | int imfs_rq_memfile_bytes_per_block = |
---|
| 452 | CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK; |
---|
| 453 | #endif |
---|
| 454 | |
---|
[29e92b0] | 455 | /** |
---|
| 456 | * The default file system table. Must be terminated with the NULL entry if |
---|
| 457 | * you provide your own. |
---|
| 458 | */ |
---|
[bd5cec41] | 459 | #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
[7d01d244] | 460 | const rtems_filesystem_table_t rtems_filesystem_table[] = { |
---|
[a9df916] | 461 | #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 462 | { "/", IMFS_initialize_support }, |
---|
[29e92b0] | 463 | #endif |
---|
| 464 | #if defined(CONFIGURE_FILESYSTEM_IMFS) && \ |
---|
| 465 | defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) |
---|
| 466 | CONFIGURE_FILESYSTEM_ENTRY_IMFS, |
---|
| 467 | #endif |
---|
| 468 | #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \ |
---|
| 469 | defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) |
---|
| 470 | CONFIGURE_FILESYSTEM_ENTRY_DEVFS, |
---|
| 471 | #endif |
---|
| 472 | #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \ |
---|
| 473 | defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) |
---|
| 474 | CONFIGURE_FILESYSTEM_ENTRY_TFTPFS, |
---|
| 475 | #endif |
---|
| 476 | #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \ |
---|
| 477 | defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) |
---|
| 478 | CONFIGURE_FILESYSTEM_ENTRY_FTPFS, |
---|
| 479 | #endif |
---|
[59673224] | 480 | #if defined(CONFIGURE_FILESYSTEM_NFS) && \ |
---|
| 481 | defined(CONFIGURE_FILESYSTEM_ENTRY_NFS) |
---|
| 482 | CONFIGURE_FILESYSTEM_ENTRY_NFS, |
---|
[29e92b0] | 483 | #endif |
---|
| 484 | #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \ |
---|
| 485 | defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) |
---|
| 486 | CONFIGURE_FILESYSTEM_ENTRY_DOSFS, |
---|
| 487 | #endif |
---|
| 488 | #if defined(CONFIGURE_FILESYSTEM_RFS) && \ |
---|
| 489 | defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) |
---|
| 490 | CONFIGURE_FILESYSTEM_ENTRY_RFS, |
---|
| 491 | #endif |
---|
[3c96bee] | 492 | #if defined(CONFIGURE_FILESYSTEM_JFFS2) && \ |
---|
| 493 | defined(CONFIGURE_FILESYSTEM_ENTRY_JFFS2) |
---|
| 494 | CONFIGURE_FILESYSTEM_ENTRY_JFFS2, |
---|
| 495 | #endif |
---|
[29e92b0] | 496 | CONFIGURE_FILESYSTEM_NULL |
---|
| 497 | }; |
---|
[43f7a90] | 498 | |
---|
[3b7c123] | 499 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 500 | static devFS_node devFS_root_filesystem_nodes [CONFIGURE_MAXIMUM_DEVICES]; |
---|
| 501 | static const devFS_data devFS_root_filesystem_data = { |
---|
| 502 | devFS_root_filesystem_nodes, |
---|
| 503 | CONFIGURE_MAXIMUM_DEVICES |
---|
| 504 | }; |
---|
[a9df916] | 505 | #else |
---|
| 506 | static IMFS_fs_info_t _Configure_IMFS_fs_info; |
---|
| 507 | |
---|
| 508 | static const rtems_filesystem_operations_table _Configure_IMFS_ops = { |
---|
| 509 | rtems_filesystem_default_lock, |
---|
| 510 | rtems_filesystem_default_unlock, |
---|
| 511 | IMFS_eval_path, |
---|
| 512 | #ifdef CONFIGURE_IMFS_DISABLE_LINK |
---|
| 513 | rtems_filesystem_default_link, |
---|
| 514 | #else |
---|
| 515 | IMFS_link, |
---|
| 516 | #endif |
---|
| 517 | rtems_filesystem_default_are_nodes_equal, |
---|
| 518 | #ifdef CONFIGURE_IMFS_DISABLE_MKNOD |
---|
| 519 | rtems_filesystem_default_mknod, |
---|
| 520 | #else |
---|
| 521 | IMFS_mknod, |
---|
| 522 | #endif |
---|
| 523 | #ifdef CONFIGURE_IMFS_DISABLE_RMNOD |
---|
| 524 | rtems_filesystem_default_rmnod, |
---|
| 525 | #else |
---|
| 526 | IMFS_rmnod, |
---|
| 527 | #endif |
---|
[249766c5] | 528 | #ifdef CONFIGURE_IMFS_DISABLE_CHMOD |
---|
[a9df916] | 529 | rtems_filesystem_default_fchmod, |
---|
| 530 | #else |
---|
| 531 | IMFS_fchmod, |
---|
| 532 | #endif |
---|
| 533 | #ifdef CONFIGURE_IMFS_DISABLE_CHOWN |
---|
| 534 | rtems_filesystem_default_chown, |
---|
| 535 | #else |
---|
| 536 | IMFS_chown, |
---|
| 537 | #endif |
---|
| 538 | IMFS_node_clone, |
---|
| 539 | IMFS_node_free, |
---|
| 540 | #ifdef CONFIGURE_IMFS_DISABLE_MOUNT |
---|
| 541 | rtems_filesystem_default_mount, |
---|
| 542 | #else |
---|
| 543 | IMFS_mount, |
---|
| 544 | #endif |
---|
| 545 | #ifdef CONFIGURE_IMFS_DISABLE_UNMOUNT |
---|
| 546 | rtems_filesystem_default_unmount, |
---|
| 547 | #else |
---|
| 548 | IMFS_unmount, |
---|
| 549 | #endif |
---|
| 550 | rtems_filesystem_default_fsunmount, |
---|
| 551 | #ifdef CONFIGURE_IMFS_DISABLE_UTIME |
---|
| 552 | rtems_filesystem_default_utime, |
---|
| 553 | #else |
---|
| 554 | IMFS_utime, |
---|
| 555 | #endif |
---|
| 556 | #ifdef CONFIGURE_IMFS_DISABLE_SYMLINK |
---|
| 557 | rtems_filesystem_default_symlink, |
---|
| 558 | #else |
---|
| 559 | IMFS_symlink, |
---|
| 560 | #endif |
---|
| 561 | #ifdef CONFIGURE_IMFS_DISABLE_READLINK |
---|
| 562 | rtems_filesystem_default_readlink, |
---|
| 563 | #else |
---|
| 564 | IMFS_readlink, |
---|
| 565 | #endif |
---|
| 566 | #ifdef CONFIGURE_IMFS_DISABLE_RENAME |
---|
| 567 | rtems_filesystem_default_rename, |
---|
| 568 | #else |
---|
| 569 | IMFS_rename, |
---|
| 570 | #endif |
---|
| 571 | rtems_filesystem_default_statvfs |
---|
| 572 | }; |
---|
| 573 | |
---|
| 574 | static const IMFS_mknod_controls _Configure_IMFS_mknod_controls = { |
---|
[f785492] | 575 | #ifdef CONFIGURE_IMFS_DISABLE_READDIR |
---|
| 576 | &IMFS_mknod_control_dir_minimal, |
---|
| 577 | #else |
---|
| 578 | &IMFS_mknod_control_dir_default, |
---|
| 579 | #endif |
---|
[a9df916] | 580 | &IMFS_mknod_control_device, |
---|
[40a18d7f] | 581 | #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_FILE |
---|
| 582 | &IMFS_mknod_control_enosys, |
---|
| 583 | #else |
---|
| 584 | &IMFS_mknod_control_memfile, |
---|
| 585 | #endif |
---|
[a9df916] | 586 | #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0 |
---|
| 587 | &IMFS_mknod_control_fifo |
---|
| 588 | #else |
---|
| 589 | &IMFS_mknod_control_enosys |
---|
| 590 | #endif |
---|
| 591 | }; |
---|
| 592 | |
---|
| 593 | static const IMFS_mount_data _Configure_IMFS_mount_data = { |
---|
| 594 | &_Configure_IMFS_fs_info, |
---|
| 595 | &_Configure_IMFS_ops, |
---|
| 596 | &_Configure_IMFS_mknod_controls |
---|
| 597 | }; |
---|
[3b7c123] | 598 | #endif |
---|
[a9df916] | 599 | |
---|
[3b7c123] | 600 | const rtems_filesystem_mount_configuration |
---|
| 601 | rtems_filesystem_root_configuration = { |
---|
| 602 | NULL, |
---|
| 603 | NULL, |
---|
[46969df] | 604 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
[14fc3a77] | 605 | RTEMS_FILESYSTEM_TYPE_DEVFS, |
---|
[3b7c123] | 606 | #else |
---|
[a9df916] | 607 | "/", |
---|
[c3db01d0] | 608 | #endif |
---|
| 609 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
[3b7c123] | 610 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 611 | &devFS_root_filesystem_data |
---|
| 612 | #else |
---|
[a9df916] | 613 | &_Configure_IMFS_mount_data |
---|
[3b7c123] | 614 | #endif |
---|
[c3db01d0] | 615 | }; |
---|
| 616 | #endif |
---|
[29e92b0] | 617 | |
---|
[43f7a90] | 618 | #endif |
---|
[5aecf664] | 619 | #endif |
---|
[bfe6391] | 620 | /**@}*/ /* end of file system group */ |
---|
[43f7a90] | 621 | |
---|
[4afd6f4] | 622 | /* |
---|
[b2b56cb9] | 623 | * STACK_CHECKER_ON was still available in 4.9 so give a warning for now. |
---|
[4afd6f4] | 624 | */ |
---|
| 625 | #if defined(STACK_CHECKER_ON) |
---|
| 626 | #define CONFIGURE_STACK_CHECKER_ENABLED |
---|
| 627 | #warning "STACK_CHECKER_ON deprecated -- use CONFIGURE_STACK_CHECKER_ENABLED" |
---|
| 628 | #endif |
---|
[28352fae] | 629 | |
---|
[5877cc3a] | 630 | /** |
---|
[27f071cd] | 631 | * This configures the stack checker user extension. |
---|
[ab97da95] | 632 | */ |
---|
[4afd6f4] | 633 | #ifdef CONFIGURE_STACK_CHECKER_ENABLED |
---|
[07d71279] | 634 | #define _CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
[ab97da95] | 635 | #else |
---|
[07d71279] | 636 | #define _CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
[ab97da95] | 637 | #endif |
---|
| 638 | |
---|
[80f9d77] | 639 | /** |
---|
[27f071cd] | 640 | * @brief Maximum priority configuration. |
---|
[80f9d77] | 641 | * |
---|
[27f071cd] | 642 | * This configures the maximum priority value that |
---|
| 643 | * a task may have. |
---|
[80f9d77] | 644 | * |
---|
[27f071cd] | 645 | * The following applies to the data space requirements |
---|
| 646 | * of the Priority Scheduler. |
---|
[010192d] | 647 | * |
---|
[27f071cd] | 648 | * By reducing the number of priorities in a system, |
---|
| 649 | * the amount of RAM required by RTEMS can be significantly |
---|
| 650 | * reduced. RTEMS allocates a Chain_Control structure per |
---|
| 651 | * priority and this structure contains 3 pointers. So |
---|
| 652 | * the default is (256 * 12) = 3K on 32-bit architectures. |
---|
[80f9d77] | 653 | * |
---|
[27f071cd] | 654 | * This must be one less than a power of 2 between |
---|
| 655 | * 4 and 256. Valid values along with the application |
---|
| 656 | * priority levels and memory saved when pointers are |
---|
| 657 | * 32-bits in size are: |
---|
[80f9d77] | 658 | * |
---|
[27f071cd] | 659 | * + 3, 2 application priorities, 3024 bytes saved |
---|
| 660 | * + 7, 5 application priorities, 2976 bytes saved |
---|
| 661 | * + 15, 13 application priorities, 2880 bytes saved |
---|
| 662 | * + 31, 29 application priorities, 2688 bytes saved |
---|
| 663 | * + 63, 61 application priorities, 2304 bytes saved |
---|
| 664 | * + 127, 125 application priorities, 1536 bytes saved |
---|
| 665 | * + 255, 253 application priorities, 0 bytes saved |
---|
[80f9d77] | 666 | * |
---|
[27f071cd] | 667 | * It is specified in terms of Classic API priority values. |
---|
[80f9d77] | 668 | */ |
---|
| 669 | #ifndef CONFIGURE_MAXIMUM_PRIORITY |
---|
[8f25cec] | 670 | #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM |
---|
[80f9d77] | 671 | #endif |
---|
| 672 | |
---|
[bfe6391] | 673 | /** |
---|
| 674 | * @defgroup ConfigScheduler Scheduler configuration |
---|
| 675 | * |
---|
| 676 | * @ingroup Configuration |
---|
[0faa9dad] | 677 | * |
---|
[9ab091e] | 678 | * The scheduler configuration allows an application to select the |
---|
[0faa9dad] | 679 | * scheduling policy to use. The supported configurations are: |
---|
[bfe6391] | 680 | * |
---|
| 681 | * - CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler |
---|
| 682 | * - CONFIGURE_SCHEDULER_PRIORITY_SMP - Deterministic Priority SMP Scheduler |
---|
| 683 | * - CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP - Deterministic |
---|
| 684 | * Priority SMP Affinity Scheduler |
---|
[981eed2] | 685 | * - CONFIGURE_SCHEDULER_STRONG_APA - Strong APA Scheduler |
---|
[bfe6391] | 686 | * - CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler |
---|
| 687 | * - CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler |
---|
| 688 | * - CONFIGURE_SCHEDULER_EDF - EDF Scheduler |
---|
[f3d9f228] | 689 | * - CONFIGURE_SCHEDULER_EDF_SMP - EDF SMP Scheduler |
---|
[bfe6391] | 690 | * - CONFIGURE_SCHEDULER_CBS - CBS Scheduler |
---|
| 691 | * - CONFIGURE_SCHEDULER_USER - user provided scheduler |
---|
| 692 | * |
---|
| 693 | * If no configuration is specified by the application in a uniprocessor |
---|
| 694 | * configuration, then CONFIGURE_SCHEDULER_PRIORITY is the default. |
---|
| 695 | * |
---|
| 696 | * If no configuration is specified by the application in SMP |
---|
| 697 | * configuration, then CONFIGURE_SCHEDULER_PRIORITY_SMP is the default. |
---|
[0faa9dad] | 698 | * |
---|
| 699 | * An application can define its own scheduling policy by defining |
---|
[010192d] | 700 | * CONFIGURE_SCHEDULER_USER and the following: |
---|
[bfe6391] | 701 | * |
---|
[2ef85b1] | 702 | * - CONFIGURE_SCHEDULER |
---|
| 703 | * - CONFIGURE_SCHEDULER_TABLE_ENTRIES |
---|
[69aa3349] | 704 | * - CONFIGURE_SCHEDULER_USER_PER_THREAD |
---|
[0faa9dad] | 705 | */ |
---|
[ba7bc099] | 706 | |
---|
[2ef85b1] | 707 | #ifdef CONFIGURE_SCHEDULER_CONTEXT |
---|
| 708 | #warning "CONFIGURE_SCHEDULER_CONTEXT has been renamed to CONFIGURE_SCHEDULER since RTEMS 5.1" |
---|
| 709 | #define CONFIGURE_SCHEDULER CONFIGURE_SCHEDULER_CONTEXT |
---|
| 710 | #endif |
---|
| 711 | |
---|
| 712 | #ifdef CONFIGURE_SCHEDULER_CONTROLS |
---|
| 713 | #warning "CONFIGURE_SCHEDULER_CONTROLS has been renamed to CONFIGURE_SCHEDULER_TABLE_ENTRIES since RTEMS 5.1" |
---|
| 714 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES CONFIGURE_SCHEDULER_CONTROLS |
---|
| 715 | #endif |
---|
| 716 | |
---|
| 717 | #ifdef CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS |
---|
| 718 | #warning "CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS has been renamed to CONFIGURE_SCHEDULER_ASSIGNMENTS since RTEMS 5.1" |
---|
| 719 | #define CONFIGURE_SCHEDULER_ASSIGNMENTS CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS |
---|
| 720 | #endif |
---|
| 721 | |
---|
[0faa9dad] | 722 | #if !defined(CONFIGURE_SCHEDULER_USER) && \ |
---|
[0118ed6] | 723 | !defined(CONFIGURE_SCHEDULER_PRIORITY) && \ |
---|
[99b3505] | 724 | !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) && \ |
---|
[6d24e8b] | 725 | !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) && \ |
---|
[981eed2] | 726 | !defined(CONFIGURE_SCHEDULER_STRONG_APA) && \ |
---|
[ba7bc099] | 727 | !defined(CONFIGURE_SCHEDULER_SIMPLE) && \ |
---|
[5472ad41] | 728 | !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \ |
---|
[82db8e56] | 729 | !defined(CONFIGURE_SCHEDULER_EDF) && \ |
---|
[f3d9f228] | 730 | !defined(CONFIGURE_SCHEDULER_EDF_SMP) && \ |
---|
[82db8e56] | 731 | !defined(CONFIGURE_SCHEDULER_CBS) |
---|
[334e1d2] | 732 | #if defined(RTEMS_SMP) && _CONFIGURE_MAXIMUM_PROCESSORS > 1 |
---|
[bfe6391] | 733 | /** |
---|
| 734 | * If no scheduler is specified in an SMP configuration, the |
---|
[21389c06] | 735 | * EDF scheduler is default. |
---|
[bfe6391] | 736 | */ |
---|
[21389c06] | 737 | #define CONFIGURE_SCHEDULER_EDF_SMP |
---|
[ba7bc099] | 738 | #else |
---|
[bfe6391] | 739 | /** |
---|
| 740 | * If no scheduler is specified in a uniprocessor configuration, the |
---|
| 741 | * priority scheduler is default. |
---|
| 742 | */ |
---|
[ba7bc099] | 743 | #define CONFIGURE_SCHEDULER_PRIORITY |
---|
| 744 | #endif |
---|
[0faa9dad] | 745 | #endif |
---|
| 746 | |
---|
[e1598a6] | 747 | #include <rtems/scheduler.h> |
---|
| 748 | |
---|
[9ab091e] | 749 | /* |
---|
[4c794c8] | 750 | * If the Priority Scheduler is selected, then configure for it. |
---|
[0faa9dad] | 751 | */ |
---|
| 752 | #if defined(CONFIGURE_SCHEDULER_PRIORITY) |
---|
[133d54c5] | 753 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 754 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 755 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'D', ' ') |
---|
| 756 | #endif |
---|
| 757 | |
---|
[2ef85b1] | 758 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 759 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 760 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 761 | RTEMS_SCHEDULER_PRIORITY( \ |
---|
[e1598a6] | 762 | dflt, \ |
---|
| 763 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 764 | ) |
---|
| 765 | |
---|
[bfe6391] | 766 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 767 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 768 | RTEMS_SCHEDULER_TABLE_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 769 | #endif |
---|
[0faa9dad] | 770 | #endif |
---|
| 771 | |
---|
[99b3505] | 772 | /* |
---|
| 773 | * If the Deterministic Priority SMP Scheduler is selected, then configure for |
---|
| 774 | * it. |
---|
| 775 | */ |
---|
| 776 | #if defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) |
---|
[133d54c5] | 777 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 778 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 779 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'D', ' ') |
---|
| 780 | #endif |
---|
| 781 | |
---|
[2ef85b1] | 782 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 783 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 784 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 785 | RTEMS_SCHEDULER_PRIORITY_SMP( \ |
---|
[e1598a6] | 786 | dflt, \ |
---|
| 787 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 788 | ) |
---|
| 789 | |
---|
[bfe6391] | 790 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 791 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 792 | RTEMS_SCHEDULER_TABLE_PRIORITY_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 793 | #endif |
---|
[99b3505] | 794 | #endif |
---|
| 795 | |
---|
[6d24e8b] | 796 | /* |
---|
| 797 | * If the Deterministic Priority Affinity SMP Scheduler is selected, then configure for |
---|
| 798 | * it. |
---|
| 799 | */ |
---|
| 800 | #if defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) |
---|
[133d54c5] | 801 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 802 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 803 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'A', ' ') |
---|
| 804 | #endif |
---|
| 805 | |
---|
[2ef85b1] | 806 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 807 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 808 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 809 | RTEMS_SCHEDULER_PRIORITY_AFFINITY_SMP( \ |
---|
[e1598a6] | 810 | dflt, \ |
---|
| 811 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 812 | ) |
---|
| 813 | |
---|
[7dfb4b9] | 814 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 815 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 816 | RTEMS_SCHEDULER_TABLE_PRIORITY_AFFINITY_SMP( \ |
---|
[133d54c5] | 817 | dflt, \ |
---|
| 818 | CONFIGURE_SCHEDULER_NAME \ |
---|
| 819 | ) |
---|
[e1598a6] | 820 | #endif |
---|
[6d24e8b] | 821 | #endif |
---|
| 822 | |
---|
[981eed2] | 823 | /* |
---|
| 824 | * If the Strong APA Scheduler is selected, then configure for |
---|
| 825 | * it. |
---|
| 826 | */ |
---|
| 827 | #if defined(CONFIGURE_SCHEDULER_STRONG_APA) |
---|
| 828 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
| 829 | /** Configure the name of the scheduler instance */ |
---|
| 830 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'A', 'P', 'A') |
---|
| 831 | #endif |
---|
| 832 | |
---|
[2ef85b1] | 833 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[981eed2] | 834 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 835 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 836 | RTEMS_SCHEDULER_STRONG_APA( \ |
---|
[981eed2] | 837 | dflt, \ |
---|
| 838 | CONFIGURE_MAXIMUM_PRIORITY + 1 \ |
---|
| 839 | ) |
---|
| 840 | |
---|
| 841 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 842 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 843 | RTEMS_SCHEDULER_TABLE_STRONG_APA(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[981eed2] | 844 | #endif |
---|
| 845 | #endif |
---|
| 846 | |
---|
[9ab091e] | 847 | /* |
---|
[0118ed6] | 848 | * If the Simple Priority Scheduler is selected, then configure for it. |
---|
| 849 | */ |
---|
| 850 | #if defined(CONFIGURE_SCHEDULER_SIMPLE) |
---|
[133d54c5] | 851 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 852 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 853 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'S', ' ') |
---|
| 854 | #endif |
---|
| 855 | |
---|
[2ef85b1] | 856 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 857 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 858 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_SIMPLE(dflt) |
---|
[e1598a6] | 859 | |
---|
[bfe6391] | 860 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 861 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 862 | RTEMS_SCHEDULER_TABLE_SIMPLE(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 863 | #endif |
---|
[0118ed6] | 864 | #endif |
---|
| 865 | |
---|
[ba7bc099] | 866 | /* |
---|
| 867 | * If the Simple SMP Priority Scheduler is selected, then configure for it. |
---|
| 868 | */ |
---|
| 869 | #if defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) |
---|
[133d54c5] | 870 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 871 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 872 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'S', ' ') |
---|
| 873 | #endif |
---|
| 874 | |
---|
[2ef85b1] | 875 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 876 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 877 | #define CONFIGURE_SCHEDULER \ |
---|
[6fadb7af] | 878 | RTEMS_SCHEDULER_SIMPLE_SMP(dflt) |
---|
[e1598a6] | 879 | |
---|
[bfe6391] | 880 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 881 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 882 | RTEMS_SCHEDULER_TABLE_SIMPLE_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 883 | #endif |
---|
[ba7bc099] | 884 | #endif |
---|
| 885 | |
---|
[5472ad41] | 886 | /* |
---|
| 887 | * If the EDF Scheduler is selected, then configure for it. |
---|
| 888 | */ |
---|
| 889 | #if defined(CONFIGURE_SCHEDULER_EDF) |
---|
[133d54c5] | 890 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 891 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 892 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'E', 'D', 'F') |
---|
| 893 | #endif |
---|
| 894 | |
---|
[2ef85b1] | 895 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 896 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 897 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_EDF(dflt) |
---|
[e1598a6] | 898 | |
---|
[bfe6391] | 899 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 900 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 901 | RTEMS_SCHEDULER_TABLE_EDF(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 902 | #endif |
---|
[5472ad41] | 903 | #endif |
---|
| 904 | |
---|
[f3d9f228] | 905 | /* |
---|
| 906 | * If the EDF SMP Scheduler is selected, then configure for it. |
---|
| 907 | */ |
---|
| 908 | #if defined(CONFIGURE_SCHEDULER_EDF_SMP) |
---|
| 909 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
| 910 | /** Configure the name of the scheduler instance */ |
---|
| 911 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'E', 'D', 'F') |
---|
| 912 | #endif |
---|
| 913 | |
---|
[2ef85b1] | 914 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[f3d9f228] | 915 | /** Configure the context needed by the scheduler instance */ |
---|
[2ef85b1] | 916 | #define CONFIGURE_SCHEDULER \ |
---|
[334e1d2] | 917 | RTEMS_SCHEDULER_EDF_SMP(dflt, _CONFIGURE_MAXIMUM_PROCESSORS) |
---|
[f3d9f228] | 918 | |
---|
| 919 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 920 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 921 | RTEMS_SCHEDULER_TABLE_EDF_SMP(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[f3d9f228] | 922 | #endif |
---|
| 923 | #endif |
---|
| 924 | |
---|
[82db8e56] | 925 | /* |
---|
| 926 | * If the CBS Scheduler is selected, then configure for it. |
---|
| 927 | */ |
---|
| 928 | #if defined(CONFIGURE_SCHEDULER_CBS) |
---|
[133d54c5] | 929 | #if !defined(CONFIGURE_SCHEDULER_NAME) |
---|
[bfe6391] | 930 | /** Configure the name of the scheduler instance */ |
---|
[133d54c5] | 931 | #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'C', 'B', 'S') |
---|
| 932 | #endif |
---|
| 933 | |
---|
[2ef85b1] | 934 | #if !defined(CONFIGURE_SCHEDULER_TABLE_ENTRIES) |
---|
[bfe6391] | 935 | /** Configure the context needed by the scheduler instance */ |
---|
[6fadb7af] | 936 | #define CONFIGURE_SCHEDULER RTEMS_SCHEDULER_CBS(dflt) |
---|
[e1598a6] | 937 | |
---|
[bfe6391] | 938 | /** Configure the controls for this scheduler instance */ |
---|
[2ef85b1] | 939 | #define CONFIGURE_SCHEDULER_TABLE_ENTRIES \ |
---|
[6fadb7af] | 940 | RTEMS_SCHEDULER_TABLE_CBS(dflt, CONFIGURE_SCHEDULER_NAME) |
---|
[e1598a6] | 941 | #endif |
---|
[82db8e56] | 942 | |
---|
| 943 | #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS |
---|
| 944 | #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS |
---|
| 945 | #endif |
---|
| 946 | |
---|
| 947 | #ifdef CONFIGURE_INIT |
---|
[e1598a6] | 948 | const uint32_t _Scheduler_CBS_Maximum_servers = |
---|
| 949 | CONFIGURE_CBS_MAXIMUM_SERVERS; |
---|
| 950 | |
---|
| 951 | Scheduler_CBS_Server |
---|
| 952 | _Scheduler_CBS_Server_list[ CONFIGURE_CBS_MAXIMUM_SERVERS ]; |
---|
[82db8e56] | 953 | #endif |
---|
| 954 | #endif |
---|
| 955 | |
---|
[9ab091e] | 956 | /* |
---|
[010192d] | 957 | * Set up the scheduler entry points table. The scheduling code uses |
---|
| 958 | * this code to know which scheduler is configured by the user. |
---|
[0faa9dad] | 959 | */ |
---|
| 960 | #ifdef CONFIGURE_INIT |
---|
[2ef85b1] | 961 | #if defined(CONFIGURE_SCHEDULER) |
---|
| 962 | CONFIGURE_SCHEDULER; |
---|
[133d54c5] | 963 | #endif |
---|
[e1598a6] | 964 | |
---|
| 965 | const Scheduler_Control _Scheduler_Table[] = { |
---|
[2ef85b1] | 966 | CONFIGURE_SCHEDULER_TABLE_ENTRIES |
---|
[0faa9dad] | 967 | }; |
---|
[1fac361] | 968 | |
---|
[61d5c886] | 969 | #define _CONFIGURE_SCHEDULER_COUNT RTEMS_ARRAY_SIZE( _Scheduler_Table ) |
---|
[3995e6d] | 970 | |
---|
[e1598a6] | 971 | #if defined(RTEMS_SMP) |
---|
[61d5c886] | 972 | const size_t _Scheduler_Count = _CONFIGURE_SCHEDULER_COUNT; |
---|
[c5831a3f] | 973 | |
---|
[e610785] | 974 | const Scheduler_Assignment _Scheduler_Initial_assignments[] = { |
---|
[2ef85b1] | 975 | #if defined(CONFIGURE_SCHEDULER_ASSIGNMENTS) |
---|
| 976 | CONFIGURE_SCHEDULER_ASSIGNMENTS |
---|
[c5831a3f] | 977 | #else |
---|
[2ef85b1] | 978 | #define _CONFIGURE_SCHEDULER_ASSIGN \ |
---|
[c5831a3f] | 979 | RTEMS_SCHEDULER_ASSIGN( \ |
---|
| 980 | 0, \ |
---|
| 981 | RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \ |
---|
| 982 | ) |
---|
[2ef85b1] | 983 | _CONFIGURE_SCHEDULER_ASSIGN |
---|
[334e1d2] | 984 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 2 |
---|
[2ef85b1] | 985 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 986 | #endif |
---|
[334e1d2] | 987 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 3 |
---|
[2ef85b1] | 988 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 989 | #endif |
---|
[334e1d2] | 990 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 4 |
---|
[2ef85b1] | 991 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 992 | #endif |
---|
[334e1d2] | 993 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 5 |
---|
[2ef85b1] | 994 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 995 | #endif |
---|
[334e1d2] | 996 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 6 |
---|
[2ef85b1] | 997 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 998 | #endif |
---|
[334e1d2] | 999 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 7 |
---|
[2ef85b1] | 1000 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1001 | #endif |
---|
[334e1d2] | 1002 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 8 |
---|
[2ef85b1] | 1003 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1004 | #endif |
---|
[334e1d2] | 1005 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 9 |
---|
[2ef85b1] | 1006 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1007 | #endif |
---|
[334e1d2] | 1008 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 10 |
---|
[2ef85b1] | 1009 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1010 | #endif |
---|
[334e1d2] | 1011 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 11 |
---|
[2ef85b1] | 1012 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1013 | #endif |
---|
[334e1d2] | 1014 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 12 |
---|
[2ef85b1] | 1015 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1016 | #endif |
---|
[334e1d2] | 1017 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 13 |
---|
[2ef85b1] | 1018 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1019 | #endif |
---|
[334e1d2] | 1020 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 14 |
---|
[2ef85b1] | 1021 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1022 | #endif |
---|
[334e1d2] | 1023 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 15 |
---|
[2ef85b1] | 1024 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1025 | #endif |
---|
[334e1d2] | 1026 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 16 |
---|
[2ef85b1] | 1027 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1028 | #endif |
---|
[334e1d2] | 1029 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 17 |
---|
[2ef85b1] | 1030 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1031 | #endif |
---|
[334e1d2] | 1032 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 18 |
---|
[2ef85b1] | 1033 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1034 | #endif |
---|
[334e1d2] | 1035 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 19 |
---|
[2ef85b1] | 1036 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1037 | #endif |
---|
[334e1d2] | 1038 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 20 |
---|
[2ef85b1] | 1039 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1040 | #endif |
---|
[334e1d2] | 1041 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 21 |
---|
[2ef85b1] | 1042 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1043 | #endif |
---|
[334e1d2] | 1044 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 22 |
---|
[2ef85b1] | 1045 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1046 | #endif |
---|
[334e1d2] | 1047 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 23 |
---|
[2ef85b1] | 1048 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1049 | #endif |
---|
[334e1d2] | 1050 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 24 |
---|
[2ef85b1] | 1051 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1052 | #endif |
---|
[334e1d2] | 1053 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 25 |
---|
[2ef85b1] | 1054 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1055 | #endif |
---|
[334e1d2] | 1056 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 26 |
---|
[2ef85b1] | 1057 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1058 | #endif |
---|
[334e1d2] | 1059 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 27 |
---|
[2ef85b1] | 1060 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1061 | #endif |
---|
[334e1d2] | 1062 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 28 |
---|
[2ef85b1] | 1063 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1064 | #endif |
---|
[334e1d2] | 1065 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 29 |
---|
[2ef85b1] | 1066 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1067 | #endif |
---|
[334e1d2] | 1068 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 30 |
---|
[2ef85b1] | 1069 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1070 | #endif |
---|
[334e1d2] | 1071 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 31 |
---|
[2ef85b1] | 1072 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1073 | #endif |
---|
[334e1d2] | 1074 | #if _CONFIGURE_MAXIMUM_PROCESSORS >= 32 |
---|
[2ef85b1] | 1075 | , _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1076 | #endif |
---|
[2ef85b1] | 1077 | #undef _CONFIGURE_SCHEDULER_ASSIGN |
---|
[c5831a3f] | 1078 | #endif |
---|
| 1079 | }; |
---|
| 1080 | |
---|
| 1081 | RTEMS_STATIC_ASSERT( |
---|
[334e1d2] | 1082 | _CONFIGURE_MAXIMUM_PROCESSORS |
---|
[e610785] | 1083 | == RTEMS_ARRAY_SIZE( _Scheduler_Initial_assignments ), |
---|
| 1084 | _Scheduler_Initial_assignments |
---|
[c5831a3f] | 1085 | ); |
---|
[e1598a6] | 1086 | #endif |
---|
[0faa9dad] | 1087 | #endif |
---|
[bfe6391] | 1088 | /**@}*/ /* end of Scheduler Configuration */ |
---|
| 1089 | |
---|
| 1090 | /** |
---|
| 1091 | * @defgroup ConfigurationIdle IDLE Thread Configuration |
---|
| 1092 | * |
---|
| 1093 | * @addtogroup Configuration |
---|
| 1094 | * |
---|
| 1095 | * This module contains configuration parameters related to the |
---|
| 1096 | * set of IDLE threads. On a uniprocessor system, there is one |
---|
| 1097 | * IDLE thread. On an SMP system, there is one for each core. |
---|
| 1098 | */ |
---|
[0faa9dad] | 1099 | |
---|
[80f9d77] | 1100 | /* |
---|
| 1101 | * If you said the IDLE task was going to do application initialization |
---|
| 1102 | * and didn't override the IDLE body, then something is amiss. |
---|
| 1103 | */ |
---|
| 1104 | #if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \ |
---|
| 1105 | !defined(CONFIGURE_IDLE_TASK_BODY)) |
---|
[805cddc] | 1106 | #error "CONFIGURE_ERROR: You did not override the IDLE task body." |
---|
[80f9d77] | 1107 | #endif |
---|
| 1108 | |
---|
[5877cc3a] | 1109 | /** |
---|
[27f071cd] | 1110 | * @brief Idle task body configuration. |
---|
[976162a6] | 1111 | * |
---|
[27f071cd] | 1112 | * There is a default IDLE thread body provided by RTEMS which |
---|
| 1113 | * has the possibility of being CPU specific. There may be a |
---|
| 1114 | * BSP specific override of the RTEMS default body and in turn, |
---|
| 1115 | * the application may override and provide its own. |
---|
[976162a6] | 1116 | */ |
---|
| 1117 | #ifndef CONFIGURE_IDLE_TASK_BODY |
---|
[6c71b25] | 1118 | #if defined(BSP_IDLE_TASK_BODY) |
---|
[976162a6] | 1119 | #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY |
---|
| 1120 | #else |
---|
[8776bb9] | 1121 | #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body |
---|
[976162a6] | 1122 | #endif |
---|
| 1123 | #endif |
---|
[bfe6391] | 1124 | /**@}*/ /* end of IDLE thread configuration */ |
---|
| 1125 | |
---|
| 1126 | /** |
---|
| 1127 | * @defgroup ConfigurationStackSize Configuration Thread Stack Size |
---|
| 1128 | * |
---|
| 1129 | * @addtogroup Configuration |
---|
| 1130 | * |
---|
| 1131 | * This module contains parameters related to thread aand interrupt stacks. |
---|
| 1132 | */ |
---|
[976162a6] | 1133 | |
---|
[ecf0f4c] | 1134 | /** |
---|
[27f071cd] | 1135 | * By default, use the minimum stack size requested by this port. |
---|
[ecf0f4c] | 1136 | */ |
---|
| 1137 | #ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 1138 | #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
| 1139 | #endif |
---|
| 1140 | |
---|
[bfe6391] | 1141 | /** |
---|
| 1142 | * This specifies the default POSIX thread stack size. By default, it is |
---|
| 1143 | * twice that recommended for the port. |
---|
| 1144 | */ |
---|
[fd27bae] | 1145 | #ifndef CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE |
---|
[b4f635e] | 1146 | #define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE \ |
---|
| 1147 | (2 * CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[fd27bae] | 1148 | #endif |
---|
[b4f635e] | 1149 | |
---|
[5877cc3a] | 1150 | /** |
---|
[27f071cd] | 1151 | * @brief Idle task stack size configuration. |
---|
[976162a6] | 1152 | * |
---|
[27f071cd] | 1153 | * By default, the IDLE task will have a stack of minimum size. |
---|
| 1154 | * The BSP or application may override this value. |
---|
[976162a6] | 1155 | */ |
---|
| 1156 | #ifndef CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 1157 | #ifdef BSP_IDLE_TASK_STACK_SIZE |
---|
| 1158 | #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE |
---|
| 1159 | #else |
---|
[ecf0f4c] | 1160 | #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[976162a6] | 1161 | #endif |
---|
| 1162 | #endif |
---|
[b4f635e] | 1163 | #if CONFIGURE_IDLE_TASK_STACK_SIZE < CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 1164 | #error "CONFIGURE_IDLE_TASK_STACK_SIZE less than CONFIGURE_MINIMUM_TASK_STACK_SIZE" |
---|
| 1165 | #endif |
---|
[976162a6] | 1166 | |
---|
[511dc4b] | 1167 | /* |
---|
| 1168 | * Interrupt stack configuration. |
---|
[6aa25da] | 1169 | * |
---|
[27f071cd] | 1170 | * By default, the interrupt stack will be of minimum size. |
---|
| 1171 | * The BSP or application may override this value. |
---|
[6aa25da] | 1172 | */ |
---|
[511dc4b] | 1173 | |
---|
[6aa25da] | 1174 | #ifndef CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 1175 | #ifdef BSP_INTERRUPT_STACK_SIZE |
---|
| 1176 | #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE |
---|
| 1177 | #else |
---|
[24b5807] | 1178 | #define CONFIGURE_INTERRUPT_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
[6aa25da] | 1179 | #endif |
---|
| 1180 | #endif |
---|
| 1181 | |
---|
[511dc4b] | 1182 | #if CONFIGURE_INTERRUPT_STACK_SIZE % CPU_INTERRUPT_STACK_ALIGNMENT != 0 |
---|
| 1183 | #error "CONFIGURE_INTERRUPT_STACK_SIZE fails to meet the CPU port interrupt stack alignment" |
---|
| 1184 | #endif |
---|
| 1185 | |
---|
| 1186 | #ifdef CONFIGURE_INIT |
---|
| 1187 | RTEMS_DEFINE_GLOBAL_SYMBOL( |
---|
[ff081aee] | 1188 | _ISR_Stack_size, |
---|
[511dc4b] | 1189 | CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 1190 | ); |
---|
| 1191 | |
---|
[ff081aee] | 1192 | char _ISR_Stack_area_begin[ |
---|
[334e1d2] | 1193 | _CONFIGURE_MAXIMUM_PROCESSORS * CONFIGURE_INTERRUPT_STACK_SIZE |
---|
[511dc4b] | 1194 | ] RTEMS_ALIGNED( CPU_INTERRUPT_STACK_ALIGNMENT ) |
---|
| 1195 | RTEMS_SECTION( ".rtemsstack.interrupt.begin" ); |
---|
| 1196 | |
---|
[ff081aee] | 1197 | const char _ISR_Stack_area_end[ 0 ] |
---|
[511dc4b] | 1198 | RTEMS_SECTION( ".rtemsstack.interrupt.end" ) = { }; |
---|
[6aa25da] | 1199 | #endif |
---|
| 1200 | |
---|
[5877cc3a] | 1201 | /** |
---|
[27f071cd] | 1202 | * Configure the very much optional task stack allocator initialization |
---|
[976162a6] | 1203 | */ |
---|
[9fa3cf0d] | 1204 | #ifndef CONFIGURE_TASK_STACK_ALLOCATOR_INIT |
---|
| 1205 | #define CONFIGURE_TASK_STACK_ALLOCATOR_INIT NULL |
---|
[976162a6] | 1206 | #endif |
---|
| 1207 | |
---|
[9fa3cf0d] | 1208 | /* |
---|
| 1209 | * Configure the very much optional task stack allocator and deallocator. |
---|
[5877cc3a] | 1210 | */ |
---|
[9fa3cf0d] | 1211 | #if !defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ |
---|
| 1212 | && !defined(CONFIGURE_TASK_STACK_DEALLOCATOR) |
---|
[bfe6391] | 1213 | /** |
---|
| 1214 | * This specifies the task stack allocator method. |
---|
| 1215 | */ |
---|
[9fa3cf0d] | 1216 | #define CONFIGURE_TASK_STACK_ALLOCATOR _Workspace_Allocate |
---|
[bfe6391] | 1217 | /** |
---|
| 1218 | * This specifies the task stack deallocator method. |
---|
| 1219 | */ |
---|
[9fa3cf0d] | 1220 | #define CONFIGURE_TASK_STACK_DEALLOCATOR _Workspace_Free |
---|
| 1221 | #elif (defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ |
---|
| 1222 | && !defined(CONFIGURE_TASK_STACK_DEALLOCATOR)) \ |
---|
| 1223 | || (!defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ |
---|
| 1224 | && defined(CONFIGURE_TASK_STACK_DEALLOCATOR)) |
---|
| 1225 | #error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined" |
---|
[976162a6] | 1226 | #endif |
---|
[bfe6391] | 1227 | /**@}*/ /* end of thread/interrupt stack configuration */ |
---|
| 1228 | |
---|
| 1229 | /** |
---|
| 1230 | * @addtogroup Configuration |
---|
| 1231 | */ |
---|
| 1232 | /**@{*/ |
---|
[976162a6] | 1233 | |
---|
[5877cc3a] | 1234 | /** |
---|
[27f071cd] | 1235 | * Should the RTEMS Workspace and C Program Heap be cleared automatically |
---|
| 1236 | * at system start up? |
---|
[976162a6] | 1237 | */ |
---|
| 1238 | #ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 1239 | #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 1240 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \ |
---|
| 1241 | BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 1242 | #else |
---|
| 1243 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE |
---|
| 1244 | #endif |
---|
| 1245 | #endif |
---|
[bfe6391] | 1246 | /**@}*/ /* end of add to group Configuration */ |
---|
[976162a6] | 1247 | |
---|
[bfe6391] | 1248 | /** |
---|
| 1249 | * @defgroup ConfigurationMalloc RTEMS Malloc configuration |
---|
| 1250 | * |
---|
| 1251 | * This module contains parameters related to configuration of the RTEMS |
---|
| 1252 | * Malloc implementation. |
---|
[cfcc4e20] | 1253 | */ |
---|
[bfe6391] | 1254 | /**@{*/ |
---|
[cfcc4e20] | 1255 | #include <rtems/malloc.h> |
---|
| 1256 | |
---|
[bd5984de] | 1257 | #ifdef CONFIGURE_INIT |
---|
| 1258 | /** |
---|
[27f071cd] | 1259 | * By default, RTEMS uses separate heaps for the RTEMS Workspace and |
---|
[92b33b8d] | 1260 | * the C Program Heap. The application can choose optionally to combine |
---|
| 1261 | * these to provide one larger memory pool. This is particularly |
---|
[27f071cd] | 1262 | * useful in combination with the unlimited objects configuration. |
---|
[bd5984de] | 1263 | */ |
---|
| 1264 | #ifdef CONFIGURE_UNIFIED_WORK_AREAS |
---|
| 1265 | Heap_Control *RTEMS_Malloc_Heap = &_Workspace_Area; |
---|
| 1266 | #else |
---|
| 1267 | Heap_Control RTEMS_Malloc_Area; |
---|
| 1268 | Heap_Control *RTEMS_Malloc_Heap = &RTEMS_Malloc_Area; |
---|
| 1269 | #endif |
---|
| 1270 | #endif |
---|
| 1271 | |
---|
[cfcc4e20] | 1272 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1273 | /** |
---|
[27f071cd] | 1274 | * This configures the sbrk() support for the malloc family. |
---|
| 1275 | * By default it is assumed that the BSP provides all available |
---|
| 1276 | * RAM to the malloc family implementation so sbrk()'ing to get |
---|
| 1277 | * more memory would always fail anyway. |
---|
[5877cc3a] | 1278 | */ |
---|
[47a3cd8] | 1279 | const rtems_heap_extend_handler rtems_malloc_extend_handler = |
---|
| 1280 | #ifdef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 1281 | rtems_heap_extend_via_sbrk; |
---|
[cfcc4e20] | 1282 | #else |
---|
[47a3cd8] | 1283 | rtems_heap_null_extend; |
---|
[cfcc4e20] | 1284 | #endif |
---|
| 1285 | #endif |
---|
| 1286 | |
---|
[bfc54b0] | 1287 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1288 | /** |
---|
[27f071cd] | 1289 | * This configures the malloc family plugin which dirties memory |
---|
| 1290 | * allocated. This is helpful for finding unitialized data structure |
---|
| 1291 | * problems. |
---|
[5877cc3a] | 1292 | */ |
---|
[0de235f9] | 1293 | rtems_malloc_dirtier_t rtems_malloc_dirty_helper = |
---|
[bfc54b0] | 1294 | #if defined(CONFIGURE_MALLOC_DIRTY) |
---|
| 1295 | rtems_malloc_dirty_memory; |
---|
| 1296 | #else |
---|
| 1297 | NULL; |
---|
| 1298 | #endif |
---|
| 1299 | #endif |
---|
[bfe6391] | 1300 | /**@}*/ /* end of Malloc Configuration */ |
---|
| 1301 | |
---|
| 1302 | /** |
---|
| 1303 | * @defgroup ConfigurationHelpers Configuration Helpers |
---|
| 1304 | * |
---|
| 1305 | * @ingroup Configuration |
---|
| 1306 | * |
---|
| 1307 | * This module contains items which are used internally to ease |
---|
| 1308 | * the configuration calculations. |
---|
| 1309 | */ |
---|
| 1310 | /**@{*/ |
---|
[bfc54b0] | 1311 | |
---|
[6e4c01e] | 1312 | /** |
---|
| 1313 | * Zero of one returns 0 if the parameter is 0 else 1 is returned. |
---|
| 1314 | */ |
---|
[3ef7e744] | 1315 | #define _Configure_Zero_or_One(_number) ((_number) != 0 ? 1 : 0) |
---|
[6e4c01e] | 1316 | |
---|
[bfe6391] | 1317 | /** |
---|
[25e28d8] | 1318 | * General helper to align up a value. |
---|
[bfe6391] | 1319 | */ |
---|
[fb9e98e] | 1320 | #define _Configure_Align_up(_val, _align) \ |
---|
[25e28d8] | 1321 | (((_val) + (_align) - 1) - ((_val) + (_align) - 1) % (_align)) |
---|
| 1322 | |
---|
[07d71279] | 1323 | #define _CONFIGURE_HEAP_MIN_BLOCK_SIZE \ |
---|
[25e28d8] | 1324 | _Configure_Align_up(sizeof(Heap_Block), CPU_HEAP_ALIGNMENT) |
---|
[fb9e98e] | 1325 | |
---|
[5877cc3a] | 1326 | /** |
---|
[27f071cd] | 1327 | * This is a helper macro used in calculations in this file. It is used |
---|
| 1328 | * to noted when an element is allocated from the RTEMS Workspace and adds |
---|
| 1329 | * a factor to account for heap overhead plus an alignment factor that |
---|
| 1330 | * may be applied. |
---|
[5877cc3a] | 1331 | */ |
---|
| 1332 | #define _Configure_From_workspace(_size) \ |
---|
[25e28d8] | 1333 | (ssize_t) (_Configure_Zero_or_One(_size) * \ |
---|
| 1334 | _Configure_Align_up(_size + HEAP_BLOCK_HEADER_SIZE, \ |
---|
[07d71279] | 1335 | _CONFIGURE_HEAP_MIN_BLOCK_SIZE)) |
---|
[5877cc3a] | 1336 | |
---|
[9fa3cf0d] | 1337 | /** |
---|
[27f071cd] | 1338 | * This is a helper macro used in stack space calculations in this file. It |
---|
| 1339 | * may be provided by the application in case a special task stack allocator |
---|
| 1340 | * is used. The default is allocation from the RTEMS Workspace. |
---|
[9fa3cf0d] | 1341 | */ |
---|
| 1342 | #ifdef CONFIGURE_TASK_STACK_FROM_ALLOCATOR |
---|
| 1343 | #define _Configure_From_stackspace(_stack_size) \ |
---|
| 1344 | CONFIGURE_TASK_STACK_FROM_ALLOCATOR(_stack_size) |
---|
| 1345 | #else |
---|
| 1346 | #define _Configure_From_stackspace(_stack_size) \ |
---|
| 1347 | _Configure_From_workspace(_stack_size) |
---|
| 1348 | #endif |
---|
| 1349 | |
---|
[dee98ce] | 1350 | /** |
---|
[27f071cd] | 1351 | * Do not use the unlimited bit as part of the multiplication |
---|
| 1352 | * for memory usage. |
---|
[dee98ce] | 1353 | */ |
---|
| 1354 | #define _Configure_Max_Objects(_max) \ |
---|
[6e4c01e] | 1355 | (_Configure_Zero_or_One(_max) * rtems_resource_maximum_per_allocation(_max)) |
---|
[dee98ce] | 1356 | |
---|
[5877cc3a] | 1357 | /** |
---|
[27f071cd] | 1358 | * This macro accounts for how memory for a set of configured objects is |
---|
| 1359 | * allocated from the Executive Workspace. |
---|
[5877cc3a] | 1360 | * |
---|
[27f071cd] | 1361 | * NOTE: It does NOT attempt to address the more complex case of unlimited |
---|
| 1362 | * objects. |
---|
[5877cc3a] | 1363 | */ |
---|
[fb9e98e] | 1364 | #define _Configure_Object_RAM(_number, _size) ( \ |
---|
| 1365 | _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \ |
---|
[5877cc3a] | 1366 | _Configure_From_workspace( \ |
---|
[fb9e98e] | 1367 | _Configure_Zero_or_One(_number) * ( \ |
---|
| 1368 | (_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *) + \ |
---|
| 1369 | _Configure_Align_up(sizeof(void *), CPU_ALIGNMENT) + \ |
---|
| 1370 | _Configure_Align_up(sizeof(uint32_t), CPU_ALIGNMENT) \ |
---|
| 1371 | ) \ |
---|
[5877cc3a] | 1372 | ) \ |
---|
| 1373 | ) |
---|
[bfe6391] | 1374 | /**@}*/ |
---|
[5877cc3a] | 1375 | |
---|
[bfe6391] | 1376 | /** |
---|
| 1377 | * @defgroup ConfigurationInitTasksTable Initialization Tasks Configuration |
---|
| 1378 | * |
---|
| 1379 | * @addtogroup Configuration |
---|
| 1380 | * |
---|
| 1381 | * This group contains the elements needed to define the Classic API |
---|
| 1382 | * Initialization Tasks Table. |
---|
| 1383 | * |
---|
[c232b37] | 1384 | * Default User Initialization Task Table. This table guarantees that |
---|
| 1385 | * one user initialization table is defined. |
---|
| 1386 | * |
---|
| 1387 | * WHEN CONFIGURE_HAS_OWN_INIT_TASK_TABLE is defined, the user is |
---|
| 1388 | * responsible for defining their own table information and setting the |
---|
[be1c11ed] | 1389 | * appropriate variables. |
---|
| 1390 | */ |
---|
[c232b37] | 1391 | #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 1392 | !defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE) |
---|
[08bae5e6] | 1393 | |
---|
[bfe6391] | 1394 | /** |
---|
| 1395 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1396 | * used to specify the name of the single Classic API task. |
---|
| 1397 | */ |
---|
[08bae5e6] | 1398 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
[5877cc3a] | 1399 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name('U', 'I', '1', ' ') |
---|
[08bae5e6] | 1400 | #endif |
---|
| 1401 | |
---|
[bfe6391] | 1402 | /** |
---|
| 1403 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1404 | * used to specify the stack size of the single Classic API task. |
---|
| 1405 | */ |
---|
[08bae5e6] | 1406 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
[ecf0f4c] | 1407 | #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[08bae5e6] | 1408 | #endif |
---|
| 1409 | |
---|
[bfe6391] | 1410 | /** |
---|
| 1411 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1412 | * used to specify the priority of the single Classic API task. |
---|
| 1413 | */ |
---|
[08bae5e6] | 1414 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
[5877cc3a] | 1415 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
[08bae5e6] | 1416 | #endif |
---|
| 1417 | |
---|
[bfe6391] | 1418 | /** |
---|
| 1419 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1420 | * used to specify the attributes size of the single Classic API task. |
---|
| 1421 | */ |
---|
[08bae5e6] | 1422 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
[5877cc3a] | 1423 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
[08bae5e6] | 1424 | #endif |
---|
| 1425 | |
---|
[bfe6391] | 1426 | /** |
---|
| 1427 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1428 | * used to specify the entry point of the single Classic API task. |
---|
| 1429 | */ |
---|
[08bae5e6] | 1430 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
[d8b74dbe] | 1431 | #ifdef __cplusplus |
---|
| 1432 | extern "C" { |
---|
| 1433 | #endif |
---|
| 1434 | rtems_task Init (rtems_task_argument ); |
---|
| 1435 | #ifdef __cplusplus |
---|
| 1436 | } |
---|
| 1437 | #endif |
---|
[5877cc3a] | 1438 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
[d8b74dbe] | 1439 | extern const char* bsp_boot_cmdline; |
---|
| 1440 | #define CONFIGURE_INIT_TASK_ARGUMENTS ((rtems_task_argument) &bsp_boot_cmdline) |
---|
[08bae5e6] | 1441 | #endif |
---|
| 1442 | |
---|
[bfe6391] | 1443 | /** |
---|
| 1444 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1445 | * used to specify the initial execution mode of the single Classic API task. |
---|
| 1446 | */ |
---|
[08bae5e6] | 1447 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
[f95fa387] | 1448 | #ifdef _CONFIGURE_SMP_APPLICATION |
---|
[05e82bd7] | 1449 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_DEFAULT_MODES |
---|
| 1450 | #else |
---|
| 1451 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
| 1452 | #endif |
---|
[08bae5e6] | 1453 | #endif |
---|
| 1454 | |
---|
[bfe6391] | 1455 | /** |
---|
| 1456 | * When using the default Classic API Initialization Tasks Table, this is |
---|
| 1457 | * used to specify the initial argument to the single Classic API task. |
---|
| 1458 | */ |
---|
[08bae5e6] | 1459 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
[5877cc3a] | 1460 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
[08bae5e6] | 1461 | #endif |
---|
| 1462 | |
---|
| 1463 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1464 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 1465 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 1466 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 1467 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 1468 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 1469 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 1470 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 1471 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 1472 | } |
---|
| 1473 | }; |
---|
[08bae5e6] | 1474 | #endif |
---|
| 1475 | |
---|
[bfe6391] | 1476 | /** |
---|
| 1477 | * This is the name of the Initialization Tasks Table generated. |
---|
| 1478 | */ |
---|
[d9a0689e] | 1479 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
| 1480 | |
---|
[07d71279] | 1481 | /* |
---|
[bfe6391] | 1482 | * This is the size of the Initialization Tasks Table generated. |
---|
| 1483 | */ |
---|
[d9a0689e] | 1484 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
[9ed2bef] | 1485 | RTEMS_ARRAY_SIZE(CONFIGURE_INIT_TASK_TABLE) |
---|
[d9a0689e] | 1486 | |
---|
[be1c11ed] | 1487 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
[c232b37] | 1488 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 1489 | |
---|
| 1490 | /* |
---|
| 1491 | * The user application is responsible for defining everything |
---|
| 1492 | * when CONFIGURE_HAS_OWN_INIT_TABLE is defined. |
---|
| 1493 | */ |
---|
| 1494 | #else /* not using standard or providing own Init Task Table */ |
---|
[be1c11ed] | 1495 | |
---|
[07d71279] | 1496 | /* |
---|
[bfe6391] | 1497 | * This is the name of the Initialization Task when none is configured. |
---|
| 1498 | */ |
---|
[be1c11ed] | 1499 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
[bfe6391] | 1500 | |
---|
[07d71279] | 1501 | /* |
---|
[bfe6391] | 1502 | * This is the size of the Initialization Task when none is configured. |
---|
| 1503 | */ |
---|
[be1c11ed] | 1504 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
[bfe6391] | 1505 | |
---|
[07d71279] | 1506 | /* |
---|
[bfe6391] | 1507 | * This is the stack size of the Initialization Task when none is configured. |
---|
| 1508 | */ |
---|
[45c3da3] | 1509 | #define CONFIGURE_INIT_TASK_STACK_SIZE 0 |
---|
[be1c11ed] | 1510 | |
---|
[c232b37] | 1511 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 1512 | |
---|
[08bae5e6] | 1513 | #endif |
---|
[bfe6391] | 1514 | /**@}*/ /* end of Classic API Initialization Tasks Table */ |
---|
[08bae5e6] | 1515 | |
---|
[bfe6391] | 1516 | /** |
---|
| 1517 | * @defgroup ConfigurationDriverTable Device Driver Table Configuration |
---|
| 1518 | * |
---|
| 1519 | * @addtogroup Configuration |
---|
| 1520 | * |
---|
| 1521 | * This group contains parameters related to generating a Device Driver |
---|
| 1522 | * Table. |
---|
| 1523 | * |
---|
| 1524 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
| 1525 | * choosen by the application. There is always a null driver entry. |
---|
[08bae5e6] | 1526 | */ |
---|
[bfe6391] | 1527 | /**@{*/ |
---|
[08bae5e6] | 1528 | |
---|
[bfe6391] | 1529 | /** |
---|
| 1530 | * This is an empty device driver slot. |
---|
| 1531 | */ |
---|
[08bae5e6] | 1532 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 1533 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 1534 | |
---|
[337a186] | 1535 | #if (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
| 1536 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER)) || \ |
---|
| 1537 | (defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
| 1538 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) || \ |
---|
| 1539 | (defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER) && \ |
---|
| 1540 | defined(CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER)) |
---|
| 1541 | #error "CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER, CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER, and CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER are mutually exclusive" |
---|
[ac28f15] | 1542 | #endif |
---|
| 1543 | |
---|
[df49c60] | 1544 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
[5877cc3a] | 1545 | #include <rtems/console.h> |
---|
[df49c60] | 1546 | #endif |
---|
| 1547 | |
---|
[ac28f15] | 1548 | #ifdef CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER |
---|
| 1549 | #include <rtems/console.h> |
---|
| 1550 | |
---|
| 1551 | #ifdef CONFIGURE_INIT |
---|
| 1552 | RTEMS_SYSINIT_ITEM( |
---|
| 1553 | _Console_simple_Initialize, |
---|
| 1554 | RTEMS_SYSINIT_DEVICE_DRIVERS, |
---|
[337a186] | 1555 | RTEMS_SYSINIT_ORDER_SECOND |
---|
| 1556 | ); |
---|
| 1557 | #endif |
---|
| 1558 | #endif |
---|
| 1559 | |
---|
| 1560 | #ifdef CONFIGURE_APPLICATION_NEEDS_SIMPLE_TASK_CONSOLE_DRIVER |
---|
| 1561 | #include <rtems/console.h> |
---|
| 1562 | |
---|
| 1563 | #ifdef CONFIGURE_INIT |
---|
| 1564 | RTEMS_SYSINIT_ITEM( |
---|
| 1565 | _Console_simple_task_Initialize, |
---|
| 1566 | RTEMS_SYSINIT_DEVICE_DRIVERS, |
---|
[ac28f15] | 1567 | RTEMS_SYSINIT_ORDER_SECOND |
---|
| 1568 | ); |
---|
| 1569 | #endif |
---|
| 1570 | #endif |
---|
| 1571 | |
---|
[df49c60] | 1572 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[5877cc3a] | 1573 | #include <rtems/clockdrv.h> |
---|
[df49c60] | 1574 | #endif |
---|
| 1575 | |
---|
| 1576 | #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
[8fbe2e6] | 1577 | #include <rtems/btimer.h> |
---|
[08bae5e6] | 1578 | #endif |
---|
| 1579 | |
---|
[1d4bac9] | 1580 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
[5877cc3a] | 1581 | #include <rtems/rtc.h> |
---|
[1d4bac9] | 1582 | #endif |
---|
| 1583 | |
---|
[d2018f71] | 1584 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
[5877cc3a] | 1585 | #include <rtems/watchdogdrv.h> |
---|
[d2018f71] | 1586 | #endif |
---|
| 1587 | |
---|
[ad4759ab] | 1588 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 1589 | #include <rtems/framebuffer.h> |
---|
| 1590 | #endif |
---|
| 1591 | |
---|
[df49c60] | 1592 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
[5877cc3a] | 1593 | #include <rtems/devnull.h> |
---|
[08bae5e6] | 1594 | #endif |
---|
| 1595 | |
---|
[5af951f] | 1596 | #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER |
---|
| 1597 | #include <rtems/devzero.h> |
---|
| 1598 | #endif |
---|
| 1599 | |
---|
[c9b005a9] | 1600 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 1601 | /* the ide driver needs the ATA driver */ |
---|
[5877cc3a] | 1602 | #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1603 | #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1604 | #endif |
---|
| 1605 | #include <libchip/ide_ctrl.h> |
---|
[c9b005a9] | 1606 | #endif |
---|
| 1607 | |
---|
| 1608 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
[5877cc3a] | 1609 | #include <libchip/ata.h> |
---|
[c9b005a9] | 1610 | #endif |
---|
| 1611 | |
---|
[08bae5e6] | 1612 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 1613 | |
---|
[263f4bec] | 1614 | /** |
---|
| 1615 | * This specifies the maximum number of device drivers that |
---|
| 1616 | * can be installed in the system at one time. It must account |
---|
| 1617 | * for both the statically and dynamically installed drivers. |
---|
| 1618 | */ |
---|
| 1619 | #ifndef CONFIGURE_MAXIMUM_DRIVERS |
---|
| 1620 | #define CONFIGURE_MAXIMUM_DRIVERS |
---|
| 1621 | #endif |
---|
| 1622 | |
---|
[08bae5e6] | 1623 | #ifdef CONFIGURE_INIT |
---|
[263f4bec] | 1624 | rtems_driver_address_table |
---|
| 1625 | _IO_Driver_address_table[ CONFIGURE_MAXIMUM_DRIVERS ] = { |
---|
[09daf222] | 1626 | #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS |
---|
| 1627 | CONFIGURE_BSP_PREREQUISITE_DRIVERS, |
---|
| 1628 | #endif |
---|
| 1629 | #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS |
---|
| 1630 | CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS, |
---|
| 1631 | #endif |
---|
[5877cc3a] | 1632 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
| 1633 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 1634 | #endif |
---|
| 1635 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
| 1636 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 1637 | #endif |
---|
| 1638 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
| 1639 | RTC_DRIVER_TABLE_ENTRY, |
---|
| 1640 | #endif |
---|
| 1641 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
| 1642 | WATCHDOG_DRIVER_TABLE_ENTRY, |
---|
| 1643 | #endif |
---|
| 1644 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
| 1645 | DEVNULL_DRIVER_TABLE_ENTRY, |
---|
| 1646 | #endif |
---|
[5af951f] | 1647 | #ifdef CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER |
---|
| 1648 | DEVZERO_DRIVER_TABLE_ENTRY, |
---|
| 1649 | #endif |
---|
[5877cc3a] | 1650 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 1651 | IDE_CONTROLLER_DRIVER_TABLE_ENTRY, |
---|
| 1652 | #endif |
---|
| 1653 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1654 | ATA_DRIVER_TABLE_ENTRY, |
---|
| 1655 | #endif |
---|
[ad4759ab] | 1656 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 1657 | FRAME_BUFFER_DRIVER_TABLE_ENTRY, |
---|
| 1658 | #endif |
---|
[5877cc3a] | 1659 | #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS |
---|
| 1660 | CONFIGURE_APPLICATION_EXTRA_DRIVERS, |
---|
| 1661 | #endif |
---|
| 1662 | #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER |
---|
| 1663 | NULL_DRIVER_TABLE_ENTRY |
---|
| 1664 | #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
[4175abd] | 1665 | !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 1666 | !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ |
---|
| 1667 | !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \ |
---|
[5af951f] | 1668 | !defined(CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER) && \ |
---|
[4175abd] | 1669 | !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \ |
---|
| 1670 | !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \ |
---|
[ad4759ab] | 1671 | !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \ |
---|
[4175abd] | 1672 | !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) |
---|
[5877cc3a] | 1673 | NULL_DRIVER_TABLE_ENTRY |
---|
| 1674 | #endif |
---|
| 1675 | }; |
---|
[08bae5e6] | 1676 | |
---|
[263f4bec] | 1677 | const size_t _IO_Number_of_drivers = |
---|
| 1678 | RTEMS_ARRAY_SIZE( _IO_Driver_address_table ); |
---|
[059a3714] | 1679 | #endif |
---|
| 1680 | |
---|
[263f4bec] | 1681 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
[08bae5e6] | 1682 | |
---|
[c9b005a9] | 1683 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 1684 | /* |
---|
| 1685 | * configure the priority of the ATA driver task |
---|
| 1686 | */ |
---|
[5877cc3a] | 1687 | #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY |
---|
| 1688 | #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY |
---|
| 1689 | #endif |
---|
| 1690 | #ifdef CONFIGURE_INIT |
---|
[3899a537] | 1691 | rtems_task_priority rtems_ata_driver_task_priority |
---|
[5877cc3a] | 1692 | = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; |
---|
| 1693 | #endif /* CONFIGURE_INIT */ |
---|
[c9b005a9] | 1694 | #endif |
---|
[bfe6391] | 1695 | /**@}*/ /* end of Device Driver Table Configuration */ |
---|
[c9b005a9] | 1696 | |
---|
[bfe6391] | 1697 | /** |
---|
| 1698 | * @defgroup ConfigurationLibBlock Configuration of LIBBLOCK |
---|
| 1699 | * |
---|
| 1700 | * @addtogroup Configuration |
---|
| 1701 | * |
---|
| 1702 | * This module contains parameters related to the LIBBLOCK buffering |
---|
| 1703 | * and caching subsystem. It requires tasks to swap out data to be |
---|
| 1704 | * written to non-volatile storage. |
---|
[c9b005a9] | 1705 | */ |
---|
[bfe6391] | 1706 | /**@{*/ |
---|
[c9b005a9] | 1707 | #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
[5877cc3a] | 1708 | #include <rtems/bdbuf.h> |
---|
| 1709 | /* |
---|
[3899a537] | 1710 | * configure the bdbuf cache parameters |
---|
[5877cc3a] | 1711 | */ |
---|
[3899a537] | 1712 | #ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS |
---|
| 1713 | #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \ |
---|
| 1714 | RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT |
---|
| 1715 | #endif |
---|
| 1716 | #ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS |
---|
| 1717 | #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \ |
---|
| 1718 | RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT |
---|
| 1719 | #endif |
---|
[5877cc3a] | 1720 | #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY |
---|
[3899a537] | 1721 | #define CONFIGURE_SWAPOUT_TASK_PRIORITY \ |
---|
| 1722 | RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT |
---|
| 1723 | #endif |
---|
| 1724 | #ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD |
---|
| 1725 | #define CONFIGURE_SWAPOUT_SWAP_PERIOD \ |
---|
| 1726 | RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT |
---|
| 1727 | #endif |
---|
| 1728 | #ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD |
---|
| 1729 | #define CONFIGURE_SWAPOUT_BLOCK_HOLD \ |
---|
| 1730 | RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT |
---|
[5877cc3a] | 1731 | #endif |
---|
[0d15414e] | 1732 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS |
---|
| 1733 | #define CONFIGURE_SWAPOUT_WORKER_TASKS \ |
---|
| 1734 | RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT |
---|
| 1735 | #endif |
---|
| 1736 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY |
---|
| 1737 | #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \ |
---|
| 1738 | RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT |
---|
| 1739 | #endif |
---|
[b6911069] | 1740 | #ifndef CONFIGURE_BDBUF_TASK_STACK_SIZE |
---|
| 1741 | #define CONFIGURE_BDBUF_TASK_STACK_SIZE \ |
---|
| 1742 | RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT |
---|
| 1743 | #endif |
---|
[0d15414e] | 1744 | #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE |
---|
| 1745 | #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \ |
---|
| 1746 | RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT |
---|
| 1747 | #endif |
---|
| 1748 | #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE |
---|
| 1749 | #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \ |
---|
| 1750 | RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT |
---|
| 1751 | #endif |
---|
| 1752 | #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE |
---|
| 1753 | #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \ |
---|
| 1754 | RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT |
---|
| 1755 | #endif |
---|
[39ee704e] | 1756 | #ifndef CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY |
---|
| 1757 | #define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY \ |
---|
| 1758 | RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT |
---|
| 1759 | #endif |
---|
[5877cc3a] | 1760 | #ifdef CONFIGURE_INIT |
---|
[28352fae] | 1761 | const rtems_bdbuf_config rtems_bdbuf_configuration = { |
---|
[3899a537] | 1762 | CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS, |
---|
| 1763 | CONFIGURE_BDBUF_MAX_WRITE_BLOCKS, |
---|
| 1764 | CONFIGURE_SWAPOUT_TASK_PRIORITY, |
---|
| 1765 | CONFIGURE_SWAPOUT_SWAP_PERIOD, |
---|
[0d15414e] | 1766 | CONFIGURE_SWAPOUT_BLOCK_HOLD, |
---|
| 1767 | CONFIGURE_SWAPOUT_WORKER_TASKS, |
---|
| 1768 | CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY, |
---|
[b6911069] | 1769 | CONFIGURE_BDBUF_TASK_STACK_SIZE, |
---|
[0d15414e] | 1770 | CONFIGURE_BDBUF_CACHE_MEMORY_SIZE, |
---|
| 1771 | CONFIGURE_BDBUF_BUFFER_MIN_SIZE, |
---|
[39ee704e] | 1772 | CONFIGURE_BDBUF_BUFFER_MAX_SIZE, |
---|
| 1773 | CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY |
---|
[3899a537] | 1774 | }; |
---|
[5877cc3a] | 1775 | #endif |
---|
[b2f216e1] | 1776 | |
---|
[07d71279] | 1777 | #define _CONFIGURE_LIBBLOCK_TASKS \ |
---|
[39ee704e] | 1778 | (1 + CONFIGURE_SWAPOUT_WORKER_TASKS + \ |
---|
| 1779 | (CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS != 0)) |
---|
[b6911069] | 1780 | |
---|
[07d71279] | 1781 | #define _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS \ |
---|
| 1782 | (_CONFIGURE_LIBBLOCK_TASKS * \ |
---|
[b6911069] | 1783 | (CONFIGURE_BDBUF_TASK_STACK_SIZE <= CONFIGURE_MINIMUM_TASK_STACK_SIZE ? \ |
---|
| 1784 | 0 : CONFIGURE_BDBUF_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)) |
---|
| 1785 | |
---|
[0d15414e] | 1786 | #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \ |
---|
| 1787 | defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \ |
---|
| 1788 | defined(CONFIGURE_BDBUF_BUFFER_COUNT) |
---|
| 1789 | #error BDBUF Cache does not use a buffer configuration table. Please remove. |
---|
| 1790 | #endif |
---|
[b2f216e1] | 1791 | #else |
---|
[bfe6391] | 1792 | /** This specifies the number of libblock tasks. */ |
---|
[07d71279] | 1793 | #define _CONFIGURE_LIBBLOCK_TASKS 0 |
---|
[bfe6391] | 1794 | /** This specifies the extra stack space configured for libblock tasks. */ |
---|
[07d71279] | 1795 | #define _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS 0 |
---|
[bfe6391] | 1796 | /** This specifies the number of Classic API semaphores needed by libblock. */ |
---|
[c9b005a9] | 1797 | #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */ |
---|
[bfe6391] | 1798 | /**@}*/ |
---|
[976162a6] | 1799 | |
---|
[bfe6391] | 1800 | /** |
---|
| 1801 | * @defgroup ConfigurationMultiprocessing Multiprocessing Configuration |
---|
| 1802 | * |
---|
| 1803 | * @addtogroup Configuration |
---|
| 1804 | * |
---|
| 1805 | * This module contains the parameters related to the Multiprocessing |
---|
| 1806 | * configuration of RTEMS. |
---|
| 1807 | * |
---|
| 1808 | * In a single processor or SMP configuration, only two parameters are |
---|
| 1809 | * needed and they are defaulted. The user should not have to specify |
---|
| 1810 | * any parameters. |
---|
| 1811 | */ |
---|
| 1812 | /**@{*/ |
---|
| 1813 | |
---|
| 1814 | /** |
---|
| 1815 | * This defines the extra stack space required for the MPCI server thread. |
---|
| 1816 | */ |
---|
[b4f635e] | 1817 | #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK |
---|
| 1818 | #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0 |
---|
| 1819 | #endif |
---|
| 1820 | |
---|
[976162a6] | 1821 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[5877cc3a] | 1822 | /* |
---|
| 1823 | * Default Multiprocessing Configuration Table. The defaults are |
---|
| 1824 | * appropriate for most of the RTEMS Multiprocessor Test Suite. Each |
---|
| 1825 | * value may be overridden within each test to customize the environment. |
---|
| 1826 | */ |
---|
[08bae5e6] | 1827 | |
---|
[5877cc3a] | 1828 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[07d71279] | 1829 | #define _CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 1 |
---|
[f0f450a] | 1830 | |
---|
[5877cc3a] | 1831 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
[08bae5e6] | 1832 | |
---|
[5877cc3a] | 1833 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 1834 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 1835 | #endif |
---|
[08bae5e6] | 1836 | |
---|
[5877cc3a] | 1837 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
[4175abd] | 1838 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
[5877cc3a] | 1839 | #endif |
---|
[08bae5e6] | 1840 | |
---|
[5877cc3a] | 1841 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
[4175abd] | 1842 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
[5877cc3a] | 1843 | #endif |
---|
[07d71279] | 1844 | #define _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
[4182b6f] | 1845 | _Configure_From_workspace( \ |
---|
| 1846 | (_global_objects) * sizeof(Objects_MP_Control) \ |
---|
| 1847 | ) |
---|
[08bae5e6] | 1848 | |
---|
[5877cc3a] | 1849 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
[4175abd] | 1850 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
[5877cc3a] | 1851 | #endif |
---|
[07d71279] | 1852 | #define _CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
[16832b0] | 1853 | _Configure_From_workspace((_proxies) \ |
---|
| 1854 | * (sizeof(Thread_Proxy_control) \ |
---|
[61d5c886] | 1855 | + THREAD_QUEUE_HEADS_SIZE(_CONFIGURE_SCHEDULER_COUNT))) |
---|
[08bae5e6] | 1856 | |
---|
[5877cc3a] | 1857 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
[4175abd] | 1858 | #include <mpci.h> |
---|
| 1859 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
[5877cc3a] | 1860 | #endif |
---|
[08bae5e6] | 1861 | |
---|
[5877cc3a] | 1862 | #ifdef CONFIGURE_INIT |
---|
[4175abd] | 1863 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
| 1864 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 1865 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */ |
---|
| 1866 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 1867 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 1868 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */ |
---|
| 1869 | CONFIGURE_MP_MPCI_TABLE_POINTER /* ptr to MPCI config table */ |
---|
| 1870 | }; |
---|
[5877cc3a] | 1871 | #endif |
---|
[08bae5e6] | 1872 | |
---|
[5877cc3a] | 1873 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
[08bae5e6] | 1874 | |
---|
[07d71279] | 1875 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 1 |
---|
[9a972889] | 1876 | |
---|
[5877cc3a] | 1877 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */ |
---|
| 1878 | #else |
---|
[2c65588] | 1879 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
| 1880 | #define _CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 0 |
---|
[07d71279] | 1881 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0 |
---|
[5877cc3a] | 1882 | #endif /* CONFIGURE_MP_APPLICATION */ |
---|
[9a972889] | 1883 | #else |
---|
[2c65588] | 1884 | #define _CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 0 |
---|
[07d71279] | 1885 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0 |
---|
[976162a6] | 1886 | #endif /* RTEMS_MULTIPROCESSING */ |
---|
[bfe6391] | 1887 | /**@}*/ /* end of Multiprocessing Configuration */ |
---|
[913ede4f] | 1888 | |
---|
[e53aae2] | 1889 | /** |
---|
| 1890 | * This macro specifies that the user wants to use unlimited objects for any |
---|
| 1891 | * classic or posix objects that have not already been given resource limits. |
---|
| 1892 | */ |
---|
| 1893 | #if defined(CONFIGURE_UNLIMITED_OBJECTS) |
---|
[2c1e7ff] | 1894 | #if !defined(CONFIGURE_UNIFIED_WORK_AREAS) && \ |
---|
| 1895 | !defined(CONFIGURE_EXECUTIVE_RAM_SIZE) && \ |
---|
| 1896 | !defined(CONFIGURE_MEMORY_OVERHEAD) |
---|
| 1897 | #error "CONFIGURE_UNLIMITED_OBJECTS requires a unified work area, an executive RAM size, or a defined workspace memory overhead" |
---|
| 1898 | #endif |
---|
| 1899 | |
---|
[e53aae2] | 1900 | #if !defined(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1901 | /** |
---|
| 1902 | * This macro specifies a default allocation size for when auto-extending |
---|
| 1903 | * unlimited objects if none was given by the user. |
---|
| 1904 | */ |
---|
| 1905 | #define CONFIGURE_UNLIMITED_ALLOCATION_SIZE 8 |
---|
| 1906 | #endif |
---|
| 1907 | #if !defined(CONFIGURE_MAXIMUM_TASKS) |
---|
| 1908 | #define CONFIGURE_MAXIMUM_TASKS \ |
---|
| 1909 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1910 | #endif |
---|
| 1911 | #if !defined(CONFIGURE_MAXIMUM_TIMERS) |
---|
| 1912 | #define CONFIGURE_MAXIMUM_TIMERS \ |
---|
| 1913 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1914 | #endif |
---|
| 1915 | #if !defined(CONFIGURE_MAXIMUM_SEMAPHORES) |
---|
| 1916 | #define CONFIGURE_MAXIMUM_SEMAPHORES \ |
---|
| 1917 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1918 | #endif |
---|
| 1919 | #if !defined(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) |
---|
| 1920 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES \ |
---|
| 1921 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1922 | #endif |
---|
| 1923 | #if !defined(CONFIGURE_MAXIMUM_PARTITIONS) |
---|
| 1924 | #define CONFIGURE_MAXIMUM_PARTITIONS \ |
---|
| 1925 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1926 | #endif |
---|
| 1927 | #if !defined(CONFIGURE_MAXIMUM_REGIONS) |
---|
| 1928 | #define CONFIGURE_MAXIMUM_REGIONS \ |
---|
| 1929 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1930 | #endif |
---|
| 1931 | #if !defined(CONFIGURE_MAXIMUM_PORTS) |
---|
| 1932 | #define CONFIGURE_MAXIMUM_PORTS \ |
---|
| 1933 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1934 | #endif |
---|
| 1935 | #if !defined(CONFIGURE_MAXIMUM_PERIODS) |
---|
| 1936 | #define CONFIGURE_MAXIMUM_PERIODS \ |
---|
| 1937 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1938 | #endif |
---|
| 1939 | #if !defined(CONFIGURE_MAXIMUM_BARRIERS) |
---|
| 1940 | #define CONFIGURE_MAXIMUM_BARRIERS \ |
---|
| 1941 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1942 | #endif |
---|
[0e98970] | 1943 | #if !defined(CONFIGURE_MAXIMUM_POSIX_KEYS) |
---|
| 1944 | #define CONFIGURE_MAXIMUM_POSIX_KEYS \ |
---|
| 1945 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1946 | #endif |
---|
| 1947 | #if !defined(CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS) |
---|
| 1948 | #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \ |
---|
| 1949 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1950 | #endif |
---|
[fe7aefd5] | 1951 | #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) |
---|
| 1952 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \ |
---|
| 1953 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1954 | #endif |
---|
[9318cfb0] | 1955 | #if !defined(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) |
---|
| 1956 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES \ |
---|
| 1957 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1958 | #endif |
---|
[701057e0] | 1959 | #if !defined(CONFIGURE_MAXIMUM_POSIX_SHMS) |
---|
| 1960 | #define CONFIGURE_MAXIMUM_POSIX_SHMS \ |
---|
| 1961 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1962 | #endif |
---|
[54f35888] | 1963 | #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS) |
---|
| 1964 | #define CONFIGURE_MAXIMUM_POSIX_THREADS \ |
---|
| 1965 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1966 | #endif |
---|
[e53aae2] | 1967 | |
---|
| 1968 | #ifdef RTEMS_POSIX_API |
---|
| 1969 | #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS) |
---|
| 1970 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS \ |
---|
| 1971 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1972 | #endif |
---|
| 1973 | /* |
---|
| 1974 | #if !defined(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) |
---|
| 1975 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS \ |
---|
| 1976 | rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE) |
---|
| 1977 | #endif |
---|
| 1978 | */ |
---|
| 1979 | #endif /* RTEMS_POSIX_API */ |
---|
| 1980 | #endif /* CONFIGURE_UNLIMITED_OBJECTS */ |
---|
| 1981 | |
---|
| 1982 | |
---|
[bfe6391] | 1983 | /** |
---|
| 1984 | * @defgroup ConfigurationClassicAPI Classic API Configuration |
---|
| 1985 | * |
---|
| 1986 | * @ingroup Configuration |
---|
| 1987 | * |
---|
| 1988 | * This module contains the parameters related to configuration |
---|
| 1989 | * of the Classic API services. |
---|
[08bae5e6] | 1990 | */ |
---|
[bfe6391] | 1991 | /**@{*/ |
---|
[8486081] | 1992 | |
---|
[68f339b6] | 1993 | /** This configures the maximum number of Classic API tasks. */ |
---|
| 1994 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 1995 | #define CONFIGURE_MAXIMUM_TASKS 0 |
---|
| 1996 | #endif |
---|
| 1997 | |
---|
| 1998 | /* |
---|
| 1999 | * This is calculated to account for the maximum number of Classic API |
---|
| 2000 | * tasks used by the application and configured RTEMS capabilities. |
---|
| 2001 | */ |
---|
| 2002 | #define _CONFIGURE_TASKS \ |
---|
| 2003 | (CONFIGURE_MAXIMUM_TASKS + _CONFIGURE_LIBBLOCK_TASKS) |
---|
[08bae5e6] | 2004 | |
---|
[68f339b6] | 2005 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
| 2006 | /** This specifies the maximum number of Classic API timers. */ |
---|
| 2007 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
[07d71279] | 2008 | /* |
---|
[68f339b6] | 2009 | * This macro is calculated to specify the memory required for |
---|
| 2010 | * Classic API timers. |
---|
[bfe6391] | 2011 | */ |
---|
[68f339b6] | 2012 | #define _CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0 |
---|
| 2013 | #else |
---|
| 2014 | #define _CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
| 2015 | _Configure_Object_RAM(_timers, sizeof(Timer_Control) ) |
---|
| 2016 | #endif |
---|
[b6911069] | 2017 | |
---|
[68f339b6] | 2018 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
| 2019 | /** This specifies the maximum number of Classic API semaphores. */ |
---|
| 2020 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 2021 | #endif |
---|
[08bae5e6] | 2022 | |
---|
[68f339b6] | 2023 | /* |
---|
| 2024 | * This macro is calculated to specify the memory required for |
---|
| 2025 | * Classic API Semaphores using MRSP. This is only available in |
---|
| 2026 | * SMP configurations. |
---|
| 2027 | */ |
---|
| 2028 | #if !defined(RTEMS_SMP) || \ |
---|
| 2029 | !defined(CONFIGURE_MAXIMUM_MRSP_SEMAPHORES) |
---|
| 2030 | #define _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES 0 |
---|
| 2031 | #else |
---|
| 2032 | #define _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES \ |
---|
| 2033 | CONFIGURE_MAXIMUM_MRSP_SEMAPHORES * \ |
---|
| 2034 | _Configure_From_workspace( \ |
---|
| 2035 | RTEMS_ARRAY_SIZE(_Scheduler_Table) * sizeof(Priority_Control) \ |
---|
| 2036 | ) |
---|
| 2037 | #endif |
---|
[f2a776ac] | 2038 | |
---|
[68f339b6] | 2039 | /* |
---|
| 2040 | * This macro is calculated to specify the memory required for |
---|
| 2041 | * Classic API Semaphores. |
---|
| 2042 | * |
---|
| 2043 | * If there are no user or support semaphores defined, then we can assume |
---|
| 2044 | * that no memory need be allocated at all for semaphores. |
---|
| 2045 | */ |
---|
| 2046 | #if CONFIGURE_MAXIMUM_SEMAPHORES == 0 |
---|
| 2047 | #define _CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0 |
---|
| 2048 | #else |
---|
| 2049 | #define _CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
| 2050 | _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) ) + \ |
---|
| 2051 | _CONFIGURE_MEMORY_FOR_MRSP_SEMAPHORES |
---|
| 2052 | #endif |
---|
| 2053 | |
---|
| 2054 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
| 2055 | /** |
---|
| 2056 | * This configuration parameter specifies the maximum number of |
---|
| 2057 | * Classic API Message Queues. |
---|
| 2058 | */ |
---|
| 2059 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 2060 | /* |
---|
| 2061 | * This macro is calculated to specify the RTEMS Workspace required for |
---|
| 2062 | * the Classic API Message Queues. |
---|
| 2063 | */ |
---|
| 2064 | #define _CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0 |
---|
| 2065 | #else |
---|
| 2066 | #define _CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
| 2067 | _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) ) |
---|
| 2068 | #endif |
---|
| 2069 | |
---|
| 2070 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
| 2071 | /** |
---|
| 2072 | * This configuration parameter specifies the maximum number of |
---|
| 2073 | * Classic API Partitions. |
---|
| 2074 | */ |
---|
| 2075 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
[07d71279] | 2076 | /* |
---|
[bfe6391] | 2077 | * This macro is calculated to specify the memory required for |
---|
[68f339b6] | 2078 | * Classic API |
---|
[bfe6391] | 2079 | */ |
---|
[68f339b6] | 2080 | #define _CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0 |
---|
| 2081 | #else |
---|
| 2082 | #define _CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
| 2083 | _Configure_Object_RAM(_partitions, sizeof(Partition_Control) ) |
---|
| 2084 | #endif |
---|
[8fcafdd5] | 2085 | |
---|
[68f339b6] | 2086 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
| 2087 | /** |
---|
| 2088 | * This configuration parameter specifies the maximum number of |
---|
| 2089 | * Classic API Regions. |
---|
| 2090 | */ |
---|
| 2091 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
[07d71279] | 2092 | /* |
---|
[bfe6391] | 2093 | * This macro is calculated to specify the memory required for |
---|
[68f339b6] | 2094 | * Classic API Regions. |
---|
[f2a776ac] | 2095 | */ |
---|
[68f339b6] | 2096 | #define _CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0 |
---|
| 2097 | #else |
---|
| 2098 | #define _CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
| 2099 | _Configure_Object_RAM(_regions, sizeof(Region_Control) ) |
---|
| 2100 | #endif |
---|
[08bae5e6] | 2101 | |
---|
[68f339b6] | 2102 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
| 2103 | /** |
---|
| 2104 | * This configuration parameter specifies the maximum number of |
---|
| 2105 | * Classic API Dual-Ported Memory Ports. |
---|
| 2106 | */ |
---|
| 2107 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 2108 | /** |
---|
| 2109 | * This macro is calculated to specify the memory required for |
---|
| 2110 | * Classic API Dual-Ported Memory Ports. |
---|
| 2111 | */ |
---|
| 2112 | #define _CONFIGURE_MEMORY_FOR_PORTS(_ports) 0 |
---|
| 2113 | #else |
---|
| 2114 | #define _CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
| 2115 | _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) ) |
---|
| 2116 | #endif |
---|
[08bae5e6] | 2117 | |
---|
[68f339b6] | 2118 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
| 2119 | /** |
---|
| 2120 | * This configuration parameter specifies the maximum number of |
---|
| 2121 | * Classic API Rate Monotonic Periods. |
---|
| 2122 | */ |
---|
| 2123 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 2124 | /* |
---|
| 2125 | * This macro is calculated to specify the memory required for |
---|
| 2126 | * Classic API Rate Monotonic Periods. |
---|
| 2127 | */ |
---|
| 2128 | #define _CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0 |
---|
| 2129 | #else |
---|
| 2130 | #define _CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
| 2131 | _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) ) |
---|
| 2132 | #endif |
---|
[08bae5e6] | 2133 | |
---|
[68f339b6] | 2134 | /** |
---|
| 2135 | * This configuration parameter specifies the maximum number of |
---|
| 2136 | * Classic API Barriers. |
---|
| 2137 | */ |
---|
| 2138 | #ifndef CONFIGURE_MAXIMUM_BARRIERS |
---|
| 2139 | #define CONFIGURE_MAXIMUM_BARRIERS 0 |
---|
| 2140 | #endif |
---|
[08bae5e6] | 2141 | |
---|
[68f339b6] | 2142 | /* |
---|
| 2143 | * This macro is calculated to specify the number of Classic API |
---|
| 2144 | * Barriers required by the application and configured capabilities. |
---|
| 2145 | */ |
---|
| 2146 | #define _CONFIGURE_BARRIERS \ |
---|
| 2147 | (CONFIGURE_MAXIMUM_BARRIERS + _CONFIGURE_BARRIERS_FOR_FIFOS) |
---|
[08bae5e6] | 2148 | |
---|
[68f339b6] | 2149 | /* |
---|
| 2150 | * This macro is calculated to specify the memory required for |
---|
| 2151 | * Classic API Barriers. |
---|
| 2152 | */ |
---|
| 2153 | #if _CONFIGURE_BARRIERS == 0 |
---|
| 2154 | #define _CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0 |
---|
[bfe6391] | 2155 | #else |
---|
[68f339b6] | 2156 | #define _CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \ |
---|
| 2157 | _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) ) |
---|
| 2158 | #endif |
---|
[7fa1ce86] | 2159 | |
---|
[68f339b6] | 2160 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
[bfe6391] | 2161 | /** |
---|
| 2162 | * This configuration parameter specifies the maximum number of |
---|
[68f339b6] | 2163 | * Classic API User Extensions. |
---|
[bfe6391] | 2164 | */ |
---|
[68f339b6] | 2165 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
[07d71279] | 2166 | /* |
---|
[bfe6391] | 2167 | * This macro is calculated to specify the memory required for |
---|
[68f339b6] | 2168 | * Classic API User Extensions. |
---|
[bfe6391] | 2169 | */ |
---|
[68f339b6] | 2170 | #define _CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0 |
---|
| 2171 | #else |
---|
| 2172 | #define _CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
| 2173 | _Configure_Object_RAM(_extensions, sizeof(Extension_Control) ) |
---|
| 2174 | #endif |
---|
[08bae5e6] | 2175 | |
---|
[68f339b6] | 2176 | /**@}*/ /* end of Classic API Configuration */ |
---|
[bfe6391] | 2177 | |
---|
[68f339b6] | 2178 | /** |
---|
| 2179 | * @defgroup ConfigurationGeneral General System Configuration |
---|
| 2180 | * |
---|
| 2181 | * @ingroup Configuration |
---|
| 2182 | * |
---|
| 2183 | * This module contains configuration parameters that are independent |
---|
| 2184 | * of any API but impact general system configuration. |
---|
| 2185 | */ |
---|
| 2186 | /**@{*/ |
---|
[08bae5e6] | 2187 | |
---|
[68f339b6] | 2188 | /** The configures the number of microseconds per clock tick. */ |
---|
| 2189 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 2190 | #define CONFIGURE_MICROSECONDS_PER_TICK \ |
---|
| 2191 | RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 2192 | #endif |
---|
[5877cc3a] | 2193 | |
---|
[68f339b6] | 2194 | #if 1000000 % CONFIGURE_MICROSECONDS_PER_TICK != 0 |
---|
| 2195 | #warning "The clock ticks per second is not an integer" |
---|
| 2196 | #endif |
---|
[381ef5c] | 2197 | |
---|
[68f339b6] | 2198 | #if CONFIGURE_MICROSECONDS_PER_TICK <= 0 |
---|
| 2199 | #error "The CONFIGURE_MICROSECONDS_PER_TICK must be positive" |
---|
| 2200 | #endif |
---|
[0ddffb76] | 2201 | |
---|
[68f339b6] | 2202 | #define _CONFIGURE_TICKS_PER_SECOND (1000000 / CONFIGURE_MICROSECONDS_PER_TICK) |
---|
[27cfe7c] | 2203 | |
---|
[68f339b6] | 2204 | /** The configures the number of clock ticks per timeslice. */ |
---|
| 2205 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 2206 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 2207 | #endif |
---|
[08bae5e6] | 2208 | |
---|
[bfe6391] | 2209 | /**@}*/ /* end of General Configuration */ |
---|
| 2210 | |
---|
[0451b44] | 2211 | /* |
---|
| 2212 | * Initial Extension Set |
---|
| 2213 | */ |
---|
| 2214 | |
---|
| 2215 | #ifdef CONFIGURE_INIT |
---|
[4afd6f4] | 2216 | #ifdef CONFIGURE_STACK_CHECKER_ENABLED |
---|
[31bce9b] | 2217 | #include <rtems/stackchk.h> |
---|
[0451b44] | 2218 | #endif |
---|
[c3db01d0] | 2219 | #include <rtems/libcsupport.h> |
---|
[0451b44] | 2220 | |
---|
[228df42] | 2221 | #if defined(BSP_INITIAL_EXTENSION) || \ |
---|
| 2222 | defined(CONFIGURE_INITIAL_EXTENSIONS) || \ |
---|
[4afd6f4] | 2223 | defined(CONFIGURE_STACK_CHECKER_ENABLED) || \ |
---|
[c3db01d0] | 2224 | (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
[2195fd27] | 2225 | static const rtems_extensions_table Configuration_Initial_Extensions[] = { |
---|
[c3db01d0] | 2226 | #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2227 | RTEMS_NEWLIB_EXTENSION, |
---|
| 2228 | #endif |
---|
[4afd6f4] | 2229 | #if defined(CONFIGURE_STACK_CHECKER_ENABLED) |
---|
[c3db01d0] | 2230 | RTEMS_STACK_CHECKER_EXTENSION, |
---|
| 2231 | #endif |
---|
| 2232 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) |
---|
| 2233 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
| 2234 | #endif |
---|
[228df42] | 2235 | #if defined(BSP_INITIAL_EXTENSION) |
---|
| 2236 | BSP_INITIAL_EXTENSION |
---|
| 2237 | #endif |
---|
[c3db01d0] | 2238 | }; |
---|
| 2239 | |
---|
[2292ca22] | 2240 | #define _CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions |
---|
[07d71279] | 2241 | #define _CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
[9ed2bef] | 2242 | RTEMS_ARRAY_SIZE(Configuration_Initial_Extensions) |
---|
[a853c851] | 2243 | |
---|
| 2244 | RTEMS_SYSINIT_ITEM( |
---|
| 2245 | _User_extensions_Handler_initialization, |
---|
| 2246 | RTEMS_SYSINIT_INITIAL_EXTENSIONS, |
---|
| 2247 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 2248 | ); |
---|
[96e6a86c] | 2249 | #else |
---|
[2292ca22] | 2250 | #define _CONFIGURE_INITIAL_EXTENSION_TABLE NULL |
---|
[07d71279] | 2251 | #define _CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0 |
---|
[96e6a86c] | 2252 | #endif |
---|
| 2253 | |
---|
[d1f7204] | 2254 | #if defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2255 | struct _reent *__getreent(void) |
---|
| 2256 | { |
---|
| 2257 | return _Thread_Get_executing()->libc_reent; |
---|
| 2258 | } |
---|
[9c9b62d8] | 2259 | #endif |
---|
[0451b44] | 2260 | |
---|
[08bae5e6] | 2261 | #endif |
---|
| 2262 | |
---|
[bfe6391] | 2263 | /** |
---|
| 2264 | * @defgroup ConfigurationPOSIXAPI POSIX API Configuration Parameters |
---|
| 2265 | * |
---|
| 2266 | * This module contains the parameters related to configuration |
---|
| 2267 | * of the POSIX API services. |
---|
[2eba45d] | 2268 | */ |
---|
[bfe6391] | 2269 | /**@{*/ |
---|
[2eba45d] | 2270 | |
---|
[bfe6391] | 2271 | /** |
---|
| 2272 | * This configuration parameter specifies the maximum number of |
---|
| 2273 | * POSIX API keys. |
---|
| 2274 | * |
---|
| 2275 | * POSIX Keys are available whether or not the POSIX API is enabled. |
---|
| 2276 | */ |
---|
[e6c87f7] | 2277 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
[5c0c0cf] | 2278 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
| 2279 | #endif |
---|
| 2280 | |
---|
[07d71279] | 2281 | /* |
---|
[bfe6391] | 2282 | * This macro is calculated to specify the memory required for |
---|
| 2283 | * POSIX API key/value pairs. |
---|
| 2284 | */ |
---|
[5c0c0cf] | 2285 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS |
---|
| 2286 | #define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS \ |
---|
| 2287 | (CONFIGURE_MAXIMUM_POSIX_KEYS * \ |
---|
| 2288 | (CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_TASKS)) |
---|
[e6c87f7] | 2289 | #endif |
---|
[2eba45d] | 2290 | |
---|
[07d71279] | 2291 | /* |
---|
[bfe6391] | 2292 | * This macro is calculated to specify the total number of |
---|
| 2293 | * POSIX API keys required by the application and configured |
---|
| 2294 | * system capabilities. |
---|
| 2295 | */ |
---|
[07d71279] | 2296 | #define _CONFIGURE_POSIX_KEYS \ |
---|
| 2297 | (CONFIGURE_MAXIMUM_POSIX_KEYS + _CONFIGURE_LIBIO_POSIX_KEYS) |
---|
[5c0c0cf] | 2298 | |
---|
[07d71279] | 2299 | /* |
---|
[bfe6391] | 2300 | * This macro is calculated to specify the memory required for |
---|
| 2301 | * POSIX API keys. |
---|
| 2302 | */ |
---|
[07d71279] | 2303 | #define _CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys, _key_value_pairs) \ |
---|
[e6c87f7] | 2304 | (_Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) \ |
---|
| 2305 | + _Configure_From_workspace( \ |
---|
[e0660391] | 2306 | _Configure_Max_Objects(_key_value_pairs) \ |
---|
| 2307 | * sizeof(POSIX_Keys_Key_value_pair))) |
---|
[e6c87f7] | 2308 | |
---|
[54f35888] | 2309 | /** |
---|
| 2310 | * This configuration parameter specifies the maximum number of |
---|
| 2311 | * POSIX API threads. |
---|
| 2312 | */ |
---|
| 2313 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 2314 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 2315 | #endif |
---|
| 2316 | |
---|
[9318cfb0] | 2317 | /* |
---|
| 2318 | * Account for the object control structures plus the name |
---|
| 2319 | * of the object to be duplicated. |
---|
| 2320 | */ |
---|
| 2321 | #define _Configure_POSIX_Named_Object_RAM(_number, _size) \ |
---|
| 2322 | (_Configure_Object_RAM(_number, _size) \ |
---|
| 2323 | + _Configure_Max_Objects(_number) \ |
---|
| 2324 | * _Configure_From_workspace(_POSIX_PATH_MAX + 1)) |
---|
| 2325 | |
---|
[fe7aefd5] | 2326 | /** |
---|
| 2327 | * This configuration parameter specifies the maximum number of |
---|
| 2328 | * POSIX API message queues. |
---|
| 2329 | */ |
---|
| 2330 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
| 2331 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
| 2332 | #endif |
---|
| 2333 | |
---|
| 2334 | /* |
---|
| 2335 | * This macro is calculated to specify the memory required for |
---|
| 2336 | * POSIX API message queues. |
---|
| 2337 | */ |
---|
| 2338 | #define _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
| 2339 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 2340 | _message_queues, sizeof(POSIX_Message_queue_Control) ) |
---|
| 2341 | |
---|
[9318cfb0] | 2342 | /** |
---|
| 2343 | * This configuration parameter specifies the maximum number of |
---|
| 2344 | * POSIX API semaphores. |
---|
| 2345 | */ |
---|
| 2346 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
| 2347 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
| 2348 | #endif |
---|
| 2349 | |
---|
| 2350 | /* |
---|
| 2351 | * This macro is calculated to specify the memory required for |
---|
| 2352 | * POSIX API semaphores. |
---|
| 2353 | */ |
---|
| 2354 | #define _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
| 2355 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 2356 | _semaphores, sizeof(POSIX_Semaphore_Control) ) |
---|
| 2357 | |
---|
[701057e0] | 2358 | /** |
---|
| 2359 | * Configure the maximum number of POSIX shared memory objects. |
---|
| 2360 | */ |
---|
| 2361 | #ifndef CONFIGURE_MAXIMUM_POSIX_SHMS |
---|
| 2362 | #define CONFIGURE_MAXIMUM_POSIX_SHMS 0 |
---|
| 2363 | #endif |
---|
| 2364 | |
---|
| 2365 | /* |
---|
| 2366 | * This macro is calculated to specify the memory required for |
---|
| 2367 | * POSIX API shared memory. |
---|
| 2368 | */ |
---|
| 2369 | #define _CONFIGURE_MEMORY_FOR_POSIX_SHMS(_shms) \ |
---|
| 2370 | _Configure_POSIX_Named_Object_RAM(_shms, sizeof(POSIX_Shm_Control) ) |
---|
| 2371 | |
---|
[e6c87f7] | 2372 | /* |
---|
| 2373 | * The rest of the POSIX threads API features are only available when |
---|
| 2374 | * POSIX is enabled. |
---|
| 2375 | */ |
---|
| 2376 | #ifdef RTEMS_POSIX_API |
---|
[5877cc3a] | 2377 | #include <sys/types.h> |
---|
| 2378 | #include <signal.h> |
---|
| 2379 | #include <rtems/posix/psignal.h> |
---|
| 2380 | #include <rtems/posix/threadsup.h> |
---|
| 2381 | #include <rtems/posix/timer.h> |
---|
| 2382 | |
---|
[bfe6391] | 2383 | /** |
---|
| 2384 | * This configuration parameter specifies the maximum number of |
---|
| 2385 | * POSIX API timers. |
---|
| 2386 | */ |
---|
[5877cc3a] | 2387 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
[6e4c01e] | 2388 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
[5877cc3a] | 2389 | #endif |
---|
[bfe6391] | 2390 | |
---|
[07d71279] | 2391 | /* |
---|
[bfe6391] | 2392 | * This macro is calculated to specify the memory required for |
---|
| 2393 | * POSIX API timers. |
---|
| 2394 | */ |
---|
[07d71279] | 2395 | #define _CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \ |
---|
[6e4c01e] | 2396 | _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) ) |
---|
[0747e2d] | 2397 | |
---|
[bfe6391] | 2398 | /** |
---|
| 2399 | * This configuration parameter specifies the maximum number of |
---|
| 2400 | * POSIX API queued signals. |
---|
| 2401 | */ |
---|
[5877cc3a] | 2402 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
[6e4c01e] | 2403 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
[5877cc3a] | 2404 | #endif |
---|
[bfe6391] | 2405 | |
---|
[07d71279] | 2406 | /* |
---|
[bfe6391] | 2407 | * This macro is calculated to specify the memory required for |
---|
| 2408 | * POSIX API queued signals. |
---|
| 2409 | */ |
---|
[07d71279] | 2410 | #define _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \ |
---|
[6e4c01e] | 2411 | _Configure_From_workspace( \ |
---|
| 2412 | (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) ) |
---|
[54f35888] | 2413 | #endif /* RTEMS_POSIX_API */ |
---|
[eb0551f] | 2414 | |
---|
[54f35888] | 2415 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
| 2416 | #ifndef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
| 2417 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
| 2418 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
| 2419 | #endif |
---|
[5240c71c] | 2420 | |
---|
[54f35888] | 2421 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 2422 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ |
---|
| 2423 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE |
---|
| 2424 | #endif |
---|
[adbb578] | 2425 | |
---|
[54f35888] | 2426 | #ifdef CONFIGURE_INIT |
---|
| 2427 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
| 2428 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, |
---|
| 2429 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
| 2430 | }; |
---|
| 2431 | #endif |
---|
[2eba45d] | 2432 | |
---|
[54f35888] | 2433 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \ |
---|
| 2434 | POSIX_Initialization_threads |
---|
[8486081] | 2435 | |
---|
[54f35888] | 2436 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
| 2437 | RTEMS_ARRAY_SIZE(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) |
---|
| 2438 | #endif /* !CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 2439 | #else /* !CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
| 2440 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
| 2441 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
| 2442 | #endif /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
[352c9b2] | 2443 | |
---|
[bfe6391] | 2444 | /** |
---|
| 2445 | * This configuration parameter specifies the stack size of the |
---|
| 2446 | * POSIX API Initialization thread (if used). |
---|
| 2447 | */ |
---|
[5877cc3a] | 2448 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 2449 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
[352c9b2] | 2450 | #endif |
---|
[bfe6391] | 2451 | /**@}*/ /* end of POSIX API Configuration */ |
---|
[352c9b2] | 2452 | |
---|
[bfe6391] | 2453 | /** |
---|
| 2454 | * @defgroup ConfigurationGNAT GNAT/RTEMS Configuration |
---|
| 2455 | * |
---|
| 2456 | * @addtogroup Configuration |
---|
| 2457 | * |
---|
| 2458 | * This modules includes configuration parameters for applications which |
---|
| 2459 | * use GNAT/RTEMS. GNAT implements each Ada task as a POSIX thread. |
---|
[5877cc3a] | 2460 | */ |
---|
[bfe6391] | 2461 | /**@{*/ |
---|
[5877cc3a] | 2462 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
| 2463 | /** |
---|
[27f071cd] | 2464 | * This is the maximum number of Ada tasks which can be concurrently |
---|
| 2465 | * in existence. Twenty (20) are required to run all tests in the |
---|
| 2466 | * ACATS (formerly ACVC). |
---|
[5877cc3a] | 2467 | */ |
---|
| 2468 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
| 2469 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
| 2470 | #endif |
---|
[352c9b2] | 2471 | |
---|
[5877cc3a] | 2472 | /** |
---|
| 2473 | * This is the number of non-Ada tasks which invoked Ada code. |
---|
| 2474 | */ |
---|
| 2475 | #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
| 2476 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
| 2477 | #endif |
---|
| 2478 | #else |
---|
[bfe6391] | 2479 | /** This defines he number of POSIX mutexes GNAT needs. */ |
---|
| 2480 | /** This defines he number of Ada tasks needed by the application. */ |
---|
[5877cc3a] | 2481 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
[bfe6391] | 2482 | /** |
---|
| 2483 | * This defines he number of non-Ada tasks/threads that will invoke |
---|
| 2484 | * Ada subprograms or functions. |
---|
| 2485 | */ |
---|
[5877cc3a] | 2486 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
[352c9b2] | 2487 | #endif |
---|
[bfe6391] | 2488 | /**@}*/ /* end of GNAT Configuration */ |
---|
[352c9b2] | 2489 | |
---|
[bfe6391] | 2490 | /** |
---|
| 2491 | * @defgroup ConfigurationGo GCC Go Configuration |
---|
| 2492 | * |
---|
| 2493 | * @addtogroup Configuration |
---|
| 2494 | * |
---|
| 2495 | * This modules includes configuration parameters for applications which |
---|
| 2496 | * use GCC Go. |
---|
| 2497 | */ |
---|
| 2498 | /**@{*/ |
---|
[a46e6b6d] | 2499 | #ifdef CONFIGURE_ENABLE_GO |
---|
| 2500 | |
---|
| 2501 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 2502 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 1 |
---|
| 2503 | #endif |
---|
| 2504 | |
---|
| 2505 | #ifndef CONFIGURE_MAXIMUM_GOROUTINES |
---|
| 2506 | #define CONFIGURE_MAXIMUM_GOROUTINES 400 |
---|
| 2507 | #endif |
---|
| 2508 | |
---|
| 2509 | #ifndef CONFIGURE_MAXIMUM_GO_CHANNELS |
---|
| 2510 | #define CONFIGURE_MAXIMUM_GO_CHANNELS 500 |
---|
| 2511 | #endif |
---|
| 2512 | |
---|
| 2513 | #else |
---|
[bfe6391] | 2514 | /** This specifies the maximum number of Go co-routines. */ |
---|
[a46e6b6d] | 2515 | #define CONFIGURE_MAXIMUM_GOROUTINES 0 |
---|
[bfe6391] | 2516 | |
---|
| 2517 | /** This specifies the maximum number of Go channels required. */ |
---|
[a46e6b6d] | 2518 | #define CONFIGURE_MAXIMUM_GO_CHANNELS 0 |
---|
| 2519 | #endif |
---|
[bfe6391] | 2520 | /**@}*/ /* end of Go Configuration */ |
---|
[5aecf664] | 2521 | |
---|
[b4f635e] | 2522 | /** |
---|
[27f071cd] | 2523 | * This is so we can account for tasks with stacks greater than minimum |
---|
| 2524 | * size. This is in bytes. |
---|
[b4f635e] | 2525 | */ |
---|
| 2526 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
| 2527 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
| 2528 | #endif |
---|
[5aecf664] | 2529 | |
---|
[94086a9] | 2530 | /** |
---|
| 2531 | * This macro provides a summation of the various POSIX thread requirements. |
---|
| 2532 | */ |
---|
[07d71279] | 2533 | #define _CONFIGURE_POSIX_THREADS \ |
---|
[94086a9] | 2534 | (CONFIGURE_MAXIMUM_POSIX_THREADS + \ |
---|
| 2535 | CONFIGURE_MAXIMUM_ADA_TASKS + \ |
---|
| 2536 | CONFIGURE_MAXIMUM_GOROUTINES) |
---|
| 2537 | |
---|
[d8ac087] | 2538 | #ifdef RTEMS_POSIX_API |
---|
[07d71279] | 2539 | /* |
---|
[bfe6391] | 2540 | * This macro is calculated to specify the memory required for |
---|
| 2541 | * the POSIX API in its entirety. |
---|
| 2542 | */ |
---|
[07d71279] | 2543 | #define _CONFIGURE_MEMORY_FOR_POSIX \ |
---|
[de59c065] | 2544 | (_CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ |
---|
[d8ac087] | 2545 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) + \ |
---|
[07d71279] | 2546 | _CONFIGURE_MEMORY_FOR_POSIX_TIMERS(CONFIGURE_MAXIMUM_POSIX_TIMERS)) |
---|
[d8ac087] | 2547 | #else |
---|
[07d71279] | 2548 | /* |
---|
[bfe6391] | 2549 | * This macro is calculated to specify the memory required for |
---|
| 2550 | * the POSIX API in its entirety. |
---|
| 2551 | */ |
---|
[07d71279] | 2552 | #define _CONFIGURE_MEMORY_FOR_POSIX 0 |
---|
[d8ac087] | 2553 | #endif |
---|
| 2554 | |
---|
[3f1bf0c] | 2555 | /* |
---|
| 2556 | * We must be able to split the free block used for the second last allocation |
---|
| 2557 | * into two parts so that we have a free block for the last allocation. See |
---|
| 2558 | * _Heap_Block_split(). |
---|
| 2559 | */ |
---|
[07d71279] | 2560 | #define _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[ffe14b26] | 2561 | _Configure_Align_up( HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT ) |
---|
[3f1bf0c] | 2562 | |
---|
[8486081] | 2563 | /* |
---|
[3652ad35] | 2564 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
| 2565 | */ |
---|
[08bae5e6] | 2566 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
[3652ad35] | 2567 | |
---|
[07d71279] | 2568 | /* |
---|
[27f071cd] | 2569 | * Account for allocating the following per object |
---|
| 2570 | * + array of object control structures |
---|
| 2571 | * + local pointer table -- pointer per object plus a zero'th |
---|
| 2572 | * entry in the local pointer table. |
---|
[5877cc3a] | 2573 | */ |
---|
[07d71279] | 2574 | #define _CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \ |
---|
[3df4d74] | 2575 | ( \ |
---|
[69aa3349] | 2576 | _Configure_Object_RAM(_tasks, sizeof(Configuration_Thread_control)) \ |
---|
[d7665823] | 2577 | + _Configure_From_workspace(_Configure_Max_Objects(_tasks) \ |
---|
[61d5c886] | 2578 | * THREAD_QUEUE_HEADS_SIZE(_CONFIGURE_SCHEDULER_COUNT)) \ |
---|
[3df4d74] | 2579 | + _Configure_Max_Objects(_number_FP_tasks) \ |
---|
| 2580 | * _Configure_From_workspace(CONTEXT_FP_SIZE) \ |
---|
| 2581 | ) |
---|
[b2b143f4] | 2582 | |
---|
[07d71279] | 2583 | /* |
---|
[27f071cd] | 2584 | * This defines the amount of memory configured for the multiprocessing |
---|
| 2585 | * support required by this application. |
---|
[5877cc3a] | 2586 | */ |
---|
[df49c60] | 2587 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[07d71279] | 2588 | #define _CONFIGURE_MEMORY_FOR_MP \ |
---|
| 2589 | (_CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
| 2590 | _CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS)) |
---|
[3652ad35] | 2591 | #else |
---|
[07d71279] | 2592 | #define _CONFIGURE_MEMORY_FOR_MP 0 |
---|
[3652ad35] | 2593 | #endif |
---|
[3b89891] | 2594 | |
---|
[5877cc3a] | 2595 | /** |
---|
[27f071cd] | 2596 | * The following macro is used to calculate the memory allocated by RTEMS |
---|
| 2597 | * for the message buffers associated with a particular message queue. |
---|
| 2598 | * There is a fixed amount of overhead per message. |
---|
[5877cc3a] | 2599 | */ |
---|
| 2600 | #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \ |
---|
| 2601 | _Configure_From_workspace( \ |
---|
[b1b6f3b0] | 2602 | (_messages) * (_Configure_Align_up(_size, sizeof(uintptr_t)) \ |
---|
| 2603 | + sizeof(CORE_message_queue_Buffer_control))) |
---|
[5877cc3a] | 2604 | |
---|
[07d71279] | 2605 | /* |
---|
[bfe6391] | 2606 | * This macro is set to the amount of memory required for pending message |
---|
[27f071cd] | 2607 | * buffers in bytes. It should be constructed by adding together a |
---|
| 2608 | * set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE. |
---|
[7042065] | 2609 | */ |
---|
| 2610 | #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
[5877cc3a] | 2611 | #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 |
---|
[7042065] | 2612 | #endif |
---|
| 2613 | |
---|
[5877cc3a] | 2614 | /** |
---|
[27f071cd] | 2615 | * This macro is available just in case the confdefs.h file underallocates |
---|
| 2616 | * memory for a particular application. This lets the user add some extra |
---|
| 2617 | * memory in case something broken and underestimates. |
---|
[5877cc3a] | 2618 | * |
---|
[27f071cd] | 2619 | * It is also possible for cases where confdefs.h overallocates memory, |
---|
| 2620 | * you could substract memory from the allocated. The estimate is just |
---|
| 2621 | * that, an estimate, and assumes worst case alignment and padding on |
---|
| 2622 | * each allocated element. So in some cases it could be too conservative. |
---|
[5877cc3a] | 2623 | * |
---|
[27f071cd] | 2624 | * NOTE: Historically this was used for message buffers. |
---|
[7042065] | 2625 | */ |
---|
| 2626 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
[5877cc3a] | 2627 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
| 2628 | #endif |
---|
| 2629 | |
---|
[06dcaf0] | 2630 | /** |
---|
[27f071cd] | 2631 | * This calculates the amount of memory reserved for the IDLE tasks. |
---|
| 2632 | * In an SMP system, each CPU core has its own idle task. |
---|
[4175abd] | 2633 | */ |
---|
[334e1d2] | 2634 | #define _CONFIGURE_IDLE_TASKS_COUNT _CONFIGURE_MAXIMUM_PROCESSORS |
---|
[4175abd] | 2635 | |
---|
[b4f635e] | 2636 | /** |
---|
[27f071cd] | 2637 | * This defines the formula used to compute the amount of memory |
---|
[9a972889] | 2638 | * reserved for internal task control structures. |
---|
[b4f635e] | 2639 | */ |
---|
[3feb372] | 2640 | #if CPU_IDLE_TASK_IS_FP == TRUE |
---|
[07d71279] | 2641 | #define _CONFIGURE_MEMORY_FOR_INTERNAL_TASKS \ |
---|
| 2642 | _CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 2643 | _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT, \ |
---|
| 2644 | _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT \ |
---|
[9a972889] | 2645 | ) |
---|
[3feb372] | 2646 | #else |
---|
[07d71279] | 2647 | #define _CONFIGURE_MEMORY_FOR_INTERNAL_TASKS \ |
---|
| 2648 | _CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 2649 | _CONFIGURE_IDLE_TASKS_COUNT + _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT, \ |
---|
| 2650 | _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT \ |
---|
[9a972889] | 2651 | ) |
---|
[3feb372] | 2652 | #endif |
---|
[b4f635e] | 2653 | |
---|
[5877cc3a] | 2654 | /** |
---|
[27f071cd] | 2655 | * This macro accounts for general RTEMS system overhead. |
---|
[5877cc3a] | 2656 | */ |
---|
[07d71279] | 2657 | #define _CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \ |
---|
[511dc4b] | 2658 | _CONFIGURE_MEMORY_FOR_INTERNAL_TASKS |
---|
[b3dcd9a2] | 2659 | |
---|
[5877cc3a] | 2660 | /** |
---|
[27f071cd] | 2661 | * This macro reserves the memory required by the statically configured |
---|
| 2662 | * user extensions. |
---|
[5877cc3a] | 2663 | */ |
---|
[07d71279] | 2664 | #define _CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \ |
---|
| 2665 | (_CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS == 0 ? 0 : \ |
---|
[466cf31d] | 2666 | _Configure_From_workspace( \ |
---|
[07d71279] | 2667 | _CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
[466cf31d] | 2668 | * sizeof(User_extensions_Switch_control) \ |
---|
| 2669 | )) |
---|
[5877cc3a] | 2670 | |
---|
| 2671 | /** |
---|
[27f071cd] | 2672 | * This macro provides a summation of the memory required by the |
---|
| 2673 | * Classic API as configured. |
---|
[5877cc3a] | 2674 | */ |
---|
[07d71279] | 2675 | #define _CONFIGURE_MEMORY_FOR_CLASSIC \ |
---|
| 2676 | (_CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \ |
---|
| 2677 | _CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \ |
---|
[03e5a780] | 2678 | _CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \ |
---|
[07d71279] | 2679 | _CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
| 2680 | _CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
| 2681 | _CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \ |
---|
| 2682 | _CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
| 2683 | _CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
| 2684 | _CONFIGURE_MEMORY_FOR_BARRIERS(_CONFIGURE_BARRIERS) + \ |
---|
| 2685 | _CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \ |
---|
[5877cc3a] | 2686 | ) |
---|
| 2687 | |
---|
| 2688 | /** |
---|
[27f071cd] | 2689 | * This calculates the memory required for the executive workspace. |
---|
[bfe6391] | 2690 | * |
---|
| 2691 | * This is an internal parameter. |
---|
[5877cc3a] | 2692 | */ |
---|
| 2693 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
[3f1bf0c] | 2694 | ( \ |
---|
[07d71279] | 2695 | _CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ |
---|
| 2696 | _CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 2697 | _CONFIGURE_TASKS, _CONFIGURE_TASKS) + \ |
---|
| 2698 | _CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 2699 | _CONFIGURE_POSIX_THREADS, _CONFIGURE_POSIX_THREADS) + \ |
---|
| 2700 | _CONFIGURE_MEMORY_FOR_CLASSIC + \ |
---|
| 2701 | _CONFIGURE_MEMORY_FOR_POSIX_KEYS( \ |
---|
| 2702 | _CONFIGURE_POSIX_KEYS, \ |
---|
[e6c87f7] | 2703 | CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ) + \ |
---|
[fe7aefd5] | 2704 | _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
| 2705 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) + \ |
---|
[9318cfb0] | 2706 | _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
| 2707 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES) + \ |
---|
[701057e0] | 2708 | _CONFIGURE_MEMORY_FOR_POSIX_SHMS( \ |
---|
| 2709 | CONFIGURE_MAXIMUM_POSIX_SHMS) + \ |
---|
[07d71279] | 2710 | _CONFIGURE_MEMORY_FOR_POSIX + \ |
---|
| 2711 | _CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \ |
---|
| 2712 | _CONFIGURE_MEMORY_FOR_MP + \ |
---|
[7042065] | 2713 | CONFIGURE_MESSAGE_BUFFER_MEMORY + \ |
---|
[3f1bf0c] | 2714 | (CONFIGURE_MEMORY_OVERHEAD * 1024) + \ |
---|
[07d71279] | 2715 | _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[3f1bf0c] | 2716 | ) |
---|
[b4f635e] | 2717 | |
---|
| 2718 | /* |
---|
| 2719 | * Now account for any extra memory that initialization tasks or threads |
---|
| 2720 | * may have requested. |
---|
| 2721 | */ |
---|
| 2722 | |
---|
[07d71279] | 2723 | /* |
---|
[27f071cd] | 2724 | * This accounts for any extra memory required by the Classic API |
---|
| 2725 | * Initialization Task. |
---|
[b4f635e] | 2726 | */ |
---|
| 2727 | #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[07d71279] | 2728 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \ |
---|
[b4f635e] | 2729 | (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
| 2730 | #else |
---|
[07d71279] | 2731 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0 |
---|
[08bae5e6] | 2732 | #endif |
---|
| 2733 | |
---|
[07d71279] | 2734 | /* |
---|
[27f071cd] | 2735 | * This accounts for any extra memory required by the POSIX API |
---|
| 2736 | * Initialization Thread. |
---|
[b4f635e] | 2737 | */ |
---|
[54f35888] | 2738 | #if (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > \ |
---|
[b4f635e] | 2739 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE) |
---|
[07d71279] | 2740 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \ |
---|
[b4f635e] | 2741 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - \ |
---|
| 2742 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE) |
---|
| 2743 | #else |
---|
[07d71279] | 2744 | #define _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0 |
---|
[b4f635e] | 2745 | #endif |
---|
| 2746 | |
---|
[07d71279] | 2747 | /* |
---|
[27f071cd] | 2748 | * This macro provides a summation of the various initialization task |
---|
| 2749 | * and thread stack requirements. |
---|
[b4f635e] | 2750 | */ |
---|
[07d71279] | 2751 | #define _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS \ |
---|
| 2752 | (_CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \ |
---|
| 2753 | _CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART) |
---|
[b4f635e] | 2754 | |
---|
[07d71279] | 2755 | /* |
---|
[bfe6391] | 2756 | * This macro is calculated to specify the memory required for |
---|
| 2757 | * the Idle tasks(s) stack. |
---|
| 2758 | */ |
---|
[07d71279] | 2759 | #define _CONFIGURE_IDLE_TASKS_STACK \ |
---|
| 2760 | (_CONFIGURE_IDLE_TASKS_COUNT * \ |
---|
[9fa3cf0d] | 2761 | _Configure_From_stackspace( CONFIGURE_IDLE_TASK_STACK_SIZE ) ) |
---|
[b4f635e] | 2762 | |
---|
[07d71279] | 2763 | /* |
---|
[9a972889] | 2764 | * This macro is calculated to specify the stack memory required for the MPCI |
---|
| 2765 | * task. |
---|
| 2766 | */ |
---|
[07d71279] | 2767 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_STACK \ |
---|
| 2768 | (_CONFIGURE_MPCI_RECEIVE_SERVER_COUNT * \ |
---|
[9a972889] | 2769 | _Configure_From_stackspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE)) |
---|
| 2770 | |
---|
[07d71279] | 2771 | /* |
---|
[bfe6391] | 2772 | * This macro is calculated to specify the memory required for |
---|
| 2773 | * the stacks of all tasks. |
---|
| 2774 | */ |
---|
[07d71279] | 2775 | #define _CONFIGURE_TASKS_STACK \ |
---|
| 2776 | (_Configure_Max_Objects( _CONFIGURE_TASKS ) * \ |
---|
[9fa3cf0d] | 2777 | _Configure_From_stackspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) ) |
---|
[b4f635e] | 2778 | |
---|
[07d71279] | 2779 | /* |
---|
[bfe6391] | 2780 | * This macro is calculated to specify the memory required for |
---|
| 2781 | * the stacks of all POSIX threads. |
---|
| 2782 | */ |
---|
[07d71279] | 2783 | #define _CONFIGURE_POSIX_THREADS_STACK \ |
---|
[b4f635e] | 2784 | (_Configure_Max_Objects( CONFIGURE_MAXIMUM_POSIX_THREADS ) * \ |
---|
[9fa3cf0d] | 2785 | _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) ) |
---|
[b4f635e] | 2786 | |
---|
[07d71279] | 2787 | /* |
---|
[bfe6391] | 2788 | * This macro is calculated to specify the memory required for |
---|
| 2789 | * the stacks of all Ada tasks. |
---|
| 2790 | */ |
---|
[07d71279] | 2791 | #define _CONFIGURE_ADA_TASKS_STACK \ |
---|
[b4f635e] | 2792 | (_Configure_Max_Objects( CONFIGURE_MAXIMUM_ADA_TASKS ) * \ |
---|
[9fa3cf0d] | 2793 | _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) ) |
---|
[b4f635e] | 2794 | |
---|
[07d71279] | 2795 | /* |
---|
[bfe6391] | 2796 | * This macro is calculated to specify the memory required for |
---|
| 2797 | * the stacks of all Go routines. |
---|
| 2798 | */ |
---|
[07d71279] | 2799 | #define _CONFIGURE_GOROUTINES_STACK \ |
---|
[bfe6391] | 2800 | (_Configure_Max_Objects( CONFIGURE_MAXIMUM_GOROUTINES ) * \ |
---|
| 2801 | _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) ) |
---|
| 2802 | |
---|
[b4f635e] | 2803 | #else /* CONFIGURE_EXECUTIVE_RAM_SIZE */ |
---|
| 2804 | |
---|
[07d71279] | 2805 | #define _CONFIGURE_IDLE_TASKS_STACK 0 |
---|
| 2806 | #define _CONFIGURE_MPCI_RECEIVE_SERVER_STACK 0 |
---|
| 2807 | #define _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS 0 |
---|
| 2808 | #define _CONFIGURE_TASKS_STACK 0 |
---|
| 2809 | #define _CONFIGURE_POSIX_THREADS_STACK 0 |
---|
| 2810 | #define _CONFIGURE_GOROUTINES_STACK 0 |
---|
| 2811 | #define _CONFIGURE_ADA_TASKS_STACK 0 |
---|
[b4f635e] | 2812 | |
---|
| 2813 | #if CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK != 0 |
---|
| 2814 | #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK" |
---|
| 2815 | #endif |
---|
| 2816 | |
---|
| 2817 | #if CONFIGURE_EXTRA_TASK_STACKS != 0 |
---|
| 2818 | #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_TASK_STACKS" |
---|
| 2819 | #endif |
---|
| 2820 | |
---|
| 2821 | #endif /* CONFIGURE_EXECUTIVE_RAM_SIZE */ |
---|
| 2822 | |
---|
[07d71279] | 2823 | /* |
---|
[bfe6391] | 2824 | * This macro is calculated to specify the memory required for |
---|
| 2825 | * all tasks and threads of all varieties. |
---|
| 2826 | */ |
---|
[07d71279] | 2827 | #define _CONFIGURE_STACK_SPACE_SIZE \ |
---|
[b4f635e] | 2828 | ( \ |
---|
[07d71279] | 2829 | _CONFIGURE_IDLE_TASKS_STACK + \ |
---|
| 2830 | _CONFIGURE_MPCI_RECEIVE_SERVER_STACK + \ |
---|
| 2831 | _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \ |
---|
| 2832 | _CONFIGURE_TASKS_STACK + \ |
---|
| 2833 | _CONFIGURE_POSIX_THREADS_STACK + \ |
---|
| 2834 | _CONFIGURE_GOROUTINES_STACK + \ |
---|
| 2835 | _CONFIGURE_ADA_TASKS_STACK + \ |
---|
[b4f635e] | 2836 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK + \ |
---|
[07d71279] | 2837 | _CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS + \ |
---|
[3f1bf0c] | 2838 | CONFIGURE_EXTRA_TASK_STACKS + \ |
---|
[07d71279] | 2839 | _CONFIGURE_HEAP_HANDLER_OVERHEAD \ |
---|
[b4f635e] | 2840 | ) |
---|
| 2841 | |
---|
[da6ad56] | 2842 | #ifndef CONFIGURE_MAXIMUM_THREAD_NAME_SIZE |
---|
| 2843 | #define CONFIGURE_MAXIMUM_THREAD_NAME_SIZE 16 |
---|
| 2844 | #endif |
---|
| 2845 | |
---|
[08bae5e6] | 2846 | #ifdef CONFIGURE_INIT |
---|
[5d6b211] | 2847 | typedef union { |
---|
| 2848 | Scheduler_Node Base; |
---|
| 2849 | #ifdef CONFIGURE_SCHEDULER_CBS |
---|
| 2850 | Scheduler_CBS_Node CBS; |
---|
| 2851 | #endif |
---|
| 2852 | #ifdef CONFIGURE_SCHEDULER_EDF |
---|
| 2853 | Scheduler_EDF_Node EDF; |
---|
| 2854 | #endif |
---|
[f3d9f228] | 2855 | #ifdef CONFIGURE_SCHEDULER_EDF_SMP |
---|
| 2856 | Scheduler_EDF_SMP_Node EDF_SMP; |
---|
| 2857 | #endif |
---|
[5d6b211] | 2858 | #ifdef CONFIGURE_SCHEDULER_PRIORITY |
---|
| 2859 | Scheduler_priority_Node Priority; |
---|
| 2860 | #endif |
---|
| 2861 | #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP |
---|
| 2862 | Scheduler_SMP_Node Simple_SMP; |
---|
| 2863 | #endif |
---|
| 2864 | #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP |
---|
| 2865 | Scheduler_priority_SMP_Node Priority_SMP; |
---|
| 2866 | #endif |
---|
| 2867 | #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP |
---|
| 2868 | Scheduler_priority_affinity_SMP_Node Priority_affinity_SMP; |
---|
| 2869 | #endif |
---|
| 2870 | #ifdef CONFIGURE_SCHEDULER_STRONG_APA |
---|
| 2871 | Scheduler_strong_APA_Node Strong_APA; |
---|
| 2872 | #endif |
---|
| 2873 | #ifdef CONFIGURE_SCHEDULER_USER_PER_THREAD |
---|
| 2874 | CONFIGURE_SCHEDULER_USER_PER_THREAD User; |
---|
| 2875 | #endif |
---|
| 2876 | } Configuration_Scheduler_node; |
---|
| 2877 | |
---|
| 2878 | #ifdef RTEMS_SMP |
---|
| 2879 | const size_t _Scheduler_Node_size = sizeof( Configuration_Scheduler_node ); |
---|
| 2880 | #endif |
---|
| 2881 | |
---|
[da6ad56] | 2882 | const size_t _Thread_Maximum_name_size = CONFIGURE_MAXIMUM_THREAD_NAME_SIZE; |
---|
| 2883 | |
---|
[69aa3349] | 2884 | typedef struct { |
---|
| 2885 | Thread_Control Control; |
---|
| 2886 | #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0 |
---|
| 2887 | void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ]; |
---|
| 2888 | #endif |
---|
[61d5c886] | 2889 | Configuration_Scheduler_node Scheduler_nodes[ _CONFIGURE_SCHEDULER_COUNT ]; |
---|
[69aa3349] | 2890 | RTEMS_API_Control API_RTEMS; |
---|
| 2891 | #ifdef RTEMS_POSIX_API |
---|
| 2892 | POSIX_API_Control API_POSIX; |
---|
| 2893 | #endif |
---|
[da6ad56] | 2894 | #if CONFIGURE_MAXIMUM_THREAD_NAME_SIZE > 1 |
---|
| 2895 | char name[ CONFIGURE_MAXIMUM_THREAD_NAME_SIZE ]; |
---|
| 2896 | #endif |
---|
[69aa3349] | 2897 | #if !defined(RTEMS_SCHEDSIM) \ |
---|
| 2898 | && defined(RTEMS_NEWLIB) \ |
---|
| 2899 | && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 2900 | struct _reent Newlib; |
---|
| 2901 | #else |
---|
| 2902 | struct { /* Empty */ } Newlib; |
---|
| 2903 | #endif |
---|
| 2904 | } Configuration_Thread_control; |
---|
| 2905 | |
---|
| 2906 | const size_t _Thread_Control_size = sizeof( Configuration_Thread_control ); |
---|
| 2907 | |
---|
| 2908 | const Thread_Control_add_on _Thread_Control_add_ons[] = { |
---|
| 2909 | { |
---|
[5d6b211] | 2910 | offsetof( Configuration_Thread_control, Control.Scheduler.nodes ), |
---|
| 2911 | offsetof( Configuration_Thread_control, Scheduler_nodes ) |
---|
[69aa3349] | 2912 | }, { |
---|
| 2913 | offsetof( |
---|
| 2914 | Configuration_Thread_control, |
---|
| 2915 | Control.API_Extensions[ THREAD_API_RTEMS ] |
---|
| 2916 | ), |
---|
| 2917 | offsetof( Configuration_Thread_control, API_RTEMS ) |
---|
| 2918 | }, { |
---|
| 2919 | offsetof( |
---|
| 2920 | Configuration_Thread_control, |
---|
| 2921 | Control.libc_reent |
---|
| 2922 | ), |
---|
| 2923 | offsetof( Configuration_Thread_control, Newlib ) |
---|
| 2924 | } |
---|
[da6ad56] | 2925 | #if CONFIGURE_MAXIMUM_THREAD_NAME_SIZE > 1 |
---|
| 2926 | , { |
---|
| 2927 | offsetof( |
---|
| 2928 | Configuration_Thread_control, |
---|
| 2929 | Control.Join_queue.Queue.name |
---|
| 2930 | ), |
---|
| 2931 | offsetof( Configuration_Thread_control, name ) |
---|
| 2932 | } |
---|
| 2933 | #endif |
---|
[69aa3349] | 2934 | #ifdef RTEMS_POSIX_API |
---|
| 2935 | , { |
---|
| 2936 | offsetof( |
---|
| 2937 | Configuration_Thread_control, |
---|
| 2938 | Control.API_Extensions[ THREAD_API_POSIX ] |
---|
| 2939 | ), |
---|
| 2940 | offsetof( Configuration_Thread_control, API_POSIX ) |
---|
| 2941 | } |
---|
| 2942 | #endif |
---|
| 2943 | }; |
---|
| 2944 | |
---|
| 2945 | const size_t _Thread_Control_add_on_count = |
---|
| 2946 | RTEMS_ARRAY_SIZE( _Thread_Control_add_ons ); |
---|
| 2947 | |
---|
[cea5ff7] | 2948 | const uint32_t _Watchdog_Nanoseconds_per_tick = |
---|
| 2949 | 1000 * CONFIGURE_MICROSECONDS_PER_TICK; |
---|
| 2950 | |
---|
[27cfe7c] | 2951 | const uint32_t _Watchdog_Ticks_per_second = _CONFIGURE_TICKS_PER_SECOND; |
---|
| 2952 | |
---|
[5877cc3a] | 2953 | /** |
---|
[27f071cd] | 2954 | * This is the Classic API Configuration Table. |
---|
[5877cc3a] | 2955 | */ |
---|
| 2956 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
[07d71279] | 2957 | _CONFIGURE_TASKS, |
---|
| 2958 | CONFIGURE_MAXIMUM_TIMERS + _CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER, |
---|
[03e5a780] | 2959 | CONFIGURE_MAXIMUM_SEMAPHORES, |
---|
[5877cc3a] | 2960 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
| 2961 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
| 2962 | CONFIGURE_MAXIMUM_REGIONS, |
---|
| 2963 | CONFIGURE_MAXIMUM_PORTS, |
---|
| 2964 | CONFIGURE_MAXIMUM_PERIODS, |
---|
[07d71279] | 2965 | _CONFIGURE_BARRIERS, |
---|
[5877cc3a] | 2966 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
| 2967 | CONFIGURE_INIT_TASK_TABLE |
---|
| 2968 | }; |
---|
[e6d4b1d] | 2969 | |
---|
[e97806a] | 2970 | #if CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES > 0 |
---|
| 2971 | const uint32_t _Configuration_POSIX_Maximum_message_queues = |
---|
| 2972 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES; |
---|
| 2973 | #endif |
---|
| 2974 | |
---|
| 2975 | #if CONFIGURE_MAXIMUM_POSIX_SEMAPHORES > 0 |
---|
| 2976 | const uint32_t _Configuration_POSIX_Maximum_named_semaphores = |
---|
| 2977 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; |
---|
| 2978 | #endif |
---|
| 2979 | |
---|
| 2980 | #if CONFIGURE_MAXIMUM_POSIX_SHMS > 0 |
---|
| 2981 | const uint32_t _Configuration_POSIX_Maximum_shms = |
---|
| 2982 | CONFIGURE_MAXIMUM_POSIX_SHMS; |
---|
| 2983 | #endif |
---|
| 2984 | |
---|
| 2985 | #if _CONFIGURE_POSIX_THREADS > 0 |
---|
| 2986 | const uint32_t _Configuration_POSIX_Maximum_threads = |
---|
| 2987 | _CONFIGURE_POSIX_THREADS; |
---|
| 2988 | #endif |
---|
| 2989 | |
---|
[5877cc3a] | 2990 | #ifdef RTEMS_POSIX_API |
---|
[e97806a] | 2991 | #if CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS > 0 |
---|
| 2992 | const uint32_t _Configuration_POSIX_Maximum_queued_signals = |
---|
| 2993 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS; |
---|
| 2994 | #endif |
---|
[fd27bae] | 2995 | |
---|
[e97806a] | 2996 | #if CONFIGURE_MAXIMUM_POSIX_TIMERS > 0 |
---|
| 2997 | const uint32_t _Configuration_POSIX_Maximum_timers = |
---|
| 2998 | CONFIGURE_MAXIMUM_POSIX_TIMERS; |
---|
| 2999 | #endif |
---|
[5877cc3a] | 3000 | #endif |
---|
[2eba45d] | 3001 | |
---|
[e97806a] | 3002 | const size_t _Configuration_POSIX_Minimum_stack_size = |
---|
| 3003 | CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE; |
---|
| 3004 | |
---|
[6784547] | 3005 | /** |
---|
[27f071cd] | 3006 | * This variable specifies the minimum stack size for tasks in an RTEMS |
---|
| 3007 | * application. |
---|
[ecf0f4c] | 3008 | * |
---|
[27f071cd] | 3009 | * NOTE: This is left as a simple uint32_t so it can be externed as |
---|
| 3010 | * needed without requring being high enough logical to |
---|
| 3011 | * include the full configuration table. |
---|
[ecf0f4c] | 3012 | */ |
---|
[28352fae] | 3013 | uint32_t rtems_minimum_stack_size = |
---|
[ecf0f4c] | 3014 | CONFIGURE_MINIMUM_TASK_STACK_SIZE; |
---|
| 3015 | |
---|
[5877cc3a] | 3016 | /** |
---|
[27f071cd] | 3017 | * This is the primary Configuration Table for this application. |
---|
[5877cc3a] | 3018 | */ |
---|
[ae4f125e] | 3019 | const rtems_configuration_table Configuration = { |
---|
[5877cc3a] | 3020 | CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */ |
---|
[07d71279] | 3021 | _CONFIGURE_STACK_SPACE_SIZE, /* required stack space */ |
---|
[5877cc3a] | 3022 | CONFIGURE_MAXIMUM_USER_EXTENSIONS, /* maximum dynamic extensions */ |
---|
[07d71279] | 3023 | _CONFIGURE_POSIX_KEYS, /* POSIX keys are always */ |
---|
[e6c87f7] | 3024 | CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS, /* enabled */ |
---|
[5877cc3a] | 3025 | CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */ |
---|
| 3026 | CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */ |
---|
| 3027 | CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */ |
---|
| 3028 | CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */ |
---|
[9fa3cf0d] | 3029 | CONFIGURE_TASK_STACK_ALLOCATOR_INIT, /* stack allocator init */ |
---|
[5877cc3a] | 3030 | CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */ |
---|
| 3031 | CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */ |
---|
| 3032 | CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */ |
---|
[b4f635e] | 3033 | #ifdef CONFIGURE_UNIFIED_WORK_AREAS /* true for unified work areas */ |
---|
| 3034 | true, |
---|
| 3035 | #else |
---|
| 3036 | false, |
---|
| 3037 | #endif |
---|
| 3038 | #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE /* true to avoid |
---|
| 3039 | work space for thread stack |
---|
| 3040 | allocation */ |
---|
| 3041 | true, |
---|
| 3042 | #else |
---|
| 3043 | false, |
---|
| 3044 | #endif |
---|
[6bc63df1] | 3045 | #ifdef RTEMS_SMP |
---|
| 3046 | #ifdef _CONFIGURE_SMP_APPLICATION |
---|
| 3047 | true, |
---|
| 3048 | #else |
---|
| 3049 | false, |
---|
| 3050 | #endif |
---|
| 3051 | #endif |
---|
[07d71279] | 3052 | _CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of static extensions */ |
---|
[2292ca22] | 3053 | _CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to static extensions */ |
---|
[5877cc3a] | 3054 | #if defined(RTEMS_MULTIPROCESSING) |
---|
| 3055 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
| 3056 | #endif |
---|
[6c2eedc] | 3057 | #ifdef RTEMS_SMP |
---|
[334e1d2] | 3058 | _CONFIGURE_MAXIMUM_PROCESSORS, |
---|
[6c2eedc] | 3059 | #endif |
---|
[5877cc3a] | 3060 | }; |
---|
[08bae5e6] | 3061 | #endif |
---|
| 3062 | |
---|
[06dcaf0] | 3063 | #if defined(RTEMS_SMP) |
---|
| 3064 | /* |
---|
| 3065 | * Instantiate the Per CPU information based upon the user configuration. |
---|
| 3066 | */ |
---|
| 3067 | #if defined(CONFIGURE_INIT) |
---|
[334e1d2] | 3068 | Per_CPU_Control_envelope _Per_CPU_Information[_CONFIGURE_MAXIMUM_PROCESSORS]; |
---|
[06dcaf0] | 3069 | #endif |
---|
| 3070 | |
---|
| 3071 | #endif |
---|
| 3072 | |
---|
[0ab34c90] | 3073 | /* |
---|
| 3074 | * If the user has configured a set of Classic API Initialization Tasks, |
---|
| 3075 | * then we need to install the code that runs that loop. |
---|
| 3076 | */ |
---|
| 3077 | #ifdef CONFIGURE_INIT |
---|
[d15bae6] | 3078 | #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) || \ |
---|
| 3079 | defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE) |
---|
[1ff8eca] | 3080 | RTEMS_SYSINIT_ITEM( |
---|
| 3081 | _RTEMS_tasks_Initialize_user_tasks_body, |
---|
| 3082 | RTEMS_SYSINIT_CLASSIC_USER_TASKS, |
---|
| 3083 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 3084 | ); |
---|
[0ab34c90] | 3085 | #endif |
---|
| 3086 | #endif |
---|
| 3087 | |
---|
| 3088 | /* |
---|
| 3089 | * If the user has configured a set of POSIX Initialization Threads, |
---|
| 3090 | * then we need to install the code that runs that loop. |
---|
| 3091 | */ |
---|
[54f35888] | 3092 | #ifdef CONFIGURE_INIT |
---|
| 3093 | #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \ |
---|
| 3094 | defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE) |
---|
| 3095 | posix_initialization_threads_table * const |
---|
| 3096 | _Configuration_POSIX_Initialization_threads = |
---|
| 3097 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME; |
---|
| 3098 | |
---|
| 3099 | const size_t _Configuration_POSIX_Initialization_thread_count = |
---|
| 3100 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE; |
---|
| 3101 | |
---|
| 3102 | RTEMS_SYSINIT_ITEM( |
---|
| 3103 | _POSIX_Threads_Initialize_user_threads_body, |
---|
| 3104 | RTEMS_SYSINIT_POSIX_USER_THREADS, |
---|
| 3105 | RTEMS_SYSINIT_ORDER_MIDDLE |
---|
| 3106 | ); |
---|
[0ab34c90] | 3107 | #endif |
---|
| 3108 | #endif |
---|
| 3109 | |
---|
[a31845f7] | 3110 | /* |
---|
| 3111 | * Select PCI Configuration Library |
---|
| 3112 | */ |
---|
| 3113 | #ifdef RTEMS_PCI_CONFIG_LIB |
---|
| 3114 | #ifdef CONFIGURE_INIT |
---|
| 3115 | #define PCI_LIB_NONE 0 |
---|
| 3116 | #define PCI_LIB_AUTO 1 |
---|
| 3117 | #define PCI_LIB_STATIC 2 |
---|
| 3118 | #define PCI_LIB_READ 3 |
---|
| 3119 | #define PCI_LIB_PERIPHERAL 4 |
---|
| 3120 | #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO |
---|
| 3121 | #define PCI_CFG_AUTO_LIB |
---|
| 3122 | #include <pci/cfg.h> |
---|
| 3123 | struct pci_bus pci_hb; |
---|
| 3124 | #define PCI_LIB_INIT pci_config_auto |
---|
| 3125 | #define PCI_LIB_CONFIG pci_config_auto_register |
---|
| 3126 | #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC |
---|
| 3127 | #define PCI_CFG_STATIC_LIB |
---|
| 3128 | #include <pci/cfg.h> |
---|
| 3129 | #define PCI_LIB_INIT pci_config_static |
---|
| 3130 | #define PCI_LIB_CONFIG NULL |
---|
| 3131 | /* Let user define PCI configuration (struct pci_bus pci_hb) */ |
---|
| 3132 | #elif CONFIGURE_PCI_LIB == PCI_LIB_READ |
---|
| 3133 | #define PCI_CFG_READ_LIB |
---|
| 3134 | #include <pci/cfg.h> |
---|
| 3135 | #define PCI_LIB_INIT pci_config_read |
---|
| 3136 | #define PCI_LIB_CONFIG NULL |
---|
| 3137 | struct pci_bus pci_hb; |
---|
| 3138 | #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL |
---|
| 3139 | #define PCI_LIB_INIT pci_config_peripheral |
---|
| 3140 | #define PCI_LIB_CONFIG NULL |
---|
| 3141 | /* Let user define PCI configuration (struct pci_bus pci_hb) */ |
---|
| 3142 | #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE |
---|
| 3143 | #define PCI_LIB_INIT NULL |
---|
| 3144 | #define PCI_LIB_CONFIG NULL |
---|
| 3145 | /* No PCI Configuration at all, user can use/debug access routines */ |
---|
| 3146 | #else |
---|
| 3147 | #error NO PCI LIBRARY DEFINED |
---|
| 3148 | #endif |
---|
| 3149 | |
---|
| 3150 | const int pci_config_lib_type = CONFIGURE_PCI_LIB; |
---|
| 3151 | int (*pci_config_lib_init)(void) = PCI_LIB_INIT; |
---|
| 3152 | void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG; |
---|
| 3153 | #endif |
---|
| 3154 | #endif |
---|
| 3155 | |
---|
[08bae5e6] | 3156 | #ifdef __cplusplus |
---|
| 3157 | } |
---|
| 3158 | #endif |
---|
[8486081] | 3159 | |
---|
[df0bfdf] | 3160 | /****************************************************************** |
---|
| 3161 | ****************************************************************** |
---|
| 3162 | ****************************************************************** |
---|
| 3163 | * CONFIGURATION WARNINGS AND ERROR CHECKING * |
---|
| 3164 | ****************************************************************** |
---|
| 3165 | ****************************************************************** |
---|
| 3166 | ****************************************************************** |
---|
[df49c60] | 3167 | */ |
---|
| 3168 | |
---|
[b4f635e] | 3169 | #if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT) |
---|
| 3170 | /** |
---|
[27f071cd] | 3171 | * This is a debug mechanism, so if you need to, the executable will |
---|
| 3172 | * have a structure with various partial values. Add to this as you |
---|
| 3173 | * need to. Viewing this structure in gdb combined with dumping |
---|
| 3174 | * the Configuration structures generated should help a lot in tracing |
---|
| 3175 | * down errors and analyzing where over and under allocations are. |
---|
[b4f635e] | 3176 | */ |
---|
| 3177 | typedef struct { |
---|
| 3178 | uint32_t SYSTEM_OVERHEAD; |
---|
| 3179 | uint32_t STATIC_EXTENSIONS; |
---|
| 3180 | uint32_t INITIALIZATION_THREADS_STACKS; |
---|
| 3181 | |
---|
| 3182 | uint32_t PER_INTEGER_TASK; |
---|
| 3183 | uint32_t FP_OVERHEAD; |
---|
| 3184 | uint32_t CLASSIC; |
---|
| 3185 | uint32_t POSIX; |
---|
| 3186 | |
---|
| 3187 | /* System overhead pieces */ |
---|
| 3188 | uint32_t MEMORY_FOR_IDLE_TASK; |
---|
| 3189 | |
---|
| 3190 | /* Classic API Pieces */ |
---|
| 3191 | uint32_t CLASSIC_TASKS; |
---|
| 3192 | uint32_t TIMERS; |
---|
| 3193 | uint32_t SEMAPHORES; |
---|
| 3194 | uint32_t MESSAGE_QUEUES; |
---|
| 3195 | uint32_t PARTITIONS; |
---|
| 3196 | uint32_t REGIONS; |
---|
| 3197 | uint32_t PORTS; |
---|
| 3198 | uint32_t PERIODS; |
---|
| 3199 | uint32_t BARRIERS; |
---|
| 3200 | uint32_t USER_EXTENSIONS; |
---|
| 3201 | |
---|
[e6c87f7] | 3202 | /* POSIX API managers that are always enabled */ |
---|
| 3203 | uint32_t POSIX_KEYS; |
---|
| 3204 | |
---|
[b4f635e] | 3205 | /* POSIX API Pieces */ |
---|
[9318cfb0] | 3206 | #ifdef RTEMS_POSIX_API |
---|
[b4f635e] | 3207 | uint32_t POSIX_TIMERS; |
---|
| 3208 | uint32_t POSIX_QUEUED_SIGNALS; |
---|
[9318cfb0] | 3209 | #endif |
---|
[fe7aefd5] | 3210 | uint32_t POSIX_MESSAGE_QUEUES; |
---|
[b4f635e] | 3211 | uint32_t POSIX_SEMAPHORES; |
---|
[ba776282] | 3212 | uint32_t POSIX_SHMS; |
---|
[b4f635e] | 3213 | |
---|
| 3214 | /* Stack space sizes */ |
---|
| 3215 | uint32_t IDLE_TASKS_STACK; |
---|
| 3216 | uint32_t INITIALIZATION_THREADS_EXTRA_STACKS; |
---|
| 3217 | uint32_t TASKS_STACK; |
---|
| 3218 | uint32_t POSIX_THREADS_STACK; |
---|
| 3219 | uint32_t GOROUTINES_STACK; |
---|
| 3220 | uint32_t ADA_TASKS_STACK; |
---|
| 3221 | uint32_t EXTRA_MPCI_RECEIVE_SERVER_STACK; |
---|
| 3222 | uint32_t EXTRA_TASK_STACKS; |
---|
| 3223 | } Configuration_Debug_t; |
---|
| 3224 | |
---|
| 3225 | Configuration_Debug_t Configuration_Memory_Debug = { |
---|
| 3226 | /* General Information */ |
---|
[07d71279] | 3227 | _CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD, |
---|
| 3228 | _CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS, |
---|
| 3229 | _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS, |
---|
| 3230 | _CONFIGURE_MEMORY_FOR_TASKS(1, 0), |
---|
| 3231 | _CONFIGURE_MEMORY_FOR_TASKS(0, 1), |
---|
| 3232 | _CONFIGURE_MEMORY_FOR_CLASSIC, |
---|
| 3233 | _CONFIGURE_MEMORY_FOR_POSIX, |
---|
[b4f635e] | 3234 | |
---|
| 3235 | /* System overhead pieces */ |
---|
[07d71279] | 3236 | _CONFIGURE_MEMORY_FOR_INTERNAL_TASKS, |
---|
[b4f635e] | 3237 | |
---|
| 3238 | /* Classic API Pieces */ |
---|
[07d71279] | 3239 | _CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0), |
---|
| 3240 | _CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS), |
---|
[03e5a780] | 3241 | _CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES), |
---|
[07d71279] | 3242 | _CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES), |
---|
| 3243 | _CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS), |
---|
| 3244 | _CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ), |
---|
| 3245 | _CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS), |
---|
| 3246 | _CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS), |
---|
| 3247 | _CONFIGURE_MEMORY_FOR_BARRIERS(_CONFIGURE_BARRIERS), |
---|
| 3248 | _CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS), |
---|
| 3249 | _CONFIGURE_MEMORY_FOR_POSIX_KEYS( _CONFIGURE_POSIX_KEYS, \ |
---|
[e6c87f7] | 3250 | CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ), |
---|
[b4f635e] | 3251 | |
---|
| 3252 | /* POSIX API Pieces */ |
---|
[701057e0] | 3253 | #ifdef RTEMS_POSIX_API |
---|
| 3254 | _CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ), |
---|
[07d71279] | 3255 | _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( |
---|
[b4f635e] | 3256 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ), |
---|
[fe7aefd5] | 3257 | #endif |
---|
[07d71279] | 3258 | _CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( |
---|
[b4f635e] | 3259 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ), |
---|
[07d71279] | 3260 | _CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ), |
---|
| 3261 | _CONFIGURE_MEMORY_FOR_POSIX_SHMS( CONFIGURE_MAXIMUM_POSIX_SHMS ), |
---|
[b4f635e] | 3262 | |
---|
| 3263 | /* Stack space sizes */ |
---|
[07d71279] | 3264 | _CONFIGURE_IDLE_TASKS_STACK, |
---|
| 3265 | _CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS, |
---|
| 3266 | _CONFIGURE_TASKS_STACK, |
---|
| 3267 | _CONFIGURE_POSIX_THREADS_STACK, |
---|
| 3268 | _CONFIGURE_GOROUTINES_STACK, |
---|
| 3269 | _CONFIGURE_ADA_TASKS_STACK, |
---|
[b4f635e] | 3270 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, |
---|
| 3271 | CONFIGURE_EXTRA_TASK_STACKS |
---|
| 3272 | }; |
---|
| 3273 | #endif |
---|
| 3274 | |
---|
[df49c60] | 3275 | /* |
---|
[80f9d77] | 3276 | * Make sure a task/thread of some sort is configured. |
---|
| 3277 | * |
---|
| 3278 | * When analyzing RTEMS to find the smallest possible of memory |
---|
| 3279 | * that must be allocated, you probably do want to configure 0 |
---|
| 3280 | * tasks/threads so there is a smaller set of calls to _Workspace_Allocate |
---|
| 3281 | * to analyze. |
---|
| 3282 | */ |
---|
| 3283 | #if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
| 3284 | #if (CONFIGURE_MAXIMUM_TASKS == 0) && \ |
---|
| 3285 | (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \ |
---|
[a46e6b6d] | 3286 | (CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \ |
---|
| 3287 | (CONFIGURE_MAXIMUM_GOROUTINES == 0) |
---|
[80f9d77] | 3288 | #error "CONFIGURATION ERROR: No tasks or threads configured!!" |
---|
| 3289 | #endif |
---|
[df49c60] | 3290 | #endif |
---|
| 3291 | |
---|
[5aecf664] | 3292 | #ifndef RTEMS_SCHEDSIM |
---|
[df49c60] | 3293 | /* |
---|
| 3294 | * Make sure at least one of the initialization task/thread |
---|
| 3295 | * tables was defined. |
---|
| 3296 | */ |
---|
| 3297 | #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 3298 | !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \ |
---|
[80f9d77] | 3299 | !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
[168ba07] | 3300 | #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!" |
---|
[df49c60] | 3301 | #endif |
---|
[5aecf664] | 3302 | #endif |
---|
[df49c60] | 3303 | |
---|
[df0bfdf] | 3304 | /* |
---|
| 3305 | * If the user is trying to configure a multiprocessing application and |
---|
| 3306 | * RTEMS was not configured and built multiprocessing, then error out. |
---|
| 3307 | */ |
---|
| 3308 | #if defined(CONFIGURE_MP_APPLICATION) && \ |
---|
| 3309 | !defined(RTEMS_MULTIPROCESSING) |
---|
| 3310 | #error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!" |
---|
| 3311 | #endif |
---|
| 3312 | |
---|
| 3313 | /* |
---|
| 3314 | * If an attempt was made to configure POSIX objects and |
---|
| 3315 | * the POSIX API was not configured into RTEMS, error out. |
---|
[e6c87f7] | 3316 | * |
---|
[c9a0a10] | 3317 | * @note POSIX Keys are always available so the parameters |
---|
[e6c87f7] | 3318 | * CONFIGURE_MAXIMUM_POSIX_KEYS and |
---|
| 3319 | * CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS are not in this list. |
---|
[df0bfdf] | 3320 | */ |
---|
| 3321 | #if !defined(RTEMS_POSIX_API) |
---|
[54f35888] | 3322 | #if ((CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \ |
---|
| 3323 | (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0)) |
---|
[df0bfdf] | 3324 | #error "CONFIGURATION ERROR: POSIX API support not configured!!" |
---|
| 3325 | #endif |
---|
| 3326 | #endif |
---|
| 3327 | |
---|
[6784547] | 3328 | #if !defined(RTEMS_SCHEDSIM) |
---|
| 3329 | #if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE) |
---|
| 3330 | /* |
---|
| 3331 | * You must either explicity include or exclude the clock driver. |
---|
| 3332 | * It is such a common newbie error to leave it out. Maybe this |
---|
| 3333 | * will put an end to it. |
---|
| 3334 | * |
---|
| 3335 | * NOTE: If you are using the timer driver, it is considered |
---|
| 3336 | * mutually exclusive with the clock driver because the |
---|
| 3337 | * drivers are assumed to use the same "timer" hardware |
---|
| 3338 | * on many boards. |
---|
| 3339 | */ |
---|
| 3340 | #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 3341 | !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \ |
---|
| 3342 | !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) |
---|
| 3343 | #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?" |
---|
| 3344 | #endif |
---|
| 3345 | |
---|
| 3346 | /* |
---|
| 3347 | * Only one of the following three configuration parameters should be |
---|
| 3348 | * defined at a time. |
---|
| 3349 | */ |
---|
| 3350 | #if ((defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) + \ |
---|
| 3351 | defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) + \ |
---|
| 3352 | defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER)) > 1) |
---|
| 3353 | #error "CONFIGURATION ERROR: More than one clock/timer driver configuration parameter specified?!?" |
---|
| 3354 | #endif |
---|
| 3355 | #endif /* !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE) */ |
---|
| 3356 | #endif /* !defined(RTEMS_SCHEDSIM) */ |
---|
[df0bfdf] | 3357 | |
---|
[0ab34c90] | 3358 | /* |
---|
| 3359 | * These names have been obsoleted so make the user application stop compiling |
---|
| 3360 | */ |
---|
| 3361 | #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \ |
---|
| 3362 | defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \ |
---|
| 3363 | defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \ |
---|
| 3364 | defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \ |
---|
| 3365 | defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER) |
---|
| 3366 | #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete" |
---|
| 3367 | #endif |
---|
| 3368 | |
---|
[80f9d77] | 3369 | /* |
---|
| 3370 | * Validate the configured maximum priority |
---|
| 3371 | */ |
---|
| 3372 | #if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \ |
---|
| 3373 | (CONFIGURE_MAXIMUM_PRIORITY != 7) && \ |
---|
| 3374 | (CONFIGURE_MAXIMUM_PRIORITY != 15) && \ |
---|
| 3375 | (CONFIGURE_MAXIMUM_PRIORITY != 31) && \ |
---|
| 3376 | (CONFIGURE_MAXIMUM_PRIORITY != 63) && \ |
---|
| 3377 | (CONFIGURE_MAXIMUM_PRIORITY != 127) && \ |
---|
| 3378 | (CONFIGURE_MAXIMUM_PRIORITY != 255)) |
---|
| 3379 | #error "Maximum priority is not 1 less than a power of 2 between 4 and 256" |
---|
| 3380 | #endif |
---|
[28352fae] | 3381 | |
---|
[80f9d77] | 3382 | #if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM) |
---|
| 3383 | #error "Maximum priority configured higher than supported by target." |
---|
| 3384 | #endif |
---|
| 3385 | |
---|
[68f339b6] | 3386 | #ifdef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
| 3387 | #warning "The CONFIGURE_HAS_OWN_CONFIGURATION_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 3388 | #endif |
---|
| 3389 | |
---|
[bd5cec41] | 3390 | #ifdef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE |
---|
| 3391 | #warning "The CONFIGURE_HAS_OWN_FILESYSTEM_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 3392 | #endif |
---|
| 3393 | |
---|
[5fa0a1f6] | 3394 | #ifdef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
| 3395 | #warning "The CONFIGURE_HAS_OWN_MOUNT_TABLE configuration option is obsolete since RTEMS 5.1" |
---|
| 3396 | #endif |
---|
| 3397 | |
---|
[53b6484] | 3398 | #ifdef CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
| 3399 | #warning "The CONFIGURE_NUMBER_OF_TERMIOS_PORTS configuration option is obsolete since RTEMS 5.1" |
---|
[2c12262] | 3400 | #endif |
---|
| 3401 | |
---|
[9c0cefb] | 3402 | #ifdef CONFIGURE_MAXIMUM_POSIX_BARRIERS |
---|
[9526b034] | 3403 | #warning "The CONFIGURE_MAXIMUM_POSIX_BARRIERS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3404 | #endif |
---|
| 3405 | |
---|
| 3406 | #ifdef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
[9526b034] | 3407 | #warning "The CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3408 | #endif |
---|
| 3409 | |
---|
[c8982e5] | 3410 | #ifdef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS |
---|
[9526b034] | 3411 | #warning "The CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3412 | #endif |
---|
| 3413 | |
---|
| 3414 | #ifdef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
[9526b034] | 3415 | #warning "The CONFIGURE_MAXIMUM_POSIX_MUTEXES configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3416 | #endif |
---|
| 3417 | |
---|
| 3418 | #ifdef CONFIGURE_MAXIMUM_POSIX_RWLOCKS |
---|
[9526b034] | 3419 | #warning "The CONFIGURE_MAXIMUM_POSIX_RWLOCKS configuration option is obsolete since RTEMS 5.1" |
---|
[9c0cefb] | 3420 | #endif |
---|
| 3421 | |
---|
| 3422 | #ifdef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS |
---|
[9526b034] | 3423 | #warning "The CONFIGURE_MAXIMUM_POSIX_SPINLOCKS configuration option is obsolete since RTEMS 5.1" |
---|
[ade17392] | 3424 | #endif |
---|
| 3425 | |
---|
[a346ebba] | 3426 | #ifdef CONFIGURE_MAXIMUM_PTYS |
---|
| 3427 | #warning "The CONFIGURE_MAXIMUM_PTYS configuration option is obsolete since RTEMS 5.1" |
---|
| 3428 | #endif |
---|
| 3429 | |
---|
[53b6484] | 3430 | #ifdef CONFIGURE_TERMIOS_DISABLED |
---|
| 3431 | #warning "The CONFIGURE_TERMIOS_DISABLED configuration option is obsolete since RTEMS 5.1" |
---|
| 3432 | #endif |
---|
| 3433 | |
---|
[b5c9064] | 3434 | /* |
---|
| 3435 | * POSIX Key pair shouldn't be less than POSIX Key, which is highly |
---|
| 3436 | * likely to be error. |
---|
| 3437 | */ |
---|
[e6c87f7] | 3438 | #if (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) && \ |
---|
| 3439 | (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS != 0) |
---|
| 3440 | #if (CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS < CONFIGURE_MAXIMUM_POSIX_KEYS) |
---|
| 3441 | #error "Fewer POSIX Key pairs than POSIX Key!" |
---|
| 3442 | #endif |
---|
[b5c9064] | 3443 | #endif |
---|
| 3444 | |
---|
[69be1a22] | 3445 | /* |
---|
| 3446 | * IMFS block size for in memory files (memfiles) must be a power of |
---|
| 3447 | * two between 16 and 512 inclusive. |
---|
| 3448 | */ |
---|
| 3449 | #if ((CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16) && \ |
---|
| 3450 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32) && \ |
---|
| 3451 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64) && \ |
---|
| 3452 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128) && \ |
---|
| 3453 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256) && \ |
---|
| 3454 | (CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512)) |
---|
| 3455 | #error "IMFS Memfile block size must be a power of 2 between 16 and 512" |
---|
| 3456 | #endif |
---|
| 3457 | |
---|
| 3458 | |
---|
[08bae5e6] | 3459 | #endif |
---|
| 3460 | /* end of include file */ |
---|