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