2 c/src/lib/libbsp/powerpc/ec555/ChangeLog | 225 ++++++++++++
3 c/src/lib/libbsp/powerpc/ec555/Makefile.am | 50 ++
4 c/src/lib/libbsp/powerpc/ec555/README | 262 ++++++++++++++
5 c/src/lib/libbsp/powerpc/ec555/bsp_specs | 13
6 c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c | 69 +++
7 c/src/lib/libbsp/powerpc/ec555/configure.ac | 52 ++
8 c/src/lib/libbsp/powerpc/ec555/console/console.c | 368 +++++++++++++++++++
9 c/src/lib/libbsp/powerpc/ec555/include/bsp.h | 112 +++++
10 c/src/lib/libbsp/powerpc/ec555/include/coverhd.h | 116 ++++++
11 c/src/lib/libbsp/powerpc/ec555/include/tm27.h | 54 ++
12 c/src/lib/libbsp/powerpc/ec555/irq/irq.h | 55 ++
13 c/src/lib/libbsp/powerpc/ec555/preinstall.am | 58 +++
14 c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c | 177 +++++++++
15 c/src/lib/libbsp/powerpc/ec555/startup/iss555.c | 148 +++++++
16 c/src/lib/libbsp/powerpc/ec555/startup/linkcmds | 319 +++++++++++++++++
17 c/src/lib/libbsp/powerpc/ec555/startup/start.S | 411 ++++++++++++++++++++++
18 c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c | 29 +
19 c/src/lib/libbsp/powerpc/ec555/times | 189 ++++++++++
20 make/custom/ec555.cfg | 38 ++
21 19 files changed, 2745 insertions(+)
23 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog
24 ===================================================================
25 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
26 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog 2008-12-08 06:15:50.000000000 +0100
28 +2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
30 + * bsp_specs: Backport from CVS-HEAD.
32 +2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
34 + * Makefile.am: Remove noinst_PROGRAMS (Unused).
36 +2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
38 + * startup/bspstart.c: Add capability for bootcard.c BSP Initialization
39 + Framework to ask the BSP where it has memory for the RTEMS Workspace
40 + and C Program Heap. These collectively are referred to as work area.
41 + If the BSP supports this, then it does not have to include code to
42 + split the available memory between the two areas. This reduces the
43 + amount of code in the BSP specific bspstart.c file. Additionally, the
44 + shared framework can initialize the C Library, call
45 + rtems_debug_enable(), and dirty the work area memory. Until most/all
46 + BSPs support this new capability, if the BSP supports this, it should
47 + call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac.
48 + When the transition is complete, this autoconf macro can be removed.
50 +2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
52 + * Makefile.am: Rework to avoid .rel files.
54 +2008-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
56 + * startup/bspstart.c: Refactored and renamed initialization routines to
57 + rtems_initialize_data_structures, rtems_initialize_before_drivers,
58 + rtems_initialize_device_drivers, and
59 + rtems_initialize_start_multitasking. This opened the sequence up so
60 + that bootcard() could provide a more robust and flexible framework
61 + which is easier to explain and understand. This also lays the
62 + groundwork for sharing the division of available memory between the
63 + RTEMS workspace and heap and the C library initialization across all
66 +2008-04-23 Joel Sherrill <joel.sherrill@OARcorp.com>
68 + * startup/bspstart.c: Remove all references to
69 + console_reserve_resources and termios_reserve_resources.
71 +2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com>
73 + * startup/linkcmds: Add wildcard to gcc_except_table section so
74 + programs compiled with gcc 4.3.x can link.
76 +2008-01-18 David Erickson <David.Erickson@drdc-rddc.gc.ca>
78 + * startup/bspstart.c: Add semicolon.
80 +2008-01-11 Joel Sherrill <joel.sherrill@OARcorp.com>
82 + * startup/bspstart.c: Add bsp_timer_least_valid and
83 + bsp_timer_average_overhead so tmtests link.
85 +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
87 + * include/bsp.h, startup/bspstart.c: Eliminate copies of the
88 + Configuration Table. Use the RTEMS provided accessor macros to obtain
89 + configuration fields.
91 +2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
93 + * startup/bspstart.c: Move interrupt_stack_size field from CPU Table to
94 + Configuration Table. Eliminate CPU Table from all ports. Delete
95 + references to CPU Table in all forms.
97 +2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
99 + * Makefile.am, startup/bspstart.c: Moved most of the remaining CPU
100 + Table fields to the Configuration Table. This included
101 + pretasking_hook, predriver_hook, postdriver_hook, idle_task,
102 + do_zero_of_workspace, extra_mpci_receive_server_stack,
103 + stack_allocate_hook, and stack_free_hook. As a side-effect of this
104 + effort some multiprocessing code was made conditional and some style
107 +2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
109 + * startup/bspstart.c: Eliminate PowerPC specific elements from the CPU
110 + Table. They have been replaced with variables named bsp_XXX as
113 +2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
115 + * bsp_specs: Remove qrtems_debug.
117 +2007-04-06 Ralf Corsépius <ralf.corsepius@rtems.org>
119 + * bsp_specs: Remove lib (Now expected to exist in GCC).
121 +2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
123 + * configure.ac: New BUG-REPORT address.
125 +2006-11-15 Joel Sherrill <joel@OARcorp.com>
127 + * Makefile.am: Merge c_rtems_main() into boot_card(). This eliminated a
128 + file and simplified initialization.
130 +2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
132 + * configure.ac: Require autoconf-2.60. Require automake-1.10.
134 +2006-03-08 Joel Sherrill <joel@OARcorp.com>
136 + * startup/linkcmds: Add .gnu.linkonce.b.* section.
138 +2006-02-08 Joel Sherrill <joel@OARcorp.com>
140 + * startup/linkcmds: Add sections required by newer gcc versions.
142 +2006-01-11 Ralf Corsepius <ralf.corsepius@rtems.org>
144 + * configure.ac: Remove explicit ampolish3 support (now in
145 + RTEMS_BSP_CONFIGURE).
147 +2006-01-10 Ralf Corsepius <ralf.corsepius@rtems.org>
149 + * configure.ac: Add ampolish3 support.
150 + * Makefile.am: Add preinstall.am.
152 +2006-01-09 Ralf Corsepius <ralf.corsepius@rtems.org>
154 + * Makefile.am: Don't include subdirs.am.
156 +2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
158 + * include/bsp.h: New header guard.
160 +2005-05-10 Ralf Corsepius <ralf.corsepius@rtems.org>
162 + * console/console.c: Eliminate unsigned8.
164 +2005-04-26 Joel Sherrill <joel@OARcorp.com>
166 + * startup/bspstart.c: Eliminate warnings.
168 +2005-04-25 Jennifer Averett <jennifer.averett@oarcorp.com>
171 + * clock/p_clock.c: Add parameter to powerpc exception handler routines
173 +2005-02-17 Ralf Corsepius <ralf.corsepius@rtems.org>
175 + * startup/bspstart.c: include <rtems/powerpc/powerpc.h>.
176 + Use PPC_MINIMUM_STACK_FRAME_SIZE instead of
177 + CPU_MINIMUM_STACK_FRAME_SIZE.
179 +2005-02-16 Ralf Corsepius <ralf.corsepius@rtems.org>
181 + * configure.ac: Remove argument from RTEMS_PPC_EXCEPTIONS.
183 +2005-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
185 + * Makefile.am: Merge-in wrapup/Makefile.am.
186 + * wrapup/Makefile.am: Remove.
187 + * configure.ac: Reflect changes above.
189 +2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
191 + * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
193 +2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
195 + * Makefile.am, wrapup/Makefile.am: Remove build-variant support.
197 +2004-10-20 Ralf Corsepius <ralf_corsepius@rtems.org>
199 + * console/console.c, include/bsp.h, startup/bspstart.c,
200 + startup/iss555.c: Use POSIX fixed size types.
202 +2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
204 + * configure.ac: Require automake > 1.9.
206 +2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
209 + * Makefile.am: Add include/tm27.h, Cosmetics.
210 + * include/tm27.h: Final cosmetics.
212 +2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
214 + * include/bsp.h: Split out tmtest27 support.
215 + * include/tm27.h: New.
217 +2004-04-21 Joel Sherrill <joel@OARcorp.com>
220 + * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
221 + for tm27 and do not add another macro definition.
222 + * startup/tm27supp.c: New file.
224 +2004-04-21 Joel Sherrill <joel@OARcorp.com>
227 + * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
228 + for tm27 and do not add another macro definition.
229 + * startup/tm27supp.c: New file.
231 +2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
234 + * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
236 +2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
239 + * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
241 +2004-04-13 Ralf Corsepius <ralf_corsepius@rtems.org>
243 + * include/bsp.h, startup/start.S: Reflect new locations of cpukit headers.
245 +2004-04-12 David Querbach <querbach@realtime.bc.ca>
247 + * .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
248 + times, clock/p_clock.c, console/console.c, include/.cvsignore,
249 + include/bsp.h, include/coverhd.h, irq/irq.h, startup/bspstart.c,
250 + startup/iss555.c, startup/linkcmds, startup/start.S,
251 + wrapup/.cvsignore, wrapup/Makefile.am: New files.
253 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/Makefile.am
254 ===================================================================
255 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
256 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/Makefile.am 2008-09-29 03:47:53.000000000 +0200
259 +## $Id: Makefile.am,v 1.13.2.1 2008/09/29 01:47:53 ralf Exp $
262 +ACLOCAL_AMFLAGS = -I ../../../../aclocal
264 +include $(top_srcdir)/../../../../automake/compile.am
265 +include $(top_srcdir)/../../bsp.am
267 +dist_project_lib_DATA = bsp_specs
269 +include_HEADERS = include/bsp.h
270 +include_HEADERS += include/tm27.h
272 +nodist_include_HEADERS = include/bspopts.h
273 +DISTCLEANFILES = include/bspopts.h
275 +include_bspdir = $(includedir)/bsp
277 +include_HEADERS += include/coverhd.h
278 +include_bsp_HEADERS = irq/irq.h
282 +dist_project_lib_DATA += startup/linkcmds
284 +pclock_SOURCES = clock/p_clock.c
285 +console_SOURCES = console/console.c
286 +startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
287 + ../../shared/bsppost.c ../../shared/bsppredriverhook.c \
288 + startup/bspstart.c ../../shared/bootcard.c startup/iss555.c \
289 + ../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/start.S
290 +tm27supp_SOURCES = startup/tm27supp.c
292 +noinst_LIBRARIES = libbsp.a
293 +libbsp_a_SOURCES = $(pclock_SOURCES) $(console_SOURCES) $(startup_SOURCES) \
294 + $(tm27supp_SOURCES)
297 + ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
298 + ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
299 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/clock.rel \
300 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/console-generic.rel \
301 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/exceptions.rel \
302 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/irq.rel \
303 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/timer.rel \
304 + ../../../libcpu/@RTEMS_CPU@/mpc5xx/vectors.rel
306 +include $(srcdir)/preinstall.am
307 +include $(top_srcdir)/../../../../automake/local.am
308 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README
309 ===================================================================
310 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
311 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README 2009-11-29 01:38:37.608590025 +0100
314 +# $Id: README,v 1.1 2004/04/12 21:52:13 joel Exp $
317 +This is a README file for the Intec SS555 of RTEMS 4.6.0
319 +The SS555 port was sponsored by Defence Research and Development
320 +Canada - Suffield, and is Copyright (C) 2004, Real-Time Systems Inc.
322 +Please send any comments, improvements, or bug reports to:
325 +querbach@realtime.bc.ca
332 +BOARD: Intec Automation Inc. SS555
336 +COPROCESSORS: Built-in Motorola TPU
343 +TIMERS: PIT / Timebase
344 + RESOLUTION: 1 microsecond (4 MHz crystal / 4)
346 +REAL-TIME CLOCK: On-chip.
365 + SCI2 serial port (console)
367 + TB timing test support
369 + SWT watchdog timer -- enable in startup/iss555.c
370 + *CS0 external 512k 2-1-1-1 Burst SRAM
394 +Clock rate: 40 MHz development/embeddable board
395 +Bus width: 32-bit on-board RAM, 16-bit off-board I/O
397 +RAM: 512k 2-1-1-1 burst SRAM
403 +The ss555 port uses the Intec SS555's external RAM in two different ways,
404 +depending on whether or not it is built for debugging by giving the
405 +VARIANT=DEBUG switch to make:
407 + make VARIANT=DEBUG all
409 +1. In the debugging case, the linker script concanttenates the .text,
410 +.data, and .bss sections starting at location zero, so they all can be
411 +loaded into the external RAM for debugging. We assume that the debugger
412 +disables the internal Flash ROM and enables the external RAM before loading
413 +the code into the external RAM.
415 +2. In the normal (non-debugging) case, the linker script still places the
416 +.text section near zero, but places the start of the .data and .bss sections
417 +at the start location of the MPC555's internal RAM. The system startup code
418 +then configures the external RAM just after the internal RAM in memory,
419 +forming one large block from the two RAM devices.
425 +This BSP includes an termios-capable asynchronous serial line driver that
426 +supports SCI1 and SCI2. The RTEMS console is selected at configuration time
427 +with the CONSOLE_MINOR variable (see .../ss555/configure.ac). We default to
428 +SCI2 for the console, since SCI1 has some extra features which may be
429 +desired for application use.
431 +The BSP console supports three different modes of operation:
433 + 1. polled I/O done with termios support,
434 + 2. polled I/O done without termios support,
435 + 3. interrupt-driven I/O with termios support.
437 +The mode of operation of the serial driver is determined at configure time in
438 +part by the value of the UARTS_IO_MODE variable (see .../ss555/configure.ac).
441 + 1 - interrupt-driven I/O.
443 +Also, set the value of UARTS_USE_TERMIOS to select whether termios should be
444 +used to perform buffering and input/output processing. Without termios
445 +support, input processing is limited to the substitution of LF for a
446 +received CR, and output processing is limited to the transmission of a CR
447 +following the transmission of a LF. The choices for UARTS_USE_TERMIOS are:
449 + 0 - do not use termios
452 +In most real-time applications, the driver should be configured to use
453 +termios and interrupt-driven I/O. Special requirements may dictate otherwise.
455 +Polled I/O must be used when running the timing tests. It must also be used
456 +to run some other tests and some samples, such as the cdtest. Some tests
457 +change the interrupt mask and will hang interrupt-driven I/O indefinitely.
458 +Others, such as cdtest, perform console output from the static constructors
459 +before the console is opened, causing the test to hang. Still other tests
460 +produce output that is supposed to be in some specific order. For these
461 +tests, termios should not be used, as termios buffers output and the
462 +transmission of the buffers occur at somewhat unpredictable times.
464 +The real solution is to fix the tests so that they work with interrupt-driven
468 +printk() and debug output
469 +-----------------------
471 +The implementation of printk() in RTEMS is mostly independent of most system
472 +services. The printk() function can therefore be used to print messages to a
473 +debug console, particularly when debugging startup code or device drivers,
474 +i.e. code that runs before the console driver is opened or that runs with
475 +interrupts disabled.
477 +Support is provided to send printk output to either port. Specify the
478 +desired port at configure time by setting the value of PRINTK_MINOR to one
479 +of SCI1_MINOR or SCI2_MINOR.
481 +printk() always uses polled I/O, and never uses termios.
483 +If the printk() port is opened by RTEMS, then UARTS_IO_MODE must be set for
484 +polled I/O, otherwise the I/O functions will be in conflict. Using printk()
485 +before the port is initialized is, of course, not possible. This
486 +initialization occurs in console_initialize(), which is called by
487 +rtems_initialize_executive_early().
493 +The MPC555 watchdog timer can be enabled at configuration time by defining
494 +the WATCHDOG_TIMEOUT variable. This variable sets the watchdog timeout
498 + --------- = --------- = 51.2 usec
501 +or about 1/20 msec. When WATCHDOG_TIMEOUT is left undefined, the watchdog
508 +Most code came from the mbx8xx port, except for the floating-point handling
509 +which came from the mpc8260ads.
515 +The port was developed on an x86 box running Debian 3.0. The toolchain was
516 +built from the sources at rtems.org, except for the autotools which came
517 +from the Debian distribution.
523 +Board: Intec SS555 v1.1
524 +CPU: Motorola MPC555LFMZP40, mask 1K83H
525 +Clock Speed: Crystal 4.0 MHz, CPU 40.0 MHz
526 +RAM: 512K bytes of 2-1-1-1 Burst SRAM
527 +Times Reported in: Microseconds
528 +Timer Source: Timebase clock
529 +GCC Flags: -O4 -fno-keep-inline-functions -mcpu=(821/860)
530 +Console: Operates in polled mode on SMC2. No I/O through EPPC-Bug.
536 +Single processor tests:
537 + All tests passed, except that:
538 + - sp09 aborts due to memory shortage
539 + - sp20 needs to be run with output buffering enabled (see
542 +Multi-processor tests:
546 + All tests passed. Note that the termios test only works if the system is
547 + rebuilt with termios enabled.
550 + All tests passed, except that:
551 + - the message queue test failed with "errno (91 - File or path name too
555 + Due to memory limitations, many of the tests will not run unless you set
556 + OPERATION_COUNT=20 at configuration time.
558 + To run tm27 (the interrupt latency timer test), short CN5-48 to CN5-50 on
561 + All tests run cleanly, except for tm26, which gives a "PANIC 12" after it
562 + exits. This doesn't seem to cause a problem otherwise.
564 + See the times file for the results of the timing tests.
570 + These run correctly, except that:
571 + - The "minimum" sample is not designed to run properly on any system.
572 + - The loopback, fileio, unilimited, and pppd tests fail due to memory
574 + - The paranoia program dies on a floating-point assist exception.
575 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/bsp_specs
576 ===================================================================
577 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
578 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/bsp_specs 2008-12-08 06:15:50.000000000 +0100
580 +%rename endfile old_endfile
581 +%rename startfile old_startfile
582 +%rename link old_link
585 +%{!qrtems: %(old_startfile)} \
586 +%{!nostdlib: %{qrtems: ecrti%O%s -u __vectors -N -u start -e start}}
589 +%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
592 +%{!qrtems: %(old_link)} %{qrtems: -dc -dp}
593 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c
594 ===================================================================
595 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
596 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c 2009-11-29 01:38:37.612589905 +0100
599 + * Clock Tick interrupt conexion code.
601 + * COPYRIGHT (c) 1989-1997.
602 + * On-Line Applications Research Corporation (OAR).
604 + * The license and distribution terms for this file may in
605 + * the file LICENSE in this distribution or at
606 + * http://www.rtems.com/license/LICENSE.
608 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
609 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
611 + * Derived from c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c:
613 + * Modified to support the MPC750.
614 + * Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
616 + * $Id: p_clock.c,v 1.3 2005/04/25 14:46:37 jennifer Exp $
620 +#include <bsp/irq.h>
621 +#include <rtems/bspIo.h>
623 +extern void clockOn(void*);
624 +extern void clockOff (void*);
625 +extern int clockIsOn(void*);
626 +extern void Clock_isr(void *);
628 +static rtems_irq_connect_data clockIrqData = {
629 + CPU_PERIODIC_TIMER,
630 + (rtems_irq_hdl)Clock_isr,
632 + (rtems_irq_enable)clockOn,
633 + (rtems_irq_disable)clockOff,
634 + (rtems_irq_is_enabled)clockIsOn
637 +int BSP_disconnect_clock_handler (void)
639 + if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
640 + printk("Unable to stop system clock\n");
641 + rtems_fatal_error_occurred(1);
643 + return BSP_remove_rtems_irq_handler (&clockIrqData);
646 +int BSP_connect_clock_handler (rtems_irq_hdl hdl)
648 + if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
649 + printk("Unable to get system clock handler\n");
650 + rtems_fatal_error_occurred(1);
652 + if (!BSP_remove_rtems_irq_handler (&clockIrqData)) {
653 + printk("Unable to remove current system clock handler\n");
654 + rtems_fatal_error_occurred(1);
659 + clockIrqData.name = CPU_PERIODIC_TIMER;
660 + clockIrqData.hdl = (rtems_irq_hdl) hdl;
661 + clockIrqData.on = (rtems_irq_enable)clockOn;
662 + clockIrqData.off = (rtems_irq_enable)clockOff;
663 + clockIrqData.isOn = (rtems_irq_is_enabled)clockIsOn;
665 + return BSP_install_rtems_irq_handler (&clockIrqData);
667 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac
668 ===================================================================
669 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
670 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac 2006-12-02 06:59:47.000000000 +0100
672 +## Process this file with autoconf to produce a configure script.
674 +## $Id: configure.ac,v 1.9 2006/12/02 05:59:47 ralf Exp $
677 +AC_INIT([rtems-c-src-lib-libbsp-powerpc-mbx5xx],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
678 +AC_CONFIG_SRCDIR([bsp_specs])
679 +RTEMS_TOP(../../../../../..)
681 +RTEMS_CANONICAL_TARGET_CPU
682 +AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
685 +RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
686 +RTEMS_CANONICALIZE_TOOLS
689 +RTEMS_CHECK_NETWORKING
690 +AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
692 +RTEMS_BSPOPTS_SET([WATCHDOG_TIMEOUT],[*],[0xFFFF])
693 +RTEMS_BSPOPTS_HELP([WATCHDOG_TIMEOUT],
694 +[Define to the desired timeout (in steps of 1/20 msec) to enable the
695 + watchdog. Default is to disable the watchdog entirely.])
697 +RTEMS_BSPOPTS_SET([UARTS_USE_TERMIOS],[*],[0])
698 +RTEMS_BSPOPTS_HELP([UARTS_USE_TERMIOS],
699 +[Define to 1 if you want termios support for every port.
700 + Termios support is independent of the choice of UART I/O mode.])
702 +RTEMS_BSPOPTS_SET([CONSOLE_MINOR],[*],[SCI2_MINOR])
703 +RTEMS_BSPOPTS_HELP([CONSOLE_MINOR],
704 +[Must be defined to be one of SCI1_MINOR or SCI2_MINOR. Determines which
705 + device will be registered as /dev/console.])
707 +RTEMS_BSPOPTS_SET([UARTS_IO_MODE],[*],[0])
708 +RTEMS_BSPOPTS_HELP([UARTS_IO_MODE],
709 +[Define to 1 if you want interrupt-driven I/O for the SCI ports.])
711 +RTEMS_BSPOPTS_SET([PRINTK_MINOR],[*],[SCI2_MINOR])
712 +RTEMS_BSPOPTS_HELP([PRINTK_MINOR],
713 +[Must be defined to be one of SCI1_MINOR or SCI2_MINOR. Determines which
714 + device is used for output by printk(). The printk port always uses polled
715 + I/O. Don't open the printk port from RTEMS unless also using polled I/O
716 + for the SCI ports.])
718 +# Explicitly list a Makefile here
719 +AC_CONFIG_FILES([Makefile])
721 +RTEMS_PPC_EXCEPTIONS
724 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/console/console.c
725 ===================================================================
726 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
727 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/console/console.c 2009-11-29 01:38:37.612589905 +0100
732 + * This file contains the Intec SS555 termios serial I/O package.
734 + * The SCI channels are assigned as follows
736 + * Channel Device Minor
740 + * All ports support termios. The use of termios is recommended for real-time
741 + * applications. Termios provides buffering and input processing. When not
742 + * using termios, processing is limited to the substitution of LF for CR on
743 + * input, and the output of a CR following the output of a LF character.
744 + * Note that the terminal should not send CR/LF pairs when the return key
745 + * is pressed, and that output lines are terminated with LF/CR, not CR/LF
746 + * (although that would be easy to change).
748 + * I/O may be interrupt-driven (recommended for real-time applications) or
753 + * It is not possible to use different I/O modes on the different ports. The
754 + * exception is with printk. The printk port can use a different mode from
755 + * the other ports. If this is done, it is important not to open the printk
756 + * port from an RTEMS application.
758 + * Currently, the I/O modes are determined at build time. It would be much
759 + * better to have the mode selected at boot time based on parameters in
762 + * Interrupt-driven I/O requires termios.
766 + * TO RUN THE TESTS, USE POLLED I/O WITHOUT TERMIOS SUPPORT. Some tests
767 + * play with the interrupt masks and turn off I/O. Those tests will hang
768 + * when interrupt-driven I/O is used. Other tests, such as cdtest, do I/O
769 + * from the static constructors before the console is open. This test
770 + * will not work with interrupt-driven I/O. Because of the buffering
771 + * performed in termios, test output may not be in sequence.The tests
772 + * should all be fixed to work with interrupt-driven I/O and to
773 + * produce output in the expected sequence. Obviously, the termios test
774 + * requires termios support in the driver.
776 + * Set CONSOLE_MINOR to the appropriate device minor number in the
777 + * config file. This allows the RTEMS application console to be different
778 + * from the GDB port.
780 + * This driver handles both available serial ports: it distinguishes
781 + * the sub-devices using minor device numbers. It is not possible to have
782 + * other protocols running on the other ports when this driver is used as
783 + * currently written.
786 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
787 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
789 + * Derived from c/src/lib/libbsp/powerpc/mbx8xx/console/console.c:
791 + * Based on code (alloc860.c in eth_comm port) by
792 + * Jay Monkman (jmonkman@frasca.com),
793 + * Copyright (C) 1998 by Frasca International, Inc.
795 + * Modifications by Darlene Stewart <Darlene.Stewart@iit.nrc.ca>
796 + * and Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>.
797 + * Copyright (c) 2000, National Research Council of Canada
802 +#include <bsp.h> /* Must be before libio.h */
803 +#include <rtems/bspIo.h>
804 +#include <rtems/libio.h>
805 +#include <termios.h>
807 +static void _BSP_output_char( char c );
808 +static rtems_status_code do_poll_read( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
809 +static rtems_status_code do_poll_write( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
811 +static void _BSP_null_char( char c ) {return;}
813 +BSP_output_char_function_type BSP_output_char = _BSP_null_char;
818 + * Input characters through polled I/O. Returns as soon as a character has
819 + * been received. Otherwise, if we wait for the number of requested
820 + * characters, we could be here forever!
822 + * CR is converted to LF on input. The terminal should not send a CR/LF pair
823 + * when the return or enter key is pressed.
825 + * Input parameters:
826 + * major - ignored. Should be the major number for this driver.
827 + * minor - selected channel.
828 + * arg->buffer - where to put the received characters.
829 + * arg->count - number of characters to receive before returning--Ignored.
831 + * Output parameters:
832 + * arg->bytes_moved - the number of characters read. Always 1.
834 + * Return value: RTEMS_SUCCESSFUL
836 + * CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
838 +static rtems_status_code do_poll_read(
839 + rtems_device_major_number major,
840 + rtems_device_minor_number minor,
844 + rtems_libio_rw_args_t *rw_args = arg;
847 + while( (c = m5xx_uart_pollRead(minor)) == -1 );
848 + rw_args->buffer[0] = (uint8_t)c;
849 + if( rw_args->buffer[0] == '\r' )
850 + rw_args->buffer[0] = '\n';
851 + rw_args->bytes_moved = 1;
853 + return RTEMS_SUCCESSFUL;
859 + * Output characters through polled I/O. Returns only once every character has
862 + * CR is transmitted AFTER a LF on output.
864 + * Input parameters:
865 + * major - ignored. Should be the major number for this driver.
866 + * minor - selected channel
867 + * arg->buffer - where to get the characters to transmit.
868 + * arg->count - the number of characters to transmit before returning.
870 + * Output parameters:
871 + * arg->bytes_moved - the number of characters read
873 + * Return value: RTEMS_SUCCESSFUL
875 + * CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
877 +static rtems_status_code do_poll_write(
878 + rtems_device_major_number major,
879 + rtems_device_minor_number minor,
883 + rtems_libio_rw_args_t *rw_args = arg;
887 + for( i = 0; i < rw_args->count; i++ ) {
888 + m5xx_uart_pollWrite(minor, &(rw_args->buffer[i]), 1);
889 + if ( rw_args->buffer[i] == '\n' )
890 + m5xx_uart_pollWrite(minor, &cr, 1);
892 + rw_args->bytes_moved = i;
894 + return RTEMS_SUCCESSFUL;
898 + * Print functions prototyped in bspIo.h
901 +static void _BSP_output_char( char c )
906 + * Can't rely on console_initialize having been called before this
907 + * function is used, so it may fail.
910 + m5xx_uart_pollWrite( PRINTK_MINOR, &c, 1 );
912 + m5xx_uart_pollWrite( PRINTK_MINOR, &cr, 1 );
920 + * All these functions are prototyped in rtems/c/src/lib/include/console.h.
924 + * Initialize and register the device
926 +rtems_device_driver console_initialize(
927 + rtems_device_major_number major,
928 + rtems_device_minor_number minor,
932 + rtems_status_code status;
935 + * Set up TERMIOS if needed
937 + #if UARTS_USE_TERMIOS == 1
938 + rtems_termios_initialize ();
939 + #endif /* UARTS_USE_TERMIOS */
942 + * Do device-specific initialization
944 + BSP_output_char = _BSP_output_char;
946 + m5xx_uart_initialize(SCI1_MINOR);
947 + status = rtems_io_register_name ("/dev/tty0", major, SCI1_MINOR);
948 + if (status != RTEMS_SUCCESSFUL)
949 + rtems_fatal_error_occurred (status);
951 + m5xx_uart_initialize(SCI2_MINOR);
952 + status = rtems_io_register_name ("/dev/tty1", major, SCI2_MINOR);
953 + if (status != RTEMS_SUCCESSFUL)
954 + rtems_fatal_error_occurred (status);
956 + /* Now register the RTEMS console */
957 + status = rtems_io_register_name ("/dev/console", major, CONSOLE_MINOR);
958 + if (status != RTEMS_SUCCESSFUL)
959 + rtems_fatal_error_occurred (status);
961 + return RTEMS_SUCCESSFUL;
967 +rtems_device_driver console_open(
968 + rtems_device_major_number major,
969 + rtems_device_minor_number minor,
973 + rtems_status_code sc;
975 + if ( minor > NUM_PORTS - 1 )
976 + return RTEMS_INVALID_NUMBER;
978 + #if (UARTS_USE_TERMIOS == 1)
980 + #if (UARTS_IO_MODE == 1) /* RTEMS interrupt-driven I/O with termios */
982 + static const rtems_termios_callbacks callbacks = {
983 + m5xx_uart_firstOpen, /* firstOpen */
984 + m5xx_uart_lastClose, /* lastClose */
985 + NULL, /* pollRead */
986 + m5xx_uart_write, /* write */
987 + m5xx_uart_setAttributes, /* setAttributes */
988 + NULL, /* stopRemoteTx */
989 + NULL, /* startRemoteTx */
990 + TERMIOS_IRQ_DRIVEN /* outputUsesInterrupts */
992 + sc = rtems_termios_open( major, minor, arg, &callbacks );
994 + #else /* UARTS_IO_MODE != 1 */ /* RTEMS polled I/O with termios */
996 + static const rtems_termios_callbacks callbacks = {
997 + m5xx_uart_firstOpen, /* firstOpen */
998 + m5xx_uart_lastClose, /* lastClose */
999 + m5xx_uart_pollRead, /* pollRead */
1000 + m5xx_uart_pollWrite, /* write */
1001 + m5xx_uart_setAttributes, /* setAttributes */
1002 + NULL, /* stopRemoteTx */
1003 + NULL, /* startRemoteTx */
1004 + TERMIOS_POLLED /* outputUsesInterrupts */
1006 + sc = rtems_termios_open( major, minor, arg, &callbacks );
1013 + #else /* no termios -- default to polled I/O */
1015 + sc = RTEMS_SUCCESSFUL;
1023 + * Close the device
1025 +rtems_device_driver console_close(
1026 + rtems_device_major_number major,
1027 + rtems_device_minor_number minor,
1031 + if ( minor > NUM_PORTS-1 )
1032 + return RTEMS_INVALID_NUMBER;
1034 + #if UARTS_USE_TERMIOS == 1
1035 + return rtems_termios_close( arg );
1037 + return RTEMS_SUCCESSFUL;
1042 + * Read from the device
1044 +rtems_device_driver console_read(
1045 + rtems_device_major_number major,
1046 + rtems_device_minor_number minor,
1050 + if ( minor > NUM_PORTS-1 )
1051 + return RTEMS_INVALID_NUMBER;
1053 + #if UARTS_USE_TERMIOS == 1
1054 + return rtems_termios_read( arg );
1056 + return do_poll_read( major, minor, arg );
1061 + * Write to the device
1063 +rtems_device_driver console_write(
1064 + rtems_device_major_number major,
1065 + rtems_device_minor_number minor,
1069 + if ( minor > NUM_PORTS-1 )
1070 + return RTEMS_INVALID_NUMBER;
1072 + #if UARTS_USE_TERMIOS == 1
1073 + return rtems_termios_write( arg );
1075 + return do_poll_write( major, minor, arg );
1080 + * Handle ioctl request.
1082 +rtems_device_driver console_control(
1083 + rtems_device_major_number major,
1084 + rtems_device_minor_number minor,
1088 + if ( minor > NUM_PORTS-1 )
1089 + return RTEMS_INVALID_NUMBER;
1091 + #if UARTS_USE_TERMIOS == 1
1092 + return rtems_termios_ioctl( arg );
1094 + return RTEMS_SUCCESSFUL;
1097 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h
1098 ===================================================================
1099 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1100 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h 2007-12-11 16:46:51.000000000 +0100
1104 + * This include file contains all board IO definitions.
1106 + * This file includes definitions for the Intec SS555.
1109 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
1110 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1112 + * Derived from c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h:
1114 + * COPYRIGHT (c) 1989-1998.
1115 + * On-Line Applications Research Corporation (OAR).
1117 + * The license and distribution terms for this file may be
1118 + * found in the file LICENSE in this distribution or at
1119 + * http://www.rtems.com/license/LICENSE.
1121 + * $Id: bsp.h,v 1.11 2007/12/11 15:46:51 joel Exp $
1131 +#include <bspopts.h>
1134 +#include <rtems/console.h>
1135 +#include <rtems/clockdrv.h>
1136 +#include <mpc5xx.h>
1137 +#include <mpc5xx/console.h>
1138 +#include <libcpu/vectors.h>
1139 +#include <bsp/irq.h>
1142 + * Clock definitions
1145 +#define BSP_CRYSTAL_HZ 4000000 /* crystal frequency, Hz */
1146 +#define BSP_CLOCK_HZ 40000000 /* CPU clock frequency, Hz
1151 + * The SS555 board includes a CPLD to control on-board features and
1152 + * off-board devices.
1154 +typedef struct cpld_ {
1155 + uint8_t cs3a[32]; /* Chip select 3A */
1156 + uint8_t pad0[0x200000 - 0x000020];
1158 + uint8_t cs3b[32]; /* Chip select 3B */
1159 + uint8_t pad2[0x400000 - 0x200020];
1161 + uint8_t cs3c[32]; /* Chip select 3C */
1162 + uint8_t pad4[0x600000 - 0x400020];
1164 + uint8_t cs3d[32]; /* Chip select 3D */
1165 + uint8_t pad6[0x800000 - 0x600020];
1167 + uint8_t serial_ints; /* Enable/disable serial interrupts */
1168 + uint8_t serial_resets; /* Enable/disable serial resets */
1169 + uint8_t serial_ack; /* Acknowledge serial transfers */
1170 + uint8_t pad8[0xA00000 - 0x800003];
1172 + uint8_t iflash_writess; /* Enable/disable internal-flash writes */
1173 + uint8_t nflash_writess; /* Enable/disable NAND-flash writes */
1174 + uint8_t padA[0xC00000 - 0xA00002];
1177 +extern volatile cpld_t cpld; /* defined in linkcmds */
1179 +/* miscellaneous stuff assumed to exist */
1182 + * Device Driver Table Entries
1186 + * NOTE: Use the standard Console driver entry
1190 + * NOTE: Use the standard Clock driver entry
1194 + * How many libio files we want
1197 +#define BSP_LIBIO_MAX_FDS 20
1201 +void bsp_cleanup( void );
1203 +rtems_isr_entry set_vector( /* returns old vector */
1204 + rtems_isr_entry handler, /* isr routine */
1205 + rtems_vector_number vector, /* vector number */
1206 + int type /* RTEMS or RAW intr */
1214 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h
1215 ===================================================================
1216 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1217 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h 2009-11-29 01:38:37.612589905 +0100
1221 + * This include file has defines to represent the overhead associated
1222 + * with calling a particular directive from C. These are used in the
1223 + * Timing Test Suite to ignore the overhead required to pass arguments
1224 + * to directives. On some CPUs and/or target boards, this overhead
1225 + * is significant and makes it difficult to distinguish internal
1226 + * RTEMS execution time from that used to call the directive.
1227 + * This file should be updated after running the C overhead timing
1228 + * test. Once this update has been performed, the RTEMS Time Test
1229 + * Suite should be rebuilt to account for these overhead times in the
1232 + * NOTE: If these are all zero, then the times reported include
1233 + * all calling overhead including passing of arguments.
1235 + * COPYRIGHT (c) 1989-1998.
1236 + * On-Line Applications Research Corporation (OAR).
1238 + * The license and distribution terms for this file may be
1239 + * found in the file LICENSE in this distribution or at
1240 + * http://www.rtems.com/license/LICENSE.
1242 + * $Id: coverhd.h,v 1.2 2006/03/17 10:11:37 ralf Exp $
1245 +#ifndef __COVERHD_h
1246 +#define __COVERHD_h
1253 + * 40 MHz processor, running from external 2-1-1-1 burst SRAM.
1255 +#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0
1256 +#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0
1257 +#define CALLING_OVERHEAD_TASK_CREATE 0
1258 +#define CALLING_OVERHEAD_TASK_IDENT 0
1259 +#define CALLING_OVERHEAD_TASK_START 0
1260 +#define CALLING_OVERHEAD_TASK_RESTART 0
1261 +#define CALLING_OVERHEAD_TASK_DELETE 0
1262 +#define CALLING_OVERHEAD_TASK_SUSPEND 0
1263 +#define CALLING_OVERHEAD_TASK_RESUME 0
1264 +#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0
1265 +#define CALLING_OVERHEAD_TASK_MODE 0
1266 +#define CALLING_OVERHEAD_TASK_GET_NOTE 0
1267 +#define CALLING_OVERHEAD_TASK_SET_NOTE 0
1268 +#define CALLING_OVERHEAD_TASK_WAKE_WHEN 2
1269 +#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0
1270 +#define CALLING_OVERHEAD_INTERRUPT_CATCH 0
1271 +#define CALLING_OVERHEAD_CLOCK_GET 2
1272 +#define CALLING_OVERHEAD_CLOCK_SET 3
1273 +#define CALLING_OVERHEAD_CLOCK_TICK 0
1275 +#define CALLING_OVERHEAD_TIMER_CREATE 0
1276 +#define CALLING_OVERHEAD_TIMER_IDENT 0
1277 +#define CALLING_OVERHEAD_TIMER_DELETE 0
1278 +#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0
1279 +#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 3
1280 +#define CALLING_OVERHEAD_TIMER_RESET 0
1281 +#define CALLING_OVERHEAD_TIMER_CANCEL 0
1282 +#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0
1283 +#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0
1284 +#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0
1285 +#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0
1286 +#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0
1287 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0
1288 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0
1289 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0
1290 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0
1291 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0
1292 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0
1293 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0
1294 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0
1296 +#define CALLING_OVERHEAD_EVENT_SEND 0
1297 +#define CALLING_OVERHEAD_EVENT_RECEIVE 0
1298 +#define CALLING_OVERHEAD_SIGNAL_CATCH 0
1299 +#define CALLING_OVERHEAD_SIGNAL_SEND 0
1300 +#define CALLING_OVERHEAD_PARTITION_CREATE 0
1301 +#define CALLING_OVERHEAD_PARTITION_IDENT 0
1302 +#define CALLING_OVERHEAD_PARTITION_DELETE 0
1303 +#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0
1304 +#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0
1305 +#define CALLING_OVERHEAD_REGION_CREATE 0
1306 +#define CALLING_OVERHEAD_REGION_IDENT 0
1307 +#define CALLING_OVERHEAD_REGION_DELETE 0
1308 +#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0
1309 +#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0
1310 +#define CALLING_OVERHEAD_PORT_CREATE 0
1311 +#define CALLING_OVERHEAD_PORT_IDENT 0
1312 +#define CALLING_OVERHEAD_PORT_DELETE 0
1313 +#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0
1314 +#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0
1316 +#define CALLING_OVERHEAD_IO_INITIALIZE 0
1317 +#define CALLING_OVERHEAD_IO_OPEN 0
1318 +#define CALLING_OVERHEAD_IO_CLOSE 0
1319 +#define CALLING_OVERHEAD_IO_READ 0
1320 +#define CALLING_OVERHEAD_IO_WRITE 0
1321 +#define CALLING_OVERHEAD_IO_CONTROL 0
1322 +#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0
1323 +#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0
1324 +#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0
1325 +#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0
1326 +#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0
1327 +#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0
1328 +#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0
1335 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/tm27.h
1336 ===================================================================
1337 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1338 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/tm27.h 2009-11-29 01:38:37.616586852 +0100
1343 + * The license and distribution terms for this file may be
1344 + * found in the file LICENSE in this distribution or at
1345 + * http://www.rtems.com/license/LICENSE.
1347 + * $Id: tm27.h,v 1.2 2004/04/23 04:47:38 ralf Exp $
1350 +#ifndef _RTEMS_TMTEST27
1351 +#error "This is an RTEMS internal file you must not include directly."
1358 + * Stuff for Time Test 27
1360 + * The following require that IRQ7 be jumpered to ground. On the SS555,
1361 + * this can be done by shorting together CN5 pin 48 and CN5 pin 50.
1364 +#define MUST_WAIT_FOR_INTERRUPT 1
1366 +#define Install_tm27_vector( handler ) \
1368 + extern rtems_irq_connect_data tm27IrqData; \
1369 + usiu.siel |= (1 << 17); \
1370 + usiu.sipend |= (1 << 17); \
1372 + tm27IrqData.hdl = (rtems_irq_hdl)handler; \
1373 + BSP_install_rtems_irq_handler (&tm27IrqData); \
1376 +#define Cause_tm27_intr() \
1378 + usiu.siel &= ~(1 << 17); \
1381 +#define Clear_tm27_intr() \
1383 + usiu.siel |= (1 << 17); \
1384 + usiu.sipend |= (1 << 17); \
1387 +#define Lower_tm27_intr() \
1389 + ppc_cached_irq_mask |= (1 << 17); \
1390 + usiu.simask = ppc_cached_irq_mask; \
1394 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/irq/irq.h
1395 ===================================================================
1396 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1397 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/irq/irq.h 2009-11-29 01:38:37.616586852 +0100
1401 + * This include file describe the data structure and the functions implemented
1402 + * by rtems to write interrupt handlers.
1405 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
1406 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1408 + * Derived from libbsp/powerpc/mbx8xx/irq/irq.h:
1410 + * CopyRight (C) 1999 valette@crf.canon.fr
1412 + * This code is heavilly inspired by the public specification of STREAM V2
1413 + * that can be found at :
1415 + * <http://www.chorus.com/Documentation/index.html> by following
1416 + * the STREAM API Specification Document link.
1418 + * The license and distribution terms for this file may be
1419 + * found in found in the file LICENSE in this distribution or at
1420 + * http://www.rtems.com/license/LICENSE.
1422 + * $Id: irq.h,v 1.2 2004/04/21 10:43:03 ralf Exp $
1425 +#ifndef LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1426 +#define LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1428 +#include <libcpu/irq.h>
1437 + * The SS555 has no external interrupt controller chip, so use the standard
1438 + * routines from the CPU-dependent code.
1440 +#define BSP_install_rtems_irq_handler(ptr) CPU_install_rtems_irq_handler(ptr)
1441 +#define BSP_get_current_rtems_irq_handler(ptr) CPU_get_current_rtems_irq_handler(ptr)
1442 +#define BSP_remove_rtems_irq_handler(ptr) CPU_remove_rtems_irq_handler(ptr)
1443 +#define BSP_rtems_irq_mngt_set(config) CPU_rtems_irq_mngt_set(config)
1444 +#define BSP_rtems_irq_mngt_get(config) CPU_rtems_irq_mngt_get(config)
1445 +#define BSP_rtems_irq_mng_init(cpuId) CPU_rtems_irq_mng_init(cpuId)
1453 +#endif /* LIBBSP_POWERPC_SS555_IRQ_IRQ_H */
1454 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c
1455 ===================================================================
1456 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1457 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c 2008-07-11 12:01:37.000000000 +0200
1461 + * This set of routines starts the application. It includes application,
1462 + * board, and monitor specific initialization and configuration.
1463 + * The generic CPU dependent initialization has been performed
1464 + * before this routine is invoked.
1466 + * COPYRIGHT (c) 1989-2007.
1467 + * On-Line Applications Research Corporation (OAR).
1469 + * The license and distribution terms for this file may be
1470 + * found in the file LICENSE in this distribution or at
1471 + * http://www.rtems.com/license/LICENSE.
1473 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
1474 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1476 + * Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c:
1478 + * Modifications for MBX860:
1479 + * Copyright (c) 1999, National Research Council of Canada
1481 + * $Id: bspstart.c,v 1.17 2008/07/11 10:01:37 thomas Exp $
1484 +#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
1486 +#include <string.h>
1488 +#include <rtems/libio.h>
1489 +#include <rtems/libcsupport.h>
1490 +#include <rtems/bspIo.h>
1491 +#include <rtems/powerpc/powerpc.h>
1493 +#include <libcpu/cpuIdent.h>
1494 +#include <libcpu/spr.h>
1496 +#include <bsp/irq.h>
1501 +extern unsigned long intrStackPtr;
1504 + * Driver configuration parameters
1506 +uint32_t bsp_clicks_per_usec;
1507 +uint32_t bsp_clock_speed; /* Serial clocks per second */
1508 +uint32_t bsp_timer_least_valid;
1509 +uint32_t bsp_timer_average_overhead;
1512 + * Use the shared implementations of the following routines.
1513 + * Look in rtems/c/src/lib/libbsp/shared/bsplibc.c.
1515 +void bsp_libc_init( void *, uint32_t, int );
1517 +void BSP_panic(char *s)
1519 + printk("%s PANIC %s\n",_RTEMS_version, s);
1520 + __asm__ __volatile ("sc");
1523 +void _BSP_Fatal_error(unsigned int v)
1525 + printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
1526 + __asm__ __volatile ("sc");
1530 + * bsp_pretasking_hook
1532 + * Called when RTEMS initialization is complete but before interrupts and
1533 + * tasking are enabled. Used to setup libc and install any BSP extensions.
1535 + * Must not use libc (to do io) from here, since drivers are not yet
1538 + * Input parameters: NONE
1540 + * Output parameters: NONE
1542 + * Return values: NONE
1544 +void bsp_pretasking_hook(void)
1547 + * These are assigned addresses in the linkcmds file for the BSP. This
1548 + * approach is better than having these defined as manifest constants and
1549 + * compiled into the kernel, but it is still not ideal when dealing with
1550 + * multiprocessor configuration in which each board as a different memory
1551 + * map. A better place for defining these symbols might be the makefiles.
1552 + * Consideration should also be given to developing an approach in which
1553 + * the kernel and the application can be linked and burned into ROM
1554 + * independently of each other.
1556 + uint8_t *_HeapStart =
1557 + (uint8_t *)Configuration.work_space_start
1558 + + rtems_configuration_get_work_space_size();
1559 + extern uint8_t _HeapEnd[];
1561 + bsp_libc_init( _HeapStart, _HeapEnd - _HeapStart, 0 );
1567 + * Board-specific initialization code. Called from the generic boot_card()
1568 + * function defined in rtems/c/src/lib/libbsp/shared/main.c. That function
1569 + * does some of the board independent initialization. It is called from the
1570 + * SS555 entry point _start() defined in
1571 + * rtems/c/src/lib/libbsp/powerpc/ss555/startup/start.S
1573 + * _start() has set up a stack, has zeroed the .bss section, has set up the
1574 + * .data section from contents stored in ROM, has turned off interrupts,
1575 + * and placed the processor in the supervisor mode. boot_card() has left
1576 + * the processor in that state when bsp_start() was called.
1578 + * Input parameters: NONE
1580 + * Output parameters: NONE
1582 + * Return values: NONE
1584 +void bsp_start(void)
1586 + extern char _WorkspaceBase[];
1588 + ppc_cpu_id_t myCpu;
1589 + ppc_cpu_revision_t myCpuRevision;
1590 + register unsigned char* intrStack;
1593 + * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
1594 + * function stores the result in global variables so that it can be used
1597 + myCpu = get_ppc_cpu_type();
1598 + myCpuRevision = get_ppc_cpu_revision();
1601 + * Initialize some SPRG registers related to irq handling
1603 + intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE);
1604 + _write_SPRG1((unsigned int)intrStack);
1607 + * Install our own set of exception vectors
1609 + initialize_exceptions();
1612 + * Allocate the memory for the RTEMS Work Space. This can come from
1613 + * a variety of places: hard coded address, malloc'ed from outside
1614 + * RTEMS world (e.g. simulator or primitive memory manager), or (as
1615 + * typically done by stock BSPs) by subtracting the required amount
1616 + * of work space from the last physical address on the CPU board.
1618 + * In this case, the memory is not malloc'ed. It is just
1619 + * "pulled from the air".
1621 + Configuration.work_space_start = _WorkspaceBase;
1624 + * initialize the device driver parameters
1626 + bsp_clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
1627 + bsp_clock_speed = BSP_CLOCK_HZ; /* for SCI baud rate generator */
1628 + bsp_timer_least_valid = 0;
1629 + bsp_timer_average_overhead = 0;
1632 + * Initalize RTEMS IRQ system
1634 + BSP_rtems_irq_mng_init(0);
1636 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c
1637 ===================================================================
1638 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1639 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c 2009-11-29 01:38:37.616586852 +0100
1644 + * Intec SS555 initialization routines.
1646 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
1647 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1649 + * Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/imbx8xx.c:
1651 + * Copyright (c) 1999, National Research Council of Canada
1653 + * The license and distribution terms for this file may be
1654 + * found in the file LICENSE in this distribution or at
1655 + * http://www.rtems.com/license/LICENSE.
1670 + * Initialize SS555
1672 +void _InitSS555 (void)
1674 + register uint32_t plprcr, msr;
1677 + * Initialize the System Protection Control Register (SYPCR).
1678 + * The SYPCR can only be written once after Reset.
1681 + USIU_SYPCR_SWTC(WATCHDOG_TIMEOUT) /* set watchdog timeout */
1682 + | USIU_SYPCR_BMT(0xFF) /* set bus monitor timeout */
1683 + | USIU_SYPCR_BME /* enable bus monitor */
1684 + | USIU_SYPCR_SWF /* watchdog halted in freeze */
1685 +#if WATCHDOG_TIMEOUT != 0xFFFF
1686 + | USIU_SYPCR_SWE /* enable watchdog */
1688 + | USIU_SYPCR_SWRI /* watchdog forces reset */
1689 + | USIU_SYPCR_SWP; /* prescale watchdog by 2048 */
1691 + TICKLE_WATCHDOG(); /* restart watchdog timer */
1694 + * Re-tune the PLL to the desired system clock frequency.
1696 + usiu.plprck = USIU_UNLOCK_KEY; /* unlock PLPRCR */
1698 + USIU_PLPRCR_TEXPS /* assert TEXP always */
1699 + | USIU_PLPRCR_MF(BSP_CLOCK_HZ / BSP_CRYSTAL_HZ);
1700 + /* PLL multiplication factor */
1701 + usiu.plprck = 0; /* lock PLPRCR */
1703 + while (((plprcr = usiu.plprcr) & USIU_PLPRCR_SPLS) == 0)
1704 + ; /* wait for PLL to re-lock */
1707 + * Enable the timebase and decrementer, then initialize decrementer
1708 + * register to a large value to guarantee that a decrementer interrupt
1709 + * will not be generated before the kernel is fully initialized.
1710 + * Initialize the timebase register to zero.
1712 + usiu.tbscrk = USIU_UNLOCK_KEY;
1713 + usiu.tbscr |= USIU_TBSCR_TBE; /* enable time base and decrementer */
1716 + usiu.tbk = USIU_UNLOCK_KEY;
1717 + _write_DEC(0x7FFFFFFF);
1718 + _write_TBWU(0x00000000 );
1719 + _write_TBWL(0x00000000 );
1723 + * Run the Inter-Module Bus at full speed.
1725 + imb.uimb.umcr &= ~UIMB_UMCR_HSPEED;
1728 + * Initialize Memory Controller for External RAM
1730 + * Initialize the Base and Option Registers (BR0-BR7 and OR0-OR7). Note
1731 + * that for all chip selects, ORx should be programmed before BRx.
1733 + * If booting from internal flash ROM, configure the external RAM to
1734 + * extend the internal RAM. If booting from external RAM, leave it at
1735 + * zero but set it up appropriately.
1737 + extern char int_ram_top[]; /* top of internal ram */
1739 + usiu.memc[0]._or =
1740 + USIU_MEMC_OR_512K /* bank size */
1741 + | USIU_MEMC_OR_SCY(0) /* wait states in first beat of burst */
1742 + | USIU_MEMC_OR_BSCY(0); /* wait states in subsequent beats */
1744 + usiu.memc[0]._br =
1745 + USIU_MEMC_BR_BA(_read_IMMR() & IMMR_FLEN
1746 + ? (uint32_t)int_ram_top : 0) /* base address */
1747 + | USIU_MEMC_BR_PS32 /* 32-bit data bus */
1748 + | USIU_MEMC_BR_TBDIP /* toggle bdip */
1749 + | USIU_MEMC_BR_V; /* base register valid */
1752 + * Initialize Memory Controller for External CPLD
1754 + * The SS555 board includes a CPLD to control on-board features and
1755 + * off-board devices. (Configuration taken from Intec's hwhook.c)
1757 + usiu.memc[3]._or =
1758 + USIU_MEMC_OR_16M /* bank size */
1759 + | USIU_MEMC_OR_CSNT /* negate CS/WE early */
1760 + | USIU_MEMC_OR_ACS_HALF /* assert CS half cycle after address */
1761 + | USIU_MEMC_OR_SCY(15) /* wait states in first beat of burst */
1762 + | USIU_MEMC_OR_TRLX; /* relaxed timing */
1764 + usiu.memc[3]._br =
1765 + USIU_MEMC_BR_BA(&cpld) /* base address */
1766 + | USIU_MEMC_BR_PS16 /* 16-bit data bus */
1767 + | USIU_MEMC_BR_BI /* inhibit bursting */
1768 + | USIU_MEMC_BR_V; /* base register valid */
1771 + * Disable show cycles and serialization so that burst accesses will work
1772 + * properly. A different value, such as 0x0, may be more appropriate for
1773 + * debugging, but can be set with the debugger, if needed.
1775 + _write_ICTRL(0x00000007);
1778 + * Set up Burst Buffer Controller (BBC)
1781 + BBCMCR_ETRE /* enable exception relocation */
1782 + | BBCMCR_BE); /* enable burst accesses */
1785 + _CPU_MSR_GET(msr);
1786 + msr |= MSR_IP; /* set prefix for exception relocation */
1787 + _CPU_MSR_SET(msr);
1789 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds
1790 ===================================================================
1791 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
1792 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds 2008-03-04 00:07:19.000000000 +0100
1795 + * Linker command file for Intec SS555 board
1797 + * When debugging, we assume that the internal flash ROM will be replaced by
1798 + * the external RAM on the SS555 board. All sections are stacked starting
1799 + * at address zero. Nothing is placed in the internal RAM, since it's not
1800 + * contiguous with the external SRAM when the external RAM is placed at
1803 + * For final production, we assume that the .text section will be burned
1804 + * into flash ROM starting at address zero. The .data, .bss, heap, and
1805 + * workspace will reside in RAM, starting at the beginning of the internal
1806 + * RAM. The system startup code will configure the external RAM to begin
1807 + * where the internal RAM ends, so as to make one large RAM block.
1809 + * Debugging mode is chosen when the RTEMS_DEBUG symbol is defined. The
1810 + * RTEMS_DEBUG symbol is defined in the bsp_specs file whenever make(1) is
1811 + * invoked with VARIANT=DEBUG.
1813 + * $Id: linkcmds,v 1.4 2008/03/03 23:07:19 joel Exp $
1816 +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
1817 +OUTPUT_ARCH(powerpc)
1820 +int_ram_org = 0x003F9800; /* base of internal RAM */
1821 +int_ram_top = 0x00400000; /* top of internal RAM */
1822 +ext_ram_size = 0x00080000; /* size of external RAM */
1830 + * For the MPC555, we use the compressed vector table format which puts
1831 + * all of the exception vectors before 0x100.
1838 + /* Read-only sections, merged into text segment: */
1842 + /* Entry point is the .entry section */
1849 + /* C++ constructors/destructors */
1850 + *(.gnu.linkonce.t*)
1852 + /* Initialization and finalization code.
1854 + * Various files can provide initialization and finalization functions.
1855 + * The bodies of these functions are in .init and .fini sections. We
1856 + * accumulate the bodies here, and prepend function prologues from
1857 + * ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
1858 + * first; ecrtn.o must be linked last. Because these are wildcards, it
1859 + * doesn't matter if the user does not actually link against ecrti.o and
1860 + * ecrtn.o; the linker won't look for a file to match a wildcard. The
1861 + * wildcard also means that it doesn't matter which directory ecrti.o
1862 + * and ecrtn.o are in.
1864 + PROVIDE (_init = .);
1869 + PROVIDE (_fini = .);
1875 + * C++ constructors and destructors for static objects.
1876 + * PowerPC EABI does not use crtstuff yet, so we build "old-style"
1877 + * constructor and destructor lists that begin with the list length
1878 + * end terminate with a NULL entry.
1880 + PROVIDE (__CTOR_LIST__ = .);
1881 + /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
1882 + *crtbegin.o(.ctors)
1886 + PROVIDE (__CTOR_END__ = .);
1888 + PROVIDE (__DTOR_LIST__ = .);
1889 + /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
1890 + *crtbegin.o(.dtors)
1894 + PROVIDE (__DTOR_END__ = .);
1897 + * Special FreeBSD sysctl sections.
1900 + __start_set_sysctl_set = .;
1902 + __stop_set_sysctl_set = ABSOLUTE(.);
1906 + /* Exception frame info */
1909 + /* Miscellaneous read-only data */
1910 + _rodata_start = . ;
1911 + *(.gnu.linkonce.r*)
1921 + /* Various possible names for the end of the .text section */
1922 + etext = ALIGN(0x10);
1926 + PROVIDE (etext = .);
1927 + PROVIDE (__etext = .);
1930 + * .data section contents, copied to RAM at system startup.
1933 + data.contents.start = .;
1935 + text.size = text.end - text.start;
1938 + * If debugging, stack the read/write sections directly after the text
1939 + * section. Otherwise, stack the read/write sections starting at base of
1942 + . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
1944 + .data : AT (data.contents.start)
1952 + PROVIDE (__SDATA_START__ = .);
1954 + *(.gnu.linkonce.d*)
1955 + *(.gnu.linkonce.s.*)
1956 + PROVIDE (__SDATA_END__ = .);
1958 + PROVIDE (__EXCEPT_START__ = .);
1959 + *(.gcc_except_table*)
1960 + PROVIDE (__EXCEPT_END__ = .);
1962 + PROVIDE(__GOT_START__ = .);
1965 + PROVIDE(__GOT_END__ = .);
1969 + PROVIDE (__GOT2_START__ = .);
1970 + PROVIDE (_GOT2_START_ = .);
1972 + PROVIDE (__GOT2_END__ = .);
1973 + PROVIDE (_GOT2_END_ = .);
1975 + PROVIDE (__FIXUP_START__ = .);
1976 + PROVIDE (_FIXUP_START_ = .);
1978 + PROVIDE (_FIXUP_END_ = .);
1979 + PROVIDE (__FIXUP_END__ = .);
1981 + /* We want the small data sections together, so single-instruction
1982 + * offsets can access them all.
1984 + PROVIDE (__SDATA2_START__ = .);
1986 + *(.gnu.linkonce.s2.*)
1987 + PROVIDE (__SDATA2_END__ = .);
1991 + data.size = data.end - data.start;
1997 + PROVIDE (__SBSS2_START__ = .);
1999 + PROVIDE (__SBSS2_END__ = .);
2001 + PROVIDE (__SBSS_START__ = .);
2003 + PROVIDE (__SBSS_END__ = .);
2005 + *(.bss .bss* .gnu.linkonce.b*)
2011 + bss.size = bss.end - bss.start;
2013 + PROVIDE(_end = bss.end);
2016 + * Initialization stack
2018 + InitStack_start = ALIGN(0x10);
2021 + PROVIDE(initStackPtr = initStack);
2026 + IntrStack_start = ALIGN(0x10);
2029 + PROVIDE(intrStackPtr = intrStack);
2031 + _WorkspaceBase = .;
2032 + __WorkspaceBase = .;
2037 + * The heap is configured at run-time to use all available memory. It
2038 + * begins just after the end of the Workspace and continues to the end of
2039 + * the external RAM.
2041 + . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
2047 + * Internal I/O devices
2049 + .usiu 0x002FC000: /* unified system interface unit */
2054 + .imb 0x00300000: /* inter-module bus and devices */
2059 + .sram 0x00380000: /* internal SRAM control registers */
2065 + * SS555 external devices managed by on-board CPLD
2067 + .cpld 0xFF000000: /* SS555 external CPLD devices */
2073 + /* Stabs debugging sections. */
2074 + .stab 0 : { *(.stab) }
2075 + .stabstr 0 : { *(.stabstr) }
2076 + .stab.excl 0 : { *(.stab.excl) }
2077 + .stab.exclstr 0 : { *(.stab.exclstr) }
2078 + .stab.index 0 : { *(.stab.index) }
2079 + .stab.indexstr 0 : { *(.stab.indexstr) }
2080 + .comment 0 : { *(.comment) }
2082 + /* DWARF debug sections.
2083 + Symbols in the DWARF debugging sections are relative to the beginning
2084 + of the section so we begin them at 0. */
2086 + .debug 0 : { *(.debug) }
2087 + .line 0 : { *(.line) }
2089 + /* GNU DWARF 1 extensions */
2090 + .debug_srcinfo 0 : { *(.debug_srcinfo) }
2091 + .debug_sfnames 0 : { *(.debug_sfnames) }
2093 + /* DWARF 1.1 and DWARF 2 */
2094 + .debug_aranges 0 : { *(.debug_aranges) }
2095 + .debug_pubnames 0 : { *(.debug_pubnames) }
2098 + .debug_info 0 : { *(.debug_info) }
2099 + .debug_abbrev 0 : { *(.debug_abbrev) }
2100 + .debug_line 0 : { *(.debug_line) }
2101 + .debug_frame 0 : { *(.debug_frame) }
2102 + .debug_str 0 : { *(.debug_str) }
2103 + .debug_loc 0 : { *(.debug_loc) }
2104 + .debug_macinfo 0 : { *(.debug_macinfo) }
2106 + /* SGI/MIPS DWARF 2 extensions */
2107 + .debug_weaknames 0 : { *(.debug_weaknames) }
2108 + .debug_funcnames 0 : { *(.debug_funcnames) }
2109 + .debug_typenames 0 : { *(.debug_typenames) }
2110 + .debug_varnames 0 : { *(.debug_varnames) }
2111 + /* These must appear regardless of . */
2113 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/start.S
2114 ===================================================================
2115 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2116 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/start.S 2009-11-29 01:38:37.620589246 +0100
2120 + * This file contains the entry veneer for RTEMS programs on the Intec
2121 + * SS555 board. It jumps to the BSP which is responsible for performing
2122 + * all remaining initialization.
2124 + * This file is based on several others:
2126 + * (1) start360.s from the gen68360 BSP by
2127 + * W. Eric Norum (eric@skatter.usask.ca)
2128 + * with the following copyright and license:
2130 + * COPYRIGHT (c) 1989-1998.
2131 + * On-Line Applications Research Corporation (OAR).
2133 + * The license and distribution terms for this file may in
2134 + * the file LICENSE in this distribution or at
2135 + * http://www.rtems.com/license/LICENSE.
2137 + * (2) start.s for the eth_comm port by
2138 + * Jay Monkman (jmonkman@fracsa.com),
2139 + * which itself is based on the
2141 + * (3) dlentry.s for the Papyrus BSP, written by:
2142 + * Andrew Bray <andy@i-cubed.co.uk>
2143 + * with the following copyright and license:
2145 + * COPYRIGHT (c) 1995 by i-cubed ltd.
2147 + * (4) start860.S for the MBX821/MBX860, written by:
2148 + * Darlene A. Stewart <darlene.stewart@iit.nrc.ca>
2149 + * Copyright (c) 1999, National Research Council of Canada
2151 + * To anyone who acknowledges that this file is provided "AS IS"
2152 + * without any express or implied warranty:
2153 + * permission to use, copy, modify, and distribute this file
2154 + * for any purpose is hereby granted without fee, provided that
2155 + * the above copyright notice and this notice appears in all
2156 + * copies, and that the name of i-cubed limited not be used in
2157 + * advertising or publicity pertaining to distribution of the
2158 + * software without specific, written prior permission.
2159 + * i-cubed limited makes no representations about the suitability
2160 + * of this software for any purpose.
2162 + * (5) Modifications (for MBX8xx) of respective RTEMS files:
2163 + * Copyright (c) 1999, National Research Council of Canada
2165 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
2166 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
2169 +#include <rtems/asm.h>
2170 +#include <rtems/powerpc/registers.h>
2173 + * The initial stack is set to the top of the internal RAM.
2175 + * All the entry veneer has to do is to clear the .bss section and copy the
2176 + * initializers into the .data section.
2180 + * GDB likes to have debugging information for the entry veneer.
2181 + * Play compiler and provide some DWARF information.
2183 + * CHANGE TO SUIT YOUR SETUP!
2186 + .section .entry,"ax",@progbits
2191 +.section .debug_sfnames
2193 + .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2202 + .4byte .L_line_e-.L_line_b
2208 + .4byte .L_text_e-.L_text_b
2212 +.section .debug_srcinfo
2215 + .4byte .L_sfnames_b
2219 + .4byte .L_LE1-.L_line_b
2220 + .4byte .L_F0-.L_sfnames_b
2221 + .4byte .L_line_last-.L_line_b
2225 +.section .debug_pubnames
2234 +.section .debug_aranges
2237 + .4byte .L_text_e-.L_text_b
2251 + .4byte .L_D1_e-.L_D1
2252 + .2byte 0x11 /* TAG_compile_unit */
2253 + .2byte 0x12 /* AT_sibling */
2255 + .2byte 0x38 /* AT_name */
2258 + .2byte 0x258 /* AT_producer */
2261 + .2byte 0x111 /* AT_low_pc */
2263 + .2byte 0x121 /* AT_high_pc */
2265 + .2byte 0x106 /* AT_stmt_list */
2267 + .2byte 0x1b8 /* AT_comp_dir */
2268 + .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2270 + .2byte 0x8006 /* AT_sf_names */
2271 + .4byte .L_sfnames_b
2272 + .2byte 0x8016 /* AT_src_info */
2273 + .4byte .L_srcinfo_b
2277 + .4byte .L_D3_e-.L_D3
2278 + .2byte 0x6 /* TAG_global_subroutine */
2279 + .2byte 0x12 /* AT_sibling */
2281 + .2byte 0x38 /* AT_name */
2284 + .2byte 0x278 /* AT_prototyped */
2286 + .2byte 0x111 /* AT_low_pc */
2288 + .2byte 0x121 /* AT_high_pc */
2290 + .2byte 0x8041 /* AT_body_begin */
2292 + .2byte 0x8051 /* AT_body_end */
2297 + .4byte .L_D4_e-.L_D4
2304 + * Tell C's eabi-ctor's that we have an atexit function,
2305 + * and that it is to register __do_global_dtors.
2307 + EXTERN_PROC(atexit)
2308 + PUBLIC_VAR(__atexit)
2309 + .section ".sdata","aw"
2312 + EXT_PROC_REF(atexit)@fixup
2315 + .section ".fixup","aw"
2317 + EXT_SYM_REF(__atexit)
2320 +/* That should do it */
2323 + * Put the entry point in its own section. That way, we can guarantee
2324 + * to put it first in the .text section in the linker script.
2328 + PUBLIC_VAR (start)
2330 + bl .startup /* or bl .spin */
2334 + * Parameters from linker
2337 + .long initStackPtr
2340 + .long __GOT_START__
2352 + .long data.contents.start
2354 +PUBLIC_VAR (text_addr)
2358 +PUBLIC_VAR (text_length)
2363 + * Spin, if necessary, to acquire control from debugger (CodeWarrior).
2369 + lwz r3, spin@l(r3)
2374 + * Initialization code
2377 + /* Capture address of linker parameters. */
2380 + /* Set initial stack pointer to end of internal RAM - 56. */
2381 + lwz r1, stack_top-base_addr(r3)
2384 + /* Initialize essential registers. */
2387 + /* Set TOC pointer */
2388 + lwz r2, toc_pointer-base_addr(r3)
2390 + /* Initialize the memory mapped MPC555 registers (done in C). */
2391 + EXTERN_PROC (_InitSS555)
2392 + bl PROC (_InitSS555)
2394 + /* Clear the .bss section. */
2397 + /* Copy initializers into the .data section */
2400 + /* Enable floating point, since gcc sometimes uses the floating
2401 + * point registers for data moves, even if the C source code doesn't
2402 + * include floating point operations.
2405 + ori r0, r0, MSR_FP
2408 + /* Start system. */
2409 + lis r5, environ@ha
2410 + la r5,environ@l(r5) /* environp */
2411 + li r4, 0 /* argv */
2412 + li r3, 0 /* argc */
2413 + EXTERN_PROC (boot_card)
2414 + bl PROC (boot_card) /* call the first C routine */
2416 + /* We should never return from boot_card, but in case we do ... */
2417 + /* The next instructions are dependent on your runtime environment. */
2423 + * datacopy - copy initializers into .data section
2426 + lis r3, base_addr@ha /* point to linker data */
2427 + addi r3, r3, base_addr@l
2429 + lwz r4, contents_addr-base_addr(r3) /* .data contents in ROM */
2430 + lwz r5, data_addr-base_addr(r3) /* .data section in RAM */
2431 + lwz r6, data_length-base_addr(r3) /* length of .data */
2433 + rlwinm. r6, r6, 30, 0x3FFFFFFF /* form length / 4 */
2434 + beqlr /* no .data - return */
2436 + mtctr r6 /* set ctr reg */
2438 + lwz r6, 0(r4) /* get word */
2439 + stw r6, 0(r5) /* store word */
2440 + addi r4, r4, 0x4 /* next source */
2441 + addi r5, r5, 0x4 /* next target */
2442 + bdnz dc1 /* dec counter and loop */
2447 + * bssclr - zero out bss
2450 + lis r3, base_addr@ha /* point to linker data */
2451 + addi r3, r3, base_addr@l
2453 + lwz r4, bss_addr-base_addr(r3) /* Start of bss */
2454 + lwz r5, bss_length-base_addr(r3) /* Length of bss */
2456 + rlwinm. r5, r5, 30, 0x3FFFFFFF /* form length/4 */
2457 + beqlr /* no bss - return */
2459 + mtctr r5 /* set ctr reg */
2460 + li r5, 0x0000 /* r5 = 0 */
2462 + stw r5, 0(r4) /* store r6 */
2463 + addi r4, r4, 0x4 /* update r4 */
2464 + bdnz clear_bss /* dec counter and loop */
2470 + * Initialize the MSR and basic core PowerPC registers
2477 + * Set the processor for big-endian mode, exceptions vectored to
2478 + * 0x000n_nnnn, no execution tracing, machine check exceptions
2479 + * enabled, floating-point not available, supervisor priviledge
2480 + * level, external interrupts disabled, power management disabled
2481 + * (normal operation mode).
2483 + li r0, 0x1000 /* MSR_ME */
2484 + mtmsr r0 /* Context-synchronizing */
2488 + * Clear the exception handling registers.
2529 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c
2530 ===================================================================
2531 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2532 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c 2009-11-29 01:38:37.620589246 +0100
2535 + * Support routines for TM27
2537 + * $Id: tm27supp.c,v 1.1 2004/04/21 20:24:36 joel Exp $
2555 +rtems_irq_connect_data tm27IrqData = {
2556 + CPU_USIU_EXT_IRQ_7,
2558 + (rtems_irq_enable)tm27On,
2559 + (rtems_irq_disable)tm27Off,
2560 + (rtems_irq_is_enabled)tm27IsOn
2563 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/times
2564 ===================================================================
2565 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2566 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/times 2009-11-29 01:38:37.620589246 +0100
2569 +# Timing Test Suite Results for the Intec SS555
2571 +# $Id: times,v 1.1 2004/04/12 21:52:13 joel Exp $
2576 +Clock Speed: 40 MHz
2577 +Memory Configuration: 512k external 2-1-1-1 SRAM
2580 +Times Reported in: microseconds
2581 +Timer Source: Timebase register (TMBCLK = (4 MHz crystal / 4) = 1.0 Mhz)
2584 +== ================================================================= ==== ====
2586 + 1 rtems_semaphore_create 21
2587 + rtems_semaphore_delete 22
2588 + rtems_semaphore_obtain: available 7
2589 + rtems_semaphore_obtain: not available -- NO_WAIT 7
2590 + rtems_semaphore_release: no waiting tasks 18
2592 + 2 rtems_semaphore_obtain: not available -- caller blocks 50
2594 + 3 rtems_semaphore_release: task readied -- preempts caller 41
2596 + 4 rtems_task_restart: blocked task -- preempts caller 69
2597 + rtems_task_restart: ready task -- preempts caller 67
2598 + rtems_semaphore_release: task readied -- returns to caller 23
2599 + rtems_task_create 75
2600 + rtems_task_start 30
2601 + rtems_task_restart: suspended task -- returns to caller 37
2602 + rtems_task_delete: suspended task 68
2603 + rtems_task_restart: ready task -- returns to caller 38
2604 + rtems_task_restart: blocked task -- returns to caller 44
2605 + rtems_task_delete: blocked task 70
2607 + 5 rtems_task_suspend: calling task 40
2608 + rtems_task_resume: task readied -- preempts caller 35
2610 + 6 rtems_task_restart: calling task 46
2611 + rtems_task_suspend: returns to caller 16
2612 + rtems_task_resume: task readied -- returns to caller 18
2613 + rtems_task_delete: ready task 71
2615 + 7 rtems_task_restart: suspended task -- preempts caller 64
2617 + 8 rtems_task_set_priority: obtain current priority 13
2618 + rtems_task_set_priority: returns to caller 24
2619 + rtems_task_mode: obtain current mode 4
2620 + rtems_task_mode: no reschedule 5
2621 + rtems_task_mode: reschedule -- returns to caller 7
2622 + rtems_task_mode: reschedule -- preempts caller 37
2623 + rtems_task_set_note 13
2624 + rtems_task_get_note 13
2625 + rtems_clock_set 27
2628 + 9 rtems_message_queue_create 34
2629 + rtems_message_queue_send: no waiting tasks 26
2630 + rtems_message_queue_urgent: no waiting tasks 26
2631 + rtems_message_queue_receive: available 24
2632 + rtems_message_queue_flush: no messages flushed 12
2633 + rtems_message_queue_flush: messages flushed 15
2634 + rtems_message_queue_delete 26
2636 +10 rtems_message_queue_receive: not available -- NO_WAIT 15
2637 + rtems_message_queue_receive: not available -- caller blocks 52
2639 +11 rtems_message_queue_send: task readied -- preempts caller 47
2641 +12 rtems_message_queue_send: task readied -- returns to caller 29
2643 +13 rtems_message_queue_urgent: task readied -- preempts caller 46
2645 +14 rtems_message_queue_urgent: task readied -- returns to caller 29
2647 +15 rtems_event_receive: obtain current events 1
2648 + rtems_event_receive: not available -- NO_WAIT 12
2649 + rtems_event_receive: not available -- caller blocks 44
2650 + rtems_event_send: no task readied 13
2651 + rtems_event_receive: available 13
2652 + rtems_event_send: task readied -- returns to caller 21
2654 +16 rtems_event_send: task readied -- preempts caller 41
2656 +17 rtems_task_set_priority: preempts caller 49
2658 +18 rtems_task_delete: calling task 95
2660 +19 rtems_signal_catch 10
2661 + rtems_signal_send: returns to caller 15
2662 + rtems_signal_send: signal to self 20
2663 + exit ASR overhead: returns to calling task 15
2664 + exit ASR overhead: returns to preempting task 30
2666 +20 rtems_partition_create 25
2667 + rtems_region_create 38
2668 + rtems_partition_get_buffer: available 14
2669 + rtems_partition_get_buffer: not available 13
2670 + rtems_partition_return_buffer 15
2671 + rtems_partition_delete 16
2672 + rtems_region_get_segment: available 34
2673 + rtems_region_get_segment: not available -- NO_WAIT 32
2674 + rtems_region_return_segment: no waiting tasks 33
2675 + rtems_region_get_segment: not available -- caller blocks 68
2676 + rtems_region_return_segment: task readied -- preempts caller 67
2677 + rtems_region_return_segment: task readied -- returns to caller 48
2678 + rtems_region_delete 30
2679 + rtems_io_initialize 2
2684 + rtems_io_control 1
2686 +21 rtems_task_ident 25
2687 + rtems_message_queue_ident 22
2688 + rtems_semaphore_ident 29
2689 + rtems_partition_ident 22
2690 + rtems_region_ident 24
2691 + rtems_port_ident 22
2692 + rtems_timer_ident 22
2693 + rtems_rate_monotonic_ident 22
2695 +22 rtems_message_queue_broadcast: task readied -- returns to caller 33
2696 + rtems_message_queue_broadcast: no waiting tasks 20
2697 + rtems_message_queue_broadcast: task readied -- preempts caller 50
2699 +23 rtems_timer_create 13
2700 + rtems_timer_fire_after: inactive 22
2701 + rtems_timer_fire_after: active 24
2702 + rtems_timer_cancel: active 13
2703 + rtems_timer_cancel: inactive 12
2704 + rtems_timer_reset: inactive 21
2705 + rtems_timer_reset: active 22
2706 + rtems_timer_fire_when: inactive 26
2707 + rtems_timer_fire_when: active 26
2708 + rtems_timer_delete: active 18
2709 + rtems_timer_delete: inactive 16
2710 + rtems_task_wake_when 49
2712 +24 rtems_task_wake_after: yield -- returns to caller 10
2713 + rtems_task_wake_after: yields -- preempts caller 36
2715 +25 rtems_clock_tick 8
2720 + _Thread_Disable_dispatch 1
2721 + _Thread_Enable_dispatch 7
2722 + _Thread_Set_state 7
2723 + _Thread_Disptach (NO FP) 32
2724 + context switch: no floating point contexts 25
2725 + context switch: self 11
2726 + context switch: to another task 12
2727 + fp context switch: restore 1st FP task 37
2728 + fp context switch: save idle, restore initialized 34
2729 + fp context switch: save idle, restore idle 48
2730 + fp context switch: save initialized, restore initialized 34
2736 + _Thread_Get: invalid id 1
2738 +27 interrupt entry overhead: returns to interrupted task 13
2739 + interrupt exit overhead: returns to interrupted task 11
2740 + interrupt entry overhead: returns to nested interrupt 12
2741 + interrupt exit overhead: returns to nested interrupt 10
2742 + interrupt entry overhead: returns to preempting task 12
2743 + interrupt exit overhead: returns to preempting task 38
2745 +28 rtems_port_create 16
2746 + rtems_port_external_to_internal 11
2747 + rtems_port_internal_to_external 11
2748 + rtems_port_delete 16
2750 +29 rtems_rate_monotonic_create 15
2751 + rtems_rate_monotonic_period: initiate period -- returns to caller 20
2752 + rtems_rate_monotonic_period: obtain status 12
2753 + rtems_rate_monotonic_cancel 15
2754 + rtems_rate_monotonic_delete: inactive 18
2755 + rtems_rate_monotonic_delete: active 20
2756 + rtems_rate_monotonic_period: conclude periods -- caller blocks 36
2757 Index: rtems-4.9.3/make/custom/ec555.cfg
2758 ===================================================================
2759 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2760 +++ rtems-4.9.3/make/custom/ec555.cfg 2009-11-29 01:43:49.127556601 +0100
2763 +# Config file for an Intec Automation SS555 MPC555-based card
2765 +# This file is derived from:
2767 +# Config file for a PowerPC MPC860-based MBX821-001 card.
2768 +# Config file for a PowerPC 403 based helas403 card
2769 +# Config file for MPC860 based Ethernet Comm Board
2771 +# $Id: ss555.cfg,v 1.11 2008/03/11 20:50:58 joel Exp $
2774 +include $(RTEMS_ROOT)/make/custom/default.cfg
2778 +RTEMS_CPU_MODEL=mpc555
2780 +# This is the actual bsp directory used during the build process.
2781 +RTEMS_BSP_FAMILY=ss555
2783 +# This contains the compiler options necessary to select the CPU model
2784 +# and (hopefully) optimize for it.
2786 +CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL) -D$(RTEMS_BSP_FAMILY)
2788 +# optimize flag: typically -O2
2789 +CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
2791 +define bsp-post-link
2792 + $(default-bsp-post-link)
2793 + cp $(basename $@).exe $(basename $@)$(DOWNEXT)
2794 + $(STRIP) $(basename $@)$(DOWNEXT)
2797 +# Override default start file
2800 Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/preinstall.am
2801 ===================================================================
2802 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
2803 +++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/preinstall.am 2009-11-29 01:38:37.620589246 +0100
2805 +## Automatically generated by ampolish3 - Do not edit
2808 +$(srcdir)/preinstall.am: Makefile.am
2809 + $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
2813 +DISTCLEANFILES += $(PREINSTALL_DIRS)
2815 +all-am: $(PREINSTALL_FILES)
2818 +CLEANFILES = $(PREINSTALL_FILES)
2820 +$(PROJECT_LIB)/$(dirstamp):
2821 + @$(MKDIR_P) $(PROJECT_LIB)
2822 + @: > $(PROJECT_LIB)/$(dirstamp)
2823 +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
2825 +$(PROJECT_INCLUDE)/$(dirstamp):
2826 + @$(MKDIR_P) $(PROJECT_INCLUDE)
2827 + @: > $(PROJECT_INCLUDE)/$(dirstamp)
2828 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
2830 +$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
2831 + $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
2832 +PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
2834 +$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
2835 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
2836 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
2838 +$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
2839 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
2840 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
2842 +$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
2843 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
2844 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
2846 +$(PROJECT_INCLUDE)/bsp/$(dirstamp):
2847 + @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
2848 + @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2849 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2851 +$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
2852 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
2853 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
2855 +$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2856 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
2857 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
2859 +$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
2860 + $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
2861 +PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds