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