OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [hal/] [common/] [v2_0/] [cdl/] [hal.cdl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
# ====================================================================
2
#
3
#      hal.cdl
4
#
5
#      HAL configuration data
6
#
7
# ====================================================================
8
#####ECOSGPLCOPYRIGHTBEGIN####
9
## -------------------------------------------
10
## This file is part of eCos, the Embedded Configurable Operating System.
11
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
12
## Copyright (C) 2002 Gary Thomas
13
##
14
## eCos is free software; you can redistribute it and/or modify it under
15
## the terms of the GNU General Public License as published by the Free
16
## Software Foundation; either version 2 or (at your option) any later version.
17
##
18
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
21
## for more details.
22
##
23
## You should have received a copy of the GNU General Public License along
24
## with eCos; if not, write to the Free Software Foundation, Inc.,
25
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26
##
27
## As a special exception, if other files instantiate templates or use macros
28
## or inline functions from this file, or you compile this file and link it
29
## with other works to produce a work based on this file, this file does not
30
## by itself cause the resulting work to be covered by the GNU General Public
31
## License. However the source code for this file must still be made available
32
## in accordance with section (3) of the GNU General Public License.
33
##
34
## This exception does not invalidate any other reasons why a work based on
35
## this file might be covered by the GNU General Public License.
36
##
37
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
38
## at http://sources.redhat.com/ecos/ecos-license/
39
## -------------------------------------------
40
#####ECOSGPLCOPYRIGHTEND####
41
# ====================================================================
42
######DESCRIPTIONBEGIN####
43
#
44
# Author(s):      bartv
45
# Original data:  nickg,jskov,jlarmour
46
# Contributors:   dmoseley
47
# Date:           1999-06-13
48
#
49
#####DESCRIPTIONEND####
50
#
51
# ====================================================================
52
 
53
cdl_package CYGPKG_HAL {
54
    display       "eCos HAL"
55
    include_dir   cyg/hal
56
    description   "
57
        The eCos HAL package provide a porting layer for
58
        higher-level parts of the system such as the kernel and the
59
        C library. Each installation should have HAL packages for
60
        one or more architectures, and for each architecture there
61
        may be one or more supported platforms. It is necessary to
62
        select one target architecture and one platform for that
63
        architecture. There are also a number of configuration
64
        options that are common to all HAL packages."
65
    doc           ref/the-ecos-hardware-abstraction-layer.html
66
 
67
    compile       drv_api.c
68
    compile       -library=libextras.a dummy.c
69
 
70
    requires      CYGPKG_INFRA
71
 
72
    make -priority 250 {
73
        /lib/extras.o: /lib/libextras.a
74
        $(CC) $(CFLAGS) -nostdlib -Wl,-r -Wl,--whole-archive -o $@ $<
75
    }
76
 
77
 
78
    cdl_component CYGPKG_HAL_COMMON {
79
        display       "Platform-independent HAL options"
80
        flavor        none
81
        description   "
82
            A number of configuration options are common to most or all
83
            HAL packages, for example options controlling how much state
84
            should be saved during a context switch. The implementations
85
            of these options will vary from architecture to architecture."
86
 
87
        script        common.cdl
88
    }
89
 
90
    cdl_component CYGPKG_HAL_COMMON_INTERRUPTS {
91
        display       "HAL interrupt handling"
92
        flavor        none
93
        description   "
94
            A number of configuration options related to interrupt
95
            handling are common to most or all HAL packages, even though
96
            the implementations will vary from architecture to
97
            architecture."
98
 
99
        script        interrupts.cdl
100
    }
101
 
102
    cdl_component CYGPKG_HAL_COMMON_CONTEXT {
103
        display       "HAL context switch support"
104
        flavor        none
105
        description   "
106
            A number of configuration options related to thread contexts
107
            are common to most or all HAL packages, even though the
108
            implementations will vary from architecture to architecture."
109
 
110
        cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM {
111
            display       "Use minimum thread context"
112
            parent        CYGPKG_HAL_COMMON_CONTEXT
113
            default_value 1
114
            description   "
115
                The thread context switch code can exploit the calling
116
                conventions defined for a given architecture to reduce the
117
                amount of state that has to be saved during a context
118
                switch. Generally this improves performance and reduces
119
                code size. However it can make source-level debugging more
120
                difficult."
121
        }
122
    }
123
 
124
    cdl_component CYGPKG_HAL_CACHE_CONTROL {
125
        display       "Explicit control over cache behaviour"
126
        flavor        none
127
        no_define
128
        description   "
129
            These options let the default behaviour of the caches
130
            be easily configurable."
131
 
132
        cdl_component CYGSEM_HAL_ENABLE_DCACHE_ON_STARTUP {
133
            display       "Enable DATA cache on startup"
134
            default_value 1
135
            description   "
136
                Enabling this option will cause the data cache to be enabled
137
                as soon as practicable when eCos starts up.  One would choose
138
                to disable this if the data cache cannot safely be turned on,
139
                such as a case where the cache(s) require additional platform
140
                specific setup."
141
            cdl_option CYGSEM_HAL_DCACHE_STARTUP_MODE {
142
                display       "DATA cache mode on startup"
143
                flavor        data
144
                legal_values  { "COPYBACK" "WRITETHRU" }
145
                default_value { "COPYBACK" }
146
                description   "
147
                    This option controls the mode the cache will be set to
148
                when enabled on startup."
149
            }
150
        }
151
 
152
        cdl_option CYGSEM_HAL_ENABLE_ICACHE_ON_STARTUP {
153
            display       "Enable INSTRUCTION cache on startup"
154
            default_value 1
155
            description   "
156
                Enabling this option will cause the instruction cache to be enabled
157
                as soon as practicable when eCos starts up.  One would choose
158
                to disable this if the instruction cache cannot safely be turned on,
159
                such as a case where the cache(s) require additional platform
160
                specific setup."
161
        }
162
    }
163
 
164
    cdl_component CYGPKG_HAL_DEBUG {
165
        display       "Source-level debugging support"
166
        flavor        none
167
        description   "
168
            If the source level debugger gdb is to be used for debugging
169
            application code then it may be necessary to configure in support
170
            for this in the HAL."
171
 
172
        script        debugging.cdl
173
    }
174
 
175
    cdl_component CYGPKG_HAL_ROM_MONITOR {
176
        display       "ROM monitor support"
177
        flavor        none
178
        no_define
179
        description   "
180
            Support for ROM monitors can be built in to your application.
181
            It may also be relevant to build your application as a ROM monitor
182
            itself. Such options are contained here if relevant for your chosen
183
            platform. The options and ROM monitors available to choose are
184
            platform-dependent."
185
 
186
 
187
 
188
        cdl_interface CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT {
189
            display "Target has virtual vector support"
190
            no_define
191
        }
192
 
193
 
194
        cdl_interface CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT {
195
            display     "Target supports baud rate control via vectors"
196
            no_define
197
            description "
198
                Whether this target supports the __COMMCTL_GETBAUD
199
                and __COMMCTL_SETBAUD virtual vector comm control operations."
200
        }
201
 
202
        cdl_component CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT {
203
            display     "Enable use of virtual vector calling interface"
204
            active_if   CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
205
            calculated  1
206
            description "
207
                Virtual vector support allows the HAL to let the ROM
208
                monitor handle certain operations. The virtual vector table
209
                defines a calling interface between applications running in
210
                RAM and the ROM monitor."
211
            compile     hal_if.c hal_misc.c
212
 
213
 
214
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE {
215
                display       "Inherit console settings from ROM monitor"
216
                active_if     CYGSEM_HAL_USE_ROM_MONITOR
217
                default_value { !CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS }
218
                description   "
219
                    When this option is set, the application will inherit
220
                    the console as set up by the ROM monitor. This means
221
                    that the application will use whatever channel and
222
                    mangling style was used by the ROM monitor when
223
                    the application was launched."
224
            }
225
 
226
            cdl_option CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE {
227
                display       "Debug channel is configurable"
228
                calculated    { CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS }
229
                description   "
230
                    This option is a configuration hint - it is enabled
231
                    when the HAL initialization code will make use
232
                    of the debug channel configuration option."
233
            }
234
 
235
            cdl_option CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE {
236
                display       "Console channel is configurable"
237
                calculated    { !CYGSEM_HAL_VIRTUAL_VECTOR_INHERIT_CONSOLE \
238
                                && !CYGDBG_HAL_DIAG_TO_DEBUG_CHAN }
239
                description   "
240
                    This option is a configuration hint - it is enabled
241
                    when the HAL initialization code will make use
242
                    of the console channel configuration option."
243
            }
244
 
245
 
246
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE {
247
                display       "Initialize whole of virtual vector table"
248
                default_value { CYG_HAL_STARTUP != "RAM" || !CYGSEM_HAL_USE_ROM_MONITOR }
249
                requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET
250
                requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US
251
                requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE
252
                requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA
253
                requires CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
254
                description   "
255
                    This option will cause the whole of the virtual
256
                    vector table to be initialized with dummy values on
257
                    startup. When this option is enabled, all the
258
                    options below must also be enabled - or the
259
                    table would be empty when the application
260
                    launches.
261
 
262
                    On targets where older ROM monitors without
263
                    virtual vector support may still be in use, it is
264
                    necessary for RAM applictions to initialize the
265
                    table (since all HAL diagnostics and debug IO
266
                    happens via the table)."
267
            }
268
 
269
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT {
270
                display       "Claim virtual vector table entries by default"
271
                active_if     !CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE
272
                default_value 1
273
                description "
274
                    By default most virtual vectors will be claimed by
275
                    RAM startup configurations, meaning that the RAM
276
                    application will provide the services. The
277
                    exception is COMMS support (HAL
278
                    diagnostics/debugging IO) which is left in the
279
                    control of the ROM monitor.
280
 
281
                    The reasoning behind this is to get as much of the
282
                    code exercised during regular development so it
283
                    is known to be working the few times a new ROM
284
                    monitor or a ROM production configuration is used
285
                    - COMMS are excluded only by necessity in order to
286
                    avoid breaking an existing debugger connections
287
                    (there may be ways around this).
288
 
289
                    For production RAM configurations this option can
290
                    be switched off, causing the appliction to rely on
291
                    the ROM monitor for these services, thus
292
                    saving some space.
293
 
294
                    Individual vectors may also be left unclaimed,
295
                    controlled by the below options (meaning that the
296
                    associated service provided by the ROM monitor
297
                    will be used)."
298
            }
299
 
300
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_RESET {
301
                display       "Claim reset virtual vectors"
302
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
303
                                || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
304
                description   "
305
                    This option will cause the reset and kill_by_reset
306
                    virtual vectors to be claimed."
307
            }
308
 
309
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_VERSION {
310
                display       "Claim version virtual vectors"
311
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE }
312
                description   "
313
                    This option will cause the version
314
                    virtual vectors to be claimed."
315
            }
316
 
317
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US {
318
                display       "Claim delay_us virtual vector"
319
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
320
                                || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
321
                description   "
322
                    This option will cause the delay_us
323
                    virtual vector to be claimed."
324
            }
325
 
326
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_CACHE {
327
                display       "Claim cache virtual vectors"
328
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
329
                                || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
330
                description   "
331
                    This option will cause the cache virtual vectors
332
                    to be claimed."
333
            }
334
 
335
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA {
336
                display       "Claim data virtual vectors"
337
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
338
                                || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
339
                description   "
340
                    This option will cause the data virtual vectors
341
                    to be claimed. At present there is only one, used
342
                    by the RedBoot ethernet driver to share diag output."
343
            }
344
 
345
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS {
346
                display       "Claim comms virtual vectors"
347
                default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
348
                                || CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS }
349
                description   "
350
                    This option will cause the communication tables
351
                    that are part of the virtual vectors mechanism to
352
                    be claimed. Note that doing this may cause an
353
                    existing ROM monitor communication connection to
354
                    be closed. For this reason, the option is disabled
355
                    per default for normal application
356
                    configurations."
357
            }
358
 
359
            cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_DIAG {
360
                display       "Do diagnostic IO via virtual vector table"
361
                calculated    1
362
                description   "
363
                    All HAL IO happens via the virtual vector table / comm
364
                    tables when those tables are supported by the HAL.
365
 
366
                    If so desired, the low-level IO functions can
367
                    still be provided by the RAM application by
368
                    enabling the CLAIM_COMMS option."
369
            }
370
        }
371
 
372
        cdl_option CYGBLD_BUILD_COMMON_GDB_STUBS {
373
            display "Build common GDB stub ROM image"
374
            default_value 0
375
            parent  CYGBLD_GLOBAL_OPTIONS
376
            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
377
            no_define
378
            description "
379
                Unless a target board has specific requirements to the
380
                stub implementation, it can use a simple common stub.
381
                This option, which gets enabled by platform HALs as
382
                appropriate, controls the building of the common stub."
383
 
384
            make -priority 315 {
385
                /bin/gdb_module.img : /src/stubrom/stubrom.c /lib/extras.o /lib/libtarget.a /lib/target.ld /lib/vectors.o
386
                @sh -c "mkdir -p src/stubrom $(dir $@)"
387
                $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/stubrom/gdb_module.o $<
388
                @echo $@ ": \\" > $(notdir $@).deps
389
                @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
390
                @tail +2 deps.tmp >> $(notdir $@).deps
391
                @echo >> $(notdir $@).deps
392
                @rm deps.tmp
393
                $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/stubrom/gdb_module.o
394
            }
395
        }
396
 
397
 
398
    }
