]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/hal/powerpc/mpc8xx/v2_0/cdl/hal_powerpc_mpc8xx.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / powerpc / mpc8xx / v2_0 / cdl / hal_powerpc_mpc8xx.cdl
1 # ====================================================================
2 #
3 #      hal_powerpc_mpc8xx.cdl
4 #
5 #      PowerPC/MPC8xx variant 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 ## Copyright (C) 2002, 2003 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):      jskov
45 # Contributors:   gthomas
46 # Date:           2000-02-04
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_POWERPC_MPC8xx {
53     display       "PowerPC 8xx variant HAL"
54     parent        CYGPKG_HAL_POWERPC
55     hardware
56     include_dir   cyg/hal
57     define_header hal_powerpc_mpc8xx.h
58     description   "
59            The PowerPC 8xx variant HAL package provides generic support
60            for this processor variant. It is also necessary to
61            select a specific target platform HAL package."
62
63     implements CYGINT_PROFILE_HAL_TIMER
64
65     cdl_interface CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED {
66         display       "ROM monitor configuration is unsupported"
67         no_define
68     }
69     cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
70         display       "Work with a ROM monitor"
71         flavor        bool
72         default_value { (CYG_HAL_STARTUP == "RAM" &&
73                         !CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS &&
74                         !CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED &&
75                         !CYGSEM_HAL_POWERPC_COPY_VECTORS) ? 1 : 0 }
76         parent        CYGPKG_HAL_ROM_MONITOR
77         requires      { CYG_HAL_STARTUP == "RAM" }
78         requires      ! CYGSEM_HAL_POWERPC_COPY_VECTORS
79         requires      ! CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
80         requires      ! CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED
81         description   "
82             Allow coexistence with ROM monitor (CygMon or GDB stubs) by
83             only initializing interrupt vectors on startup, thus leaving
84             exception handling to the ROM monitor."
85     }
86
87
88     # FIXME: the option above should be adjusted to select between monitor
89     #        variants
90     cdl_option CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs {
91         display "Bad CDL workaround"
92         calculated 1
93         active_if CYGSEM_HAL_USE_ROM_MONITOR
94     }
95
96
97     # Note: This should be sub-variant specific to reduce memory use.
98     define_proc {
99         puts $cdl_header "#define CYGHWR_HAL_VSR_TABLE (CYGHWR_HAL_POWERPC_VECTOR_BASE + 0x3000)"
100         puts $cdl_header "#define CYGHWR_HAL_VIRTUAL_VECTOR_TABLE (CYGHWR_HAL_VSR_TABLE + 0x200)"
101
102         puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 250000"
103     }
104
105     cdl_component CYGHWR_HAL_POWERPC_MPC8XX {
106         display       "PowerPC 8xx microprocessor family"
107         flavor        data
108         legal_values  { "823" "850" "852T" "855T" "860" "860T" "862T" "862P" "866T" }
109         default_value "860"
110         implements    CYGINT_HAL_POWERPC_VARIANT
111         description "
112             The PowerPC 8xx microprocessor family. These are embedded parts 
113             that in addition to the PowerPC processor core have built in peripherals
114             such as memory controllers, DMA controllers, serial ports and
115             timers/counters."               
116
117         define_proc {
118             # Someday, CDL will support doing this directly...
119             puts $::cdl_header "#if defined(CYGHWR_HAL_POWERPC_MPC8XX_823)"
120             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 823\""
121             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_850)"
122             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 850\""
123             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_852T)"
124             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 852T\""
125             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_855T)"
126             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 855T\""
127             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_860)"
128             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 860\""
129             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_860T)"
130             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 860T\""
131             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_862T)"
132             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 862T\""
133             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_862P)"
134             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 862P\""
135             puts $::cdl_header "#elif defined(CYGHWR_HAL_POWERPC_MPC8XX_866T)"
136             puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 866T\""
137             puts $::cdl_header "#else"
138             puts $::cdl_header "#error Unknown CPU variant"
139             puts $::cdl_header "#endif"
140         }
141
142         cdl_option CYGHWR_HAL_POWERPC_FPU {
143             display    "Variant FPU support"
144             calculated 0
145         }
146
147         cdl_option CYGPKG_HAL_POWERPC_MSBFIRST {
148             display    "CPU Variant big-endian"
149             calculated 1
150         }
151
152
153         cdl_component CYGSEM_HAL_POWERPC_MPC860_CPM_ENABLE {
154             display       "Enable CPM interrupts"
155             default_value 1
156             description   "
157                 This option causes the CPM interrupt arbiter to be attached
158                 at startup, and CPM interrupts are enabled. Enabling CPM
159                 level interrupt arbitration and handling must still be
160                 done by the application code. See intr0.c test for an
161                 example."
162
163             cdl_option CYGHWR_HAL_POWERPC_MPC860_CPM_LVL {
164                 display       "CPM interrupt level on the SIU"
165                 flavor        data
166                 legal_values  0 to 7
167                 default_value 7
168                 description   "
169                     This option selects which SIU level the CPM interrupts
170                     should be routed to."
171             }
172         }
173     }
174
175     define_proc {
176         puts $::cdl_header "#include <pkgconf/hal_powerpc.h>"
177     }
178
179     compile       var_intr.c var_misc.c variant.S
180
181     cdl_option CYGPKG_HAL_POWERPC_MPC8xx_TESTS {
182         display "PowerPC MPC8xx tests"
183         flavor  data
184         no_define
185         calculated { "tests/intr0" }
186
187         description   "
188             This option specifies the set of tests for the PowerPC MPC8xx HAL."
189     }
190
191     cdl_option CYGBLD_BUILD_VERSION_TOOL {
192         display "Build MPC8xx version dump tool"
193         default_value 0
194         requires { CYG_HAL_STARTUP == "RAM" }
195         no_define
196         description "This option enables the building of a tool which will print the version identifiers of the CPU."
197         make -priority 320 {
198             <PREFIX>/bin/mpc8xxrev : <PACKAGE>/src/mpc8xxrev.c
199             @sh -c "mkdir -p src $(dir $@)"
200             $(CC) -c $(INCLUDE_PATH) -Wp,-MD,deps.tmp -I$(dir $<) $(CFLAGS) -o src/mpc8xxrev.o $<
201             @echo $@ ": \\" > $(notdir $@).deps
202             @echo $(wildcard $(PREFIX)/lib/*) " \\" >> $(notdir $@).deps
203             @tail -n +2 deps.tmp >> $(notdir $@).deps
204             @echo >> $(notdir $@).deps
205             @rm deps.tmp
206             $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/mpc8xxrev.o
207         }
208     }
209
210 }