1 |
27 |
unneback |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# hal_mips_upd985xx.cdl
|
4 |
|
|
#
|
5 |
|
|
# MIPS/UPD985XX 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 |
|
|
##
|
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): hmt, jskov
|
44 |
|
|
# Original data: nickg
|
45 |
|
|
# Contributors:
|
46 |
|
|
# Date: 2001-05-24
|
47 |
|
|
#
|
48 |
|
|
#####DESCRIPTIONEND####
|
49 |
|
|
#
|
50 |
|
|
# ====================================================================
|
51 |
|
|
|
52 |
|
|
cdl_package CYGPKG_HAL_MIPS_UPD985XX {
|
53 |
|
|
display "UPD985XX variant"
|
54 |
|
|
parent CYGPKG_HAL_MIPS
|
55 |
|
|
implements CYGINT_HAL_MIPS_VARIANT
|
56 |
|
|
hardware
|
57 |
|
|
include_dir cyg/hal
|
58 |
|
|
define_header hal_mips_upd985xx.h
|
59 |
|
|
description "
|
60 |
|
|
The UPD985XX variant HAL package provides generic support
|
61 |
|
|
for this NEC system-on-chip processor architecture, uPD985xx.
|
62 |
|
|
It is also necessary to
|
63 |
|
|
select a specific target platform HAL package."
|
64 |
|
|
|
65 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS
|
66 |
|
|
implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
|
67 |
|
|
|
68 |
|
|
implements CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
|
69 |
|
|
implements CYGINT_HAL_VIRTUAL_VECTOR_COMM_BAUD_SUPPORT
|
70 |
|
|
|
71 |
|
|
implements CYGINT_HAL_MIPS_STUB_REPRESENT_32BIT_AS_64BIT
|
72 |
|
|
|
73 |
|
|
implements CYGINT_HAL_MIPS_INTERRUPT_RETURN_KEEP_SR_IM
|
74 |
|
|
|
75 |
|
|
# The way the arbitration ISR is attached does not work with chained interrupts
|
76 |
|
|
requires ! CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
|
77 |
|
|
|
78 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
|
79 |
|
|
display "Number of communication channels on the board"
|
80 |
|
|
flavor data
|
81 |
|
|
calculated 1
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
|
85 |
|
|
display "Debug serial port"
|
86 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL_CONFIGURABLE
|
87 |
|
|
flavor data
|
88 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
89 |
|
|
default_value 0
|
90 |
|
|
description "
|
91 |
|
|
There is only one serial port. This option
|
92 |
|
|
chooses which port will be used to connect to a host
|
93 |
|
|
running GDB."
|
94 |
|
|
}
|
95 |
|
|
|
96 |
|
|
cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL {
|
97 |
|
|
display "Diagnostic serial port"
|
98 |
|
|
active_if CYGPRI_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_CONFIGURABLE
|
99 |
|
|
flavor data
|
100 |
|
|
legal_values 0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
|
101 |
|
|
default_value 0
|
102 |
|
|
description "
|
103 |
|
|
There is only one serial port. This option
|
104 |
|
|
chooses which port will be used for diagnostic output."
|
105 |
|
|
}
|
106 |
|
|
|
107 |
|
|
cdl_option CYGHWR_HAL_MIPS_UPD985XX_DIAG_BAUD {
|
108 |
|
|
display "Diagnostic Serial Port Baud Rate"
|
109 |
|
|
flavor data
|
110 |
|
|
legal_values 9600 19200 38400 115200
|
111 |
|
|
default_value 38400
|
112 |
|
|
define CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD
|
113 |
|
|
description "
|
114 |
|
|
This option selects the baud rate used for the diagnostic port.
|
115 |
|
|
Note: this must match the value chosen for the GDB port if the
|
116 |
|
|
diagnostic and GDB port are the same."
|
117 |
|
|
}
|
118 |
|
|
|
119 |
|
|
cdl_option CYGHWR_HAL_MIPS_UPD985XX_GDB_BAUD {
|
120 |
|
|
display "GDB Serial Port Baud Rate"
|
121 |
|
|
active_if { CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL != \
|
122 |
|
|
CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL }
|
123 |
|
|
flavor data
|
124 |
|
|
legal_values 9600 19200 38400 115200
|
125 |
|
|
default_value 38400
|
126 |
|
|
description "
|
127 |
|
|
This option controls the baud rate used for the GDB connection."
|
128 |
|
|
}
|
129 |
|
|
|
130 |
|
|
cdl_component CYGPKG_HAL_MIPS_UPD985XX_HARDWARE_BUGS {
|
131 |
|
|
display "Workarounds for uPD98503 hardware bugs "
|
132 |
|
|
flavor bool
|
133 |
|
|
default_value 1
|
134 |
|
|
description "
|
135 |
|
|
This component controls whether code workarounds for the
|
136 |
|
|
hardware bugs in the uPD98503 System Controller and IBUS are included.
|
137 |
|
|
Please refer to the manufacturer's
|
138 |
|
|
Behaviour Analysis Report to make your decision about which of
|
139 |
|
|
these options to enable or disable.
|
140 |
|
|
The default is to enable all workarounds for best reliability.
|
141 |
|
|
Please refer to the
|
142 |
|
|
USB and Ethernet devices for controls for subsystem specific
|
143 |
|
|
workarounds such as U3 and U4 in the USB; or E1,E2,E3 and E8 in
|
144 |
|
|
the ethernet."
|
145 |
|
|
|
146 |
|
|
cdl_option CYGOPT_HAL_MIPS_UPD985XX_HARDWARE_BUGS_S1 {
|
147 |
|
|
display "S1 - CPU to IBUS write restriction"
|
148 |
|
|
active_if { CYGPKG_DEVS_USB_UPD985XX || CYGPKG_DEVS_ETH_MIPS_UPD985XX }
|
149 |
|
|
flavor bool
|
150 |
|
|
default_value 1
|
151 |
|
|
# require either the workaround, or not the package ;
|
152 |
|
|
requires { CYGIMP_DEVS_USB_UPD985XX_IBUS_WRITE_LIMIT || !CYGPKG_DEVS_USB_UPD985XX }
|
153 |
|
|
requires { CYGOPT_DEVS_ETH_MIPS_UPD985XX_HARDWARE_BUGS_S1 || !CYGPKG_DEVS_ETH_MIPS_UPD985XX}
|
154 |
|
|
description "
|
155 |
|
|
This workaround is actually implemented in the Ethernet and USB
|
156 |
|
|
drivers; this option is a short cut to enable those options when
|
157 |
|
|
those packages are included in the build."
|
158 |
|
|
}
|
159 |
|
|
cdl_option CYGOPT_HAL_MIPS_UPD985XX_HARDWARE_BUGS_S2 {
|
160 |
|
|
display "S2 - Interrupt Mask restriction"
|
161 |
|
|
flavor bool
|
162 |
|
|
default_value 1
|
163 |
|
|
description "
|
164 |
|
|
Problem 'S2' is that masking an interrupt source at the same
|
165 |
|
|
instant that the interrupt 'fires' can lock up the system.
|
166 |
|
|
This workaround enables code which never masks an interrupt
|
167 |
|
|
once it has been unmasked, and silently fields any interrupts
|
168 |
|
|
which occur when that interrupt is soft-masked. When the
|
169 |
|
|
interrupt is unmasked by the application, then passing on the
|
170 |
|
|
interrupt is once more permitted, and any stored-up interrupt
|
171 |
|
|
will have its ISR called, otherwise interrupts would be
|
172 |
|
|
lost; they would not pend until the interrupt is unmasked.
|
173 |
|
|
This tactic is only possible due to the edge-triggered nature
|
174 |
|
|
of the interrupt controller in this device."
|
175 |
|
|
}
|
176 |
|
|
}
|
177 |
|
|
|
178 |
|
|
cdl_option CYGHWR_HAL_MIPS_64BIT {
|
179 |
|
|
display "Variant 64 bit architecture support"
|
180 |
|
|
calculated 0
|
181 |
|
|
description "
|
182 |
|
|
While the vr4100 is a 64bit CPU core, only its 32bit mode is
|
183 |
|
|
currently supported in eCos."
|
184 |
|
|
}
|
185 |
|
|
|
186 |
|
|
cdl_option CYGHWR_HAL_MIPS_FPU {
|
187 |
|
|
display "Variant FPU support"
|
188 |
|
|
calculated 0
|
189 |
|
|
}
|
190 |
|
|
|
191 |
|
|
cdl_option CYGHWR_HAL_MIPS_FPU_64BIT {
|
192 |
|
|
display "Variant 64 bit FPU support"
|
193 |
|
|
calculated 0
|
194 |
|
|
}
|
195 |
|
|
|
196 |
|
|
cdl_option CYGPKG_HAL_MIPS_LSBFIRST {
|
197 |
|
|
display "CPU Variant little-endian"
|
198 |
|
|
calculated 1
|
199 |
|
|
}
|
200 |
|
|
|
201 |
|
|
cdl_option CYGPKG_HAL_MIPS_MSBFIRST {
|
202 |
|
|
display "CPU Variant big-endian"
|
203 |
|
|
calculated { ! CYGPKG_HAL_MIPS_LSBFIRST }
|
204 |
|
|
}
|
205 |
|
|
|
206 |
|
|
define_proc {
|
207 |
|
|
puts $::cdl_header "#include "
|
208 |
|
|
}
|
209 |
|
|
|
210 |
|
|
compile variant.S var_misc.c hal_diag.c
|
211 |
|
|
|
212 |
|
|
make {
|
213 |
|
|
/lib/target.ld: /src/hal_mips_upd985xx.ld
|
214 |
|
|
$(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
|
215 |
|
|
@echo $@ ": \\" > $(notdir $@).deps
|
216 |
|
|
@tail +2 target.tmp >> $(notdir $@).deps
|
217 |
|
|
@echo >> $(notdir $@).deps
|
218 |
|
|
@rm target.tmp
|
219 |
|
|
}
|
220 |
|
|
|
221 |
|
|
cdl_option CYGBLD_LINKER_SCRIPT {
|
222 |
|
|
display "Linker script"
|
223 |
|
|
flavor data
|
224 |
|
|
no_define
|
225 |
|
|
calculated { "src/hal_mips_upd985xx.ld" }
|
226 |
|
|
}
|
227 |
|
|
|
228 |
|
|
}
|