]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - rtems-patches/current/rtems-clone-ss555-to-ec555.patch
rtems patches updated for rtems-4.9.3
[rtems-devel.git] / rtems-patches / current / rtems-clone-ss555-to-ec555.patch
1 ---
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(+)
22
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
27 @@ -0,0 +1,225 @@
28 +2008-12-08     Ralf Corsépius <ralf.corsepius@rtems.org>
29 +
30 +       * bsp_specs: Backport from CVS-HEAD.
31 +
32 +2008-09-29     Ralf Corsépius <ralf.corsepius@rtems.org>
33 +
34 +       * Makefile.am: Remove noinst_PROGRAMS (Unused).
35 +
36 +2008-05-15     Joel Sherrill <joel.sherrill@OARcorp.com>
37 +
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.
49 +
50 +2008-05-14     Joel Sherrill <joel.sherrill@OARcorp.com>
51 +
52 +       * Makefile.am: Rework to avoid .rel files.
53 +
54 +2008-05-12     Joel Sherrill <joel.sherrill@OARcorp.com>
55 +
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
64 +       BSPs.
65 +
66 +2008-04-23     Joel Sherrill <joel.sherrill@OARcorp.com>
67 +
68 +       * startup/bspstart.c: Remove all references to
69 +       console_reserve_resources and termios_reserve_resources.
70 +
71 +2008-03-03     Joel Sherrill <joel.sherrill@OARcorp.com>
72 +
73 +       * startup/linkcmds: Add wildcard to gcc_except_table section so
74 +       programs compiled with gcc 4.3.x can link.
75 +
76 +2008-01-18     David Erickson <David.Erickson@drdc-rddc.gc.ca>
77 +
78 +       * startup/bspstart.c: Add semicolon.
79 +
80 +2008-01-11     Joel Sherrill <joel.sherrill@OARcorp.com>
81 +
82 +       * startup/bspstart.c: Add bsp_timer_least_valid and
83 +       bsp_timer_average_overhead so tmtests link.
84 +
85 +2007-12-11     Joel Sherrill <joel.sherrill@OARcorp.com>
86 +
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.
90 +
91 +2007-12-04     Joel Sherrill <joel.sherrill@OARcorp.com>
92 +
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.
96 +
97 +2007-12-03     Joel Sherrill <joel.sherrill@OARcorp.com>
98 +
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
105 +       clean up occurred.
106 +
107 +2007-11-28     Joel Sherrill <joel.sherrill@OARcorp.com>
108 +
109 +       * startup/bspstart.c: Eliminate PowerPC specific elements from the CPU
110 +       Table. They have been replaced with variables named bsp_XXX as
111 +       needed.
112 +
113 +2007-04-12     Ralf Corsépius <ralf.corsepius@rtems.org>
114 +
115 +       * bsp_specs: Remove qrtems_debug.
116 +
117 +2007-04-06     Ralf Corsépius <ralf.corsepius@rtems.org>
118 +
119 +       * bsp_specs: Remove lib (Now expected to exist in GCC).
120 +
121 +2006-12-02     Ralf Corsépius <ralf.corsepius@rtems.org>
122 +
123 +       * configure.ac: New BUG-REPORT address.
124 +
125 +2006-11-15     Joel Sherrill <joel@OARcorp.com>
126 +
127 +       * Makefile.am: Merge c_rtems_main() into boot_card(). This eliminated a
128 +       file and simplified initialization.
129 +
130 +2006-10-17     Ralf Corsépius <ralf.corsepius@rtems.org>
131 +
132 +       * configure.ac: Require autoconf-2.60. Require automake-1.10.
133 +
134 +2006-03-08     Joel Sherrill <joel@OARcorp.com>
135 +
136 +       * startup/linkcmds: Add .gnu.linkonce.b.* section.
137 +
138 +2006-02-08     Joel Sherrill <joel@OARcorp.com>
139 +
140 +       * startup/linkcmds: Add sections required by newer gcc versions.
141 +
142 +2006-01-11     Ralf Corsepius <ralf.corsepius@rtems.org>
143 +
144 +       * configure.ac: Remove explicit ampolish3 support (now in
145 +       RTEMS_BSP_CONFIGURE).
146 +
147 +2006-01-10     Ralf Corsepius <ralf.corsepius@rtems.org>
148 +
149 +       * configure.ac: Add ampolish3 support.
150 +       * Makefile.am: Add preinstall.am.
151 +
152 +2006-01-09     Ralf Corsepius <ralf.corsepius@rtems.org>
153 +
154 +       * Makefile.am: Don't include subdirs.am.
155 +
156 +2005-05-26     Ralf Corsepius <ralf.corsepius@rtems.org>
157 +
158 +       * include/bsp.h: New header guard.
159 +
160 +2005-05-10     Ralf Corsepius <ralf.corsepius@rtems.org>
161 +
162 +       * console/console.c: Eliminate unsigned8.
163 +
164 +2005-04-26     Joel Sherrill <joel@OARcorp.com>
165 +
166 +       * startup/bspstart.c: Eliminate warnings.
167 +
168 +2005-04-25      Jennifer Averett <jennifer.averett@oarcorp.com>
169 +
170 +        PR 779/bsp
171 +        * clock/p_clock.c: Add parameter to powerpc exception handler routines
172 +
173 +2005-02-17     Ralf Corsepius <ralf.corsepius@rtems.org>
174 +
175 +       * startup/bspstart.c: include <rtems/powerpc/powerpc.h>.
176 +       Use PPC_MINIMUM_STACK_FRAME_SIZE instead of
177 +       CPU_MINIMUM_STACK_FRAME_SIZE.
178 +
179 +2005-02-16     Ralf Corsepius <ralf.corsepius@rtems.org>
180 +
181 +       * configure.ac: Remove argument from RTEMS_PPC_EXCEPTIONS.
182 +
183 +2005-02-11     Ralf Corsepius <ralf.corsepius@rtems.org>
184 +
185 +       * Makefile.am: Merge-in wrapup/Makefile.am.
186 +       * wrapup/Makefile.am: Remove.
187 +       * configure.ac: Reflect changes above.
188 +
189 +2005-01-07     Ralf Corsepius <ralf.corsepius@rtems.org>
190 +
191 +       * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
192 +
193 +2005-01-02     Ralf Corsepius <ralf.corsepius@rtems.org>
194 +
195 +       * Makefile.am, wrapup/Makefile.am: Remove build-variant support.
196 +
197 +2004-10-20     Ralf Corsepius <ralf_corsepius@rtems.org>
198 +
199 +       * console/console.c, include/bsp.h, startup/bspstart.c,
200 +       startup/iss555.c: Use POSIX fixed size types.
201 +
202 +2004-09-24     Ralf Corsepius <ralf_corsepius@rtems.org>
203 +
204 +       * configure.ac: Require automake > 1.9.
205 +
206 +2004-04-23     Ralf Corsepius <ralf_corsepius@rtems.org>
207 +
208 +       PR 610/bsps
209 +       * Makefile.am: Add include/tm27.h, Cosmetics.
210 +       * include/tm27.h: Final cosmetics.
211 +
212 +2004-04-22     Ralf Corsepius <ralf_corsepius@rtems.org>
213 +
214 +       * include/bsp.h: Split out tmtest27 support.
215 +       * include/tm27.h: New.
216 +
217 +2004-04-21     Joel Sherrill <joel@OARcorp.com>
218 +
219 +       PR 611/bsps
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.
223 +
224 +2004-04-21     Joel Sherrill <joel@OARcorp.com>
225 +
226 +       PR 611/bsps
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.
230 +
231 +2004-04-21     Ralf Corsepius <ralf_corsepius@rtems.org>
232 +
233 +       PR 613/bsps
234 +       * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
235 +
236 +2004-04-21     Ralf Corsepius <ralf_corsepius@rtems.org>
237 +
238 +       PR 614/bsps
239 +       * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
240 +
241 +2004-04-13     Ralf Corsepius <ralf_corsepius@rtems.org>
242 +
243 +       * include/bsp.h, startup/start.S: Reflect new locations of cpukit headers.
244 +
245 +2004-04-12     David Querbach <querbach@realtime.bc.ca>
246 +
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.
252 +
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
257 @@ -0,0 +1,50 @@
258 +##
259 +## $Id: Makefile.am,v 1.13.2.1 2008/09/29 01:47:53 ralf Exp $
260 +##
261 +
262 +ACLOCAL_AMFLAGS = -I ../../../../aclocal
263 +
264 +include $(top_srcdir)/../../../../automake/compile.am
265 +include $(top_srcdir)/../../bsp.am
266 +
267 +dist_project_lib_DATA = bsp_specs
268 +
269 +include_HEADERS = include/bsp.h
270 +include_HEADERS += include/tm27.h
271 +
272 +nodist_include_HEADERS = include/bspopts.h
273 +DISTCLEANFILES = include/bspopts.h
274 +
275 +include_bspdir = $(includedir)/bsp
276 +
277 +include_HEADERS += include/coverhd.h
278 +include_bsp_HEADERS = irq/irq.h
279 +
280 +EXTRA_DIST = times
281 +
282 +dist_project_lib_DATA += startup/linkcmds
283 +
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
291 +
292 +noinst_LIBRARIES = libbsp.a
293 +libbsp_a_SOURCES = $(pclock_SOURCES) $(console_SOURCES) $(startup_SOURCES) \
294 +    $(tm27supp_SOURCES)
295 +
296 +libbsp_a_LIBADD = \
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
305 +
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
312 @@ -0,0 +1,262 @@
313 +#
314 +#  $Id: README,v 1.1 2004/04/12 21:52:13 joel Exp $
315 +#
316 +
317 +This is a README file for the Intec SS555 of RTEMS 4.6.0
318 +
319 +The SS555 port was sponsored by Defence Research and Development 
320 +Canada - Suffield, and is Copyright (C) 2004, Real-Time Systems Inc.
321 +
322 +Please send any comments, improvements, or bug reports to:
323 +
324 +David Querbach
325 +querbach@realtime.bc.ca
326 +
327 +
328 +Summary
329 +-------
330 +
331 +BSP NAME:           ss555
332 +BOARD:              Intec Automation Inc. SS555
333 +BUS:                None 
334 +CPU FAMILY:         PowerPC
335 +CPU:                PowerPC MPC555
336 +COPROCESSORS:       Built-in Motorola TPU
337 +MODE:               32 bit mode
338 +
339 +DEBUG MONITOR:      None
340 +
341 +PERIPHERALS
342 +===========
343 +TIMERS:             PIT / Timebase
344 +  RESOLUTION:       1 microsecond (4 MHz crystal / 4)
345 +SERIAL PORTS:       2 SCI
346 +REAL-TIME CLOCK:    On-chip.
347 +DMA:                None.
348 +VIDEO:              None.
349 +SCSI:               None.
350 +NETWORKING:         None.
351 +                  
352 +
353 +DRIVER INFORMATION
354 +==================
355 +CLOCK DRIVER:       yes
356 +CONSOLE DRIVER:     yes
357 +SHMSUPP:            N/A
358 +TIMER DRIVER:       yes
359 +NETWORK DRIVER:            no
360 +
361 +NOTES
362 +=====
363 +On-chip resources:
364 +       SCI1            serial port
365 +       SCI2            serial port (console)
366 +       PIT             clock
367 +       TB              timing test support
368 +       DEC
369 +       SWT             watchdog timer -- enable in startup/iss555.c
370 +       *CS0            external 512k 2-1-1-1 Burst SRAM
371 +       *CS1
372 +       *CS2
373 +       *CS3            CPLD
374 +       IRQ0
375 +       IRQ1
376 +       IRQ2            
377 +       IRQ3            
378 +       IRQ4            
379 +       IRQ5    
380 +       IRQ6
381 +       IRQ7
382 +       IRQ_LVL0        
383 +       IRQ_LVL1
384 +       IRQ_LVL2
385 +       IRQ_LVL3
386 +       IRQ_LVL4
387 +       IRQ_LVL5        SCI
388 +       IRQ_LVL6        PIT
389 +       IRQ_LVL7
390 +       
391 +
392 +Board description
393 +-----------------
394 +Clock rate:     40 MHz development/embeddable board
395 +Bus width:      32-bit on-board RAM, 16-bit off-board I/O
396 +FLASH:         512k on-chip
397 +RAM:            512k 2-1-1-1 burst SRAM
398 +
399 +
400 +Installation
401 +------------
402 +
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:
406 +
407 +       make VARIANT=DEBUG all
408 +
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.
414 +
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.
420 +
421 +
422 +Console driver
423 +---------------
424 +
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.
430 +
431 +The BSP console supports three different modes of operation:
432 +
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.
436 +     
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).
439 +
440 +  0 - polled I/O.
441 +  1 - interrupt-driven I/O.
442 +  
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:
448 +
449 +  0 - do not use termios
450 +  1 - use termios
451 +
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.
454 +
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.
463 +
464 +The real solution is to fix the tests so that they work with interrupt-driven
465 +I/O and termios.
466 +
467 +
468 +printk() and debug output
469 +-----------------------
470 +
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.
476 +
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.
480 +
481 +printk() always uses polled I/O, and never uses termios.
482 +
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().
488 +
489 +
490 +Watchdog Timer
491 +--------------
492 +
493 +The MPC555 watchdog timer can be enabled at configuration time by defining
494 +the WATCHDOG_TIMEOUT variable.  This variable sets the watchdog timeout
495 +period in steps of
496 +
497 +         2048          2048
498 +       ---------  =  ---------  =  51.2 usec
499 +        Fsystem       40 MHz
500 +
501 +or about 1/20 msec.  When WATCHDOG_TIMEOUT is left undefined, the watchdog
502 +timer is disabled.
503 +
504 +
505 +Miscellaneous
506 +-------------
507 +
508 +Most code came from the mbx8xx port, except for the floating-point handling
509 +which came from the mpc8260ads.
510 +
511 +
512 +Host System
513 +-----------
514 +
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.
518 +
519 +
520 +Test Configuration
521 +------------------
522 +
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.    
531 +
532 +
533 +Test Results
534 +------------
535 +
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
540 +      buffer_test_io.h)
541 +
542 +Multi-processor tests:  
543 +  Not applicable.
544 +
545 +Library tests:
546 +  All tests passed.  Note that the termios test only works if the system is
547 +  rebuilt with termios enabled.                         
548 +
549 +Posix tests:
550 +  All tests passed, except that:
551 +    - the message queue test failed with "errno (91 - File or path name too
552 +      long)"
553 +
554 +Timing tests:
555 +  Due to memory limitations, many of the tests will not run unless you set
556 +  OPERATION_COUNT=20 at configuration time.
557 +
558 +  To run tm27 (the interrupt latency timer test), short CN5-48 to CN5-50 on
559 +  the SS555 board.
560 +
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.
563 +
564 +  See the times file for the results of the timing tests.
565 +
566 +Network tests:  
567 +  Not applicable.
568 +
569 +Sample programs:
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
573 +      limitations.
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
579 @@ -0,0 +1,13 @@
580 +%rename endfile old_endfile
581 +%rename startfile old_startfile
582 +%rename link old_link
583 +
584 +*startfile:
585 +%{!qrtems: %(old_startfile)} \
586 +%{!nostdlib: %{qrtems: ecrti%O%s -u __vectors -N -u start -e start}}
587 +
588 +*endfile:
589 +%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
590 +
591 +*link:
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
597 @@ -0,0 +1,69 @@
598 +/*
599 + *  Clock Tick interrupt conexion code.
600 + *
601 + *  COPYRIGHT (c) 1989-1997.
602 + *  On-Line Applications Research Corporation (OAR).
603 + *
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.
607 + *
608 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
609 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
610 + *
611 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c:
612 + *
613 + *  Modified to support the MPC750.
614 + *  Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
615 + *
616 + *  $Id: p_clock.c,v 1.3 2005/04/25 14:46:37 jennifer Exp $
617 + */
618 +
619 +#include <bsp.h>
620 +#include <bsp/irq.h>
621 +#include <rtems/bspIo.h>
622 +
623 +extern void clockOn(void*);
624 +extern void clockOff (void*);
625 +extern int clockIsOn(void*);
626 +extern void Clock_isr(void *);
627 +
628 +static rtems_irq_connect_data clockIrqData = {
629 +  CPU_PERIODIC_TIMER,
630 +  (rtems_irq_hdl)Clock_isr,
631 +  NULL,
632 +  (rtems_irq_enable)clockOn,
633 +  (rtems_irq_disable)clockOff,
634 +  (rtems_irq_is_enabled)clockIsOn
635 +};
636 +
637 +int BSP_disconnect_clock_handler (void)
638 +{
639 +  if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
640 +     printk("Unable to stop system clock\n");
641 +    rtems_fatal_error_occurred(1);
642 +  }
643 +  return BSP_remove_rtems_irq_handler (&clockIrqData);
644 +}
645 +
646 +int BSP_connect_clock_handler (rtems_irq_hdl hdl)
647 +{
648 +  if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
649 +     printk("Unable to get system clock handler\n");
650 +    rtems_fatal_error_occurred(1);
651 +  }
652 +  if (!BSP_remove_rtems_irq_handler (&clockIrqData)) {
653 +   printk("Unable to remove current system clock handler\n");
654 +    rtems_fatal_error_occurred(1);
655 +  }
656 +  /*
657 +   * Reinit structure
658 +   */
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;
664 +
665 +  return BSP_install_rtems_irq_handler (&clockIrqData);
666 +}
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
671 @@ -0,0 +1,52 @@
672 +## Process this file with autoconf to produce a configure script.
673 +## 
674 +## $Id: configure.ac,v 1.9 2006/12/02 05:59:47 ralf Exp $
675 +
676 +AC_PREREQ(2.60)
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(../../../../../..)
680 +
681 +RTEMS_CANONICAL_TARGET_CPU
682 +AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
683 +RTEMS_BSP_CONFIGURE
684 +
685 +RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
686 +RTEMS_CANONICALIZE_TOOLS
687 +RTEMS_PROG_CCAS
688 +
689 +RTEMS_CHECK_NETWORKING
690 +AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
691 +
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.])
696 +
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.])
701 +
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.])
706 +
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.])
710 +
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.])
717 +
718 +# Explicitly list a Makefile here 
719 +AC_CONFIG_FILES([Makefile])
720 +
721 +RTEMS_PPC_EXCEPTIONS
722 +
723 +AC_OUTPUT
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
728 @@ -0,0 +1,368 @@
729 +/*
730 + *  console.c
731 + *
732 + *  This file contains the Intec SS555 termios serial I/O package.
733 + *
734 + *  The SCI channels are assigned as follows
735 + *
736 + *   Channel     Device      Minor
737 + *    SCI1      /dev/tty0      0
738 + *    SCI2      /dev/tty1      1
739 + *
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).
747 + *
748 + *  I/O may be interrupt-driven (recommended for real-time applications) or
749 + *  polled.
750 + *
751 + *  LIMITATIONS:
752 + *
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.
757 + *
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
760 + *  NVRAM.
761 + *
762 + *  Interrupt-driven I/O requires termios.
763 + *
764 + *  TESTS:
765 + *
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.
775 + *
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.
779 + *
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.
784 + *
785 + *
786 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
787 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
788 + *
789 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/console/console.c:
790 + *
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.
794 + *
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
798 + *
799 + */
800 +#include <stdarg.h>
801 +#include <stdio.h>
802 +#include <bsp.h>                /* Must be before libio.h */
803 +#include <rtems/bspIo.h>
804 +#include <rtems/libio.h>
805 +#include <termios.h>
806 +
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);
810 +
811 +static void _BSP_null_char( char c ) {return;}
812 +
813 +BSP_output_char_function_type BSP_output_char = _BSP_null_char;
814 +
815 +/*
816 + *  do_poll_read
817 + *
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!
821 + *
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.
824 + *
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.
830 + *
831 + *  Output parameters:
832 + *    arg->bytes_moved - the number of characters read. Always 1.
833 + *
834 + *  Return value: RTEMS_SUCCESSFUL
835 + *
836 + *  CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
837 + */
838 +static rtems_status_code do_poll_read(
839 +  rtems_device_major_number major,
840 +  rtems_device_minor_number minor,
841 +  void                    * arg
842 +)
843 +{
844 +  rtems_libio_rw_args_t *rw_args = arg;
845 +  int c;
846 +
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;
852 +
853 +  return RTEMS_SUCCESSFUL;
854 +}
855 +
856 +/*
857 + *  do_poll_write
858 + *
859 + *  Output characters through polled I/O. Returns only once every character has
860 + *  been sent.
861 + *
862 + *  CR is transmitted AFTER a LF on output.
863 + *
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.
869 + *
870 + *  Output parameters:
871 + *    arg->bytes_moved - the number of characters read
872 + *
873 + *  Return value: RTEMS_SUCCESSFUL
874 + *
875 + *  CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
876 + */
877 +static rtems_status_code do_poll_write(
878 +  rtems_device_major_number major,
879 +  rtems_device_minor_number minor,
880 +  void                    * arg
881 +)
882 +{
883 +  rtems_libio_rw_args_t *rw_args = arg;
884 +  uint32_t i;
885 +  char cr ='\r';
886 +
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);
891 +  }
892 +  rw_args->bytes_moved = i;
893 +
894 +  return RTEMS_SUCCESSFUL;
895 +}
896 +
897 +/*
898 + *  Print functions prototyped in bspIo.h
899 + */
900 +
901 +static void _BSP_output_char( char c )
902 +{
903 +  char cr = '\r';
904 +
905 +  /*
906 +   *  Can't rely on console_initialize having been called before this
907 +   *  function is used, so it may fail.
908 +   */
909 +
910 +  m5xx_uart_pollWrite( PRINTK_MINOR, &c, 1 );
911 +  if( c == '\n' )
912 +    m5xx_uart_pollWrite( PRINTK_MINOR, &cr, 1 );
913 +}
914 +
915 +/*
916 + ***************
917 + * BOILERPLATE *
918 + ***************
919 + *
920 + *  All these functions are prototyped in rtems/c/src/lib/include/console.h.
921 + */
922 +
923 +/*
924 + * Initialize and register the device
925 + */
926 +rtems_device_driver console_initialize(
927 +  rtems_device_major_number major,
928 +  rtems_device_minor_number minor,
929 +  void *arg
930 +)
931 +{
932 +  rtems_status_code status;
933 +
934 +  /*
935 +   * Set up TERMIOS if needed
936 +   */
937 +  #if UARTS_USE_TERMIOS == 1
938 +    rtems_termios_initialize ();
939 +  #endif /* UARTS_USE_TERMIOS */
940 +
941 +  /*
942 +   * Do device-specific initialization
943 +   */
944 +  BSP_output_char = _BSP_output_char;
945 +
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);
950 +
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);
955 +
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);
960 +
961 +  return RTEMS_SUCCESSFUL;
962 +}
963 +
964 +/*
965 + * Open the device
966 + */
967 +rtems_device_driver console_open(
968 +  rtems_device_major_number major,
969 +  rtems_device_minor_number minor,
970 +  void *arg
971 +)
972 +{
973 +  rtems_status_code sc;
974 +
975 +  if ( minor > NUM_PORTS - 1 )
976 +    return RTEMS_INVALID_NUMBER;
977 +
978 +  #if (UARTS_USE_TERMIOS == 1)
979 +  {
980 +    #if (UARTS_IO_MODE == 1)    /* RTEMS interrupt-driven I/O with termios */
981 +
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 */
991 +      };
992 +      sc = rtems_termios_open( major, minor, arg, &callbacks );
993 +
994 +    #else /* UARTS_IO_MODE != 1        */      /* RTEMS polled I/O with termios */
995 +
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 */
1005 +      };
1006 +      sc = rtems_termios_open( major, minor, arg, &callbacks );
1007 +
1008 +    #endif
1009 +
1010 +    return sc;
1011 +  }
1012 +
1013 +  #else                /* no termios -- default to polled I/O */
1014 +  {
1015 +    sc = RTEMS_SUCCESSFUL;
1016 +  }
1017 +  #endif
1018 +
1019 +  return sc;
1020 +}
1021 +
1022 +/*
1023 + * Close the device
1024 + */
1025 +rtems_device_driver console_close(
1026 +  rtems_device_major_number major,
1027 +  rtems_device_minor_number minor,
1028 +  void *arg
1029 +)
1030 +{
1031 +  if ( minor > NUM_PORTS-1 )
1032 +    return RTEMS_INVALID_NUMBER;
1033 +
1034 +  #if UARTS_USE_TERMIOS == 1
1035 +    return rtems_termios_close( arg );
1036 +  #else
1037 +    return RTEMS_SUCCESSFUL;
1038 +  #endif
1039 +}
1040 +
1041 +/*
1042 + * Read from the device
1043 + */
1044 +rtems_device_driver console_read(
1045 +  rtems_device_major_number major,
1046 +  rtems_device_minor_number minor,
1047 +  void *arg
1048 +)
1049 +{
1050 +  if ( minor > NUM_PORTS-1 )
1051 +    return RTEMS_INVALID_NUMBER;
1052 +
1053 +  #if UARTS_USE_TERMIOS == 1
1054 +    return rtems_termios_read( arg );
1055 +  #else
1056 +    return do_poll_read( major, minor, arg );
1057 +  #endif
1058 +}
1059 +
1060 +/*
1061 + * Write to the device
1062 + */
1063 +rtems_device_driver console_write(
1064 +  rtems_device_major_number major,
1065 +  rtems_device_minor_number minor,
1066 +  void *arg
1067 +)
1068 +{
1069 +  if ( minor > NUM_PORTS-1 )
1070 +    return RTEMS_INVALID_NUMBER;
1071 +
1072 +  #if UARTS_USE_TERMIOS == 1
1073 +    return rtems_termios_write( arg );
1074 +  #else
1075 +    return do_poll_write( major, minor, arg );
1076 +  #endif
1077 +}
1078 +
1079 +/*
1080 + * Handle ioctl request.
1081 + */
1082 +rtems_device_driver console_control(
1083 +  rtems_device_major_number major,
1084 +  rtems_device_minor_number minor,
1085 +  void *arg
1086 +)
1087 +{
1088 +  if ( minor > NUM_PORTS-1 )
1089 +    return RTEMS_INVALID_NUMBER;
1090 +
1091 +  #if UARTS_USE_TERMIOS == 1
1092 +    return rtems_termios_ioctl( arg );
1093 +  #else
1094 +    return RTEMS_SUCCESSFUL;
1095 +  #endif
1096 +}
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
1101 @@ -0,0 +1,112 @@
1102 +/*  bsp.h
1103 + *
1104 + *  This include file contains all board IO definitions.
1105 + *
1106 + *  This file includes definitions for the Intec SS555.
1107 + *
1108 + *
1109 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1110 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1111 + *
1112 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h:
1113 + *
1114 + *  COPYRIGHT (c) 1989-1998.
1115 + *  On-Line Applications Research Corporation (OAR).
1116 + *
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.
1120 + *
1121 + *  $Id: bsp.h,v 1.11 2007/12/11 15:46:51 joel Exp $
1122 + */
1123 +
1124 +#ifndef _BSP_H
1125 +#define _BSP_H
1126 +
1127 +#ifdef __cplusplus
1128 +extern "C" {
1129 +#endif
1130 +
1131 +#include <bspopts.h>
1132 +
1133 +#include <rtems.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>
1140 +
1141 +/*
1142 + * Clock definitions
1143 + */
1144 +
1145 +#define BSP_CRYSTAL_HZ          4000000        /* crystal frequency, Hz */
1146 +#define BSP_CLOCK_HZ   40000000        /* CPU clock frequency, Hz
1147 +
1148 +/*
1149 + * I/O definitions
1150 + *
1151 + * The SS555 board includes a CPLD to control on-board features and
1152 + * off-board devices.
1153 + */
1154 +typedef struct cpld_ {
1155 +  uint8_t      cs3a[32];               /* Chip select 3A */
1156 +  uint8_t      pad0[0x200000 - 0x000020];
1157 +
1158 +  uint8_t      cs3b[32];               /* Chip select 3B */
1159 +  uint8_t      pad2[0x400000 - 0x200020];
1160 +
1161 +  uint8_t      cs3c[32];               /* Chip select 3C */
1162 +  uint8_t      pad4[0x600000 - 0x400020];
1163 +
1164 +  uint8_t      cs3d[32];               /* Chip select 3D */
1165 +  uint8_t      pad6[0x800000 - 0x600020];
1166 +
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];
1171 +
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];
1175 +} cpld_t;
1176 +
1177 +extern volatile cpld_t cpld;              /* defined in linkcmds */
1178 +
1179 +/* miscellaneous stuff assumed to exist */
1180 +
1181 +/*
1182 + *  Device Driver Table Entries
1183 + */
1184 +
1185 +/*
1186 + * NOTE: Use the standard Console driver entry
1187 + */
1188 +
1189 +/*
1190 + * NOTE: Use the standard Clock driver entry
1191 + */
1192 +
1193 +/*
1194 + * How many libio files we want
1195 + */
1196 +
1197 +#define BSP_LIBIO_MAX_FDS       20
1198 +
1199 +/* functions */
1200 +
1201 +void bsp_cleanup( void );
1202 +
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  */
1207 +);
1208 +
1209 +#ifdef __cplusplus
1210 +}
1211 +#endif
1212 +
1213 +#endif
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
1218 @@ -0,0 +1,116 @@
1219 +/*  coverhd.h
1220 + *
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
1230 + *  timing results.
1231 + *
1232 + *  NOTE:  If these are all zero, then the times reported include
1233 + *         all calling overhead including passing of arguments.
1234 + *
1235 + *  COPYRIGHT (c) 1989-1998.
1236 + *  On-Line Applications Research Corporation (OAR).
1237 + *
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.
1241 + *
1242 + *  $Id: coverhd.h,v 1.2 2006/03/17 10:11:37 ralf Exp $
1243 + */
1244 +
1245 +#ifndef __COVERHD_h
1246 +#define __COVERHD_h
1247 +
1248 +#ifdef __cplusplus
1249 +extern "C" {
1250 +#endif
1251 +
1252 +/*
1253 + * 40 MHz processor, running from external 2-1-1-1 burst SRAM.
1254 + */
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
1274 +
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
1295 +
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
1315 +
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
1329 +
1330 +#ifdef __cplusplus
1331 +}
1332 +#endif
1333 +
1334 +#endif
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
1339 @@ -0,0 +1,54 @@
1340 +/*
1341 + *  tm27.h
1342 + *
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.
1346 + *
1347 + *  $Id: tm27.h,v 1.2 2004/04/23 04:47:38 ralf Exp $
1348 + */
1349 +
1350 +#ifndef _RTEMS_TMTEST27
1351 +#error "This is an RTEMS internal file you must not include directly."
1352 +#endif
1353 +
1354 +#ifndef __tm27_h
1355 +#define __tm27_h
1356 +
1357 +/*
1358 + * Stuff for Time Test 27
1359 + *
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.
1362 + */
1363 +
1364 +#define MUST_WAIT_FOR_INTERRUPT 1
1365 +
1366 +#define Install_tm27_vector( handler )                                 \
1367 +{                                                                      \
1368 +  extern rtems_irq_connect_data tm27IrqData;                            \
1369 +  usiu.siel |= (1 << 17);                                              \
1370 +  usiu.sipend |= (1 << 17);                                            \
1371 +                                                                       \
1372 +  tm27IrqData.hdl = (rtems_irq_hdl)handler;                            \
1373 +  BSP_install_rtems_irq_handler (&tm27IrqData);                                \
1374 +}
1375 +
1376 +#define Cause_tm27_intr()                                              \
1377 +{                                                                      \
1378 +  usiu.siel &= ~(1 << 17);                                             \
1379 +}
1380 +
1381 +#define Clear_tm27_intr()                                              \
1382 +{                                                                      \
1383 +  usiu.siel |= (1 << 17);                                              \
1384 +  usiu.sipend |= (1 << 17);                                            \
1385 +}
1386 +
1387 +#define Lower_tm27_intr()                                              \
1388 +{                                                                      \
1389 +  ppc_cached_irq_mask |= (1 << 17);                                    \
1390 +  usiu.simask = ppc_cached_irq_mask;                                   \
1391 +}
1392 +
1393 +#endif
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
1398 @@ -0,0 +1,55 @@
1399 +/* irq.h
1400 + *
1401 + *  This include file describe the data structure and the functions implemented
1402 + *  by rtems to write interrupt handlers.
1403 + *
1404 + *
1405 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1406 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1407 + *
1408 + *  Derived from libbsp/powerpc/mbx8xx/irq/irq.h:
1409 + *
1410 + *  CopyRight (C) 1999 valette@crf.canon.fr
1411 + *
1412 + *  This code is heavilly inspired by the public specification of STREAM V2
1413 + *  that can be found at :
1414 + *
1415 + *      <http://www.chorus.com/Documentation/index.html> by following
1416 + *  the STREAM API Specification Document link.
1417 + *
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.
1421 + *
1422 + *  $Id: irq.h,v 1.2 2004/04/21 10:43:03 ralf Exp $
1423 + */
1424 +
1425 +#ifndef LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1426 +#define LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1427 +
1428 +#include <libcpu/irq.h>
1429 +
1430 +#ifndef ASM
1431 +
1432 +#ifdef __cplusplus
1433 +extern "C" {
1434 +#endif
1435 +
1436 +/*
1437 + * The SS555 has no external interrupt controller chip, so use the standard
1438 + * routines from the CPU-dependent code.
1439 + */
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)
1446 +
1447 +#ifdef __cplusplus
1448 +}
1449 +#endif
1450 +
1451 +#endif /* ASM */
1452 +
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
1458 @@ -0,0 +1,177 @@
1459 +/*  bspstart.c
1460 + *
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.
1465 + *
1466 + *  COPYRIGHT (c) 1989-2007.
1467 + *  On-Line Applications Research Corporation (OAR).
1468 + *
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.
1472 + *
1473 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1474 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1475 + *
1476 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c:
1477 + *
1478 + *  Modifications for MBX860:
1479 + *  Copyright (c) 1999, National Research Council of Canada
1480 + *
1481 + *  $Id: bspstart.c,v 1.17 2008/07/11 10:01:37 thomas Exp $
1482 + */
1483 +
1484 +#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
1485 +
1486 +#include <string.h>
1487 +
1488 +#include <rtems/libio.h>
1489 +#include <rtems/libcsupport.h>
1490 +#include <rtems/bspIo.h>
1491 +#include <rtems/powerpc/powerpc.h>
1492 +
1493 +#include <libcpu/cpuIdent.h>
1494 +#include <libcpu/spr.h>
1495 +
1496 +#include <bsp/irq.h>
1497 +#include <bsp.h>
1498 +
1499 +SPR_RW(SPRG1)
1500 +
1501 +extern unsigned long intrStackPtr;
1502 +
1503 +/*
1504 + *  Driver configuration parameters
1505 + */
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;
1510 +
1511 +/*
1512 + *  Use the shared implementations of the following routines.
1513 + *  Look in rtems/c/src/lib/libbsp/shared/bsplibc.c.
1514 + */
1515 +void bsp_libc_init( void *, uint32_t, int );
1516 +
1517 +void BSP_panic(char *s)
1518 +{
1519 +  printk("%s PANIC %s\n",_RTEMS_version, s);
1520 +  __asm__ __volatile ("sc");
1521 +}
1522 +
1523 +void _BSP_Fatal_error(unsigned int v)
1524 +{
1525 +  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
1526 +  __asm__ __volatile ("sc");
1527 +}
1528 +
1529 +/*
1530 + *  bsp_pretasking_hook
1531 + *
1532 + *  Called when RTEMS initialization is complete but before interrupts and
1533 + *  tasking are enabled. Used to setup libc and install any BSP extensions.
1534 + *
1535 + *  Must not use libc (to do io) from here, since drivers are not yet
1536 + *  initialized.
1537 + *
1538 + *  Input parameters: NONE
1539 + *
1540 + *  Output parameters: NONE
1541 + *
1542 + *  Return values: NONE
1543 + */
1544 +void bsp_pretasking_hook(void)
1545 +{
1546 +  /*
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.
1555 +   */
1556 +  uint8_t *_HeapStart =
1557 +      (uint8_t *)Configuration.work_space_start
1558 +           + rtems_configuration_get_work_space_size();
1559 +  extern uint8_t _HeapEnd[];
1560 +
1561 +  bsp_libc_init( _HeapStart, _HeapEnd - _HeapStart, 0 );
1562 +}
1563 +
1564 +/*
1565 + *  bsp_start()
1566 + *
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
1572 + *
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.
1577 + *
1578 + *  Input parameters: NONE
1579 + *
1580 + *  Output parameters: NONE
1581 + *
1582 + *  Return values: NONE
1583 + */
1584 +void bsp_start(void)
1585 +{
1586 +  extern char _WorkspaceBase[];
1587 +
1588 +  ppc_cpu_id_t myCpu;
1589 +  ppc_cpu_revision_t myCpuRevision;
1590 +  register unsigned char* intrStack;
1591 +
1592 +  /*
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
1595 +   * later.
1596 +   */
1597 +  myCpu        = get_ppc_cpu_type();
1598 +  myCpuRevision = get_ppc_cpu_revision();
1599 +
1600 +  /*
1601 +   * Initialize some SPRG registers related to irq handling
1602 +   */
1603 +  intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE);
1604 +  _write_SPRG1((unsigned int)intrStack);
1605 +
1606 +  /*
1607 +   * Install our own set of exception vectors
1608 +   */
1609 +  initialize_exceptions();
1610 +
1611 +  /*
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.
1617 +   *
1618 +   *  In this case, the memory is not malloc'ed.  It is just
1619 +   *  "pulled from the air".
1620 +   */
1621 +  Configuration.work_space_start = _WorkspaceBase;
1622 +
1623 +  /*
1624 +   *  initialize the device driver parameters
1625 +   */
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;
1630 +
1631 +  /*
1632 +   * Initalize RTEMS IRQ system
1633 +   */
1634 +  BSP_rtems_irq_mng_init(0);
1635 +}
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
1640 @@ -0,0 +1,148 @@
1641 +/*
1642 + *  iss555.c
1643 + *
1644 + *  Intec SS555 initialization routines.
1645 + *
1646 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1647 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1648 + *
1649 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/imbx8xx.c:
1650 + *
1651 + *  Copyright (c) 1999, National Research Council of Canada
1652 + *
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.
1656 + */
1657 +
1658 +#include <bsp.h>
1659 +
1660 +SPR_RW(ICTRL);
1661 +SPR_RW(DEC);
1662 +SPR_RW(TBWU);
1663 +SPR_RW(TBWL);
1664 +SPR_RO(IMMR);
1665 +SPR_RW(MI_GRA);
1666 +SPR_RW(L2U_GRA);
1667 +SPR_RW(BBCMCR);
1668 +
1669 +/*
1670 + *  Initialize SS555
1671 + */
1672 +void _InitSS555 (void)
1673 +{
1674 +  register uint32_t plprcr, msr;
1675 +
1676 +  /*
1677 +   * Initialize the System Protection Control Register (SYPCR).
1678 +   * The SYPCR can only be written once after Reset.
1679 +   */
1680 +  usiu.sypcr =
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 */
1687 +#endif
1688 +    | USIU_SYPCR_SWRI                  /* watchdog forces reset */
1689 +    | USIU_SYPCR_SWP;                  /* prescale watchdog by 2048 */
1690 +
1691 +  TICKLE_WATCHDOG();                   /* restart watchdog timer */
1692 +
1693 +  /*
1694 +   * Re-tune the PLL to the desired system clock frequency.
1695 +   */
1696 +  usiu.plprck = USIU_UNLOCK_KEY;       /* unlock PLPRCR */
1697 +  usiu.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 */
1702 +
1703 +  while (((plprcr = usiu.plprcr) & USIU_PLPRCR_SPLS) == 0)
1704 +    ;                                  /* wait for PLL to re-lock */
1705 +
1706 +  /*
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.
1711 +   */
1712 +  usiu.tbscrk = USIU_UNLOCK_KEY;
1713 +  usiu.tbscr |= USIU_TBSCR_TBE;                /* enable time base and decrementer */
1714 +  usiu.tbscrk = 0;
1715 +
1716 +  usiu.tbk = USIU_UNLOCK_KEY;
1717 +  _write_DEC(0x7FFFFFFF);
1718 +  _write_TBWU(0x00000000 );
1719 +  _write_TBWL(0x00000000 );
1720 +  usiu.tbk = 0;
1721 +
1722 +  /*
1723 +   * Run the Inter-Module Bus at full speed.
1724 +   */
1725 +  imb.uimb.umcr &= ~UIMB_UMCR_HSPEED;
1726 +
1727 +  /*
1728 +   * Initialize Memory Controller for External RAM
1729 +   *
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.
1732 +   *
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.
1736 +   */
1737 +  extern char int_ram_top[];           /* top of internal ram */
1738 +
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 */
1743 +
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 */
1750 +
1751 +  /*
1752 +   * Initialize Memory Controller for External CPLD
1753 +   *
1754 +   * The SS555 board includes a CPLD to control on-board features and
1755 +   * off-board devices.  (Configuration taken from Intec's hwhook.c)
1756 +   */
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 */
1763 +
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 */
1769 +
1770 +  /*
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.
1774 +   */
1775 +  _write_ICTRL(0x00000007);
1776 +
1777 +  /*
1778 +   * Set up Burst Buffer Controller (BBC)
1779 +   */
1780 +  _write_BBCMCR(
1781 +      BBCMCR_ETRE                      /* enable exception relocation */
1782 +    | BBCMCR_BE);                      /* enable burst accesses */
1783 +  _isync;
1784 +
1785 +  _CPU_MSR_GET(msr);
1786 +  msr |= MSR_IP;               /* set prefix for exception relocation */
1787 +  _CPU_MSR_SET(msr);
1788 +}
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
1793 @@ -0,0 +1,319 @@
1794 +/*
1795 + * Linker command file for Intec SS555 board
1796 + *
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
1801 + * zero.
1802 + *
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.
1808 + *
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.
1812 + *
1813 + *  $Id: linkcmds,v 1.4 2008/03/03 23:07:19 joel Exp $
1814 + */
1815 +
1816 +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
1817 +OUTPUT_ARCH(powerpc) 
1818 +ENTRY(start)
1819 +
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 */
1823 +
1824 +
1825 +SECTIONS
1826 +{
1827 +  .vectors 0x0:
1828 +  {
1829 +    /*
1830 +     * For the MPC555, we use the compressed vector table format which puts
1831 +     * all of the exception vectors before 0x100.
1832 +     */ 
1833 +    *(.vectors)
1834 +  }
1835 +
1836 +  .text 0x100:
1837 +  {
1838 +    /* Read-only sections, merged into text segment: */
1839 +    
1840 +    text.start = .;
1841 +
1842 +    /* Entry point is the .entry section */
1843 +    *(.entry)
1844 +    *(.entry2)
1845 +
1846 +    /* Actual code */
1847 +    *(.text*)
1848 +
1849 +    /* C++ constructors/destructors */
1850 +    *(.gnu.linkonce.t*)
1851 +            
1852 +    /*  Initialization and finalization code.
1853 +     *
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. 
1863 +     */
1864 +    PROVIDE (_init = .);
1865 +    *ecrti.o(.init)
1866 +    *(.init)
1867 +    *ecrtn.o(.init)
1868 +    
1869 +    PROVIDE (_fini = .);
1870 +    *ecrti.o(.fini)
1871 +    *(.fini)
1872 +    *ecrtn.o(.init)
1873 +
1874 +    /* 
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.
1879 +     */
1880 +    PROVIDE (__CTOR_LIST__ = .);            
1881 +    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
1882 +    *crtbegin.o(.ctors)
1883 +    *(.ctors)
1884 +    *crtend.o(.ctors)
1885 +    LONG(0)
1886 +    PROVIDE (__CTOR_END__ = .);
1887 +       
1888 +    PROVIDE (__DTOR_LIST__ = .);
1889 +    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
1890 +    *crtbegin.o(.dtors)
1891 +    *(.dtors)
1892 +    *crtend.o(.dtors)
1893 +    LONG(0)
1894 +    PROVIDE (__DTOR_END__ = .);
1895 +       
1896 +    /*
1897 +     * Special FreeBSD sysctl sections.
1898 +     */
1899 +    . = ALIGN (16);
1900 +    __start_set_sysctl_set = .;
1901 +    *(set_sysctl_*);
1902 +    __stop_set_sysctl_set = ABSOLUTE(.);
1903 +    *(set_domain_*);
1904 +    *(set_pseudo_*);
1905 +
1906 +    /* Exception frame info */
1907 +    *(.eh_frame)
1908 +
1909 +    /* Miscellaneous read-only data */
1910 +    _rodata_start = . ;
1911 +    *(.gnu.linkonce.r*)
1912 +    *(.lit)
1913 +    *(.shdata)
1914 +    *(.rodata*)
1915 +    *(.rodata1)
1916 +    *.(eh_frame)
1917 +    *(.descriptors)
1918 +    *(rom_ver)
1919 +    _erodata = .;
1920 +
1921 +    /* Various possible names for the end of the .text section */
1922 +    etext = ALIGN(0x10);
1923 +    _etext = .;
1924 +    _endtext = .;
1925 +    text.end = .;
1926 +    PROVIDE (etext = .);
1927 +    PROVIDE (__etext = .);
1928 +
1929 +    /* 
1930 +     * .data section contents, copied to RAM at system startup. 
1931 +     */
1932 +    . = ALIGN(0x20);
1933 +    data.contents.start = .;
1934 +  }
1935 +  text.size = text.end - text.start;
1936 +
1937 +  /*
1938 +   * If debugging, stack the read/write sections directly after the text
1939 +   * section.  Otherwise, stack the read/write sections starting at base of
1940 +   * internal RAM.
1941 +   */
1942 +  . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
1943
1944 +  .data : AT (data.contents.start)
1945 +  {
1946 +    data.start = .;
1947 +    
1948 +    *(.data)
1949 +    *(.data.*)
1950 +    *(.data1)
1951 +    
1952 +    PROVIDE (__SDATA_START__ = .);
1953 +    *(.sdata*)
1954 +    *(.gnu.linkonce.d*)
1955 +    *(.gnu.linkonce.s.*)
1956 +    PROVIDE (__SDATA_END__ = .);
1957 +    
1958 +    PROVIDE (__EXCEPT_START__ = .);
1959 +    *(.gcc_except_table*)
1960 +    PROVIDE (__EXCEPT_END__ = .);
1961 +    
1962 +    PROVIDE(__GOT_START__ = .);
1963 +    *(.got.plt) 
1964 +    *(.got)
1965 +    PROVIDE(__GOT_END__ = .);
1966 +       
1967 +    *(.got1)
1968 +    
1969 +    PROVIDE (__GOT2_START__ = .);
1970 +    PROVIDE (_GOT2_START_ = .);
1971 +    *(.got2)
1972 +    PROVIDE (__GOT2_END__ = .);
1973 +    PROVIDE (_GOT2_END_ = .);
1974 +       
1975 +    PROVIDE (__FIXUP_START__ = .);
1976 +    PROVIDE (_FIXUP_START_ = .);
1977 +    *(.fixup)
1978 +    PROVIDE (_FIXUP_END_ = .);
1979 +    PROVIDE (__FIXUP_END__ = .);
1980 +
1981 +    /*  We want the small data sections together, so single-instruction
1982 +     *   offsets can access them all.
1983 +     */
1984 +    PROVIDE (__SDATA2_START__ = .);
1985 +    *(.sdata2)
1986 +    *(.gnu.linkonce.s2.*)
1987 +    PROVIDE (__SDATA2_END__ = .);
1988 +
1989 +    data.end = .;
1990 +  }
1991 +  data.size = data.end - data.start;
1992 +       
1993 +  .bss :
1994 +  {
1995 +    bss.start = .;
1996 +       
1997 +    PROVIDE (__SBSS2_START__ = .);
1998 +    *(.sbss2)
1999 +    PROVIDE (__SBSS2_END__ = .);
2000 +       
2001 +    PROVIDE (__SBSS_START__ = .);
2002 +    *(.sbss*)
2003 +    PROVIDE (__SBSS_END__ = .);
2004 +
2005 +    *(.bss .bss* .gnu.linkonce.b*)
2006 +    *(COMMON)
2007 +
2008 +    . = ALIGN(4);
2009 +    bss.end = .;
2010 +  }
2011 +  bss.size = bss.end - bss.start;
2012 +
2013 +  PROVIDE(_end = bss.end);
2014 +
2015 +  /*
2016 +   * Initialization stack
2017 +   */
2018 +  InitStack_start = ALIGN(0x10);
2019 +  . += 0x1000;
2020 +  initStack = .;
2021 +  PROVIDE(initStackPtr = initStack);
2022 +
2023 +  /*
2024 +   * Interrupt stack
2025 +   */
2026 +  IntrStack_start = ALIGN(0x10);
2027 +  . += 0x4000;
2028 +  intrStack = .;
2029 +  PROVIDE(intrStackPtr = intrStack);
2030 +
2031 +  _WorkspaceBase = .;
2032 +  __WorkspaceBase = .;
2033 +       
2034 +  /*
2035 +   * Heap
2036 +   *
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.
2040 +   */
2041 +  . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
2042 +  _HeapEnd = .;
2043 +  __HeapEnd = .;
2044
2045 +        
2046 +  /* 
2047 +   * Internal I/O devices 
2048 +   */
2049 +  .usiu 0x002FC000:            /* unified system interface unit */
2050 +  {
2051 +    usiu = .;
2052 +  }
2053 +
2054 +  .imb 0x00300000:             /* inter-module bus and devices */
2055 +  {
2056 +    imb = .;
2057 +  }
2058 +
2059 +  .sram 0x00380000:            /* internal SRAM control registers */
2060 +  {
2061 +    sram = .;
2062 +  }
2063 +
2064 +  /*
2065 +   * SS555 external devices managed by on-board CPLD
2066 +   */
2067 +  .cpld 0xFF000000:            /* SS555 external CPLD devices */
2068 +  {
2069 +    cpld = .;
2070 +  }
2071 +
2072 +
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) }
2081 +  
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.  */
2085 +  /* DWARF 1 */
2086 +  .debug          0 : { *(.debug) }
2087 +  .line           0 : { *(.line) }
2088 +  
2089 +  /* GNU DWARF 1 extensions */
2090 +  .debug_srcinfo  0 : { *(.debug_srcinfo) }
2091 +  .debug_sfnames  0 : { *(.debug_sfnames) }
2092 +  
2093 +  /* DWARF 1.1 and DWARF 2 */
2094 +  .debug_aranges  0 : { *(.debug_aranges) }
2095 +  .debug_pubnames 0 : { *(.debug_pubnames) }
2096 +  
2097 +  /* DWARF 2 */
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) }
2105 +  
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  .  */
2112 +}
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
2117 @@ -0,0 +1,411 @@
2118 +/*  start.S
2119 + *
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.
2123 + *
2124 + * This file is based on several others:
2125 + *
2126 + * (1) start360.s from the gen68360 BSP by
2127 + *     W. Eric Norum (eric@skatter.usask.ca)
2128 + *     with the following copyright and license:
2129 + *
2130 + *     COPYRIGHT (c) 1989-1998.
2131 + *     On-Line Applications Research Corporation (OAR).
2132 + *
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.
2136 + *
2137 + * (2) start.s for the eth_comm port by
2138 + *     Jay Monkman (jmonkman@fracsa.com),
2139 + *     which itself is based on the
2140 + *
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:
2144 + *
2145 + *     COPYRIGHT (c) 1995 by i-cubed ltd.
2146 + *
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
2150 + *
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.
2161 + *
2162 + * (5) Modifications (for MBX8xx) of respective RTEMS files:
2163 + *     Copyright (c) 1999, National Research Council of Canada
2164 + *
2165 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
2166 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
2167 + */
2168 +
2169 +#include <rtems/asm.h>
2170 +#include <rtems/powerpc/registers.h>
2171 +
2172 +/*
2173 + *  The initial stack is set to the top of the internal RAM.
2174 + *
2175 + *  All the entry veneer has to do is to clear the .bss section and copy the
2176 + *  initializers into the .data section.
2177 + */
2178 +
2179 +/*
2180 + *  GDB likes to have debugging information for the entry veneer.
2181 + *  Play compiler and provide some DWARF information.
2182 + *
2183 + *  CHANGE TO SUIT YOUR SETUP!
2184 + */
2185 +
2186 +        .section .entry,"ax",@progbits
2187 +.L_text_b:
2188 +.L_LC1:
2189 +       .previous
2190 +
2191 +.section       .debug_sfnames
2192 +.L_sfnames_b:
2193 +       .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2194 +       .byte 0
2195 +.L_F0:
2196 +       .byte "start.S"
2197 +       .byte 0
2198 +       .previous
2199 +
2200 +.section       .line
2201 +.L_line_b:
2202 +       .4byte  .L_line_e-.L_line_b
2203 +       .4byte  .L_text_b
2204 +.L_LE1:
2205 +.L_line_last:
2206 +       .4byte  0x0
2207 +       .2byte  0xffff
2208 +       .4byte  .L_text_e-.L_text_b
2209 +.L_line_e:
2210 +       .previous
2211 +
2212 +.section       .debug_srcinfo
2213 +.L_srcinfo_b:
2214 +       .4byte  .L_line_b
2215 +       .4byte  .L_sfnames_b
2216 +       .4byte  .L_text_b
2217 +       .4byte  .L_text_e
2218 +       .4byte  0xffffffff
2219 +       .4byte  .L_LE1-.L_line_b
2220 +       .4byte  .L_F0-.L_sfnames_b
2221 +       .4byte  .L_line_last-.L_line_b
2222 +       .4byte  0xffffffff
2223 +       .previous
2224 +
2225 +.section       .debug_pubnames
2226 +       .4byte  .L_debug_b
2227 +       .4byte  .L_P0
2228 +       .byte "start"
2229 +       .byte 0
2230 +       .4byte  0x0
2231 +       .byte 0
2232 +       .previous
2233 +
2234 +.section       .debug_aranges
2235 +       .4byte  .L_debug_b
2236 +       .4byte  .L_text_b
2237 +       .4byte  .L_text_e-.L_text_b
2238 +       .4byte  0
2239 +       .4byte  0
2240 +       .4byte  0
2241 +       .4byte  0
2242 +       .4byte  0
2243 +       .4byte  0
2244 +       .4byte  0x0
2245 +       .4byte  0x0
2246 +       .previous
2247 +
2248 +.section       .debug
2249 +.L_debug_b:
2250 +.L_D1:
2251 +       .4byte  .L_D1_e-.L_D1
2252 +       .2byte  0x11    /* TAG_compile_unit */
2253 +       .2byte  0x12    /* AT_sibling */
2254 +       .4byte  .L_D2
2255 +       .2byte  0x38    /* AT_name */
2256 +       .byte "start.S"
2257 +       .byte 0
2258 +       .2byte  0x258   /* AT_producer */
2259 +       .byte "GAS 2.5.2"
2260 +       .byte 0
2261 +       .2byte  0x111   /* AT_low_pc */
2262 +       .4byte  .L_text_b
2263 +       .2byte  0x121   /* AT_high_pc */
2264 +       .4byte  .L_text_e
2265 +       .2byte  0x106   /* AT_stmt_list */
2266 +       .4byte  .L_line_b
2267 +       .2byte  0x1b8   /* AT_comp_dir */
2268 +       .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2269 +       .byte 0
2270 +       .2byte  0x8006  /* AT_sf_names */
2271 +       .4byte  .L_sfnames_b
2272 +       .2byte  0x8016  /* AT_src_info */
2273 +       .4byte  .L_srcinfo_b
2274 +.L_D1_e:
2275 +.L_P0:
2276 +.L_D3:
2277 +       .4byte  .L_D3_e-.L_D3
2278 +       .2byte  0x6     /* TAG_global_subroutine */
2279 +       .2byte  0x12    /* AT_sibling */
2280 +       .4byte  .L_D4
2281 +       .2byte  0x38    /* AT_name */
2282 +       .byte "start"
2283 +       .byte 0
2284 +       .2byte  0x278   /* AT_prototyped */
2285 +       .byte 0
2286 +       .2byte  0x111   /* AT_low_pc */
2287 +       .4byte  .L_text_b
2288 +       .2byte  0x121   /* AT_high_pc */
2289 +       .4byte  .L_text_e
2290 +       .2byte  0x8041  /* AT_body_begin */
2291 +       .4byte  .L_text_b
2292 +       .2byte  0x8051  /* AT_body_end */
2293 +       .4byte  .L_text_e
2294 +.L_D3_e:
2295 +
2296 +.L_D4:
2297 +       .4byte  .L_D4_e-.L_D4
2298 +       .align 2
2299 +.L_D4_e:
2300 +.L_D2:
2301 +       .previous
2302 +
2303 +/*
2304 + * Tell C's eabi-ctor's that we have an atexit function,
2305 + * and that it is to register __do_global_dtors.
2306 + */
2307 +       EXTERN_PROC(atexit)
2308 +       PUBLIC_VAR(__atexit)
2309 +       .section ".sdata","aw"
2310 +       .align  2
2311 +SYM(__atexit):
2312 +       EXT_PROC_REF(atexit)@fixup
2313 +       .previous
2314 +
2315 +       .section ".fixup","aw"
2316 +       .align  2
2317 +       EXT_SYM_REF(__atexit)
2318 +       .previous
2319 +
2320 +/* That should do it */
2321 +
2322 +/*
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.
2325 + */
2326 +        .section .entry
2327 +
2328 +        PUBLIC_VAR (start)
2329 +SYM(start):
2330 +        bl      .startup       /* or bl .spin */
2331 +base_addr:
2332 +
2333 +/*
2334 + * Parameters from linker
2335 + */
2336 +stack_top:
2337 +       .long   initStackPtr
2338 +
2339 +toc_pointer:
2340 +        .long   __GOT_START__
2341 +
2342 +bss_length:
2343 +        .long   bss.size
2344 +bss_addr:
2345 +        .long   bss.start
2346 +
2347 +data_length:
2348 +        .long   data.size
2349 +data_addr:
2350 +        .long   data.start
2351 +contents_addr:
2352 +        .long   data.contents.start
2353 +
2354 +PUBLIC_VAR (text_addr)
2355 +text_addr:
2356 +        .long   text.start
2357 +
2358 +PUBLIC_VAR (text_length)
2359 +text_length:
2360 +        .long   text.size
2361 +
2362 +/*
2363 + * Spin, if necessary, to acquire control from debugger (CodeWarrior).
2364 + */
2365 +spin:
2366 +       .long   0x0001
2367 +.spin:
2368 +       lis     r3, spin@ha
2369 +       lwz     r3, spin@l(r3)
2370 +       cmpwi   r3, 0x1
2371 +       beq     .spin
2372 +
2373 +/*
2374 + * Initialization code
2375 + */
2376 +.startup:
2377 +        /* Capture address of linker parameters. */
2378 +        mflr    r3
2379 +
2380 +       /* Set initial stack pointer to end of internal RAM - 56. */
2381 +       lwz     r1, stack_top-base_addr(r3)
2382 +        addi    r1, r1, -56
2383 +
2384 +        /* Initialize essential registers. */
2385 +        bl      initregs
2386 +
2387 +        /* Set TOC pointer */
2388 +        lwz r2, toc_pointer-base_addr(r3)
2389 +
2390 +        /* Initialize the memory mapped MPC555 registers (done in C). */
2391 +        EXTERN_PROC (_InitSS555)
2392 +        bl     PROC (_InitSS555)
2393 +
2394 +        /* Clear the .bss section. */
2395 +        bl      bssclr
2396 +
2397 +       /* Copy initializers into the .data section */
2398 +       bl      datacopy
2399 +
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.
2403 +        */
2404 +       mfmsr   r0
2405 +       ori     r0, r0, MSR_FP
2406 +       mtmsr   r0
2407 +
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 */
2415 +
2416 +        /* We should never return from boot_card, but in case we do ... */
2417 +       /* The next instructions are dependent on your runtime environment. */
2418 +
2419 +stop_here:
2420 +       b       stop_here
2421 +
2422 +/*
2423 + * datacopy - copy initializers into .data section
2424 + */
2425 +datacopy:
2426 +       lis     r3, base_addr@ha                /* point to linker data */
2427 +       addi    r3, r3, base_addr@l
2428 +
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 */
2432 +
2433 +        rlwinm. r6, r6, 30, 0x3FFFFFFF          /* form length / 4 */
2434 +        beqlr                                   /* no .data - return */
2435 +
2436 +        mtctr   r6                              /* set ctr reg */
2437 +dc1:
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 */
2443 +
2444 +        blr                                     /* return */
2445 +
2446 +/*
2447 + * bssclr - zero out bss
2448 + */
2449 +bssclr:
2450 +       lis     r3, base_addr@ha                /* point to linker data */
2451 +       addi    r3, r3, base_addr@l
2452 +
2453 +        lwz     r4, bss_addr-base_addr(r3)      /* Start of bss */
2454 +        lwz     r5, bss_length-base_addr(r3)    /* Length of bss */
2455 +
2456 +        rlwinm. r5, r5, 30, 0x3FFFFFFF          /* form length/4 */
2457 +        beqlr                                   /* no bss - return */
2458 +
2459 +        mtctr   r5                              /* set ctr reg */
2460 +        li      r5, 0x0000                      /* r5 = 0 */
2461 +clear_bss:
2462 +        stw     r5, 0(r4)                       /* store r6 */
2463 +        addi    r4, r4, 0x4                     /* update r4 */
2464 +        bdnz    clear_bss                       /* dec counter and loop */
2465 +
2466 +        blr                                     /* return */
2467 +
2468 +/*
2469 + * initregs
2470 + *     Initialize the MSR and basic core PowerPC registers
2471 + *
2472 + * Register usage:
2473 + *     r0 - scratch
2474 + */
2475 +initregs:
2476 +       /*
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).
2482 +        */
2483 +       li      r0, 0x1000      /* MSR_ME */
2484 +       mtmsr   r0              /* Context-synchronizing */
2485 +       isync
2486 +
2487 +       /*
2488 +        * Clear the exception handling registers.
2489 +        */
2490 +       li      r0, 0x0000
2491 +       mtdar   r0
2492 +       mtspr   sprg0, r0
2493 +       mtspr   sprg1, r0
2494 +       mtspr   sprg2, r0
2495 +       mtspr   sprg3, r0
2496 +       mtspr   srr0, r0
2497 +       mtspr   srr1, r0
2498 +
2499 +       mr      r6, r0
2500 +       mr      r7, r0
2501 +       mr      r8, r0
2502 +       mr      r9, r0
2503 +       mr      r10, r0
2504 +       mr      r11, r0
2505 +       mr      r12, r0
2506 +       mr      r13, r0
2507 +       mr      r14, r0
2508 +       mr      r15, r0
2509 +       mr      r16, r0
2510 +       mr      r17, r0
2511 +       mr      r18, r0
2512 +       mr      r19, r0
2513 +       mr      r20, r0
2514 +       mr      r21, r0
2515 +       mr      r22, r0
2516 +       mr      r23, r0
2517 +       mr      r24, r0
2518 +       mr      r25, r0
2519 +       mr      r26, r0
2520 +       mr      r27, r0
2521 +       mr      r28, r0
2522 +       mr      r29, r0
2523 +       mr      r30, r0
2524 +       mr      r31, r0
2525 +
2526 +       blr                     /* return */
2527 +
2528 +.L_text_e:
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
2533 @@ -0,0 +1,29 @@
2534 +/*
2535 + *  Support routines for TM27
2536 + *
2537 + *  $Id: tm27supp.c,v 1.1 2004/04/21 20:24:36 joel Exp $
2538 + */
2539 +
2540 +#include <bsp.h>
2541 +
2542 +void tm27On()                                                          
2543 +{                                                                      
2544 +}                                                                      
2545 +                                                                       
2546 +void tm27Off()                                                         
2547 +{                                                                      
2548 +}                                                                      
2549 +                                                                       
2550 +int tm27IsOn()                                                         
2551 +{                                                                      
2552 +  return 1;                                                            
2553 +}                                                                      
2554 +                                                                       
2555 +rtems_irq_connect_data tm27IrqData = {                                 
2556 +  CPU_USIU_EXT_IRQ_7,                                                  
2557 +  (rtems_irq_hdl)0,                                                    
2558 +  (rtems_irq_enable)tm27On,                                            
2559 +  (rtems_irq_disable)tm27Off,                                          
2560 +  (rtems_irq_is_enabled)tm27IsOn                                       
2561 +};
2562 +
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
2567 @@ -0,0 +1,189 @@
2568 +#
2569 +#  Timing Test Suite Results for the Intec SS555
2570 +#
2571 +#  $Id: times,v 1.1 2004/04/12 21:52:13 joel Exp $
2572 +#
2573 +
2574 +Board: SS555
2575 +CPU: MPC555
2576 +Clock Speed: 40 MHz
2577 +Memory Configuration: 512k external 2-1-1-1 SRAM
2578 +Wait States: 0
2579 +
2580 +Times Reported in: microseconds
2581 +Timer Source: Timebase register (TMBCLK = (4 MHz crystal / 4) = 1.0 Mhz)
2582 +
2583 +#                          DESCRIPTION                                  A       B
2584 +== =================================================================   ====    ====
2585 +
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
2591 +
2592 + 2 rtems_semaphore_obtain: not available -- caller blocks               50
2593 +
2594 + 3 rtems_semaphore_release: task readied -- preempts caller             41
2595 +
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
2606 +
2607 + 5 rtems_task_suspend: calling task                                     40
2608 +   rtems_task_resume: task readied -- preempts caller                   35
2609 +
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
2614 +
2615 + 7 rtems_task_restart: suspended task -- preempts caller                64
2616 +
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
2626 +   rtems_clock_get                                                       1
2627 +
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
2635 +
2636 +10 rtems_message_queue_receive: not available -- NO_WAIT                15
2637 +   rtems_message_queue_receive: not available -- caller blocks          52
2638 +
2639 +11 rtems_message_queue_send: task readied -- preempts caller            47
2640 +
2641 +12 rtems_message_queue_send: task readied -- returns to caller          29
2642 +
2643 +13 rtems_message_queue_urgent: task readied -- preempts caller          46
2644 +
2645 +14 rtems_message_queue_urgent: task readied -- returns to caller        29
2646 +
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
2653 +
2654 +16 rtems_event_send: task readied -- preempts caller                    41
2655 +
2656 +17 rtems_task_set_priority: preempts caller                             49
2657 +
2658 +18 rtems_task_delete: calling task                                      95
2659 +
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
2665 +
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
2680 +   rtems_io_open                                                         1
2681 +   rtems_io_close                                                        1
2682 +   rtems_io_read                                                         1
2683 +   rtems_io_write                                                        1
2684 +   rtems_io_control                                                      1
2685 +
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
2694 +
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
2698 +
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
2711 +
2712 +24 rtems_task_wake_after: yield -- returns to caller                    10
2713 +   rtems_task_wake_after: yields -- preempts caller                     36
2714 +
2715 +25 rtems_clock_tick                                                      8
2716 +
2717 +26 _ISR_Disable                                                          1
2718 +   _ISR_Flash                                                            1
2719 +   _ISR_Enable                                                           1
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
2731 +   _Thread_Resume                                                        7
2732 +   _Thread_Unblock                                                       6
2733 +   _Thread_Ready                                                         7
2734 +   _Thread_Get                                                           4
2735 +   _Semaphore_Get                                                        2
2736 +   _Thread_Get: invalid id                                               1
2737 +
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
2744 +
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
2749 +
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
2761 @@ -0,0 +1,38 @@
2762 +#
2763 +#  Config file for an Intec Automation SS555 MPC555-based card
2764 +#
2765 +#  This file is derived from:
2766 +#
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
2770 +#
2771 +#  $Id: ss555.cfg,v 1.11 2008/03/11 20:50:58 joel Exp $
2772 +#
2773 +
2774 +include $(RTEMS_ROOT)/make/custom/default.cfg
2775 +
2776 +RTEMS_CPU=powerpc
2777 +GCC_CPU_MODEL=505
2778 +RTEMS_CPU_MODEL=mpc555
2779 +
2780 +# This is the actual bsp directory used during the build process.
2781 +RTEMS_BSP_FAMILY=ss555
2782 +
2783 +#  This contains the compiler options necessary to select the CPU model
2784 +#  and (hopefully) optimize for it.
2785 +#
2786 +CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL) -D$(RTEMS_BSP_FAMILY)
2787 +
2788 +# optimize flag: typically -O2
2789 +CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
2790 +
2791 +define bsp-post-link
2792 +       $(default-bsp-post-link)
2793 +       cp $(basename $@).exe $(basename $@)$(DOWNEXT) 
2794 +       $(STRIP) $(basename $@)$(DOWNEXT)
2795 +endef
2796 +
2797 +# Override default start file
2798 +START_BASE=
2799 +
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
2804 @@ -0,0 +1,58 @@
2805 +## Automatically generated by ampolish3 - Do not edit
2806 +
2807 +if AMPOLISH3
2808 +$(srcdir)/preinstall.am: Makefile.am
2809 +       $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
2810 +endif
2811 +
2812 +PREINSTALL_DIRS =
2813 +DISTCLEANFILES += $(PREINSTALL_DIRS)
2814 +
2815 +all-am: $(PREINSTALL_FILES)
2816 +
2817 +PREINSTALL_FILES =
2818 +CLEANFILES = $(PREINSTALL_FILES)
2819 +
2820 +$(PROJECT_LIB)/$(dirstamp):
2821 +       @$(MKDIR_P) $(PROJECT_LIB)
2822 +       @: > $(PROJECT_LIB)/$(dirstamp)
2823 +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
2824 +
2825 +$(PROJECT_INCLUDE)/$(dirstamp):
2826 +       @$(MKDIR_P) $(PROJECT_INCLUDE)
2827 +       @: > $(PROJECT_INCLUDE)/$(dirstamp)
2828 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
2829 +
2830 +$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
2831 +       $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
2832 +PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
2833 +
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
2837 +
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
2841 +
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
2845 +
2846 +$(PROJECT_INCLUDE)/bsp/$(dirstamp):
2847 +       @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
2848 +       @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2849 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2850 +
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
2854 +
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
2858 +
2859 +$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
2860 +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
2861 +PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
2862 +