1 # ====================================================================
3 # hal_powerpc_mpc8xx.cdl
5 # PowerPC/MPC8xx variant architectural HAL package configuration data
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
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.
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
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.
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.
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.
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####
45 # Contributors: gthomas
48 #####DESCRIPTIONEND####
50 # ====================================================================
52 cdl_package CYGPKG_HAL_POWERPC_MPC8xx {
53 display "PowerPC 8xx variant HAL"
54 parent CYGPKG_HAL_POWERPC
57 define_header hal_powerpc_mpc8xx.h
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."
63 implements CYGINT_PROFILE_HAL_TIMER
65 cdl_interface CYGINT_HAL_USE_ROM_MONITOR_UNSUPPORTED {
66 display "ROM monitor configuration is unsupported"
69 cdl_option CYGSEM_HAL_USE_ROM_MONITOR {
70 display "Work with a ROM monitor"
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
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."
88 # FIXME: the option above should be adjusted to select between monitor
90 cdl_option CYGSEM_HAL_USE_ROM_MONITOR_GDB_stubs {
91 display "Bad CDL workaround"
93 active_if CYGSEM_HAL_USE_ROM_MONITOR
97 # Note: This should be sub-variant specific to reduce memory use.
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)"
102 puts $::cdl_header "#define CYGPRI_KERNEL_TESTS_DHRYSTONE_PASSES 250000"
105 cdl_component CYGHWR_HAL_POWERPC_MPC8XX {
106 display "PowerPC 8xx microprocessor family"
108 legal_values { "823" "850" "852T" "855T" "860" "860T" "862T" "862P" "866T" }
110 implements CYGINT_HAL_POWERPC_VARIANT
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
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"
142 cdl_option CYGHWR_HAL_POWERPC_FPU {
143 display "Variant FPU support"
147 cdl_option CYGPKG_HAL_POWERPC_MSBFIRST {
148 display "CPU Variant big-endian"
153 cdl_component CYGSEM_HAL_POWERPC_MPC860_CPM_ENABLE {
154 display "Enable CPM interrupts"
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
163 cdl_option CYGHWR_HAL_POWERPC_MPC860_CPM_LVL {
164 display "CPM interrupt level on the SIU"
169 This option selects which SIU level the CPM interrupts
170 should be routed to."
176 puts $::cdl_header "#include <pkgconf/hal_powerpc.h>"
179 compile var_intr.c var_misc.c variant.S
181 cdl_option CYGPKG_HAL_POWERPC_MPC8xx_TESTS {
182 display "PowerPC MPC8xx tests"
185 calculated { "tests/intr0" }
188 This option specifies the set of tests for the PowerPC MPC8xx HAL."
191 cdl_option CYGBLD_BUILD_VERSION_TOOL {
192 display "Build MPC8xx version dump tool"
194 requires { CYG_HAL_STARTUP == "RAM" }
196 description "This option enables the building of a tool which will print the version identifiers of the CPU."
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
206 $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@ src/mpc8xxrev.o