]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/powerpc/arch/v2_0/cdl/hal_powerpc.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / powerpc / arch / v2_0 / cdl / hal_powerpc.cdl
1 # ====================================================================
2 #
3 #      hal_powerpc.cdl
4 #
5 #      PowerPC architectural HAL package 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 ##
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 version.
16 ##
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20 ## for more details.
21 ##
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ##
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
32 ##
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
35 ##
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
42 #
43 # Author(s):      jskov
44 # Original data:  bartv
45 # Contributors:
46 # Date:           1999-11-02
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_POWERPC {
53     display  "PowerPC architecture"
54     parent        CYGPKG_HAL
55     hardware
56     include_dir   cyg/hal
57     define_header hal_powerpc.h
58     description   "
59         The PowerPC architecture HAL package provides generic
60         support for this processor architecture. It is also
61         necessary to select a specific target platform HAL
62         package."
63
64     cdl_interface CYGINT_HAL_POWERPC_VARIANT {
65         display  "Number of variant implementations in this configuration"
66         no_define
67         requires 1 == CYGINT_HAL_POWERPC_VARIANT
68     }
69
70     compile       hal_misc.c context.S ppc_stub.c hal_intr.c
71
72     # The "-o file" is a workaround for CR100958 - without it the
73     # output file would end up in the source directory under CygWin.
74     # n.b. grep does not behave itself under win32
75     make -priority 1 {
76         <PREFIX>/include/cyg/hal/ppc_offsets.inc : <PACKAGE>/src/hal_mk_defs.c
77         $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,ppc_offsets.tmp -o hal_mk_defs.tmp -S $<
78         fgrep .equ hal_mk_defs.tmp | sed s/#// > $@
79         @echo $@ ": \\" > $(notdir $@).deps
80         @tail -n +2 ppc_offsets.tmp >> $(notdir $@).deps
81         @echo >> $(notdir $@).deps
82         @rm ppc_offsets.tmp hal_mk_defs.tmp
83     }
84
85     make {
86         <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
87         $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
88         @echo $@ ": \\" > $(notdir $@).deps
89         @tail -n +2 vectors.tmp >> $(notdir $@).deps
90         @echo >> $(notdir $@).deps
91         @rm vectors.tmp
92     }
93
94     make {
95         <PREFIX>/lib/target.ld: <PACKAGE>/src/powerpc.ld
96         $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
97         @echo $@ ": \\" > $(notdir $@).deps
98         @tail -n +2 target.tmp >> $(notdir $@).deps
99         @echo >> $(notdir $@).deps
100         @rm target.tmp
101     }
102
103     cdl_option CYGSEM_HAL_POWERPC_RESET_USES_JUMP {
104         display       "RESET vector jumps to startup"
105         default_value 0
106         description   "
107             Some platforms may need this for ROMRAM startup."
108     }
109
110     cdl_option CYGSEM_HAL_POWERPC_COPY_VECTORS {
111         display       "Copy exception vectors to RAM"
112         default_value { (CYG_HAL_STARTUP != "RAM" ||
113                          CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS) ? 1 : 0 }
114         requires      ! CYGSEM_HAL_USE_ROM_MONITOR
115         description   "
116             Enable this option to force exception vectors to be copied
117             to the vector base on startup. For RAM startup this is normally
118             disabled since the vectors would already have been provided
119             by the GDB stubs - but it's possible to override, thus taking
120             full control of the target. For ROM startup it is desirable to
121             enable this option if the vector base is set to RAM since
122             accessing vectors in ROM is normally slower. But if memory is
123             tight the vectors can be left in ROM."
124     }
125
126     cdl_option CYGHWR_HAL_POWERPC_NEED_VECTORS {
127         display       "Exception vectors inclusion"
128         description   "
129             If eCos can rely on the target environment to provide
130             eCos compatible vector code, there is no reason to include
131             the additional data in application images. This option controls
132             the inclusion of the vector code."
133         # Platform HALs and startup configuration controls this setting.
134         calculated { ((CYGHWR_HAL_POWERPC_FORCE_VECTORS ||
135                        CYG_HAL_STARTUP != "RAM" ||
136                        CYGSEM_HAL_POWERPC_COPY_VECTORS) &&
137                       ! CYGSEM_HAL_USE_ROM_MONITOR)
138                       ? 1 : 0 }
139     }
140
141     cdl_option CYGHWR_HAL_POWERPC_VECTOR_BASE {
142         display       "Exception vectors location"
143         description   "
144             PowerPC exception vectors can reside either at 0x00000000 or
145             0xfff00000. The startup type and platform HAL controls which
146             is used."
147         flavor        data
148         calculated { (! CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_LOW && 
149                        (CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_HIGH ||
150                        (CYG_HAL_STARTUP != "RAM" &&
151                         ! CYGSEM_HAL_POWERPC_COPY_VECTORS)))
152                       ? 0xfff00000 : 0x00000000 }
153     }
154
155     cdl_option CYGHWR_HAL_POWERPC_ENABLE_MMU {
156         display       "Enable MMU"
157         default_value { !CYGHWR_HAL_POWERPC_DISABLE_MMU }
158         description   "
159             Some platforms do not want the MMU enabled."
160     }
161
162     cdl_option CYGDBG_HAL_POWERPC_FRAME_WALLS {
163         display       "Exception stack-frame walls"
164         default_value 0
165         description   "
166             Enable this option to put \"walls\" around the exception
167             frames. This can ease analyzing the stack contents when
168             debugging."
169     }
170
171     cdl_option CYGSEM_REDBOOT_HAL_LINUX_BOOT {
172         active_if      { CYGSEM_REDBOOT_PLF_LINUX_BOOT == 1 }
173         display        "Support booting Linux via RedBoot"
174         flavor         bool
175         default_value  1
176         description    "
177            This option enables RedBoot to support booting of a Linux kernel."
178
179         compile -library=libextras.a redboot_linux_exec.c
180     }
181
182     cdl_component CYGPKG_HAL_POWERPC_OPTIONS {
183         display "PowerPC build options"
184         flavor  none
185         no_define
186         description   "
187             Package specific build options including control over
188             compiler flags used only in building this package,
189             and details of which tests are built."
190
191
192         cdl_option CYGPKG_HAL_POWERPC_CFLAGS_ADD {
193             display "Additional compiler flags"
194             flavor  data
195             no_define
196             default_value { "" }
197             description   "
198                 This option modifies the set of compiler flags for
199                 building the PowerPC HAL. These flags are used in addition
200                 to the set of global flags."
201         }
202
203         cdl_option CYGPKG_HAL_POWERPC_CFLAGS_REMOVE {
204             display "Suppressed compiler flags"
205             flavor  data
206             no_define
207             default_value { "" }
208             description   "
209                 This option modifies the set of compiler flags for
210                 building the PowerPC HAL. These flags are removed from
211                 the set of global flags if present."
212         }
213
214         cdl_option CYGPKG_HAL_POWERPC_TESTS {
215             display "PowerPC tests"
216             flavor  data
217             no_define
218             calculated { "" }
219             description   "
220                 This option specifies the set of tests for the PowerPC HAL."
221         }
222     }
223
224     cdl_option CYGBLD_LINKER_SCRIPT {
225         display "Linker script"
226         flavor data
227         no_define
228         calculated  { "src/powerpc.ld" }
229     }
230 }