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