[08bae5e6] | 1 | /* confdefs.h |
---|
| 2 | * |
---|
| 3 | * This include file contains the configuration table template that will |
---|
| 4 | * be used by the single processor tests to define its default configuration |
---|
| 5 | * parameters. |
---|
| 6 | * |
---|
| 7 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
| 8 | * On-Line Applications Research Corporation (OAR). |
---|
| 9 | * All rights assigned to U.S. Government, 1994. |
---|
| 10 | * |
---|
| 11 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
| 12 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
| 13 | * notice must appear in all copies of this file and its derivatives. |
---|
| 14 | * |
---|
| 15 | * $Id$ |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
| 19 | #define __CONFIGURATION_TEMPLATE_h |
---|
| 20 | |
---|
| 21 | #ifdef __cplusplus |
---|
| 22 | extern "C" { |
---|
| 23 | #endif |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
| 27 | extern rtems_driver_address_table Device_drivers[]; |
---|
| 28 | extern rtems_configuration_table Configuration; |
---|
| 29 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
| 30 | |
---|
| 31 | /* |
---|
| 32 | * Default User Initialization Task Table. This table guarantees that |
---|
| 33 | * one user initialization table is defined. |
---|
| 34 | */ |
---|
| 35 | |
---|
| 36 | #ifndef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 37 | |
---|
| 38 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
| 39 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' ) |
---|
| 40 | #endif |
---|
| 41 | |
---|
| 42 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
| 43 | #define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE |
---|
| 44 | #endif |
---|
| 45 | |
---|
| 46 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
| 47 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
| 48 | #endif |
---|
| 49 | |
---|
| 50 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
| 51 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
| 52 | #endif |
---|
| 53 | |
---|
| 54 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
| 55 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
| 56 | #endif |
---|
| 57 | |
---|
| 58 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
| 59 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
| 60 | #endif |
---|
| 61 | |
---|
| 62 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 63 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
| 64 | #endif |
---|
| 65 | |
---|
| 66 | #ifdef CONFIGURE_INIT |
---|
| 67 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 68 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 69 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 70 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 71 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 72 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 73 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 74 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 75 | } |
---|
| 76 | }; |
---|
| 77 | #endif |
---|
| 78 | |
---|
| 79 | #endif |
---|
| 80 | |
---|
| 81 | /* |
---|
| 82 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
| 83 | * choosen by that test. There is always a null driver entry. |
---|
| 84 | */ |
---|
| 85 | |
---|
| 86 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 87 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 88 | |
---|
| 89 | #ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER |
---|
| 90 | #include <timerdrv.h> |
---|
| 91 | #endif |
---|
| 92 | |
---|
| 93 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
| 94 | #include <stubdrv.h> |
---|
| 95 | #endif |
---|
| 96 | |
---|
| 97 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 98 | |
---|
| 99 | #ifdef CONFIGURE_INIT |
---|
| 100 | rtems_driver_address_table Device_drivers[] = { |
---|
| 101 | #ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER |
---|
| 102 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 103 | #endif |
---|
| 104 | #ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER |
---|
| 105 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 106 | #endif |
---|
| 107 | #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER |
---|
| 108 | STUB_DRIVER_TABLE_ENTRY, |
---|
| 109 | #endif |
---|
| 110 | NULL_DRIVER_TABLE_ENTRY |
---|
| 111 | }; |
---|
| 112 | #endif |
---|
| 113 | |
---|
| 114 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
| 115 | |
---|
| 116 | /* |
---|
| 117 | * Default the number of devices per device driver. This value may be |
---|
| 118 | * overridden by the user. |
---|
| 119 | */ |
---|
| 120 | |
---|
| 121 | #ifndef CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES |
---|
| 122 | |
---|
| 123 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
| 124 | #define CONFIGURE_MAXIMUM_DEVICES 20 |
---|
| 125 | #endif |
---|
| 126 | |
---|
| 127 | #endif /* CONFIGURE_HAS_OWN_NUMBER_OF_DEVICES */ |
---|
| 128 | |
---|
| 129 | /* |
---|
| 130 | * Default Configuration Table. This table contains the most values set in |
---|
| 131 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
| 132 | * customize the environment. |
---|
| 133 | */ |
---|
| 134 | |
---|
| 135 | #ifdef CONFIGURE_MPTEST |
---|
| 136 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
| 137 | |
---|
| 138 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 139 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 140 | #endif |
---|
| 141 | |
---|
| 142 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
| 143 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
| 144 | #endif |
---|
| 145 | |
---|
| 146 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
| 147 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
| 148 | #endif |
---|
| 149 | |
---|
| 150 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
| 151 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
| 152 | #endif |
---|
| 153 | |
---|
| 154 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
| 155 | #include <mpci.h> |
---|
| 156 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
| 157 | #endif |
---|
| 158 | |
---|
| 159 | #ifdef CONFIGURE_INIT |
---|
| 160 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
| 161 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 162 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes in system */ |
---|
| 163 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 164 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 165 | CONFIGURE_MP_MPCI_TABLE_POINTER /* pointer to MPCI config table */ |
---|
| 166 | }; |
---|
| 167 | #endif |
---|
| 168 | |
---|
| 169 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
| 170 | |
---|
| 171 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
| 172 | |
---|
| 173 | #else |
---|
| 174 | |
---|
| 175 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
| 176 | |
---|
| 177 | #endif /* CONFIGURE_MPTEST */ |
---|
| 178 | |
---|
| 179 | /* |
---|
| 180 | * Default Configuration Table. This table contains the most values set in |
---|
| 181 | * the RTEMS Test Suite. Each value may be overridden within each test to |
---|
| 182 | * customize the environment. |
---|
| 183 | */ |
---|
| 184 | |
---|
| 185 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
| 186 | |
---|
| 187 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
| 188 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
| 189 | #endif |
---|
| 190 | |
---|
| 191 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 192 | #define CONFIGURE_MAXIMUM_TASKS 10 |
---|
| 193 | #endif |
---|
| 194 | |
---|
| 195 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
| 196 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
| 197 | #endif |
---|
| 198 | |
---|
| 199 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
| 200 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 201 | #endif |
---|
| 202 | |
---|
| 203 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
| 204 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 205 | #endif |
---|
| 206 | |
---|
| 207 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
| 208 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
| 209 | #endif |
---|
| 210 | |
---|
| 211 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
| 212 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
| 213 | #endif |
---|
| 214 | |
---|
| 215 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
| 216 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 217 | #endif |
---|
| 218 | |
---|
| 219 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
| 220 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 221 | #endif |
---|
| 222 | |
---|
| 223 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
| 224 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
| 225 | #endif |
---|
| 226 | |
---|
| 227 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 228 | #define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 229 | #endif |
---|
| 230 | |
---|
| 231 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 232 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 233 | #endif |
---|
| 234 | |
---|
| 235 | #ifndef CONFIGURE_INITIAL_EXTENSIONS |
---|
| 236 | #define CONFIGURE_INITIAL_EXTENSIONS NULL |
---|
| 237 | #endif |
---|
| 238 | |
---|
| 239 | /* Calculate the RAM size based on the maximum number of tasks configured */ |
---|
| 240 | |
---|
| 241 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
| 242 | #define CONFIGURE_MEMORY_REQUIRED(_tasks) \ |
---|
| 243 | (_tasks) * ( (sizeof(Thread_Control) + CONTEXT_FP_SIZE + STACK_MINIMUM_SIZE)) |
---|
| 244 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
| 245 | ( (CONFIGURE_MEMORY_REQUIRED(CONFIGURE_MAXIMUM_TASKS) + (128*1024)) &0xffff0000) |
---|
| 246 | #endif |
---|
| 247 | |
---|
| 248 | #ifdef CONFIGURE_INIT |
---|
| 249 | rtems_configuration_table Configuration = { |
---|
| 250 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
| 251 | CONFIGURE_EXECUTIVE_RAM_SIZE, |
---|
| 252 | CONFIGURE_MAXIMUM_TASKS, |
---|
| 253 | CONFIGURE_MAXIMUM_TIMERS, |
---|
| 254 | CONFIGURE_MAXIMUM_SEMAPHORES, |
---|
| 255 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
| 256 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
| 257 | CONFIGURE_MAXIMUM_REGIONS, |
---|
| 258 | CONFIGURE_MAXIMUM_PORTS, |
---|
| 259 | CONFIGURE_MAXIMUM_PERIODS, |
---|
| 260 | CONFIGURE_MAXIMUM_USER_EXTENSIONS, |
---|
| 261 | CONFIGURE_MICROSECONDS_PER_TICK, |
---|
| 262 | CONFIGURE_TICKS_PER_TIMESLICE, |
---|
| 263 | sizeof (Initialization_tasks)/ |
---|
| 264 | sizeof(rtems_initialization_tasks_table), /* number of init tasks */ |
---|
| 265 | Initialization_tasks, /* init task(s) table */ |
---|
| 266 | sizeof (Device_drivers)/ |
---|
| 267 | sizeof(rtems_driver_address_table), /* number of device drivers */ |
---|
| 268 | CONFIGURE_MAXIMUM_DEVICES, |
---|
| 269 | Device_drivers, /* pointer to driver table */ |
---|
| 270 | CONFIGURE_INITIAL_EXTENSIONS, /* pointer to initial extensions */ |
---|
| 271 | CONFIGURE_MULTIPROCESSING_TABLE /* ptr to MP config table */ |
---|
| 272 | }; |
---|
| 273 | #endif |
---|
| 274 | |
---|
| 275 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
| 276 | |
---|
| 277 | #ifdef __cplusplus |
---|
| 278 | } |
---|
| 279 | #endif |
---|
| 280 | |
---|
| 281 | #endif |
---|
| 282 | /* end of include file */ |
---|