|
0
|
1 #ifndef CYGONCE_PKGCONF_HAL_H |
|
|
2 #define CYGONCE_PKGCONF_HAL_H |
|
|
3 // ==================================================================== |
|
|
4 // |
|
2
|
5 // pkgconf/hal.h |
|
0
|
6 // |
|
2
|
7 // HAL configuration file |
|
0
|
8 // |
|
|
9 // ==================================================================== |
|
|
10 //####COPYRIGHTBEGIN#### |
|
|
11 // |
|
|
12 // ------------------------------------------- |
|
|
13 // The contents of this file are subject to the Cygnus eCos Public License |
|
|
14 // Version 1.0 (the "License"); you may not use this file except in |
|
|
15 // compliance with the License. You may obtain a copy of the License at |
|
|
16 // http://sourceware.cygnus.com/ecos |
|
|
17 // |
|
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
|
20 // License for the specific language governing rights and limitations under |
|
|
21 // the License. |
|
|
22 // |
|
|
23 // The Original Code is eCos - Embedded Cygnus Operating System, released |
|
|
24 // September 30, 1998. |
|
|
25 // |
|
|
26 // The Initial Developer of the Original Code is Cygnus. Portions created |
|
2
|
27 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved. |
|
0
|
28 // ------------------------------------------- |
|
|
29 // |
|
|
30 //####COPYRIGHTEND#### |
|
|
31 // ==================================================================== |
|
|
32 //#####DESCRIPTIONBEGIN#### |
|
|
33 // |
|
2
|
34 // Author(s): nickg, jskov |
|
|
35 // Contributors: nickg, jskov, |
|
|
36 // jlarmour |
|
|
37 // Date: 1999-01-21 |
|
|
38 // Purpose: To allow the user to edit HAL configuration options. |
|
0
|
39 // Description: |
|
|
40 // |
|
|
41 //####DESCRIPTIONEND#### |
|
|
42 // |
|
|
43 // ==================================================================== |
|
|
44 |
|
|
45 /* --------------------------------------------------------------------- |
|
|
46 * Some of the HAL configuration options depend on global options, |
|
|
47 * so it is necessary to include the global options first. |
|
|
48 */ |
|
|
49 |
|
|
50 #include <pkgconf/system.h> |
|
|
51 |
|
|
52 /* --------------------------------------------------------------------- |
|
|
53 Define an overall package for the HAL. All other HAL packages |
|
|
54 live below this. |
|
|
55 |
|
|
56 {{CFG_DATA |
|
|
57 |
|
|
58 cdl_package CYGPKG_HAL { |
|
|
59 display "eCos HAL" |
|
|
60 type dummy |
|
|
61 description " |
|
|
62 The eCos HAL package provide a porting layer for |
|
|
63 higher-level parts of the system such as the kernel and the |
|
|
64 C library. Each installation should have HAL packages for |
|
|
65 one or more architectures, and for each architecture there |
|
|
66 may be one or more supported platforms. It is necessary to |
|
|
67 select one target architecture and one platform for that |
|
|
68 architecture. There are also a number of configuration |
|
|
69 options that are common to all HAL packages." |
|
2
|
70 doc ref/ecos-ref/the-ecos-hardware-abstraction-layer-hal.html |
|
0
|
71 } |
|
|
72 |
|
|
73 }}CFG_DATA */ |
|
|
74 |
|
|
75 /* --------------------------------------------------------------------- |
|
|
76 * The platform-independent HAL configuration options go here, |
|
|
77 * inside a component CYGPKG_HAL_COMMON. In practice some of the |
|
|
78 * options are not completely platform-independent, but they are |
|
|
79 * likely to be available on the vast majority of platforms and |
|
|
80 * it is more convenient to provide them by default and let the |
|
|
81 * appropriate platforms disable them (probably via a suitable |
|
|
82 * interface). |
|
|
83 * |
|
|
84 * The common component is subdivided into components for |
|
|
85 * interrupt handling, thread context, and rom monitor/gdb support. |
|
|
86 |
|
|
87 {{CFG_DATA |
|
|
88 |
|
|
89 cdl_component CYGPKG_HAL_COMMON { |
|
|
90 display "Platform-independent HAL options" |
|
|
91 parent CYGPKG_HAL |
|
|
92 type dummy |
|
|
93 description " |
|
|
94 A number of configuration options are common to most or all |
|
|
95 HAL packages, for example options controlling how much state |
|
|
96 should be saved during a context switch. The implementations |
|
|
97 of these options will vary from architecture to architecture." |
|
|
98 } |
|
|
99 |
|
|
100 cdl_option CYGFUN_HAL_COMMON_KERNEL_SUPPORT { |
|
|
101 display "Provide eCos kernel support" |
|
|
102 parent CYGPKG_HAL_COMMON |
|
|
103 requires CYGPKG_KERNEL |
|
|
104 description " |
|
|
105 The HAL can be configured to either support the full eCos |
|
|
106 kernel, or to support only very simple applications which do |
|
|
107 not require a full kernel. If kernel support is not required |
|
|
108 then some of the startup, exception, and interrupt handling |
|
|
109 code can be eliminated." |
|
|
110 } |
|
|
111 |
|
|
112 }}CFG_DATA */ |
|
|
113 #define CYGFUN_HAL_COMMON_KERNEL_SUPPORT |
|
|
114 |
|
|
115 /* {{CFG_DATA |
|
|
116 |
|
|
117 cdl_component CYGPKG_HAL_COMMON_INTERRUPTS { |
|
|
118 display "HAL interrupt handling" |
|
|
119 parent CYGPKG_HAL_COMMON |
|
|
120 type dummy |
|
|
121 description " |
|
|
122 A number of configuration options related to interrupt |
|
|
123 handling are common to most or all HAL packages, even though |
|
|
124 the implementations will vary from architecture to |
|
|
125 architecture." |
|
|
126 } |
|
|
127 |
|
|
128 cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK { |
|
|
129 display "Use separate stack for interrupts" |
|
|
130 parent CYGPKG_HAL_COMMON_INTERRUPTS |
|
|
131 description " |
|
|
132 When an interrupt occurs this interrupt can be handled either |
|
|
133 on the current stack or on a separate stack maintained by the |
|
|
134 HAL. Using a separate stack requires a small number of extra |
|
|
135 instructions in the interrupt handling code, but it has the |
|
|
136 advantage that it is no longer necessary to allow extra space |
|
|
137 in every thread stack for the interrupt handlers. The amount |
|
|
138 of extra space required depends on the interrupt handlers |
|
|
139 that are being used." |
|
|
140 } |
|
|
141 |
|
|
142 # NOTE: various parts of the system such as device drivers should |
|
|
143 # impose lower bounds on this. The actual lower bound depends on a |
|
|
144 # platform-specific value for startup overheads, and the minimum |
|
|
145 # sizes specified by the various device drivers. If interrupts are |
|
|
146 # not handled on a separate stack then only the startup overheads |
|
|
147 # are significant. If nested interrupts are disabled then the |
|
|
148 # lower bound is the maximum of the individual sizes, otherwise |
|
|
149 # it is the sum of these sizes. It is not currently possible to |
|
|
150 # express a relationship like this. |
|
|
151 cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE { |
|
|
152 display "Interrupt stack size" |
|
|
153 parent CYGPKG_HAL_COMMON_INTERRUPTS |
|
|
154 type count |
|
|
155 legal_values 1024 to 1048576 |
|
|
156 description " |
|
|
157 This configuration option specifies the stack size in bytes |
|
|
158 for the interrupt stack. Typically this should be a multiple |
|
|
159 of 16, but the exact requirements will vary from architecture |
|
|
160 to architecture. The interrupt stack serves two separate |
|
|
161 purposes. It is used as the stack during system |
|
|
162 initialization. In addition, if the interrupt system is |
|
|
163 configured to use a separate stack then all interrupts will |
|
|
164 be processed on this stack. The exact memory requirements |
|
|
165 will vary from application to application, and will depend |
|
|
166 heavily on whether or not other interrupt-related options, |
|
|
167 for example nested interrupts, are enabled." |
|
|
168 } |
|
|
169 |
|
|
170 cdl_option CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING { |
|
|
171 display "Allow nested interrupts" |
|
|
172 parent CYGPKG_HAL_COMMON_INTERRUPTS |
|
|
173 description " |
|
|
174 When an interrupt occurs the HAL interrupt handling code can |
|
|
175 either leave interrupts disabled for the duration of the |
|
|
176 interrupt handling code, or by doing some extra work it can |
|
|
177 reenable interrupts before invoking the interrupt handler and |
|
|
178 thus allow nested interrupts to happen. If all the interrupt |
|
|
179 handlers being used are small and do not involve any loops |
|
|
180 then it is usually better to disallow nested interrupts. |
|
|
181 However if any of the interrupt handlers are more complicated |
|
|
182 than nested interrupts will usually be required." |
|
|
183 } |
|
|
184 |
|
|
185 cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT { |
|
|
186 display "Save minimum context on interrupt" |
|
|
187 parent CYGPKG_HAL_COMMON_INTERRUPTS |
|
|
188 description " |
|
|
189 The HAL interrupt handling code can exploit the calling conventions |
|
|
190 defined for a given architecture to reduce the amount of state |
|
|
191 that has to be saved. Generally this improves performance and |
|
|
192 reduces code size. However it can make source-level debugging |
|
|
193 more difficult. |
|
|
194 " |
|
|
195 } |
|
|
196 |
|
|
197 cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN { |
|
|
198 display "Chain all interrupts together" |
|
|
199 parent CYGPKG_HAL_COMMON_INTERRUPTS |
|
|
200 description " |
|
|
201 Interrupts can be attached to vectors either singly, or be |
|
|
202 chained together. The latter is necessary if there is no way |
|
|
203 of discovering which device has interrupted without |
|
|
204 inspecting the device itself. It can also reduce the amount |
|
|
205 of RAM needed for interrupt decoding tables and code." |
|
|
206 } |
|
|
207 |
|
|
208 }}CFG_DATA |
|
|
209 |
|
|
210 */ |
|
|
211 |
|
|
212 #define CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK |
|
|
213 #define CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE 4096 |
|
|
214 #undef CYGSEM_HAL_COMMON_INTERRUPTS_ALLOW_NESTING |
|
|
215 #define CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT |
|
|
216 #undef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN |
|
|
217 |
|
|
218 |
|
|
219 /* {{CFG_DATA |
|
|
220 |
|
|
221 cdl_component CYGPKG_HAL_COMMON_CONTEXT { |
|
|
222 display "HAL context switch support" |
|
|
223 parent CYGPKG_HAL_COMMON |
|
|
224 type dummy |
|
|
225 description " |
|
|
226 A number of configuration options related to thread contexts |
|
|
227 are common to most or all HAL packages, even though the |
|
|
228 implementations will vary from architecture to architecture." |
|
|
229 } |
|
|
230 |
|
|
231 cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM { |
|
|
232 display "Use minimum thread context" |
|
|
233 parent CYGPKG_HAL_COMMON_CONTEXT |
|
|
234 description " |
|
|
235 The thread context switch code can exploit the calling conventions |
|
|
236 defined for a given architecture to reduce the amount of state |
|
|
237 that has to be saved during a context switch. Generally this |
|
|
238 improves performance and reduces code size. However it can make |
|
|
239 source-level debugging more difficult." |
|
|
240 } |
|
|
241 |
|
|
242 }}CFG_DATA */ |
|
|
243 #define CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM |
|
|
244 |
|
|
245 /* {{CFG_DATA |
|
|
246 |
|
|
247 # NOTE: The requirement for kernel exception support is bogus in that |
|
|
248 # the user can supply a deliver_exception function herself. In that |
|
|
249 # case, however, it is easy to force the kernel option off while leaving |
|
|
250 # this one on. Having the requirement prevents accidental invalid |
|
|
251 # configurations of the kernel. |
|
|
252 cdl_option CYGPKG_HAL_EXCEPTIONS { |
|
|
253 display "HAL exception support" |
|
|
254 parent CYGPKG_HAL_COMMON |
|
|
255 requires CYGPKG_KERNEL_EXCEPTIONS |
|
|
256 description " |
|
|
257 When a processor exception occurs, for example an attempt to |
|
|
258 execute an illegal instruction or to perform a divide by |
|
|
259 zero, this exception may be handled in a number of different |
|
|
260 ways. If the target system has gdb support then typically |
|
|
261 the exception will be handled by gdb code. Otherwise if the |
|
|
262 HAL exception support is enabled then the HAL will invoke a |
|
|
263 routine deliver_exception(). Typically this routine will be |
|
|
264 provided by the eCos kernel, but it is possible for |
|
|
265 application code to provide its own implementation. If the |
|
|
266 HAL exception support is not enabled and a processor |
|
|
267 exception occurs then the behaviour of the system is |
|
|
268 undefined. |
|
|
269 " |
|
|
270 } |
|
|
271 |
|
|
272 }}CFG_DATA */ |
|
|
273 #define CYGPKG_HAL_EXCEPTIONS |
|
|
274 |
|
2
|
275 /* {{CFG_DATA |
|
|
276 |
|
|
277 cdl_option CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG { |
|
|
278 display "Stop calling constructors early" |
|
|
279 description "This option supports environments where some constructors |
|
|
280 must be run in the context of a thread rather than at |
|
|
281 simple system startup time. A boolean flag named |
|
|
282 cyg_hal_stop_constructors is set to 1 when constructors |
|
|
283 should no longer be invoked. It is up to some other |
|
|
284 package to deal with the rest of the constructors. |
|
|
285 In the current version this is only possible with the |
|
|
286 C library." |
|
|
287 type boolean |
|
|
288 requires CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS |
|
|
289 parent CYGPKG_HAL_COMMON |
|
|
290 } |
|
|
291 |
|
|
292 }}CFG_DATA */ |
|
|
293 |
|
|
294 #undef CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG |
|
0
|
295 |
|
|
296 /* --------------------------------------------------------------------- |
|
|
297 * Options related to source-level debugging and diagnostics. |
|
|
298 |
|
|
299 {{CFG_DATA |
|
|
300 |
|
|
301 cdl_component CYGPKG_HAL_DEBUG { |
|
|
302 display "Source-level debugging support" |
|
|
303 type dummy |
|
|
304 parent CYGPKG_HAL |
|
|
305 description " |
|
|
306 If the source level debugger gdb is to be used for debugging |
|
|
307 application code then it may be necessary to configure in support |
|
|
308 for this in the HAL." |
|
|
309 } |
|
|
310 |
|
|
311 cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS { |
|
|
312 display "Include GDB stubs in HAL" |
|
|
313 parent CYGPKG_HAL_DEBUG |
|
|
314 requires !CYGPKG_HAL_POWERPC_SIM |
|
|
315 requires !CYGPKG_HAL_MN10300_SIM |
|
|
316 requires !CYGPKG_HAL_TX39_SIM |
|
2
|
317 requires !CYGPKG_HAL_I386_LINUX |
|
|
318 requires !CYGPKG_HAL_SPARCLITE |
|
0
|
319 description " |
|
|
320 This option causes a set of GDB stubs to be included into the |
|
|
321 system. On some target systems the GDB support will be |
|
|
322 provided by other means, for example by a ROM monitor. On |
|
|
323 other targets, especially when building a ROM-booting system, |
|
|
324 the necessary support has to go into the target library |
|
|
325 itself." |
|
|
326 } |
|
|
327 |
|
2
|
328 cdl_option CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT { |
|
|
329 display "Include GDB external break support" |
|
|
330 parent CYGPKG_HAL_DEBUG |
|
|
331 requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
|
|
332 requires !CYGPKG_HAL_TX39_JMR3904 |
|
|
333 requires !CYGPKG_HAL_POWERPC_FADS |
|
|
334 description " |
|
|
335 This option causes the GDB stub to add a serial interrupt handler |
|
|
336 which will listen for GDB break packets. This lets you stop the |
|
|
337 target asynchronously when using GDB, usually by hitting Control+C |
|
|
338 or pressing the STOP button." |
|
|
339 } |
|
|
340 |
|
0
|
341 cdl_option CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT { |
|
|
342 display "Include GDB multi-threading debug support" |
|
|
343 parent CYGPKG_HAL_DEBUG |
|
|
344 requires CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT |
|
|
345 description " |
|
|
346 This option enables some extra HAL code which is needed |
|
|
347 to support multi-threaded source level debugging." |
|
|
348 } |
|
|
349 |
|
|
350 }}CFG_DATA */ |
|
|
351 |
|
2
|
352 #undef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS |
|
|
353 #undef CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT |
|
0
|
354 #define CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT |
|
|
355 |
|
|
356 /* |
|
|
357 * NOTE: |
|
|
358 * |
|
|
359 * Right now there is no easy way to express the ROM monitor options |
|
|
360 * in CDL. The problem is that the default values depend on the |
|
|
361 * target platform and on the desired start-up. It is possible to |
|
|
362 * produce something that will work correctly in a clean world, but |
|
|
363 * not something more general. |
|
|
364 * |
|
|
365 * One possibility is to duplicate the relevant options in the various |
|
|
366 * platform HAL packages, renaming them to avoid collisions. This appears |
|
|
367 * to be feasible with the current sources because the rom monitor options |
|
|
368 * are only referenced in the HAL packages. It is not clear whether or not |
|
|
369 * this will continue to be the case. */ |
|
|
370 |
|
|
371 /* |
|
|
372 * Some development boards come with a ROM monitor that provides |
|
|
373 * download and debug facilities. Such ROMs may also supply interrupt |
|
|
374 * redirection and IO facilities. The following option causes the HAL |
|
|
375 * to integrate with the ROM monitor present on the configured |
|
|
376 * platform. If this option is not defined, the monitor will not be |
|
|
377 * used. Where there is more than one ROM monitor for a specific |
|
|
378 * platform, a subsidiary define should identify the appropriate monitor |
|
|
379 * type. |
|
|
380 */ |
|
|
381 |
|
|
382 //#define CYG_HAL_USE_ROM_MONITOR |
|
|
383 |
|
|
384 #if defined(CYG_HAL_TX39_JMR3904) && defined(CYG_HAL_STARTUP_RAM) |
|
|
385 #define CYG_HAL_USE_ROM_MONITOR |
|
|
386 #define CYG_HAL_USE_ROM_MONITOR_CYGMON |
|
|
387 #endif |
|
|
388 #if defined(CYG_HAL_MN10300_STDEVAL1) && defined(CYG_HAL_STARTUP_RAM) |
|
|
389 #define CYG_HAL_USE_ROM_MONITOR |
|
|
390 #define CYG_HAL_USE_ROM_MONITOR_CYGMON |
|
|
391 #endif |
|
|
392 |
|
|
393 #ifdef CYG_HAL_USE_ROM_MONITOR |
|
|
394 |
|
|
395 //#define CYG_HAL_USE_ROM_MONITOR_SLOAD |
|
|
396 //#define CYG_HAL_USE_ROM_MONITOR_GDB_STUBS |
|
|
397 //#define CYG_HAL_USE_ROM_MONITOR_CYGMON |
|
|
398 |
|
|
399 #endif |
|
|
400 |
|
|
401 /* --------------------------------------------------------------------- |
|
|
402 * |
|
|
403 * The section below deals with some inferences about package/feature |
|
|
404 * presence that are not yet supported by the full external configuration |
|
|
405 * tool; they are NOT user configuration, and you should NOT edit them. |
|
|
406 */ |
|
|
407 |
|
|
408 /* |
|
|
409 * CYG_HAL_<TARGET> and CYG_HAL_<TARGET>_<PLATFORM> are generated by |
|
|
410 * pkgconf, using the information from the targets file. |
|
|
411 * |
|
|
412 * NOTE: Currently the code also needs these #defines. |
|
|
413 */ |
|
|
414 #ifdef CYG_HAL_MN10300_STDEVAL1 |
|
|
415 # define CYG_HAL_MN10300_MN103002 |
|
|
416 #endif |
|
|
417 #ifdef CYG_HAL_MN10300_SIM |
|
|
418 # define CYG_HAL_MN10300_MN103002 |
|
|
419 #endif |
|
|
420 |
|
|
421 #ifdef CYG_HAL_POWERPC_COGENT |
|
2
|
422 # define CYG_HAL_POWERPC_MPC8xx |
|
|
423 # define CYG_HAL_POWERPC_MPC860 |
|
|
424 # undef CYG_HAL_POWERPC_MPC850 |
|
|
425 # undef CYG_HAL_POWERPC_MPC823 |
|
|
426 #endif |
|
|
427 #ifdef CYG_HAL_POWERPC_FADS |
|
|
428 # define CYG_HAL_POWERPC_MPC8xx |
|
|
429 # define CYG_HAL_POWERPC_MPC860 |
|
0
|
430 #endif |
|
|
431 #ifdef CYG_HAL_POWERPC_SIM |
|
2
|
432 # define CYG_HAL_POWERPC_MPC603 |
|
0
|
433 #endif |
|
|
434 |
|
|
435 #ifdef CYG_HAL_TX39_JMR3904 |
|
|
436 # define CYG_HAL_MIPS |
|
|
437 # define CYG_HAL_MIPS_TX39 |
|
|
438 # define CYG_HAL_MIPS_TX3904 |
|
|
439 # define CYG_HAL_MIPS_JMR3904 |
|
|
440 #endif |
|
|
441 #ifdef CYG_HAL_TX39_SIM |
|
|
442 # define CYG_HAL_MIPS |
|
|
443 # define CYG_HAL_MIPS_TX39 |
|
|
444 # define CYG_HAL_MIPS_SIM |
|
|
445 #endif |
|
2
|
446 #ifdef CYG_HAL_MIPS_TX39 |
|
|
447 #include <pkgconf/hal_tx39.h> |
|
|
448 #endif |
|
0
|
449 |
|
|
450 /* -------------------------------------------------------------------*/ |
|
|
451 #endif /* CYGONCE_PKGCONF_HAL_H */ |
|
|
452 /* EOF hal.h */ |