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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [common/] [current/] [cdl/] [hal.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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