399
 
400
    # Does platform need special I/O initializations?
401
    cdl_interface     CYGINT_HAL_PLF_IF_INIT {
402
        display       "Platform defined I/O channels."
403
        description   "
404
          Platforms which provide additional I/O channels can implement
405
          this interface, indicating that the function plf_if_init()
406
          needs to be called."
407
    }
408
 
409
    # Does platform provide IDE I/O macros?
410
    cdl_interface     CYGINT_HAL_PLF_IF_IDE {
411
        display       "Platform IDE I/O support."
412
        description   "
413
          Platforms which provide IDE controllers can implement
414
          this interface, indicating that IDE I/O macros are
415
          available."
416
    }
417
    cdl_option CYGPKG_HAL_GDB_FILEIO {
418
        display       "File I/O operations via GDB"
419
        default_value 0
420
        active_if     CYGSEM_REDBOOT_BSP_SYSCALLS
421
        requires      CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
422
        compile       gdb-fileio.c
423
        description   "This option enables support for various file I/O
424
                       operations using the GDB remote protocol to communicate
425
                       with GDB. The operations are then performed on the
426
                       debugging host by proxy. These operations are only
427
                       currently available by using a system call interface
428
                       to RedBoot. This may change in the future."
429
    }
430
 
431
    define_proc {
432
        puts $::cdl_header "/***** proc output start *****/"
433
        puts $::cdl_header "#include "
434
 
435
        puts $::cdl_header "#include CYGBLD_HAL_TARGET_H"
436
        puts $::cdl_header "#ifdef   CYGBLD_HAL_VARIANT_H"
437
        puts $::cdl_header "#include CYGBLD_HAL_VARIANT_H"
438
        puts $::cdl_header "#endif"
439
        puts $::cdl_header "#include CYGBLD_HAL_PLATFORM_H"
440
 
441
        puts $::cdl_header "/****** proc output end ******/"
442
 
443
    }
444
 
445
    cdl_option     CYGPKG_HAL_BUILD_COMPILER_TESTS {
446
        display       "Build Compiler sanity checking tests"
447
        description   "
448
            Enabling this option causes compiler tests to be built."
449
    }
450
 
451
    cdl_component CYGPKG_HAL_TESTS {
452
        display "Common HAL tests"
453
        flavor  data
454
        no_define
455
        calculated {  "tests/context tests/basic"
456
                      . ((!CYGINT_HAL_TESTS_NO_CACHES) ? " tests/cache" : "")
457
                      . ((CYGPKG_HAL_BUILD_COMPILER_TESTS) ? " tests/cpp1 tests/vaargs" : "")
458
                      . ((!CYGVAR_KERNEL_COUNTERS_CLOCK) ?   " tests/intr" : "") }
459
        description   "
460
            This option specifies the set of tests for the common HAL."
461
 
462
 
463
        cdl_interface CYGINT_HAL_TESTS_NO_CACHES {
464
            display       "Interface for cache presence"
465
            flavor        booldata
466
            description   "
467
                Some architectures and/or platforms do not have caches. By
468
                implementing this interface, these can disable the various
469
                cache-related tests."
470
        }
471
 
472
    }
473
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.