+++ /dev/null
----
- configure | 3 ++-
- configure.ac | 3 ++-
- gcc/config/arm/rtems-elf.h | 1 -
- gcc/config/avr/t-rtems | 3 ++-
- gcc/config/mips/elf.h | 2 --
- gcc/config/rs6000/rtems.h | 12 +++++++++++-
- gcc/config/rs6000/t-rtems | 11 +++++++----
- 7 files changed, 24 insertions(+), 11 deletions(-)
-
-Index: gcc-4.3.4/configure
-===================================================================
---- gcc-4.3.4.orig/configure 2009-04-25 07:55:24.000000000 +0200
-+++ gcc-4.3.4/configure 2009-11-28 22:40:01.647590027 +0100
-@@ -2185,6 +2185,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -5831,7 +5832,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-Index: gcc-4.3.4/configure.ac
-===================================================================
---- gcc-4.3.4.orig/configure.ac 2009-04-25 07:55:24.000000000 +0200
-+++ gcc-4.3.4/configure.ac 2009-11-28 22:40:01.647590027 +0100
-@@ -462,6 +462,7 @@
- noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
- ;;
- *-*-rtems*)
-+ skipdirs="$skipdirs target-libiberty"
- noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
- ;;
- # The tpf target doesn't support gdb yet.
-@@ -2342,7 +2343,7 @@
- # to it. This is right: we don't want to search that directory
- # for binaries, but we want the header files in there, so add
- # them explicitly.
-- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
-+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include -isystem $$r/$(HOST_SUBDIR)/gcc/include-fixed'
-
- # Someone might think of using the pre-installed headers on
- # Canadian crosses, in case the installed compiler is not fully
-Index: gcc-4.3.4/gcc/config/arm/rtems-elf.h
-===================================================================
---- gcc-4.3.4.orig/gcc/config/arm/rtems-elf.h 2008-02-06 08:33:26.000000000 +0100
-+++ gcc-4.3.4/gcc/config/arm/rtems-elf.h 2009-11-28 22:40:01.647590027 +0100
-@@ -43,4 +43,3 @@
- * with how this used to be defined.
- */
- #undef LINK_GCC_C_SEQUENCE_SPEC
--#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
-Index: gcc-4.3.4/gcc/config/avr/t-rtems
-===================================================================
---- gcc-4.3.4.orig/gcc/config/avr/t-rtems 2004-11-23 04:44:03.000000000 +0100
-+++ gcc-4.3.4/gcc/config/avr/t-rtems 2009-11-28 22:40:01.647590027 +0100
-@@ -1,3 +1,4 @@
- # Multilibs for avr RTEMS targets.
-
--# ATM, this is just a stub
-+# RTEMS uses _exit from newlib
-+LIB1ASMFUNCS := $(filter-out _exit,$(LIB1ASMFUNCS))
-Index: gcc-4.3.4/gcc/config/mips/elf.h
-===================================================================
---- gcc-4.3.4.orig/gcc/config/mips/elf.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.3.4/gcc/config/mips/elf.h 2009-11-28 22:40:01.651569933 +0100
-@@ -48,6 +48,4 @@
- #undef ENDFILE_SPEC
- #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
-
--#define NO_IMPLICIT_EXTERN_C 1
--
- #define HANDLE_PRAGMA_PACK_PUSH_POP 1
-Index: gcc-4.3.4/gcc/config/rs6000/rtems.h
-===================================================================
---- gcc-4.3.4.orig/gcc/config/rs6000/rtems.h 2007-08-02 12:49:31.000000000 +0200
-+++ gcc-4.3.4/gcc/config/rs6000/rtems.h 2009-11-28 22:40:01.651569933 +0100
-@@ -49,8 +49,18 @@
- %{mcpu=604: %{!Dppc*: %{!Dmpc*: -Dmpc604} } } \
- %{mcpu=750: %{!Dppc*: %{!Dmpc*: -Dmpc750} } } \
- %{mcpu=821: %{!Dppc*: %{!Dmpc*: -Dmpc821} } } \
--%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } }"
-+%{mcpu=860: %{!Dppc*: %{!Dmpc*: -Dmpc860} } } \
-+%{mcpu=8540: %{!Dppc*: %{!Dmpc*: -Dppc8540} } }"
-
- #undef SUBSUBTARGET_EXTRA_SPECS
- #define SUBSUBTARGET_EXTRA_SPECS \
- { "cpp_os_rtems", CPP_OS_RTEMS_SPEC }
-+
-+#undef SUBSUBTARGET_OVERRIDE_OPTIONS
-+#define SUBSUBTARGET_OVERRIDE_OPTIONS \
-+ do { \
-+ if (TARGET_E500) \
-+ { \
-+ rs6000_float_gprs = 1; \
-+ } \
-+ } while(0)
-Index: gcc-4.3.4/gcc/config/rs6000/t-rtems
-===================================================================
---- gcc-4.3.4.orig/gcc/config/rs6000/t-rtems 2005-05-27 09:54:06.000000000 +0200
-+++ gcc-4.3.4/gcc/config/rs6000/t-rtems 2009-11-28 22:40:01.651569933 +0100
-@@ -1,17 +1,15 @@
- # Multilibs for powerpc RTEMS targets.
-
- MULTILIB_OPTIONS = \
--mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400 \
-+mcpu=403/mcpu=505/mcpu=601/mcpu=603e/mcpu=604/mcpu=860/mcpu=7400/mcpu=8540 \
- Dmpc8260 \
- msoft-float
-
- MULTILIB_DIRNAMES = \
--m403 m505 m601 m603e m604 m860 m7400 \
-+m403 m505 m601 m603e m604 m860 m7400 m8540 \
- mpc8260 \
- nof
-
--MULTILIB_EXTRA_OPTS = mrelocatable-lib mno-eabi mstrict-align
--
- # MULTILIB_MATCHES = ${MULTILIB_MATCHES_FLOAT}
- MULTILIB_MATCHES =
- MULTILIB_MATCHES += ${MULTILIB_MATCHES_ENDIAN}
-@@ -31,6 +29,10 @@
- # Map 750 to .
- MULTILIB_MATCHES += mcpu?750=
-
-+# Map e500, 8548 to 8540
-+MULTILIB_MATCHES += mcpu?8540=mcpu?e500
-+MULTILIB_MATCHES += mcpu?8540=mcpu?8548
-+
- # Soft-float only, default implies msoft-float
- # NOTE: Must match with MULTILIB_MATCHES_FLOAT and MULTILIB_MATCHES
- MULTILIB_SOFTFLOAT_ONLY = \
-@@ -64,3 +66,4 @@
- MULTILIB_EXCEPTIONS += *mcpu=750/Dmpc*
- MULTILIB_EXCEPTIONS += *mcpu=860/Dmpc*
- MULTILIB_EXCEPTIONS += *mcpu=7400/Dmpc*
-+MULTILIB_EXCEPTIONS += *mcpu=8540/Dmpc*
+++ /dev/null
-gcc-core-4.3.4-rtems4.9-20090825.diff
+++ /dev/null
-diff -Naur newlib-1.16.0.orig/newlib/ChangeLog.rtems newlib-1.16.0/newlib/ChangeLog.rtems
---- newlib-1.16.0.orig/newlib/ChangeLog.rtems 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.16.0/newlib/ChangeLog.rtems 2009-03-24 04:29:55.000000000 +0100
-@@ -0,0 +1,5 @@
-+2009-03-09 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * libc/machine/powerpc/times.c: Remove.
-+ * libc/machine/powerpc/Makefile.am: Remove times.c.
-+ * libc/machine/powerpc/Makefile.in: Regenerate.
-diff -Naur newlib-1.16.0.orig/newlib/configure.host newlib-1.16.0/newlib/configure.host
---- newlib-1.16.0.orig/newlib/configure.host 2007-11-07 22:42:24.000000000 +0100
-+++ newlib-1.16.0/newlib/configure.host 2009-03-24 04:29:55.000000000 +0100
-@@ -528,6 +528,7 @@
- # NOTE: When newlib malloc uses a semaphore, RTEMS will switch to that.
- *-*-rtems*)
- default_newlib_io_long_long="yes"
-+ default_newlib_io_c99_formats="yes"
- newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DMISSING_SYSCALL_NAMES -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_OPENDIR -DNO_EXEC -DHAVE_FCNTL"
- ;;
- # VxWorks supplies its own version of malloc, and the newlib one
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/getopt.h newlib-1.16.0/newlib/libc/include/getopt.h
---- newlib-1.16.0.orig/newlib/libc/include/getopt.h 2006-01-04 22:21:52.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/getopt.h 2009-03-24 04:29:55.000000000 +0100
-@@ -89,31 +89,40 @@
-
- /* include files needed by this include file */
-
--/* macros defined by this include file */
--#define NO_ARG 0
--#define REQUIRED_ARG 1
--#define OPTIONAL_ARG 2
--
--/* types defined by this include file */
--
--struct option
--{
-- char *name; /* the name of the long option */
-- int has_arg; /* one of the above macros */
-- int *flag; /* determines if getopt_long() returns a
-- * value for a long option; if it is
-- * non-NULL, 0 is returned as a function
-- * value and the value of val is stored in
-- * the area pointed to by flag. Otherwise,
-- * val is returned. */
-- int val; /* determines the value to return if flag is
-- * NULL. */
--};
-+ /* These #defines are to keep the namespace clear... */
-+#define getopt_r __getopt_r
-+#define getopt_long_r __getopt_long_r
-+#define getopt_long_only_r __getopt_long_only_r
-
- #ifdef __cplusplus
- extern "C"
- {
--#endif
-+
-+#endif /* __cplusplus */
-+
-+/* types defined by this include file */
-+ struct option
-+ {
-+ char *name; /* the name of the long option */
-+ int has_arg; /* one of the above macros */
-+ int *flag; /* determines if getopt_long() returns a
-+ * value for a long option; if it is
-+ * non-NULL, 0 is returned as a function
-+ * value and the value of val is stored in
-+ * the area pointed to by flag. Otherwise,
-+ * val is returned. */
-+ int val; /* determines the value to return if flag is
-+ * NULL. */
-+
-+ };
-+
-+ /* The getopt_data structure is for reentrancy. Its members are similar to
-+ the externally-defined variables. */
-+ typedef struct getopt_data
-+ {
-+ char *optarg;
-+ int optind, opterr, optopt, optwhere;
-+ } getopt_data;
-
- /* externally-defined variables */
- extern char *optarg;
-@@ -122,14 +131,35 @@
- extern int optopt;
-
- /* function prototypes */
-- int _EXFUN (getopt, (int __argc, char *const __argv[], const char *__optstring));
-- int _EXFUN (getopt_long, (int __argc, char *const __argv[], const char *__shortopts, const struct option *__longopts, int *__longind));
-- int _EXFUN (getopt_long_only, (int __argc, char *const __argv[], const char *__shortopts, const struct option *__longopts, int *__longind));
-+ int _EXFUN (getopt,
-+ (int __argc, char *const __argv[], const char *__optstring));
-+
-+ int _EXFUN (getopt_long,
-+ (int __argc, char *const __argv[], const char *__shortopts,
-+ const struct option * __longopts, int *__longind));
-+
-+ int _EXFUN (getopt_long_only,
-+ (int __argc, char *const __argv[], const char *__shortopts,
-+ const struct option * __longopts, int *__longind));
-+
-+ int _EXFUN (__getopt_r,
-+ (int __argc, char *const __argv[], const char *__optstring,
-+ struct getopt_data * __data));
-+
-+ int _EXFUN (__getopt_long_r,
-+ (int __argc, char *const __argv[], const char *__shortopts,
-+ const struct option * __longopts, int *__longind,
-+ struct getopt_data * __data));
-+
-+ int _EXFUN (__getopt_long_only_r,
-+ (int __argc, char *const __argv[], const char *__shortopts,
-+ const struct option * __longopts, int *__longind,
-+ struct getopt_data * __data));
-
- #ifdef __cplusplus
- };
-
--#endif
-+#endif /* __cplusplus */
-
- #endif /* GETOPT_H */
-
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/inttypes.h newlib-1.16.0/newlib/libc/include/inttypes.h
---- newlib-1.16.0.orig/newlib/libc/include/inttypes.h 2005-12-16 20:03:12.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/inttypes.h 2009-03-24 04:29:55.000000000 +0100
-@@ -242,9 +242,12 @@
- #define SCNxMAX __SCNMAX(x)
-
- /* ptr types */
--#if __have_longlong64
--#define __PRIPTR(x) __STRINGIFY(ll##x)
--#define __SCNPTR(x) __STRINGIFY(ll##x)
-+#if __ptrint_t_long_defined
-+#define __PRIPTR(x) __STRINGIFY(l##x)
-+#define __SCNPTR(x) __STRINGIFY(l##x)
-+#elif __ptrint_t_int_defined
-+#define __PRIPTR(x) __STRINGIFY(x)
-+#define __SCNPTR(x) __STRINGIFY(x)
- #elif __have_long64
- #define __PRIPTR(x) __STRINGIFY(l##x)
- #define __SCNPTR(x) __STRINGIFY(l##x)
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/machine/ieeefp.h newlib-1.16.0/newlib/libc/include/machine/ieeefp.h
---- newlib-1.16.0.orig/newlib/libc/include/machine/ieeefp.h 2007-11-07 22:42:24.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/machine/ieeefp.h 2009-03-24 04:29:55.000000000 +0100
-@@ -62,8 +62,12 @@
- # define __IEEE_BIG_ENDIAN
- # endif
- #else
--# define __IEEE_BIG_ENDIAN
- # ifdef __ARMEL__
-+# define __IEEE_LITTLE_ENDIAN
-+# else
-+# define __IEEE_BIG_ENDIAN
-+# endif
-+# ifdef __ARMWEL__
- # define __IEEE_BYTES_LITTLE_ENDIAN
- # endif
- #endif
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/machine/setjmp.h newlib-1.16.0/newlib/libc/include/machine/setjmp.h
---- newlib-1.16.0.orig/newlib/libc/include/machine/setjmp.h 2007-11-07 22:42:24.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/machine/setjmp.h 2009-03-24 04:29:55.000000000 +0100
-@@ -27,7 +27,7 @@
-
- /* necv70 was 9 as well. */
-
--#ifdef __mc68000__
-+#if defined(__m68k__) || defined(__mc68000__)
- /*
- * onsstack,sigmask,sp,pc,psl,d2-d7,a2-a6,
- * fp2-fp7 for 68881.
-@@ -268,6 +268,12 @@
- # define _CYGWIN_WORKING_SIGSETJMP
- #endif
-
-+#ifdef _POSIX_THREADS
-+#define __SIGMASK_FUNC pthread_sigmask
-+#else
-+#define __SIGMASK_FUNC sigprocmask
-+#endif
-+
- #if defined(__GNUC__)
-
- #define sigsetjmp(env, savemask) \
-@@ -275,7 +281,7 @@
- ({ \
- sigjmp_buf *_sjbuf = &(env); \
- ((*_sjbuf)[_SAVEMASK] = savemask,\
-- sigprocmask (SIG_SETMASK, 0, (sigset_t *)((*_sjbuf) + _SIGMASK)),\
-+ __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *)((*_sjbuf) + _SIGMASK)),\
- setjmp (*_sjbuf)); \
- })
-
-@@ -284,7 +290,7 @@
- ({ \
- sigjmp_buf *_sjbuf = &(env); \
- ((((*_sjbuf)[_SAVEMASK]) ? \
-- sigprocmask (SIG_SETMASK, (sigset_t *)((*_sjbuf) + _SIGMASK), 0)\
-+ __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *)((*_sjbuf) + _SIGMASK), 0)\
- : 0), \
- longjmp (*_sjbuf, val)); \
- })
-@@ -292,15 +298,21 @@
- #else /* !__GNUC__ */
-
- #define sigsetjmp(env, savemask) ((env)[_SAVEMASK] = savemask,\
-- sigprocmask (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\
-+ __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *) ((env) + _SIGMASK)),\
- setjmp (env))
-
- #define siglongjmp(env, val) ((((env)[_SAVEMASK])?\
-- sigprocmask (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 0):0),\
-+ __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *) ((env) + _SIGMASK), 0):0),\
- longjmp (env, val))
-
- #endif
-
-+/* POSIX _setjmp/_longjmp macros, maintained for XSI compatibility. These
-+ are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
-+ New applications should use sigsetjmp/siglongjmp instead. */
-+#define _setjmp(env) sigsetjmp ((env), 0)
-+#define _longjmp(env, val) siglongjmp ((env), (val))
-+
- #ifdef __cplusplus
- }
- #endif
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/pthread.h newlib-1.16.0/newlib/libc/include/pthread.h
---- newlib-1.16.0.orig/newlib/libc/include/pthread.h 2006-09-14 00:09:27.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/include/pthread.h 2009-03-24 04:29:55.000000000 +0100
-@@ -283,14 +283,6 @@
- int _EXFUN(pthread_getcpuclockid,
- (pthread_t __pthread_id, clockid_t *__clock_id));
-
--/* CPU-time Clock Thread Creation Attribute, P1003.4b/D8, p. 59 */
--
--int _EXFUN(pthread_attr_setcputime,
-- (pthread_attr_t *__attr, int __clock_allowed));
--
--int _EXFUN(pthread_attr_getcputime,
-- (pthread_attr_t *__attr, int *__clock_allowed));
--
- #endif /* defined(_POSIX_THREAD_CPUTIME) */
-
-
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/sched.h newlib-1.16.0/newlib/libc/include/sched.h
---- newlib-1.16.0.orig/newlib/libc/include/sched.h 2007-09-21 23:02:15.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/include/sched.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,14 +0,0 @@
--#ifndef _SCHED_H_
--#define _SCHED_H_
--
--#ifdef __cplusplus
--extern "C" {
--#endif
--
--#include <sys/sched.h>
--
--#ifdef __cplusplus
--}
--#endif
--
--#endif /* _SCHED_H_ */
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/stdint.h newlib-1.16.0/newlib/libc/include/stdint.h
---- newlib-1.16.0.orig/newlib/libc/include/stdint.h 2006-08-16 23:39:43.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/include/stdint.h 2009-03-24 04:29:55.000000000 +0100
-@@ -348,8 +348,7 @@
- #endif
-
- /* This must match size_t in stddef.h, currently long unsigned int */
--#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
--#define SIZE_MAX __STDINT_EXP(LONG_MAX)
-+#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
-
- /* This must match sig_atomic_t in <signal.h> (currently int) */
- #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
-@@ -393,6 +392,9 @@
- #define UINTMAX_C(x) x##UL
- #endif
-
-+#ifdef __rtems__
-+#include <machine/stdint.h>
-+#endif
-
- #ifdef __cplusplus
- }
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/sys/features.h newlib-1.16.0/newlib/libc/include/sys/features.h
---- newlib-1.16.0.orig/newlib/libc/include/sys/features.h 2007-12-19 19:51:19.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/sys/features.h 2009-03-24 04:29:55.000000000 +0100
-@@ -38,11 +38,12 @@
- #define _POSIX_MEMLOCK_RANGE 1
- #define _POSIX_MEMORY_PROTECTION 1
- #define _POSIX_MESSAGE_PASSING 1
-+#define _POSIX_MONOTONIC_CLOCK 200112L
- #define _POSIX_PRIORITIZED_IO 1
- #define _POSIX_PRIORITY_SCHEDULING 1
- #define _POSIX_REALTIME_SIGNALS 1
- #define _POSIX_SEMAPHORES 1
--#define _POSIX_SHARED_MEMORY_OBJECTS 1
-+/* #define _POSIX_SHARED_MEMORY_OBJECTS 1 */
- #define _POSIX_SYNCHRONIZED_IO 1
- #define _POSIX_TIMERS 1
- #define _POSIX_BARRIERS 200112L
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/sys/_types.h newlib-1.16.0/newlib/libc/include/sys/_types.h
---- newlib-1.16.0.orig/newlib/libc/include/sys/_types.h 2007-09-18 22:05:17.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/include/sys/_types.h 2009-03-24 04:29:55.000000000 +0100
-@@ -84,4 +84,7 @@
- typedef void *_iconv_t;
- #endif
-
-+typedef long * __intptr_t;
-+typedef unsigned long* __uintptr_t;
-+
- #endif /* _SYS__TYPES_H */
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/sys/unistd.h newlib-1.16.0/newlib/libc/include/sys/unistd.h
---- newlib-1.16.0.orig/newlib/libc/include/sys/unistd.h 2007-11-08 17:20:12.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/sys/unistd.h 2009-03-24 04:29:55.000000000 +0100
-@@ -157,7 +157,7 @@
- pid_t _EXFUN(tcgetpgrp, (int __fildes ));
- int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
- char _EXFUN(*ttyname, (int __fildes ));
--#if defined(__CYGWIN__)
-+#if defined(__CYGWIN__) || defined(__rtems__)
- int _EXFUN(ttyname_r, (int, char *, size_t));
- #endif
- int _EXFUN(unlink, (const char *__path ));
-@@ -219,13 +219,11 @@
- char * _EXFUN(mktemp, (char *));
- #endif
-
--#if defined(__CYGWIN__) || defined(__SPU__)
-+#if defined(__CYGWIN__) || defined(__SPU__) || defined(__rtems__)
- void _EXFUN(sync, (void));
--#elif defined(__rtems__)
--int _EXFUN(sync, (void));
- #endif
-
--int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
-+ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
- int _EXFUN(symlink, (const char *__name1, const char *__name2));
-
- #define F_OK 0
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/_syslist.h newlib-1.16.0/newlib/libc/include/_syslist.h
---- newlib-1.16.0.orig/newlib/libc/include/_syslist.h 2005-08-22 23:13:35.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/include/_syslist.h 2009-03-24 04:29:55.000000000 +0100
-@@ -11,6 +11,7 @@
- #define _fstat fstat
- #define _getpid getpid
- #define _gettimeofday gettimeofday
-+#define _isatty isatty
- #define _kill kill
- #define _link link
- #define _lseek lseek
-diff -Naur newlib-1.16.0.orig/newlib/libc/include/time.h newlib-1.16.0/newlib/libc/include/time.h
---- newlib-1.16.0.orig/newlib/libc/include/time.h 2005-11-18 16:57:24.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/include/time.h 2009-03-24 04:29:55.000000000 +0100
-@@ -226,6 +226,16 @@
-
- #endif
-
-+#if defined(_POSIX_MONOTONIC_CLOCK)
-+
-+/* The identifier for the system-wide monotonic clock, which is defined
-+ as a clock whose value cannot be set via clock_settime() and which
-+ cannot have backward clock jumps. */
-+
-+#define CLOCK_MONOTONIC (clockid_t)4
-+
-+#endif
-+
- #if defined(_POSIX_CPUTIME)
-
- /* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */
-diff -Naur newlib-1.16.0.orig/newlib/libc/machine/arm/machine/endian.h newlib-1.16.0/newlib/libc/machine/arm/machine/endian.h
---- newlib-1.16.0.orig/newlib/libc/machine/arm/machine/endian.h 2004-05-07 22:29:24.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/machine/arm/machine/endian.h 1970-01-01 01:00:00.000000000 +0100
-@@ -1,12 +0,0 @@
--/* ARM configuration file */
--
--#ifndef _MACHINE_ENDIAN_H
--# define _MACHINE_ENDIAN_H
--
--#ifdef __ARMEB__
--#define BYTE_ORDER BIG_ENDIAN
--#else
--#define BYTE_ORDER LITTLE_ENDIAN
--#endif
--
--#endif
-diff -Naur newlib-1.16.0.orig/newlib/libc/machine/powerpc/Makefile.am newlib-1.16.0/newlib/libc/machine/powerpc/Makefile.am
---- newlib-1.16.0.orig/newlib/libc/machine/powerpc/Makefile.am 2007-05-24 19:33:35.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/machine/powerpc/Makefile.am 2009-03-24 04:29:55.000000000 +0100
-@@ -10,7 +10,7 @@
-
- AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
-
--lib_a_SOURCES = setjmp.S times.c
-+lib_a_SOURCES = setjmp.S
- lib_a_CCASFLAGS=$(AM_CCASFLAGS)
- lib_a_CFLAGS=$(AM_CFLAGS)
- lib_a_LIBADD = @extra_objs@
-diff -Naur newlib-1.16.0.orig/newlib/libc/machine/powerpc/Makefile.in newlib-1.16.0/newlib/libc/machine/powerpc/Makefile.in
---- newlib-1.16.0.orig/newlib/libc/machine/powerpc/Makefile.in 2007-12-19 23:36:34.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/machine/powerpc/Makefile.in 2009-03-24 04:29:55.000000000 +0100
-@@ -39,8 +39,7 @@
- DIST_COMMON = $(srcdir)/../../../../config.guess \
- $(srcdir)/../../../../config.sub $(srcdir)/Makefile.in \
- $(srcdir)/Makefile.am $(top_srcdir)/configure \
-- $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs \
-- $(srcdir)/../../../../compile
-+ $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
- subdir = .
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
-@@ -54,7 +53,7 @@
- LIBRARIES = $(noinst_LIBRARIES)
- ARFLAGS = cru
- lib_a_AR = $(AR) $(ARFLAGS)
--am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-times.$(OBJEXT)
-+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT)
- lib_a_OBJECTS = $(am_lib_a_OBJECTS)
- DEFAULT_INCLUDES = -I. -I$(srcdir)
- depcomp =
-@@ -184,7 +183,7 @@
- AM_CCASFLAGS = $(INCLUDES)
- noinst_LIBRARIES = lib.a
- AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
--lib_a_SOURCES = setjmp.S times.c
-+lib_a_SOURCES = setjmp.S
- lib_a_CCASFLAGS = $(AM_CCASFLAGS)
- lib_a_CFLAGS = $(AM_CFLAGS)
- lib_a_LIBADD = @extra_objs@
-@@ -195,7 +194,7 @@
- all: all-am
-
- .SUFFIXES:
--.SUFFIXES: .S .c .o .obj
-+.SUFFIXES: .S .o .obj
- am--refresh:
- @:
- $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
-@@ -254,18 +253,6 @@
-
- lib_a-setjmp.obj: setjmp.S
- $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
--
--.c.o:
-- $(COMPILE) -c $<
--
--.c.obj:
-- $(COMPILE) -c `$(CYGPATH_W) '$<'`
--
--lib_a-times.o: times.c
-- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.o `test -f 'times.c' || echo '$(srcdir)/'`times.c
--
--lib_a-times.obj: times.c
-- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-times.obj `if test -f 'times.c'; then $(CYGPATH_W) 'times.c'; else $(CYGPATH_W) '$(srcdir)/times.c'; fi`
- uninstall-info-am:
-
- ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-diff -Naur newlib-1.16.0.orig/newlib/libc/machine/powerpc/times.c newlib-1.16.0/newlib/libc/machine/powerpc/times.c
---- newlib-1.16.0.orig/newlib/libc/machine/powerpc/times.c 2002-07-22 22:26:51.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/machine/powerpc/times.c 1970-01-01 01:00:00.000000000 +0100
-@@ -1,36 +0,0 @@
--/* Time support routines for PowerPC.
-- *
-- * Written by Aldy Hernandez.
-- */
--
--#include <_ansi.h>
--#include <reent.h>
--#include <sys/time.h>
--#include <sys/times.h>
--#include <sys/resource.h>
--
--clock_t
--times (struct tms *tp)
--{
-- struct rusage usage;
-- union {
-- struct rusage r;
-- /* Newlib's rusage has only 2 fields. We need to make room for
-- when we call the system's rusage. This should be enough. */
-- int filler[32];
-- } host_ru;
--
-- getrusage (RUSAGE_SELF, (void *)&host_ru);
--
-- if (tp)
-- {
-- tp->tms_utime = host_ru.r.ru_utime.tv_sec * 1000
-- + host_ru.r.ru_utime.tv_usec;
-- tp->tms_stime = host_ru.r.ru_stime.tv_sec * 1000
-- + host_ru.r.ru_stime.tv_usec;
-- tp->tms_cutime = 0; /* user time, children */
-- tp->tms_cstime = 0; /* system time, children */
-- }
--
-- return tp->tms_utime;
--}
-diff -Naur newlib-1.16.0.orig/newlib/libc/stdlib/getopt.c newlib-1.16.0/newlib/libc/stdlib/getopt.c
---- newlib-1.16.0.orig/newlib/libc/stdlib/getopt.c 2007-05-29 23:26:59.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/stdlib/getopt.c 2009-03-24 04:29:55.000000000 +0100
-@@ -90,6 +90,9 @@
- #include <getopt.h>
-
- /* macros */
-+#define NO_ARG 0
-+#define REQUIRED_ARG 1
-+#define OPTIONAL_ARG 2
-
- /* types */
- typedef enum GETOPT_ORDERING_T
-@@ -100,16 +103,19 @@
- } GETOPT_ORDERING_T;
-
- /* globally-defined variables */
--char *optarg = NULL;
-+char *optarg = 0;
- int optind = 0;
- int opterr = 1;
- int optopt = '?';
-
-+/* static variables */
-+static int optwhere = 0;
-+
- /* functions */
-
- /* reverse_argv_elements: reverses num elements starting at argv */
- static void
--reverse_argv_elements (char ** argv, int num)
-+reverse_argv_elements (char **argv, int num)
- {
- int i;
- char *tmp;
-@@ -126,281 +132,346 @@
- static void
- permute (char *const argv[], int len1, int len2)
- {
-- reverse_argv_elements ((char **)argv, len1);
-- reverse_argv_elements ((char **)argv, len1 + len2);
-- reverse_argv_elements ((char **)argv, len2);
-+ reverse_argv_elements ((char **) argv, len1);
-+ reverse_argv_elements ((char **) argv, len1 + len2);
-+ reverse_argv_elements ((char **) argv, len2);
- }
-
- /* is_option: is this argv-element an option or the end of the option list? */
- static int
- is_option (char *argv_element, int only)
- {
-- return ((argv_element == NULL)
-- || (argv_element[0] == '-') || (only && argv_element[0] == '+'));
-+ return ((argv_element == 0)
-+ || (argv_element[0] == '-') || (only && argv_element[0] == '+'));
-+}
-+
-+/* read_globals: read the values from the globals into a getopt_data
-+ structure */
-+static void
-+read_globals (struct getopt_data *data)
-+{
-+ data->optarg = optarg;
-+ data->optind = optind;
-+ data->opterr = opterr;
-+ data->optopt = optopt;
-+ data->optwhere = optwhere;
-+}
-+
-+/* write_globals: write the values into the globals from a getopt_data
-+ structure */
-+static void
-+write_globals (struct getopt_data *data)
-+{
-+ optarg = data->optarg;
-+ optind = data->optind;
-+ opterr = data->opterr;
-+ optopt = data->optopt;
-+ optwhere = data->optwhere;
- }
-
- /* getopt_internal: the function that does all the dirty work */
- static int
- getopt_internal (int argc, char *const argv[], const char *shortopts,
-- const struct option *longopts, int *longind, int only)
-+ const struct option *longopts, int *longind, int only,
-+ struct getopt_data *data)
- {
- GETOPT_ORDERING_T ordering = PERMUTE;
-- static size_t optwhere = 0;
- size_t permute_from = 0;
- int num_nonopts = 0;
- int optindex = 0;
- size_t match_chars = 0;
-- char *possible_arg = NULL;
-+ char *possible_arg = 0;
- int longopt_match = -1;
- int has_arg = -1;
-- char *cp = NULL;
-+ char *cp = 0;
- int arg_next = 0;
-
- /* first, deal with silly parameters and easy stuff */
-- if (argc == 0 || argv == NULL || (shortopts == NULL && longopts == NULL))
-- return EOF;
-- if (optind >= argc || argv[optind] == NULL)
-+ if (argc == 0 || argv == 0 || (shortopts == 0 && longopts == 0)
-+ || data->optind >= argc || argv[data->optind] == 0)
- return EOF;
-- if (strcmp (argv[optind], "--") == 0)
-+ if (strcmp (argv[data->optind], "--") == 0)
- {
-- optind++;
-+ data->optind++;
- return EOF;
- }
-+
- /* if this is our first time through */
-- if (optind == 0)
-- optind = optwhere = 1;
-+ if (data->optind == 0)
-+ data->optind = data->optwhere = 1;
-
- /* define ordering */
-- if (shortopts != NULL && (*shortopts == '-' || *shortopts == '+'))
-+ if (shortopts != 0 && (*shortopts == '-' || *shortopts == '+'))
- {
- ordering = (*shortopts == '-') ? RETURN_IN_ORDER : REQUIRE_ORDER;
- shortopts++;
- }
- else
-- ordering = (getenv ("POSIXLY_CORRECT") != NULL) ? REQUIRE_ORDER : PERMUTE;
-+ ordering = (getenv ("POSIXLY_CORRECT") != 0) ? REQUIRE_ORDER : PERMUTE;
-
- /*
- * based on ordering, find our next option, if we're at the beginning of
- * one
- */
-- if (optwhere == 1)
-+ if (data->optwhere == 1)
- {
- switch (ordering)
-- {
-- case PERMUTE:
-- permute_from = optind;
-- num_nonopts = 0;
-- while (!is_option (argv[optind], only))
-- {
-- optind++;
-- num_nonopts++;
-- }
-- if (argv[optind] == NULL)
-- {
-- /* no more options */
-- optind = permute_from;
-- return EOF;
-- }
-- else if (strcmp (argv[optind], "--") == 0)
-- {
-- /* no more options, but have to get `--' out of the way */
-- permute (argv + permute_from, num_nonopts, 1);
-- optind = permute_from + 1;
-- return EOF;
-- }
-- break;
-- case RETURN_IN_ORDER:
-- if (!is_option (argv[optind], only))
-- {
-- optarg = argv[optind++];
-- return (optopt = 1);
-- }
-- break;
-- case REQUIRE_ORDER:
-- if (!is_option (argv[optind], only))
-- return EOF;
-- break;
-- }
-+ {
-+ default: /* shouldn't happen */
-+ case PERMUTE:
-+ permute_from = data->optind;
-+ num_nonopts = 0;
-+ while (!is_option (argv[data->optind], only))
-+ {
-+ data->optind++;
-+ num_nonopts++;
-+ }
-+ if (argv[data->optind] == 0)
-+ {
-+ /* no more options */
-+ data->optind = permute_from;
-+ return EOF;
-+ }
-+ else if (strcmp (argv[data->optind], "--") == 0)
-+ {
-+ /* no more options, but have to get `--' out of the way */
-+ permute (argv + permute_from, num_nonopts, 1);
-+ data->optind = permute_from + 1;
-+ return EOF;
-+ }
-+ break;
-+ case RETURN_IN_ORDER:
-+ if (!is_option (argv[data->optind], only))
-+ {
-+ data->optarg = argv[data->optind++];
-+ return (data->optopt = 1);
-+ }
-+ break;
-+ case REQUIRE_ORDER:
-+ if (!is_option (argv[data->optind], only))
-+ return EOF;
-+ break;
-+ }
- }
- /* we've got an option, so parse it */
-
- /* first, is it a long option? */
-- if (longopts != NULL
-- && (memcmp (argv[optind], "--", 2) == 0
-- || (only && argv[optind][0] == '+')) && optwhere == 1)
-+ if (longopts != 0
-+ && (memcmp (argv[data->optind], "--", 2) == 0
-+ || (only && argv[data->optind][0] == '+')) && data->optwhere == 1)
- {
- /* handle long options */
-- if (memcmp (argv[optind], "--", 2) == 0)
-- optwhere = 2;
-+ if (memcmp (argv[data->optind], "--", 2) == 0)
-+ data->optwhere = 2;
- longopt_match = -1;
-- possible_arg = strchr (argv[optind] + optwhere, '=');
-- if (possible_arg == NULL)
-- {
-- /* no =, so next argv might be arg */
-- match_chars = strlen (argv[optind]);
-- possible_arg = argv[optind] + match_chars;
-- match_chars = match_chars - optwhere;
-- }
-+ possible_arg = strchr (argv[data->optind] + data->optwhere, '=');
-+ if (possible_arg == 0)
-+ {
-+ /* no =, so next argv might be arg */
-+ match_chars = strlen (argv[data->optind]);
-+ possible_arg = argv[data->optind] + match_chars;
-+ match_chars = match_chars - data->optwhere;
-+ }
- else
-- match_chars = (possible_arg - argv[optind]) - optwhere;
-- for (optindex = 0; longopts[optindex].name != NULL; optindex++)
-- {
-- if (memcmp (argv[optind] + optwhere,
-- longopts[optindex].name, match_chars) == 0)
-- {
-- /* do we have an exact match? */
-- if (match_chars == (int) (strlen (longopts[optindex].name)))
-- {
-- longopt_match = optindex;
-- break;
-- }
-- /* do any characters match? */
-- else
-- {
-- if (longopt_match < 0)
-- longopt_match = optindex;
-- else
-- {
-- /* we have ambiguous options */
-- if (opterr)
-- fprintf (stderr, "%s: option `%s' is ambiguous "
-- "(could be `--%s' or `--%s')\n",
-- argv[0],
-- argv[optind],
-- longopts[longopt_match].name,
-- longopts[optindex].name);
-- return (optopt = '?');
-- }
-- }
-- }
-- }
-+ match_chars = (possible_arg - argv[data->optind]) - data->optwhere;
-+ for (optindex = 0; longopts[optindex].name != 0; ++optindex)
-+ {
-+ if (memcmp
-+ (argv[data->optind] + data->optwhere, longopts[optindex].name,
-+ match_chars) == 0)
-+ {
-+ /* do we have an exact match? */
-+ if (match_chars == (int) (strlen (longopts[optindex].name)))
-+ {
-+ longopt_match = optindex;
-+ break;
-+ }
-+ /* do any characters match? */
-+ else
-+ {
-+ if (longopt_match < 0)
-+ longopt_match = optindex;
-+ else
-+ {
-+ /* we have ambiguous options */
-+ if (data->opterr)
-+ fprintf (stderr, "%s: option `%s' is ambiguous "
-+ "(could be `--%s' or `--%s')\n",
-+ argv[0],
-+ argv[data->optind],
-+ longopts[longopt_match].name,
-+ longopts[optindex].name);
-+ return (data->optopt = '?');
-+ }
-+ }
-+ }
-+ }
- if (longopt_match >= 0)
-- has_arg = longopts[longopt_match].has_arg;
-+ has_arg = longopts[longopt_match].has_arg;
- }
-+
- /* if we didn't find a long option, is it a short option? */
-- if (longopt_match < 0 && shortopts != NULL)
-+ if (longopt_match < 0 && shortopts != 0)
- {
-- cp = strchr (shortopts, argv[optind][optwhere]);
-- if (cp == NULL)
-- {
-- /* couldn't find option in shortopts */
-- if (opterr)
-- fprintf (stderr,
-- "%s: invalid option -- `-%c'\n",
-- argv[0], argv[optind][optwhere]);
-- optwhere++;
-- if (argv[optind][optwhere] == '\0')
-- {
-- optind++;
-- optwhere = 1;
-- }
-- return (optopt = '?');
-- }
-+ cp = strchr (shortopts, argv[data->optind][data->optwhere]);
-+ if (cp == 0)
-+ {
-+ /* couldn't find option in shortopts */
-+ if (data->opterr)
-+ fprintf (stderr,
-+ "%s: invalid option -- `-%c'\n",
-+ argv[0], argv[data->optind][data->optwhere]);
-+ data->optwhere++;
-+ if (argv[data->optind][data->optwhere] == '\0')
-+ {
-+ data->optind++;
-+ data->optwhere = 1;
-+ }
-+ return (data->optopt = '?');
-+ }
- has_arg = ((cp[1] == ':')
-- ? ((cp[2] == ':') ? OPTIONAL_ARG : REQUIRED_ARG) : NO_ARG);
-- possible_arg = argv[optind] + optwhere + 1;
-- optopt = *cp;
-+ ? ((cp[2] == ':') ? OPTIONAL_ARG : REQUIRED_ARG) : NO_ARG);
-+ possible_arg = argv[data->optind] + data->optwhere + 1;
-+ data->optopt = *cp;
- }
-- /* get argument and reset optwhere */
-+
-+ /* get argument and reset data->optwhere */
- arg_next = 0;
- switch (has_arg)
- {
- case OPTIONAL_ARG:
- if (*possible_arg == '=')
-- possible_arg++;
-- if (*possible_arg != '\0')
-- {
-- optarg = possible_arg;
-- optwhere = 1;
-- }
-- else
-- optarg = NULL;
-+ possible_arg++;
-+ data->optarg = (*possible_arg != '\0') ? possible_arg : 0;
-+ data->optwhere = 1;
- break;
- case REQUIRED_ARG:
- if (*possible_arg == '=')
-- possible_arg++;
-+ possible_arg++;
- if (*possible_arg != '\0')
-- {
-- optarg = possible_arg;
-- optwhere = 1;
-- }
-- else if (optind + 1 >= argc)
-- {
-- if (opterr)
-- {
-- fprintf (stderr, "%s: argument required for option `", argv[0]);
-- if (longopt_match >= 0)
-- fprintf (stderr, "--%s'\n", longopts[longopt_match].name);
-- else
-- fprintf (stderr, "-%c'\n", *cp);
-- }
-- optind++;
-- return (optopt = ':');
-- }
-+ {
-+ data->optarg = possible_arg;
-+ data->optwhere = 1;
-+ }
-+ else if (data->optind + 1 >= argc)
-+ {
-+ if (data->opterr)
-+ {
-+ fprintf (stderr, "%s: argument required for option `", argv[0]);
-+ if (longopt_match >= 0)
-+ fprintf (stderr, "--%s'\n", longopts[longopt_match].name);
-+ else
-+ fprintf (stderr, "-%c'\n", *cp);
-+ }
-+ data->optind++;
-+ return (data->optopt = ':');
-+ }
- else
-- {
-- optarg = argv[optind + 1];
-- arg_next = 1;
-- optwhere = 1;
-- }
-+ {
-+ data->optarg = argv[data->optind + 1];
-+ arg_next = 1;
-+ data->optwhere = 1;
-+ }
- break;
-+ default: /* shouldn't happen */
- case NO_ARG:
- if (longopt_match < 0)
-- {
-- optwhere++;
-- if (argv[optind][optwhere] == '\0')
-- optwhere = 1;
-- }
-+ {
-+ data->optwhere++;
-+ if (argv[data->optind][data->optwhere] == '\0')
-+ data->optwhere = 1;
-+ }
- else
-- optwhere = 1;
-- optarg = NULL;
-+ data->optwhere = 1;
-+ data->optarg = 0;
- break;
- }
-
-- /* do we have to permute or otherwise modify optind? */
-- if (ordering == PERMUTE && optwhere == 1 && num_nonopts != 0)
-+ /* do we have to permute or otherwise modify data->optind? */
-+ if (ordering == PERMUTE && data->optwhere == 1 && num_nonopts != 0)
- {
- permute (argv + permute_from, num_nonopts, 1 + arg_next);
-- optind = permute_from + 1 + arg_next;
-+ data->optind = permute_from + 1 + arg_next;
- }
-- else if (optwhere == 1)
-- optind = optind + 1 + arg_next;
-+ else if (data->optwhere == 1)
-+ data->optind = data->optind + 1 + arg_next;
-
- /* finally return */
- if (longopt_match >= 0)
- {
-- if (longind != NULL)
-- *longind = longopt_match;
-- if (longopts[longopt_match].flag != NULL)
-- {
-- *(longopts[longopt_match].flag) = longopts[longopt_match].val;
-- return 0;
-- }
-+ if (longind != 0)
-+ *longind = longopt_match;
-+ if (longopts[longopt_match].flag != 0)
-+ {
-+ *(longopts[longopt_match].flag) = longopts[longopt_match].val;
-+ return 0;
-+ }
- else
-- return longopts[longopt_match].val;
-+ return longopts[longopt_match].val;
- }
- else
-- return optopt;
-+ return data->optopt;
- }
-
- int
- getopt (int argc, char *const argv[], const char *optstring)
- {
-- return getopt_internal (argc, argv, optstring, NULL, NULL, 0);
-+ struct getopt_data data;
-+ int r;
-+
-+ read_globals (&data);
-+ r = getopt_internal (argc, argv, optstring, 0, 0, 0, &data);
-+ write_globals (&data);
-+ return r;
- }
-
- int
- getopt_long (int argc, char *const argv[], const char *shortopts,
-- const struct option *longopts, int *longind)
-+ const struct option *longopts, int *longind)
- {
-- return getopt_internal (argc, argv, shortopts, longopts, longind, 0);
-+ struct getopt_data data;
-+ int r;
-+
-+ read_globals (&data);
-+ r = getopt_internal (argc, argv, shortopts, longopts, longind, 0, &data);
-+ write_globals (&data);
-+ return r;
- }
-
- int
- getopt_long_only (int argc, char *const argv[], const char *shortopts,
-- const struct option *longopts, int *longind)
-+ const struct option *longopts, int *longind)
-+{
-+ struct getopt_data data;
-+ int r;
-+
-+ read_globals (&data);
-+ r = getopt_internal (argc, argv, shortopts, longopts, longind, 1, &data);
-+ write_globals (&data);
-+ return r;
-+}
-+
-+int
-+__getopt_r (int argc, char *const argv[], const char *optstring,
-+ struct getopt_data *data)
-+{
-+ return getopt_internal (argc, argv, optstring, 0, 0, 0, data);
-+}
-+
-+int
-+__getopt_long_r (int argc, char *const argv[], const char *shortopts,
-+ const struct option *longopts, int *longind,
-+ struct getopt_data *data)
-+{
-+ return getopt_internal (argc, argv, shortopts, longopts, longind, 0, data);
-+}
-+
-+int
-+__getopt_long_only_r (int argc, char *const argv[], const char *shortopts,
-+ const struct option *longopts, int *longind,
-+ struct getopt_data *data)
- {
-- return getopt_internal (argc, argv, shortopts, longopts, longind, 1);
-+ return getopt_internal (argc, argv, shortopts, longopts, longind, 1, data);
- }
-
- /* end of file GETOPT.C */
-diff -Naur newlib-1.16.0.orig/newlib/libc/sys/rtems/machine/stdint.h newlib-1.16.0/newlib/libc/sys/rtems/machine/stdint.h
---- newlib-1.16.0.orig/newlib/libc/sys/rtems/machine/stdint.h 1970-01-01 01:00:00.000000000 +0100
-+++ newlib-1.16.0/newlib/libc/sys/rtems/machine/stdint.h 2009-03-24 04:29:55.000000000 +0100
-@@ -0,0 +1,35 @@
-+/*
-+ *
-+ */
-+#ifndef _MACHINE_STDINT_H
-+#define _MACHINE_STDINT_H
-+
-+#ifndef _STDINT_H
-+#error machine/stdint.h is an internal file and must not be directly included
-+#endif
-+
-+#ifndef __rtems__
-+#error machine/stdint.h is an RTEMS specific internal file and must not be used otherwise
-+#endif
-+
-+#if defined(__sparc__) \
-+ || defined(__powerpc__) || defined(__PPC__) \
-+ || defined(__mips__) \
-+ || defined(__sh__) \
-+ || defined(__AVR__) \
-+ || defined(_C4x) || defined(_C3x) \
-+ || defined(__H8300__)
-+/* PTRDIFF_TYPE = int */
-+#define __ptrint_t_int_defined 1
-+#endif
-+
-+#if defined(__i386__) \
-+ || defined(__m68k__) \
-+ || defined(__bfin__) \
-+ || defined(__arm__) \
-+ || defined(__H8300S__) || defined(__H8300H__)
-+/* PTRDIFF_TYPE = long */
-+#define __ptrint_t_long_defined 1
-+#endif
-+
-+#endif
-diff -Naur newlib-1.16.0.orig/newlib/libc/sys/rtems/sys/param.h newlib-1.16.0/newlib/libc/sys/rtems/sys/param.h
---- newlib-1.16.0.orig/newlib/libc/sys/rtems/sys/param.h 2004-05-07 22:29:24.000000000 +0200
-+++ newlib-1.16.0/newlib/libc/sys/rtems/sys/param.h 2009-03-24 04:29:55.000000000 +0100
-@@ -93,7 +93,6 @@
- #include <sys/resource.h>
- #include <sys/ucred.h>
- #include <sys/uio.h>
--#include <sys/rtprio.h>
-
- #ifndef FALSE
- #define FALSE 0
-diff -Naur newlib-1.16.0.orig/newlib/Makefile.am newlib-1.16.0/newlib/Makefile.am
---- newlib-1.16.0.orig/newlib/Makefile.am 2007-05-24 19:33:29.000000000 +0200
-+++ newlib-1.16.0/newlib/Makefile.am 2009-03-24 04:29:55.000000000 +0100
-@@ -81,7 +81,7 @@
- libc.a
- endif
-
--noinst_DATA = stmp-targ-include
-+BUILT_SOURCES = stmp-targ-include
-
- toollib_DATA = $(CRT0) $(CRT1)
-
-@@ -186,9 +186,6 @@
-
- $(CRT1_DIR)$(CRT1): ; @true
-
--
--all-recursive: stmp-targ-include
--
- # The targ-include directory just holds the includes files for the
- # particular system and machine we have been configured for. It is
- # used while building.
-diff -Naur newlib-1.16.0.orig/newlib/Makefile.in newlib-1.16.0/newlib/Makefile.in
---- newlib-1.16.0.orig/newlib/Makefile.in 2007-12-19 23:36:26.000000000 +0100
-+++ newlib-1.16.0/newlib/Makefile.in 2009-03-24 04:29:55.000000000 +0100
-@@ -105,7 +105,7 @@
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
- toollibDATA_INSTALL = $(INSTALL_DATA)
--DATA = $(noinst_DATA) $(toollib_DATA)
-+DATA = $(toollib_DATA)
- ETAGS = etags
- CTAGS = ctags
- DEJATOOL = $(PACKAGE)
-@@ -339,7 +339,7 @@
- @USE_LIBTOOL_FALSE@toollib_LIBRARIES = libm.a \
- @USE_LIBTOOL_FALSE@ libc.a
-
--noinst_DATA = stmp-targ-include
-+BUILT_SOURCES = stmp-targ-include
- toollib_DATA = $(CRT0) $(CRT1)
-
- # The functions ldexp, frexp and modf are traditionally supplied in
-@@ -398,7 +398,7 @@
-
- # dejagnu support
- RUNTESTFLAGS =
--all: newlib.h
-+all: $(BUILT_SOURCES) newlib.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
- .SUFFIXES:
-@@ -703,14 +703,16 @@
- done
- check-am:
- $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
--check: check-recursive
-+check: $(BUILT_SOURCES)
-+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
- all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h
- installdirs: installdirs-recursive
- installdirs-am:
- for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
--install: install-recursive
-+install: $(BUILT_SOURCES)
-+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
- install-exec: install-exec-recursive
- install-data: install-data-recursive
- uninstall: uninstall-recursive
-@@ -735,6 +737,7 @@
- maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- clean: clean-recursive
-
- clean-am: clean-generic clean-libtool clean-toollibLIBRARIES \
-@@ -853,8 +856,6 @@
-
- $(CRT1_DIR)$(CRT1): ; @true
-
--all-recursive: stmp-targ-include
--
- # The targ-include directory just holds the includes files for the
- # particular system and machine we have been configured for. It is
- # used while building.
+++ /dev/null
-newlib-1.16.0-rtems4.9-20090324.diff
+++ /dev/null
-#Usage: configure [OPTIONS] [HOST]
-#
-#Options: [defaults in brackets]
-# --prefix=MYDIR install into MYDIR [/usr/local]
-# --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]
-# --help print this message [normal config]
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [determined via config.guess]
-# --norecursion configure this directory only [recurse]
-# --program-prefix=FOO prepend FOO to installed program names [""]
-# --program-suffix=FOO append FOO to installed program names [""]
-# --program-transform-name=P transform installed names by sed pattern P [""]
-# --site=SITE configure with site-specific makefile for SITE
-# --srcdir=DIR find the sources in DIR [. or ..]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]
-# --nfp configure for software floating point [hard float]
-# --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)
-# --without-FOO package FOO is NOT available
-# --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
-# --disable-FOO do not include feature FOO
-#
-#Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.
-#
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=no]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-targets alternative target configurations
-# --enable-commonbfdlib build shared BFD/opcodes/libiberty library
-# --with-mmap try using mmap for BFD input files if available
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=yes]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-targets alternative target configurations
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-
-# --target=i586-pc-linux-gnulibc1
-# --target=i586-mingw32
-# --target=m68k-coff
-# --target=m68k-linux-gnulibc1
-# --target=h8300-hitachi-coff
-# --target=tic30-ti-coff
-# --host=i586-pc-linux-gnulibc1
-
-#--host=i586-pc-linux-gnu \
-#--enable-targets=arm-rtems,arm-linux,arm-coff
-
-CFLAGS=-O2 LDFLAGS=-s \
-../../../binutils/configure \
---target=arm-rtems4.9 \
---with-gnu-ld --exec-prefix=/usr --prefix=/usr \
---verbose --disable-nls --disable-win32-registry --disable-werror \
---with-mmap --enable-64-bit-bfd \
-#i586-go32,
-#--ieee,
-#srec,symbolsrec,tekhex,binary,ihex,trad-core
+++ /dev/null
-Package: binutils-arm-rtems4.9
-Version: 2.20-1
-Architecture: amd64
-Source: binutils-2.20
-Section: cross-dev
-Priority: extra
-Maintainer: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-Priority: extra
-Description: binutils for target arm-rtems4.9
- .
- binutils targetting arm-rtems4.9
+++ /dev/null
-../../../cexp-1.4.beta/configure --target=arm-rtems --host=arm-rtems --prefix=/opt/rtems --disable-nlsg
\ No newline at end of file
+++ /dev/null
-Package: gcc-arm-rtems4.9
-Version: 4.3.4-1
-Architecture: amd64
-Source: gcc-4.3.4
-Section: cross-dev
-Priority: extra
-Maintainer: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-Priority: extra
-Description: GCC for target arm-rtems4.9
- .
- GNU GCC targetting arm-rtems4.9
+++ /dev/null
-# `configure' configures this package to adapt to many kinds of systems.
-#
-# Usage: ../../gcc/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/usr/local/bin', `/usr/local/lib' etc. You can specify
-# an installation prefix other than `/usr/local' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-generated-files-in-srcdir
-# put copies of generated files in source dir
-# intended for creating source tarballs for users
-# without texinfo bison or flex.
-# --enable-werror enable -Werror in bootstrap stage2 and later
-# --enable-checking=LIST
-# enable expensive run-time checks. With LIST,
-# enable only specific categories of checks.
-# Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
-# default is no checking
-# --enable-coverage=LEVEL
-# enable compiler\'s code coverage collection.
-# Use to measure compiler performance and locate
-# unused parts of the compiler. With LEVEL, specify
-# optimization. Values are opt, noopt,
-# default is noopt
-# --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
-# --enable-multilib enable library support for multiple ABIs
-# --enable-__cxa_atexit enable __cxa_atexit for C++
-# --enable-threads enable thread usage for target GCC
-# --enable-threads=LIB use LIB thread package for target GCC
-# --enable-objc-gc enable the use of Boehm's garbage collector with
-# the GNU Objective-C runtime
-# --disable-shared don't provide a shared libgcc
-# --enable-intermodule build the compiler in one step
-# --enable-initfini-array use .init_array/.fini_array sections
-# --enable-sjlj-exceptions
-# arrange to use setjmp/longjmp exception handling
-# --enable-libunwind-exceptions force use libunwind for exceptions
-# --disable-win32-registry
-# disable lookup of installation paths in the
-# Registry on Windows hosts
-# --enable-win32-registry enable registry lookup (default)
-# --enable-win32-registry=KEY
-# use KEY instead of GCC version as the last portion
-# of the registry key
-# --enable-maintainer-mode
-# enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-version-specific-runtime-libs
-# specify that runtime libraries should be
-# installed in a compiler-specific directory
-#
-# Optional Packages:
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --with-local-prefix=DIR specifies directory to put local include
-# --with-gxx-include-dir=DIR
-# specifies directory to put g++ header files
-# --with-cpp-install-dir=DIR
-# install the user visible C preprocessor in DIR
-# (relative to PREFIX) as well as PREFIX/bin
-# --with-gnu-ld arrange to work with GNU ld.
-# --with-ld arrange to use the specified ld (full pathname)
-# --with-gnu-as arrange to work with GNU as
-# --with-as arrange to use the specified as (full pathname)
-# --with-stabs arrange to use stabs instead of host debug format
-# --with-dwarf2 force the default debug format to be DWARF 2
-# --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
-# --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
-# --with-gc={simple,page,zone} choose the garbage collection mechanism to use
-# with the compiler
-# --with-system-zlib use installed libz
-# --with-slibdir=DIR shared libraries in DIR LIBDIR
-#
-# Some influential environment variables:
-# CC C compiler command
-# CFLAGS C compiler flags
-# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
-# nonstandard directory <lib dir>
-# CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
-# headers in a nonstandard directory <include dir>
-# CPP C preprocessor
-#
-# Use these variables to override the choices made by `configure' or to help
-# it to find libraries and programs with nonstandard names/locations.
-#
-# ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib
-# --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
-# --enable-threads=posix --disable-checking --enable-long-long
-# --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions
-# --enable-languages=c,c++,f77,objc,java --host=i586-mandrake-linux-gnu
-# --with-system-zlib
-# --with-sysroot=DIR --with-headers=DIR --without-headers --with-libs=``DIR1 DIR2 ... DIRN''
-#
-# ../gcc-3.4.0/configure --target=arm-linux --prefix=/usr/local/arm920/3.4.0 --host=i686-pc-linux-gnu --with-cpu=arm9 \
-# --with-headers=/usr/src/arm920/elroy-jack/sw/linux-2.6.6/include --disable-shared --disable-threads --enable-languages=c \
-# --with-float=soft --disable-nls --enable--symvers=gnu --enable-__cxa_atexit
-# make
-# make install
-#
-# ../glibc-2.3.2/configure --host=arm-linux --build=i686-pc-linux-gnu \
-# --with-headers=/usr/src/arm920/elroy-jack/sw/linux-2.6.6/include \
-# --enable-add-ons=linuxthreads --enable-shared --prefix=/usr/local/arm920/3.4.0 \
-# --with-cpu=arm9 --without-fp --enable-kernel=2.6.6
-# make
-# make install
-
-# --host=i586-pc-linux-gnu \
-
-../../../gcc/configure --target=arm-rtems4.9 --prefix=/usr \
- --with-cpu=arm9 \
- --enable-languages=c,c++ \
- --disable-libstdcxx-pch \
- --with-gnu-ld \
- --with-gnu-as \
- --with-float=soft \
- --enable-threads=rtems \
- --enable-target-optspace \
- --verbose \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --with-newlib \
- --enable-newlib-io-c99-formats \
- --enable-version-specific-runtime-libs
+++ /dev/null
-../../../rtems/configure --target=arm-rtems4.9 --prefix=/opt/rtems4.9 \
- --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
- --enable-rdbg --enable-maintainer-mode --disable-tests \
- --enable-networking --enable-posix --enable-itron --disable-ada \
- --disable-expada --disable-multilib --disable-docs \
- --enable-rtemsbsp=csb336
-
-# `configure' configures rtems 4.6.99.1 to adapt to many kinds of systems.
-#
-# Usage: ../rtems/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/opt/rtems-4.7]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/opt/rtems-4.7/bin', `/opt/rtems-4.7/lib' etc. You can specify
-# an installation prefix other than `/opt/rtems-4.7' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-multiprocessing
-# enable multiprocessing interface
-# --enable-posix enable posix interface
-# --enable-itron enable itron interface
-# --enable-networking enable TCP/IP stack
-# --enable-rdbg enable remote debugger
-# --enable-rtems-inlines enable RTEMS inline functions (default:enabled,
-# disable to use macros)
-# --enable-cxx enable C++ support and build the rtems++ library
-# --enable-tests enable tests (default:samples)
-# --enable-rtems-debug enable RTEMS_DEBUG
-# --enable-rtemsbsp="bsp1 bsp2 .."
-# BSPs to include in build
-# --enable-multilib build many library versions (default=no)
-# --enable-docs enable building documentation (default:disabled)
-# CC_FOR_BUILD
-# c-compiler to be used for build subdirs (default: auto-detected)
-# CFLAGS_FOR_BUILD
-# c-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CXX_FOR_BUILD
-# c++-compiler to be used for build subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_BUILD
-# c++-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CC_FOR_HOST c-compiler to be used for host subdirs (default: auto-detected)
-# CFLAGS_FOR_HOST
-# c-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CXX_FOR_HOST
-# c++-compiler to be used for host subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_HOST
-# c++-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CC_FOR_TARGET
-# c-compiler to be used for target subdirs (default:
-# auto-detected)
-# CFLAGS_FOR_TARGET
-# c-flags to be used for target subdirs (default: provided by
-# autoconf)
-# CXX_FOR_TARGET
-# c++-compiler to be used for target subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_TARGET
-# c++-flags to be used for target subdirs (default: provided by
-# autoconf)
-#
-# Report bugs to <rtems-bugs@rtems.com>.
-#
\ No newline at end of file
+++ /dev/null
-Package: rtems4.9-csb336
-Version: 4.9.3
-Architecture: all
-Source: rtems-4.9.3
-Section: cross-dev
-Priority: extra
-Maintainer: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-Priority: extra
-Description: RTEMS executive for target board CSB336/PiMX1 (arm-rtems)
- .
- RTEMS targetting board CSB336/PiMX1 (arm-rtems)
+++ /dev/null
-
-#!/bin/bash
-
-../../../bdm/m68k/configure \
- --prefix=/opt/m68k-rtems4.7 \
- --enable-bdmctrl \
- --with-libbfd=/opt/m68k-rtems4.7/lib/libbfd.a \
- --with-libiberty=/opt/m68k-rtems4.7/lib/libiberty.a \
- --with-bfd-include-dir=/opt/m68k-rtems4.7/include \
- --enable-driver \
- --enable-ioperm
-
-# `configure' configures m68k-bdm 1.3.2 to adapt to many kinds of systems.
-#
-# Usage: ../../../bdm/m68k/configure [OPTION]... [VAR=VALUE]...
-
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/usr/local/bin', `/usr/local/lib' etc. You can specify
-# an installation prefix other than `/usr/local' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
-# --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
-# --infodir=DIR info documentation [DATAROOTDIR/info]
-# --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
-# --mandir=DIR man documentation [DATAROOTDIR/man]
-# --docdir=DIR documentation root [DATAROOTDIR/doc/m68k-bdm]
-# --htmldir=DIR html documentation [DOCDIR]
-# --dvidir=DIR dvi documentation [DOCDIR]
-# --pdfdir=DIR pdf documentation [DOCDIR]
-# --psdir=DIR ps documentation [DOCDIR]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --disable-dependency-tracking speeds up one-time build
-# --enable-dependency-tracking do not reject slow dependency extractors
-# --enable-debug Turn on debug information (enabled)
-# --enable-remote Turn on the remote protocol (enabled)
-# --enable-ioperm Turn on direct ioperm hardware access (autodetected)
-# --enable-driver Turn on driver support (autodetected)
-# --enable-server Turn on server support (enabled)
-# --enable-bdmctrl Turn on bdmctrl support (disabled)
-# --enable-flashlib Turn on flashlib support (enabled)
-# --enable-bdmflash Build the bdmflash utility (enabled)
-# --enable-bdmmon Build the bdmmon utility (enabled)
-#
-# Optional Packages:
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --with-libbfd=FILE path to libbfd.a library to use
-# --with-libiberty=FILE path to libiberty.a library to use
-# --with-bfd-include-dir=DIR include path for correct bfd.h
-#
-# Some influential environment variables:
-# CC C compiler command
-# CFLAGS C compiler flags
-# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
-# nonstandard directory <lib dir>
-# CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
-# you have headers in a nonstandard directory <include dir>
-#
-# Use these variables to override the choices made by `configure' or to help
-# it to find libraries and programs with nonstandard names/locations.
-#
-# Report bugs to <bdm-devel@lists.sourceforge.net>.
-#
\ No newline at end of file
+++ /dev/null
-#Usage: configure [OPTIONS] [HOST]
-#
-#Options: [defaults in brackets]
-# --prefix=MYDIR install into MYDIR [/usr/local]
-# --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]
-# --help print this message [normal config]
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [determined via config.guess]
-# --norecursion configure this directory only [recurse]
-# --program-prefix=FOO prepend FOO to installed program names [""]
-# --program-suffix=FOO append FOO to installed program names [""]
-# --program-transform-name=P transform installed names by sed pattern P [""]
-# --site=SITE configure with site-specific makefile for SITE
-# --srcdir=DIR find the sources in DIR [. or ..]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]
-# --nfp configure for software floating point [hard float]
-# --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)
-# --without-FOO package FOO is NOT available
-# --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
-# --disable-FOO do not include feature FOO
-#
-#Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.
-#
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=no]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-targets alternative target configurations
-# --enable-commonbfdlib build shared BFD/opcodes/libiberty library
-# --with-mmap try using mmap for BFD input files if available
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=yes]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-targets alternative target configurations
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-
-# --target=i586-pc-linux-gnulibc1
-# --target=i586-mingw32
-# --target=m68k-coff
-# --target=m68k-linux-gnulibc1
-# --target=h8300-hitachi-coff
-# --target=tic30-ti-coff
-# --host=i586-pc-linux-gnulibc1
-CFLAGS=-O2 LDFLAGS=-s \
-../../../binutils/configure \
---host=i486-linux-gnu \
---target=m68k-rtems4.7 \
---with-gnu-ld --exec-prefix=/opt/m68k-rtems4.7 --prefix=/opt/m68k-rtems4.7 \
---verbose --with-mmap --enable-64-bit-bfd \
---enable-targets=m68k-linux-elf --disable-werror
-#i586-go32,
-#--ieee,
-#srec,symbolsrec,tekhex,binary,ihex,trad-core
+++ /dev/null
-# Usage: configure [options] [host]
-# Options: [defaults in brackets after descriptions]
-# Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-# Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-# Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-# --enable and --with options recognized:
-# --with-gnu-ld arrange to work with GNU ld.
-# --with-gnu-as arrange to work with GNU as.
-# --with-stabs arrange to use stabs instead of host debug format.
-# --with-elf arrange to use ELF instead of host debug format.
-# --with-local-prefix=DIR specifies directory to put local include.
-# --with-gxx-include-dir=DIR
-# specifies directory to put g++ header files.
-# --enable-checking enable expensive run-time checks.
-# --enable-c-cpplib Use cpplib for C.
-# --enable-haifa Use the experimental scheduler.
-# --disable-haifa Don't use the experimental scheduler for the
-# targets which normally enable it.
-# --with-fast-fixincludes Use a faster fixinclude program. Experimental
-# --enable-threads enable thread usage for target GCC.
-# --enable-threads=LIB use LIB thread package for target GCC.
-#
-
-# *-*-gnu*)
-# *-*-linux-gnu*)
-# *-*-sysv*)
-# *-*-sysv4*)
-# 1750a-*-*)
-# a29k-*-*) # Default a29k environment.
-# a29k-*-bsd* | a29k-*-sym1*)
-# a29k-*-udi | a29k-*-coff)
-# a29k-wrs-vxworks*)
-# alpha*-*-*)
-# alpha*-*-linux-gnu*)
-# alpha*-*-linux-gnuecoff*)
-# alpha*-*-linux-gnulibc1*)
-# alpha*-*-netbsd*)
-# alpha*-*-vxworks*)
-# alpha*-*-winnt*)
-# alpha*-dec-osf*)
-# alpha*-dec-vms*)
-# arc-*-elf*)
-# arm*-*-*)
-# arm*-*-netbsd*)
-# arm-*-aout)
-# arm-*-coff* | armel-*-coff*)
-# arm-*-linux-gnuaout*) # ARM GNU/Linux
-# arm-*-riscix*) # Acorn RISC machine
-# arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
-# arm-semi-aof | armel-semi-aof)
-# arm-semi-aout | armel-semi-aout)
-# c1-convex-*) # Convex C1
-# c2-convex-*) # Convex C2
-# c32-convex-*)
-# c34-convex-*)
-# c38-convex-*)
-# case $machine in
-# case $machine in
-# clipper-intergraph-clix*)
-# dsp16xx-*)
-# elxsi-elxsi-*)
-# esac
-# esac
-# esac
-# h8300-*-*)
-# hppa*-*-lites*)
-# hppa1.0-*-bsd*)
-# hppa1.0-*-hiux*)
-# hppa1.0-*-hpux*)
-# hppa1.0-*-hpux10*)
-# hppa1.0-*-hpux7*)
-# hppa1.0-*-hpux8*)
-# hppa1.0-*-hpux8.0[[0-2]]*)
-# hppa1.0-*-osf*)
-# hppa1.1-*-bsd*)
-# hppa1.1-*-hiux*)
-# hppa1.1-*-hpux*)
-# hppa1.1-*-hpux10*)
-# hppa1.1-*-hpux8*)
-# hppa1.1-*-hpux8.0[[0-2]]*)
-# hppa1.1-*-osf*)
-# hppa1.1-*-pro*)
-# hppa1.1-*-rtems*)
-# i370-*-mvs*)
-# i386-*-vsta) # Intel 80386's running VSTa kernel
-# i386-sun-sunos*) # Sun i386 roadrunner
-# i486-*-*)
-# i586-*-*)
-# i686-*-* | i786-*-*)
-# i860-*-bsd*)
-# i860-*-mach*)
-# i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
-# i860-*-sysv3*)
-# i860-*-sysv4*)
-# i860-alliant-*) # Alliant FX/2800
-# i960-*-*) # Default i960 environment.
-# i960-*-coff*)
-# i960-*-rtems)
-# i960-wrs-vxworks*)
-# i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
-# i960-wrs-vxworks5* | i960-wrs-vxworks)
-# i[[34567]]86-*-aout*)
-# i[[34567]]86-*-bsd*)
-# i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
-# i[[34567]]86-*-coff*)
-# i[[34567]]86-*-freebsd*)
-# i[[34567]]86-*-freebsdelf*)
-# i[[34567]]86-*-gnu*)
-# i[[34567]]86-*-isc*) # 80386 running ISC system
-# i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-lynxos*)
-# i[[34567]]86-*-mach*)
-# i[[34567]]86-*-mingw32*)
-# i[[34567]]86-*-netbsd*)
-# i[[34567]]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
-# i[[34567]]86-*-osfrose*) # 386 using OSF/rose
-# i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
-# i[[34567]]86-*-rtems*)
-# i[[34567]]86-*-rtemself*)
-# i[[34567]]86-*-sco*) # 80386 running SCO system
-# i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
-# i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
-# i[[34567]]86-*-solaris2*)
-# i[[34567]]86-*-sysv*) # Intel 80386's running system V
-# i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
-# i[[34567]]86-*-sysv5*) # Intel x86 on System V Release 5
-# i[[34567]]86-*-winnt3*)
-# i[[34567]]86-dg-dgux*)
-# i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
-# i[[34567]]86-go32-rtems*)
-# i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
-# i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
-# i[[34567]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
-# i[[34567]]86-next-*)
-# i[[34567]]86-pc-msdosdjgpp*)
-# i[[34567]]86-sequent-bsd*) # 80386 from Sequent
-# i[[34567]]86-sequent-ptx1*)
-# i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
-# i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
-# i[[34567]]86-wrs-vxworks*)
-# if [[ "$target_cpu_default2" != "" ]]
-# m32r-*-elf*)
-# m68000-att-sysv*)
-# m68000-convergent-sysv*)
-# m68000-hp-bsd*) # HP 9000/200 running BSD
-# m68000-hp-hpux*) # HP 9000 series 300
-# m68000-sun-sunos3*)
-# m68000-sun-sunos4*)
-# m68k*-*-netbsd*)
-# m68k-*-aout*)
-# m68k-*-coff*)
-# m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
-# m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
-# m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
-# m68k-*-lynxos*)
-# m68k-*-psos*)
-# m68k-*-rtems*)
-# m68k-*-sysv3*) # Motorola m68k's running system V.3
-# m68k-*-sysv4*) # Motorola m68k's running system V.4
-# m68k-altos-sysv*) # Altos 3068
-# m68k-apollo-*)
-# m68k-apple-aux*) # Apple Macintosh running A/UX
-# m68k-atari-sysv4*) # Atari variant of V.4.
-# m68k-bull-sysv*) # Bull DPX/2
-# m68k-cbm-sysv4*) # Commodore variant of V.4.
-# m68k-ccur-rtu)
-# m68k-crds-unos*)
-# m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
-# m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
-# m68k-hp-hpux*) # HP 9000 series 300
-# m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
-# m68k-isi-bsd*)
-# m68k-motorola-sysv*)
-# m68k-ncr-sysv*) # NCR Tower 32 SVR3
-# m68k-next-nextstep2*)
-# m68k-next-nextstep3*)
-# m68k-plexus-sysv*)
-# m68k-sony-bsd* | m68k-sony-newsos*)
-# m68k-sony-newsos3*)
-# m68k-sun-mach*)
-# m68k-sun-sunos*) # For SunOS 4 (the default).
-# m68k-sun-sunos3*)
-# m68k-tti-*)
-# m68k-wrs-vxworks*)
-# m88k-*-aout*)
-# m88k-*-coff*)
-# m88k-*-luna*)
-# m88k-*-sysv3*)
-# m88k-*-sysv4*)
-# m88k-dg-dgux*)
-# m88k-dolphin-sysv3*)
-# m88k-tektronix-sysv3)
-# mips*-*-*)
-# mips*-*-ecoff* | mips*-*-elf*)
-# mips-*-*) # Default MIPS RISC-OS 4.0.
-# mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
-# mips-*-ecoff*)
-# mips-*-elf*)
-# mips-*-gnu*)
-# mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
-# mips-*-riscos[[56789]]bsd*)
-# mips-*-riscos[[56789]]sysv*)
-# mips-*-riscos[[56789]]sysv4*)
-# mips-*-sysv* | mips-*-riscos*sysv*)
-# mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
-# mips-*-ultrix* | mips-dec-mach3) # Decstation.
-# mips-dec-bsd*) # Decstation running 4.4 BSD
-# mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
-# mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
-# mips-sgi-*) # Mostly like a MIPS.
-# mips-sgi-irix4*) # Mostly like a MIPS.
-# mips-sgi-irix4loser*) # Mostly like a MIPS.
-# mips-sgi-irix5*) # SGI System V.4., IRIX 5
-# mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
-# mips-sgi-irix6*) # SGI System V.4., IRIX 6
-# mips-sni-sysv4)
-# mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
-# mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
-# mips-tandem-sysv4*) # Tandem S2 running NonStop UX
-# mips-wrs-vxworks)
-# mips64-*-elf*)
-# mips64el-*-elf*)
-# mips64orion-*-elf*)
-# mips64orion-*-rtems*)
-# mips64orionel-*-elf*)
-# mipsel-*-ecoff*)
-# mipsel-*-elf*)
-# mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
-# mipstx39-*-elf*)
-# mipstx39el-*-elf*)
-# mn10200-*-*)
-# mn10300-*-*)
-# ns32k-*-netbsd*)
-# ns32k-encore-bsd*)
-# ns32k-merlin-*)
-# ns32k-pc532-mach*)
-# ns32k-pc532-minix*)
-# ns32k-sequent-bsd*)
-# ns32k-tek6100-bsd*)
-# ns32k-tek6200-bsd*)
-# pdp11-*-*)
-# pdp11-*-bsd)
-# powerpc*-*-* | rs6000-*-*)
-# powerpc-*-beos*)
-# powerpc-*-eabi*)
-# powerpc-*-eabiaix*)
-# powerpc-*-eabisim*)
-# powerpc-*-linux-gnu*)
-# powerpc-*-linux-gnulibc1)
-# powerpc-*-rtems*)
-# powerpc-*-sysv* | powerpc-*-elf*)
-# powerpc-wrs-vxworks*)
-# powerpcle-*-eabi*)
-# powerpcle-*-eabisim*)
-# powerpcle-*-pe | powerpcle-*-cygwin32)
-# powerpcle-*-solaris2*)
-# powerpcle-*-sysv* | powerpcle-*-elf*)
-# powerpcle-*-winnt* )
-# pyramid-*-*)
-# romp-*-aos*)
-# romp-*-mach*)
-# rs6000-*-lynxos*)
-# rs6000-*-mach*)
-# rs6000-bull-bosx)
-# rs6000-ibm-aix*)
-# rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
-# rs6000-ibm-aix3.[[01]]*)
-# rs6000-ibm-aix4.[[12]]* | powerpc-ibm-aix4.[[12]]*)
-# rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
-# rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
-# sh-*-*)
-# sh-*-elf*)
-# sh-*-rtems*)
-# sh-*-rtemself*)
-# sparc*-*-*)
-# sparc-*-aout*)
-# sparc-*-bsd*)
-# sparc-*-elf*)
-# sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
-# sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
-# sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
-# sparc-*-lynxos*)
-# sparc-*-netbsd*)
-# sparc-*-rtems*)
-# sparc-*-solaris2*)
-# sparc-*-sunos3*)
-# sparc-*-sunos4*)
-# sparc-*-sunos4.0*)
-# sparc-*-sysv4*)
-# sparc-*-vxsim*)
-# sparc-tti-*)
-# sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
-# sparc64-*-aout*)
-# sparc64-*-elf*)
-# sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
-# sparclet-*-aout*)
-# sparclite-*-aout*)
-# sparclite-*-coff*)
-# target_cpu_default2=
-# thumb-*-coff* | thumbel-*-coff*)
-# v850-*-*)
-# vax-*-*) # vax default entry
-# vax-*-bsd*) # vaxen running BSD
-# vax-*-netbsd*)
-# vax-*-sysv*) # vaxen running system V
-# vax-*-ultrix*) # vaxen running ultrix
-# vax-*-vms*) # vaxen running VMS
-# we32k-att-sysv*)
-
-# --target=m68k-linux-gnulibc1
-# --enable-version-specific-runtime-libs
-# --with-float=soft \
-
-../../../gcc/configure \
- --host=i486-linux-gnu \
- --target=m68k-rtems4.7 \
- --exec-prefix=/opt/m68k-rtems4.7 --prefix=/opt/m68k-rtems4.7 \
- --with-gnu-ld \
- --with-gnu-as \
- --with-newlib \
- --enable-languages=c,c++ \
- --enable-threads=rtems \
- --verbose
+++ /dev/null
-#!/bin/bash
-
-export CFLAGS="-I /opt/m68k-rtems4.7/include"
-export LDFLAGS="-L /opt/m68k-rtems4.7/lib"
-
-../../../gdb/configure \
- --target=m68k-bdm-elf \
- --prefix=/opt/m68k-rtems4.7
-
-# Usage: configure [options] [host]
-# Options: [defaults in brackets after descriptions]
-# Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --site-file=FILE use FILE as the site file
-# --version print the version of autoconf that created configure
-# Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-# Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-# --enable and --with options recognized:
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-# --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]
-# --disable-gdbcli disable command-line interface (CLI)
-# --disable-gdbmi disable machine-interface (MI)
-# --enable-tui enable full-screen terminal user interface (TUI)
-# --enable-gdbtk enable gdbtk graphical user interface (GUI)
-# --with-libunwind Use libunwind frame unwinding support
-# --enable-profiling enable profiling of GDB
-# --without-included-regex don't use included regex; this is the default
-# on systems with version 2 of the GNU C library
-# (use with caution on other system)
-# --with-sysroot[=DIR] Search for usr/lib et al within DIR.
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used
-# --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)
-# --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)
-# --with-tclinclude=DIR Directory where tcl private headers are
-# --with-tkinclude=DIR Directory where tk private headers are
-# --with-itclconfig Directory containing itcl configuration (itclConfig.sh)
-# --with-itkconfig Directory containing itk configuration (itkConfig.sh)
-# --with-x use the X Window System
-# --enable-sim Link gdb with simulator
-# --enable-multi-ice build the multi-ice-gdb-server
-# --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
-#
\ No newline at end of file
+++ /dev/null
-target bdm /dev/bdmcf0
-
-set remotecache off
-
-set $IPSBAR = 0x40000000
-
-set $DCR = $IPSBAR + 0x000040
-set $DACR0 = $IPSBAR + 0x000048
-set $DMR0 = $IPSBAR + 0x00004C
-
-set $CSAR0 = $IPSBAR + 0x000080
-set $CSMR0 = $IPSBAR + 0x000084
-set $CSCR0 = $IPSBAR + 0x00008A
-
-set $PAR_SDRAM = $IPSBAR + 0x100046
-set $PAR_AD = $IPSBAR + 0x100040
-
-set $WCR = $IPSBAR + 0x140000
-
-define delay
- set $delay = 0
- while ($delay < 20000)
- set $delay += 1
- end
-end
-
-define delay_memsync
- set $delay = 0
- while ($delay < 1000)
- set $delay += 1
- end
-end
-
-define setup-cs
- # 2MB FLASH on CS0 at 0x80000000
- set *(unsigned short *)$CSAR0 = 0x0000ffe0
- set *(unsigned long *)$CSMR0 = 0x001F0001
- set *(unsigned short *)$CSCR0 = 0x00001980
-end
-
-define setup-sdram
- # Set PAR_SDRAM to allow SDRAM signals to be enable
- set *(unsigned char *)$PAR_SDRAM = 0x3F
- # Set PAR_AD to allow 32-bit SDRAM if the external boot device is 16-bit
- set *(unsigned char *)$PAR_AD = 0xE1
-
- # SDRAM
- set *(unsigned short *)$DCR = 0x0446
- set *(unsigned long *)$DACR0 = 0x00001300
- set *(unsigned long *)$DMR0 = 0x00FC0001
-
- # Set IP in DACR and init precharge.
- set *(unsigned long *)$DACR0 |= 0x00000008
- set *(0x00000000) = 0xAA55AA55
- delay
-
- # Set RE in DACR
- set *(unsigned long *)$DACR0 |= 0x00008000
- # Issue IMRS
- set *(unsigned long *)$DACR0 |= 0x00000040
- set *(0x00000400) = 0xAA55AA55
- delay
-end
-
-define setup-other
- # Turn Off WCR
- set *(unsigned char *)$WCR = 0x00
-end
-
-define setup-board
- bdm-reset
-
- # Set VBR to the vector table.
- #set $vbr = 0x00000000
- # Set internal SRAM to start at 0x20000000
- #set $rambar = 0x20000001
-
- setup-other
- setup-cs
- setup-sdram
-end
-
-define debug-sramtest
- set $srambase = 0x20000000
- set $sramsize = 0x00010000
- set $j = 0
- printf "Testing SRAM : 0x%08X - 0x%08X\n", $srambase, ($srambase + $sramsize)
- set $i = $srambase
- while $i < ($srambase + $sramsize)
- set *(unsigned long *)($i) = 0xAA55AA55
- delay_memsync
- if 0xAA55AA55 != *(unsigned long *)$i
- printf " 0x%08X = FAIL\n", $i
- else
- printf " 0x%08X = OK", $i
- if $j % 4 == 3
- printf "\n"
- end
- set $j = $j + 1
- end
- set $i = $i + 0x400
- end
-end
-
-define debug-ramtest
- set $sdrambase = 0x00000000
- set $sdramsize = 0x01000000
- set $j = 0
- printf "Testing SDRAM : 0x%08X - 0x%08X\n", $sdrambase, ($sdrambase + $sdramsize)
- set $i = $sdrambase
- while $i < ($sdrambase + $sdramsize)
- set *(unsigned long *)($i) = 0xAA55AA55
- delay_memsync
- if 0xAA55AA55 != *(unsigned long *)$i
- printf " 0x%08X = FAIL\n", $i
- else
- printf " 0x%08X = OK", $i
- if $j % 4 == 3
- printf "\n"
- end
- set $j = $j + 1
- end
- set $i = $i + 0x10000
- end
- printf "\n"
-end
-
-define execute
- set $pc = *(long *)0x00000004
- tbreak main
- tk gdbtk_update
-end
-
-define debug-printexception
- printf "vector: %d", *(unsigned short *)$sp >> 2 &0x1F
- printf "old pc: 0x%08x", *(unsigned long *)($sp + 4)
- printf "old sr: 0x%02x", *(unsigned short *)($sp + 2)
-end
-
-define six
- si
- x /10i $pc
-end
-
-setup-board
\ No newline at end of file
+++ /dev/null
-../../../rtems/configure --target=m68k-rtems4.7 --prefix=/opt/m68k-rtems4.7 \
- --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
- --enable-rdbg --enable-maintainer-mode --enable-tests=yes \
- --enable-networking --enable-posix --enable-itron --disable-ada \
- --disable-expada --disable-multilib --disable-docs \
- --enable-rtemsbsp=mcf5235
-
-# --enable-rtems-debug \
-# `configure' configures rtems 4.6.99.1 to adapt to many kinds of systems.
-#
-# Usage: ../rtems/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/opt/rtems-4.7]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/opt/rtems-4.7/bin', `/opt/rtems-4.7/lib' etc. You can specify
-# an installation prefix other than `/opt/rtems-4.7' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-multiprocessing
-# enable multiprocessing interface
-# --enable-posix enable posix interface
-# --enable-itron enable itron interface
-# --enable-networking enable TCP/IP stack
-# --enable-rdbg enable remote debugger
-# --enable-rtems-inlines enable RTEMS inline functions (default:enabled,
-# disable to use macros)
-# --enable-cxx enable C++ support and build the rtems++ library
-# --enable-tests enable tests (default:samples)
-# --enable-rtems-debug enable RTEMS_DEBUG
-# --enable-rtemsbsp="bsp1 bsp2 .."
-# BSPs to include in build
-# --enable-multilib build many library versions (default=no)
-# --enable-docs enable building documentation (default:disabled)
-# CC_FOR_BUILD
-# c-compiler to be used for build subdirs (default: auto-detected)
-# CFLAGS_FOR_BUILD
-# c-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CXX_FOR_BUILD
-# c++-compiler to be used for build subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_BUILD
-# c++-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CC_FOR_HOST c-compiler to be used for host subdirs (default: auto-detected)
-# CFLAGS_FOR_HOST
-# c-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CXX_FOR_HOST
-# c++-compiler to be used for host subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_HOST
-# c++-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CC_FOR_TARGET
-# c-compiler to be used for target subdirs (default:
-# auto-detected)
-# CFLAGS_FOR_TARGET
-# c-flags to be used for target subdirs (default: provided by
-# autoconf)
-# CXX_FOR_TARGET
-# c++-compiler to be used for target subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_TARGET
-# c++-flags to be used for target subdirs (default: provided by
-# autoconf)
-#
-# Report bugs to <rtems-bugs@rtems.com>.
-#
+++ /dev/null
-#Usage: configure [OPTIONS] [HOST]
-#
-#Options: [defaults in brackets]
-# --prefix=MYDIR install into MYDIR [/usr/local]
-# --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]
-# --help print this message [normal config]
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [determined via config.guess]
-# --norecursion configure this directory only [recurse]
-# --program-prefix=FOO prepend FOO to installed program names [""]
-# --program-suffix=FOO append FOO to installed program names [""]
-# --program-transform-name=P transform installed names by sed pattern P [""]
-# --site=SITE configure with site-specific makefile for SITE
-# --srcdir=DIR find the sources in DIR [. or ..]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]
-# --nfp configure for software floating point [hard float]
-# --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)
-# --without-FOO package FOO is NOT available
-# --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
-# --disable-FOO do not include feature FOO
-#
-#Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.
-#
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=no]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-targets alternative target configurations
-# --enable-commonbfdlib build shared BFD/opcodes/libiberty library
-# --with-mmap try using mmap for BFD input files if available
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=yes]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-targets alternative target configurations
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-
-# --target=i586-pc-linux-gnulibc1
-# --target=i586-mingw32
-# --target=m68k-coff
-# --target=m68k-linux-gnulibc1
-# --target=h8300-hitachi-coff
-# --target=tic30-ti-coff
-# --host=i586-pc-linux-gnulibc1
-CFLAGS=-O2 LDFLAGS=-s \
-../../../binutils/configure \
---host=i586-pc-linux-gnu \
---target=m68k-rtems \
---with-gnu-ld --exec-prefix=/usr --prefix=/usr \
---enable-shared --enable-commonbfdlib --verbose \
---with-mmap --enable-64-bit-bfd \
---enable-targets=i586-pc-linux-gnu,i586-pc-linux-gnulibc1,\
-i386-coff,i586-msdosdjgpp\
-m68k-linux-elf,m68k-coff,m68k-a.out-linux,\
-powerpc-rtems,m68hc11-elf,m68hc12-elf,\
-h8300-coff,sh-coff,sh-rtemself,\
-sparc-linux-elf,i586-win-pe,tic30-ti-coff,tic30-ti-aout
-#i586-go32,
-#--ieee,
-#srec,symbolsrec,tekhex,binary,ihex,trad-core
+++ /dev/null
-# Usage: configure [options] [host]
-# Options: [defaults in brackets after descriptions]
-# Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-# Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-# Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-# --enable and --with options recognized:
-# --with-gnu-ld arrange to work with GNU ld.
-# --with-gnu-as arrange to work with GNU as.
-# --with-stabs arrange to use stabs instead of host debug format.
-# --with-elf arrange to use ELF instead of host debug format.
-# --with-local-prefix=DIR specifies directory to put local include.
-# --with-gxx-include-dir=DIR
-# specifies directory to put g++ header files.
-# --enable-checking enable expensive run-time checks.
-# --enable-c-cpplib Use cpplib for C.
-# --enable-haifa Use the experimental scheduler.
-# --disable-haifa Don't use the experimental scheduler for the
-# targets which normally enable it.
-# --with-fast-fixincludes Use a faster fixinclude program. Experimental
-# --enable-threads enable thread usage for target GCC.
-# --enable-threads=LIB use LIB thread package for target GCC.
-#
-
-# *-*-gnu*)
-# *-*-linux-gnu*)
-# *-*-sysv*)
-# *-*-sysv4*)
-# 1750a-*-*)
-# a29k-*-*) # Default a29k environment.
-# a29k-*-bsd* | a29k-*-sym1*)
-# a29k-*-udi | a29k-*-coff)
-# a29k-wrs-vxworks*)
-# alpha*-*-*)
-# alpha*-*-linux-gnu*)
-# alpha*-*-linux-gnuecoff*)
-# alpha*-*-linux-gnulibc1*)
-# alpha*-*-netbsd*)
-# alpha*-*-vxworks*)
-# alpha*-*-winnt*)
-# alpha*-dec-osf*)
-# alpha*-dec-vms*)
-# arc-*-elf*)
-# arm*-*-*)
-# arm*-*-netbsd*)
-# arm-*-aout)
-# arm-*-coff* | armel-*-coff*)
-# arm-*-linux-gnuaout*) # ARM GNU/Linux
-# arm-*-riscix*) # Acorn RISC machine
-# arm-*-riscix1.[[01]]*) # Acorn RISC machine (early versions)
-# arm-semi-aof | armel-semi-aof)
-# arm-semi-aout | armel-semi-aout)
-# c1-convex-*) # Convex C1
-# c2-convex-*) # Convex C2
-# c32-convex-*)
-# c34-convex-*)
-# c38-convex-*)
-# case $machine in
-# case $machine in
-# clipper-intergraph-clix*)
-# dsp16xx-*)
-# elxsi-elxsi-*)
-# esac
-# esac
-# esac
-# h8300-*-*)
-# hppa*-*-lites*)
-# hppa1.0-*-bsd*)
-# hppa1.0-*-hiux*)
-# hppa1.0-*-hpux*)
-# hppa1.0-*-hpux10*)
-# hppa1.0-*-hpux7*)
-# hppa1.0-*-hpux8*)
-# hppa1.0-*-hpux8.0[[0-2]]*)
-# hppa1.0-*-osf*)
-# hppa1.1-*-bsd*)
-# hppa1.1-*-hiux*)
-# hppa1.1-*-hpux*)
-# hppa1.1-*-hpux10*)
-# hppa1.1-*-hpux8*)
-# hppa1.1-*-hpux8.0[[0-2]]*)
-# hppa1.1-*-osf*)
-# hppa1.1-*-pro*)
-# hppa1.1-*-rtems*)
-# i370-*-mvs*)
-# i386-*-vsta) # Intel 80386's running VSTa kernel
-# i386-sun-sunos*) # Sun i386 roadrunner
-# i486-*-*)
-# i586-*-*)
-# i686-*-* | i786-*-*)
-# i860-*-bsd*)
-# i860-*-mach*)
-# i860-*-osf*) # Intel Paragon XP/S, OSF/1AD
-# i860-*-sysv3*)
-# i860-*-sysv4*)
-# i860-alliant-*) # Alliant FX/2800
-# i960-*-*) # Default i960 environment.
-# i960-*-coff*)
-# i960-*-rtems)
-# i960-wrs-vxworks*)
-# i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
-# i960-wrs-vxworks5* | i960-wrs-vxworks)
-# i[[34567]]86-*-aout*)
-# i[[34567]]86-*-bsd*)
-# i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
-# i[[34567]]86-*-coff*)
-# i[[34567]]86-*-freebsd*)
-# i[[34567]]86-*-freebsdelf*)
-# i[[34567]]86-*-gnu*)
-# i[[34567]]86-*-isc*) # 80386 running ISC system
-# i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnulibc1) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
-# i[[34567]]86-*-lynxos*)
-# i[[34567]]86-*-mach*)
-# i[[34567]]86-*-mingw32*)
-# i[[34567]]86-*-netbsd*)
-# i[[34567]]86-*-osf1*) # Intel 80386's running OSF/1 1.3+
-# i[[34567]]86-*-osfrose*) # 386 using OSF/rose
-# i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
-# i[[34567]]86-*-rtems*)
-# i[[34567]]86-*-rtemself*)
-# i[[34567]]86-*-sco*) # 80386 running SCO system
-# i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
-# i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
-# i[[34567]]86-*-solaris2*)
-# i[[34567]]86-*-sysv*) # Intel 80386's running system V
-# i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
-# i[[34567]]86-*-sysv5*) # Intel x86 on System V Release 5
-# i[[34567]]86-*-winnt3*)
-# i[[34567]]86-dg-dgux*)
-# i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
-# i[[34567]]86-go32-rtems*)
-# i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
-# i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
-# i[[34567]]86-ncr-sysv4*) # NCR 3000 - ix86 running system V.4
-# i[[34567]]86-next-*)
-# i[[34567]]86-pc-msdosdjgpp*)
-# i[[34567]]86-sequent-bsd*) # 80386 from Sequent
-# i[[34567]]86-sequent-ptx1*)
-# i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
-# i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
-# i[[34567]]86-wrs-vxworks*)
-# if [[ "$target_cpu_default2" != "" ]]
-# m32r-*-elf*)
-# m68000-att-sysv*)
-# m68000-convergent-sysv*)
-# m68000-hp-bsd*) # HP 9000/200 running BSD
-# m68000-hp-hpux*) # HP 9000 series 300
-# m68000-sun-sunos3*)
-# m68000-sun-sunos4*)
-# m68k*-*-netbsd*)
-# m68k-*-aout*)
-# m68k-*-coff*)
-# m68k-*-linux-gnu*) # Motorola m68k's running GNU/Linux
-# m68k-*-linux-gnuaout*) # Motorola m68k's running GNU/Linux
-# m68k-*-linux-gnulibc1) # Motorola m68k's running GNU/Linux
-# m68k-*-lynxos*)
-# m68k-*-psos*)
-# m68k-*-rtems*)
-# m68k-*-sysv3*) # Motorola m68k's running system V.3
-# m68k-*-sysv4*) # Motorola m68k's running system V.4
-# m68k-altos-sysv*) # Altos 3068
-# m68k-apollo-*)
-# m68k-apple-aux*) # Apple Macintosh running A/UX
-# m68k-atari-sysv4*) # Atari variant of V.4.
-# m68k-bull-sysv*) # Bull DPX/2
-# m68k-cbm-sysv4*) # Commodore variant of V.4.
-# m68k-ccur-rtu)
-# m68k-crds-unos*)
-# m68k-hp-bsd*) # HP 9000/3xx running Berkeley Unix
-# m68k-hp-bsd4.4*) # HP 9000/3xx running 4.4bsd
-# m68k-hp-hpux*) # HP 9000 series 300
-# m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7.
-# m68k-isi-bsd*)
-# m68k-motorola-sysv*)
-# m68k-ncr-sysv*) # NCR Tower 32 SVR3
-# m68k-next-nextstep2*)
-# m68k-next-nextstep3*)
-# m68k-plexus-sysv*)
-# m68k-sony-bsd* | m68k-sony-newsos*)
-# m68k-sony-newsos3*)
-# m68k-sun-mach*)
-# m68k-sun-sunos*) # For SunOS 4 (the default).
-# m68k-sun-sunos3*)
-# m68k-tti-*)
-# m68k-wrs-vxworks*)
-# m88k-*-aout*)
-# m88k-*-coff*)
-# m88k-*-luna*)
-# m88k-*-sysv3*)
-# m88k-*-sysv4*)
-# m88k-dg-dgux*)
-# m88k-dolphin-sysv3*)
-# m88k-tektronix-sysv3)
-# mips*-*-*)
-# mips*-*-ecoff* | mips*-*-elf*)
-# mips-*-*) # Default MIPS RISC-OS 4.0.
-# mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[[1234]]bsd*)
-# mips-*-ecoff*)
-# mips-*-elf*)
-# mips-*-gnu*)
-# mips-*-riscos[[56789]]*) # Default MIPS RISC-OS 5.0.
-# mips-*-riscos[[56789]]bsd*)
-# mips-*-riscos[[56789]]sysv*)
-# mips-*-riscos[[56789]]sysv4*)
-# mips-*-sysv* | mips-*-riscos*sysv*)
-# mips-*-sysv4* | mips-*-riscos[[1234]]sysv4* | mips-*-riscossysv4*)
-# mips-*-ultrix* | mips-dec-mach3) # Decstation.
-# mips-dec-bsd*) # Decstation running 4.4 BSD
-# mips-dec-osf*) # Decstation running OSF/1 as shipped by DIGITAL
-# mips-dec-osfrose*) # Decstation running OSF/1 reference port with OSF/rose.
-# mips-sgi-*) # Mostly like a MIPS.
-# mips-sgi-irix4*) # Mostly like a MIPS.
-# mips-sgi-irix4loser*) # Mostly like a MIPS.
-# mips-sgi-irix5*) # SGI System V.4., IRIX 5
-# mips-sgi-irix5cross64) # Irix5 host, Irix 6 target, cross64
-# mips-sgi-irix6*) # SGI System V.4., IRIX 6
-# mips-sni-sysv4)
-# mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
-# mips-sony-sysv*) # Sony NEWS 3800 with NEWSOS5.0.
-# mips-tandem-sysv4*) # Tandem S2 running NonStop UX
-# mips-wrs-vxworks)
-# mips64-*-elf*)
-# mips64el-*-elf*)
-# mips64orion-*-elf*)
-# mips64orion-*-rtems*)
-# mips64orionel-*-elf*)
-# mipsel-*-ecoff*)
-# mipsel-*-elf*)
-# mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD
-# mipstx39-*-elf*)
-# mipstx39el-*-elf*)
-# mn10200-*-*)
-# mn10300-*-*)
-# ns32k-*-netbsd*)
-# ns32k-encore-bsd*)
-# ns32k-merlin-*)
-# ns32k-pc532-mach*)
-# ns32k-pc532-minix*)
-# ns32k-sequent-bsd*)
-# ns32k-tek6100-bsd*)
-# ns32k-tek6200-bsd*)
-# pdp11-*-*)
-# pdp11-*-bsd)
-# powerpc*-*-* | rs6000-*-*)
-# powerpc-*-beos*)
-# powerpc-*-eabi*)
-# powerpc-*-eabiaix*)
-# powerpc-*-eabisim*)
-# powerpc-*-linux-gnu*)
-# powerpc-*-linux-gnulibc1)
-# powerpc-*-rtems*)
-# powerpc-*-sysv* | powerpc-*-elf*)
-# powerpc-wrs-vxworks*)
-# powerpcle-*-eabi*)
-# powerpcle-*-eabisim*)
-# powerpcle-*-pe | powerpcle-*-cygwin32)
-# powerpcle-*-solaris2*)
-# powerpcle-*-sysv* | powerpcle-*-elf*)
-# powerpcle-*-winnt* )
-# pyramid-*-*)
-# romp-*-aos*)
-# romp-*-mach*)
-# rs6000-*-lynxos*)
-# rs6000-*-mach*)
-# rs6000-bull-bosx)
-# rs6000-ibm-aix*)
-# rs6000-ibm-aix3.2.[[456789]]* | powerpc-ibm-aix3.2.[[456789]]*)
-# rs6000-ibm-aix3.[[01]]*)
-# rs6000-ibm-aix4.[[12]]* | powerpc-ibm-aix4.[[12]]*)
-# rs6000-ibm-aix4.[[3456789]].* | powerpc-ibm-aix4.[[3456789]].*)
-# rs6000-ibm-aix[[56789]].* | powerpc-ibm-aix[[56789]].*)
-# sh-*-*)
-# sh-*-elf*)
-# sh-*-rtems*)
-# sh-*-rtemself*)
-# sparc*-*-*)
-# sparc-*-aout*)
-# sparc-*-bsd*)
-# sparc-*-elf*)
-# sparc-*-linux-gnu*) # Sparc's running GNU/Linux, libc6
-# sparc-*-linux-gnuaout*) # Sparc's running GNU/Linux, a.out
-# sparc-*-linux-gnulibc1*) # Sparc's running GNU/Linux, libc5
-# sparc-*-lynxos*)
-# sparc-*-netbsd*)
-# sparc-*-rtems*)
-# sparc-*-solaris2*)
-# sparc-*-sunos3*)
-# sparc-*-sunos4*)
-# sparc-*-sunos4.0*)
-# sparc-*-sysv4*)
-# sparc-*-vxsim*)
-# sparc-tti-*)
-# sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
-# sparc64-*-aout*)
-# sparc64-*-elf*)
-# sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
-# sparclet-*-aout*)
-# sparclite-*-aout*)
-# sparclite-*-coff*)
-# target_cpu_default2=
-# thumb-*-coff* | thumbel-*-coff*)
-# v850-*-*)
-# vax-*-*) # vax default entry
-# vax-*-bsd*) # vaxen running BSD
-# vax-*-netbsd*)
-# vax-*-sysv*) # vaxen running system V
-# vax-*-ultrix*) # vaxen running ultrix
-# vax-*-vms*) # vaxen running VMS
-# we32k-att-sysv*)
-
-# --target=m68k-linux-gnulibc1
-# --enable-version-specific-runtime-libs
-# --with-float=soft \
-
-../../../gcc/configure --prefix=/usr \
- --target=m68k-rtems \
- --with-gnu-ld \
- --with-gnu-as \
- --with-newlib \
- --enable-languages=c,c++ \
- --enable-threads=rtems \
- --verbose \
- --disable-nls \
- --host=i586-pc-linux-gnu \
- --with-newlib
+++ /dev/null
-../../../rtems/configure --target=m68k-rtems --prefix=/opt/rtems \
- --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
- --enable-rdbg --enable-maintainer-mode --enable-tests=yes \
- --enable-networking --enable-posix --enable-itron --disable-ada \
- --disable-expada --disable-multilib --disable-docs \
- --enable-rtemsbsp=mo376
-
-# --enable-rtems-debug \
-# `configure' configures rtems 4.6.99.1 to adapt to many kinds of systems.
-#
-# Usage: ../rtems/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/opt/rtems-4.7]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/opt/rtems-4.7/bin', `/opt/rtems-4.7/lib' etc. You can specify
-# an installation prefix other than `/opt/rtems-4.7' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-multiprocessing
-# enable multiprocessing interface
-# --enable-posix enable posix interface
-# --enable-itron enable itron interface
-# --enable-networking enable TCP/IP stack
-# --enable-rdbg enable remote debugger
-# --enable-rtems-inlines enable RTEMS inline functions (default:enabled,
-# disable to use macros)
-# --enable-cxx enable C++ support and build the rtems++ library
-# --enable-tests enable tests (default:samples)
-# --enable-rtems-debug enable RTEMS_DEBUG
-# --enable-rtemsbsp="bsp1 bsp2 .."
-# BSPs to include in build
-# --enable-multilib build many library versions (default=no)
-# --enable-docs enable building documentation (default:disabled)
-# CC_FOR_BUILD
-# c-compiler to be used for build subdirs (default: auto-detected)
-# CFLAGS_FOR_BUILD
-# c-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CXX_FOR_BUILD
-# c++-compiler to be used for build subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_BUILD
-# c++-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CC_FOR_HOST c-compiler to be used for host subdirs (default: auto-detected)
-# CFLAGS_FOR_HOST
-# c-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CXX_FOR_HOST
-# c++-compiler to be used for host subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_HOST
-# c++-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CC_FOR_TARGET
-# c-compiler to be used for target subdirs (default:
-# auto-detected)
-# CFLAGS_FOR_TARGET
-# c-flags to be used for target subdirs (default: provided by
-# autoconf)
-# CXX_FOR_TARGET
-# c++-compiler to be used for target subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_TARGET
-# c++-flags to be used for target subdirs (default: provided by
-# autoconf)
-#
-# Report bugs to <rtems-bugs@rtems.com>.
-#
\ No newline at end of file
+++ /dev/null
-#Usage: configure [OPTIONS] [HOST]
-#
-#Options: [defaults in brackets]
-# --prefix=MYDIR install into MYDIR [/usr/local]
-# --exec-prefix=MYDIR install host-dependent files into MYDIR [/usr/local]
-# --help print this message [normal config]
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [determined via config.guess]
-# --norecursion configure this directory only [recurse]
-# --program-prefix=FOO prepend FOO to installed program names [""]
-# --program-suffix=FOO append FOO to installed program names [""]
-# --program-transform-name=P transform installed names by sed pattern P [""]
-# --site=SITE configure with site-specific makefile for SITE
-# --srcdir=DIR find the sources in DIR [. or ..]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-# --tmpdir=TMPDIR create temporary files in TMPDIR [/tmp]
-# --nfp configure for software floating point [hard float]
-# --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)
-# --without-FOO package FOO is NOT available
-# --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
-# --disable-FOO do not include feature FOO
-#
-#Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.
-#
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=no]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-targets alternative target configurations
-# --enable-commonbfdlib build shared BFD/opcodes/libiberty library
-# --with-mmap try using mmap for BFD input files if available
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-#Usage: configure [options] [host]
-#Options: [defaults in brackets after descriptions]
-#Configuration:
-# --cache-file=FILE cache test results in FILE
-# --help print this message
-# --no-create do not create output files
-# --quiet, --silent do not print `checking...' messages
-# --version print the version of autoconf that created configure
-#Directory and file names:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [same as prefix]
-# --bindir=DIR user executables in DIR [EPREFIX/bin]
-# --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
-# --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data in DIR
-# [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data in DIR
-# [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
-# --libdir=DIR object code libraries in DIR [EPREFIX/lib]
-# --includedir=DIR C header files in DIR [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
-# --infodir=DIR info documentation in DIR [PREFIX/info]
-# --mandir=DIR man documentation in DIR [PREFIX/man]
-# --srcdir=DIR find the sources in DIR [configure dir or ..]
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM
-# run sed PROGRAM on installed program names
-#Host type:
-# --build=BUILD configure for building on BUILD [BUILD=HOST]
-# --host=HOST configure for HOST [guessed]
-# --target=TARGET configure for TARGET [TARGET=HOST]
-#Features and packages:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --x-includes=DIR X include files are in DIR
-# --x-libraries=DIR X library files are in DIR
-#--enable and --with options recognized:
-# --enable-shared[=PKGS] build shared libraries [default=yes]
-# --enable-static[=PKGS] build static libraries [default=yes]
-# --enable-fast-install[=PKGS] optimize for fast installation [default=yes]
-# --with-gnu-ld assume the C compiler uses GNU ld [default=no]
-# --disable-libtool-lock avoid locking (might break parallel builds)
-# --with-pic try to use only PIC/non-PIC objects [default=use both]
-# --enable-targets alternative target configurations
-# --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
-# --enable-build-warnings Enable build-time compiler warnings if gcc is used
-# --disable-nls do not use Native Language Support
-# --with-included-gettext use the GNU gettext library included here
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-
-# --target=i586-pc-linux-gnulibc1
-# --target=i586-mingw32
-# --target=m68k-coff
-# --target=m68k-linux-gnulibc1
-# --target=h8300-hitachi-coff
-# --target=tic30-ti-coff
-# --host=i586-pc-linux-gnulibc1
-
-#--host=i586-pc-linux-gnu \
-#--enable-targets=arm-rtems,arm-linux,arm-coff
-
-CFLAGS=-O2 LDFLAGS=-s \
-../../../binutils/configure \
---target=powerpc-rtems4.9 \
---with-gnu-ld --exec-prefix=/usr --prefix=/usr \
---verbose --disable-nls --disable-win32-registry --disable-werror \
---with-mmap --enable-64-bit-bfd \
-
-#--enable-shared --enable-commonbfdlib --verbose \
-#--enable-targets=i586-pc-linux-gnu,i586-pc-linux-gnulibc1,\
-#i386-coff,i586-msdosdjgpp,\
-#m68k-linux-elf,m68k-rtems,m68k-coff,m68k-a.out-linux,\
-#powerpc-rtems,powerpc-linux,m68hc11-elf,m68hc12-elf,\
-#h8300-coff,h8300-elf,sh-coff,sh-rtemself,sh64-linux,\
-#or32-elf,openrisc-elf,alpha-linux-gnu,\
-#ia64-linux-gnu,x86_64-linux-gnu,\
-#arm-rtems,arm-linux,arm-pe,arm-coff,avr-elf,\
-#sparc-linux-elf,i586-win-pe,\
-#tic30-ti-coff,tic30-ti-aout,tic4x-ti-coff,tic54x-ti-coff,msp430
-#i586-go32,
-#--ieee,
-#srec,symbolsrec,tekhex,binary,ihex,trad-core
+++ /dev/null
-# `configure' configures this package to adapt to many kinds of systems.
-#
-# Usage: ../../gcc/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/usr/local]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/usr/local/bin', `/usr/local/lib' etc. You can specify
-# an installation prefix other than `/usr/local' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-generated-files-in-srcdir
-# put copies of generated files in source dir
-# intended for creating source tarballs for users
-# without texinfo bison or flex.
-# --enable-werror enable -Werror in bootstrap stage2 and later
-# --enable-checking=LIST
-# enable expensive run-time checks. With LIST,
-# enable only specific categories of checks.
-# Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold;
-# default is no checking
-# --enable-coverage=LEVEL
-# enable compiler\'s code coverage collection.
-# Use to measure compiler performance and locate
-# unused parts of the compiler. With LEVEL, specify
-# optimization. Values are opt, noopt,
-# default is noopt
-# --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering
-# --enable-multilib enable library support for multiple ABIs
-# --enable-__cxa_atexit enable __cxa_atexit for C++
-# --enable-threads enable thread usage for target GCC
-# --enable-threads=LIB use LIB thread package for target GCC
-# --enable-objc-gc enable the use of Boehm's garbage collector with
-# the GNU Objective-C runtime
-# --disable-shared don't provide a shared libgcc
-# --enable-intermodule build the compiler in one step
-# --enable-initfini-array use .init_array/.fini_array sections
-# --enable-sjlj-exceptions
-# arrange to use setjmp/longjmp exception handling
-# --enable-libunwind-exceptions force use libunwind for exceptions
-# --disable-win32-registry
-# disable lookup of installation paths in the
-# Registry on Windows hosts
-# --enable-win32-registry enable registry lookup (default)
-# --enable-win32-registry=KEY
-# use KEY instead of GCC version as the last portion
-# of the registry key
-# --enable-maintainer-mode
-# enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-version-specific-runtime-libs
-# specify that runtime libraries should be
-# installed in a compiler-specific directory
-#
-# Optional Packages:
-# --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-# --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-# --with-local-prefix=DIR specifies directory to put local include
-# --with-gxx-include-dir=DIR
-# specifies directory to put g++ header files
-# --with-cpp-install-dir=DIR
-# install the user visible C preprocessor in DIR
-# (relative to PREFIX) as well as PREFIX/bin
-# --with-gnu-ld arrange to work with GNU ld.
-# --with-ld arrange to use the specified ld (full pathname)
-# --with-gnu-as arrange to work with GNU as
-# --with-as arrange to use the specified as (full pathname)
-# --with-stabs arrange to use stabs instead of host debug format
-# --with-dwarf2 force the default debug format to be DWARF 2
-# --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR.
-# --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
-# --with-gc={simple,page,zone} choose the garbage collection mechanism to use
-# with the compiler
-# --with-system-zlib use installed libz
-# --with-slibdir=DIR shared libraries in DIR LIBDIR
-#
-# Some influential environment variables:
-# CC C compiler command
-# CFLAGS C compiler flags
-# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
-# nonstandard directory <lib dir>
-# CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
-# headers in a nonstandard directory <include dir>
-# CPP C preprocessor
-#
-# Use these variables to override the choices made by `configure' or to help
-# it to find libraries and programs with nonstandard names/locations.
-#
-# ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib
-# --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
-# --enable-threads=posix --disable-checking --enable-long-long
-# --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions
-# --enable-languages=c,c++,f77,objc,java --host=i586-mandrake-linux-gnu
-# --with-system-zlib
-# --with-sysroot=DIR --with-headers=DIR --without-headers --with-libs=``DIR1 DIR2 ... DIRN''
-#
-# ../gcc-3.4.0/configure --target=arm-linux --prefix=/usr/local/arm920/3.4.0 --host=i686-pc-linux-gnu --with-cpu=arm9 \
-# --with-headers=/usr/src/arm920/elroy-jack/sw/linux-2.6.6/include --disable-shared --disable-threads --enable-languages=c \
-# --with-float=soft --disable-nls --enable--symvers=gnu --enable-__cxa_atexit
-# make
-# make install
-#
-# ../glibc-2.3.2/configure --host=arm-linux --build=i686-pc-linux-gnu \
-# --with-headers=/usr/src/arm920/elroy-jack/sw/linux-2.6.6/include \
-# --enable-add-ons=linuxthreads --enable-shared --prefix=/usr/local/arm920/3.4.0 \
-# --with-cpu=arm9 --without-fp --enable-kernel=2.6.6
-# --with-cpu=405
-# make
-# make install
-
-# --host=i586-pc-linux-gnu \
-
-../../../gcc/configure --target=powerpc-rtems4.9 --prefix=/usr \
- --enable-languages=c,c++ \
- --disable-libstdcxx-pch \
- --with-gnu-ld \
- --with-gnu-as \
- --with-float=soft \
- --enable-threads=rtems \
- --enable-target-optspace \
- --verbose \
- --disable-nls --without-included-gettext \
- --disable-win32-registry \
- --with-newlib \
- --enable-newlib-io-c99-formats \
- --enable-version-specific-runtime-libs
+++ /dev/null
-#!/bin/sh
-
-OBJCOPY_FOR_TARGET=powerpc-rtems4.9-objcopy
-OBJCOPY="$OBJCOPY_FOR_TARGET"
-
-EXE_NAME=$1
-
-START_ADDR=0x00010000
-
-${OBJCOPY} -R -S -O binary "$EXE_NAME" "$EXE_NAME.bin" || exit 1
-cat "$EXE_NAME.bin" | gzip -9 >"$EXE_NAME.gz"
-mkimage \
- -A ppc -O rtems -T kernel -a $START_ADDR -e $START_ADDR -n "RTEMS" \
- -d "$EXE_NAME.gz" "$EXE_NAME.img"
+++ /dev/null
-../../../rtems/configure --target=powerpc-rtems4.9 --prefix=/opt/rtems4.9 \
- --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
- --enable-rdbg --enable-maintainer-mode --disable-tests \
- --enable-networking --enable-posix --enable-itron --disable-ada \
- --disable-expada --disable-multilib --disable-docs --verbose \
- --enable-rtemsbsp="icecube"
-
-# `configure' configures rtems 4.6.99.1 to adapt to many kinds of systems.
-#
-# Usage: ../rtems/configure [OPTION]... [VAR=VALUE]...
-#
-# To assign environment variables (e.g., CC, CFLAGS...), specify them as
-# VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-# Defaults for the options are specified in brackets.
-#
-# Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-# Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/opt/rtems-4.7]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-# By default, `make install' will install all the files in
-# `/opt/rtems-4.7/bin', `/opt/rtems-4.7/lib' etc. You can specify
-# an installation prefix other than `/opt/rtems-4.7' using `--prefix',
-# for instance `--prefix=$HOME'.
-#
-# For better control, use the options below.
-#
-# Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-# Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-# System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-# Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-multiprocessing
-# enable multiprocessing interface
-# --enable-posix enable posix interface
-# --enable-itron enable itron interface
-# --enable-networking enable TCP/IP stack
-# --enable-rdbg enable remote debugger
-# --enable-rtems-inlines enable RTEMS inline functions (default:enabled,
-# disable to use macros)
-# --enable-cxx enable C++ support and build the rtems++ library
-# --enable-tests enable tests (default:samples)
-# --enable-rtems-debug enable RTEMS_DEBUG
-# --enable-rtemsbsp="bsp1 bsp2 .."
-# BSPs to include in build
-# --enable-multilib build many library versions (default=no)
-# --enable-docs enable building documentation (default:disabled)
-# CC_FOR_BUILD
-# c-compiler to be used for build subdirs (default: auto-detected)
-# CFLAGS_FOR_BUILD
-# c-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CXX_FOR_BUILD
-# c++-compiler to be used for build subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_BUILD
-# c++-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CC_FOR_HOST c-compiler to be used for host subdirs (default: auto-detected)
-# CFLAGS_FOR_HOST
-# c-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CXX_FOR_HOST
-# c++-compiler to be used for host subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_HOST
-# c++-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CC_FOR_TARGET
-# c-compiler to be used for target subdirs (default:
-# auto-detected)
-# CFLAGS_FOR_TARGET
-# c-flags to be used for target subdirs (default: provided by
-# autoconf)
-# CXX_FOR_TARGET
-# c++-compiler to be used for target subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_TARGET
-# c++-flags to be used for target subdirs (default: provided by
-# autoconf)
-#
-# Report bugs to <rtems-bugs@rtems.com>.
-#
\ No newline at end of file
+++ /dev/null
-mw f0000b00 ${psc_cfg}
-dhcp
-#set serverip 192.168.202.251
-tftp 1000000 appfoo.img
-bootm
+++ /dev/null
-../../../rtems/configure --target=powerpc-rtems --prefix=/opt/rtems \
- --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
- --enable-rdbg --enable-maintainer-mode --enable-tests=yes \
- --enable-networking --enable-posix --enable-itron --disable-ada \
- --disable-expada --disable-multilib --disable-docs \
- --enable-rtemsbsp="ec555"
-
-# --enable-rtemsbsp="ss555"
-
-#`configure' configures rtems 4.6.99.1 to adapt to many kinds of systems.
-#
-#Usage: ../rtems/configure [OPTION]... [VAR=VALUE]...
-#
-#To assign environment variables (e.g., CC, CFLAGS...), specify them as
-#VAR=VALUE. See below for descriptions of some of the useful variables.
-#
-#Defaults for the options are specified in brackets.
-#
-#Configuration:
-# -h, --help display this help and exit
-# --help=short display options specific to this package
-# --help=recursive display the short help of all the included packages
-# -V, --version display version information and exit
-# -q, --quiet, --silent do not print `checking...' messages
-# --cache-file=FILE cache test results in FILE [disabled]
-# -C, --config-cache alias for `--cache-file=config.cache'
-# -n, --no-create do not create output files
-# --srcdir=DIR find the sources in DIR [configure dir or `..']
-#
-#Installation directories:
-# --prefix=PREFIX install architecture-independent files in PREFIX
-# [/opt/rtems-4.7]
-# --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
-# [PREFIX]
-#
-#By default, `make install' will install all the files in
-#`/opt/rtems-4.7/bin', `/opt/rtems-4.7/lib' etc. You can specify
-#an installation prefix other than `/opt/rtems-4.7' using `--prefix',
-#for instance `--prefix=$HOME'.
-#
-#For better control, use the options below.
-#
-#Fine tuning of the installation directories:
-# --bindir=DIR user executables [EPREFIX/bin]
-# --sbindir=DIR system admin executables [EPREFIX/sbin]
-# --libexecdir=DIR program executables [EPREFIX/libexec]
-# --datadir=DIR read-only architecture-independent data [PREFIX/share]
-# --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
-# --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
-# --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-# --libdir=DIR object code libraries [EPREFIX/lib]
-# --includedir=DIR C header files [PREFIX/include]
-# --oldincludedir=DIR C header files for non-gcc [/usr/include]
-# --infodir=DIR info documentation [PREFIX/info]
-# --mandir=DIR man documentation [PREFIX/man]
-#
-#Program names:
-# --program-prefix=PREFIX prepend PREFIX to installed program names
-# --program-suffix=SUFFIX append SUFFIX to installed program names
-# --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-#
-#System types:
-# --build=BUILD configure for building on BUILD [guessed]
-# --host=HOST cross-compile to build programs to run on HOST [BUILD]
-# --target=TARGET configure for building compilers for TARGET [HOST]
-#
-#Optional Features:
-# --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
-# --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-# --enable-maintainer-mode enable make rules and dependencies not useful
-# (and sometimes confusing) to the casual installer
-# --enable-multiprocessing
-# enable multiprocessing interface
-# --enable-posix enable posix interface
-# --enable-itron enable itron interface
-# --enable-networking enable TCP/IP stack
-# --enable-rdbg enable remote debugger
-# --enable-rtems-inlines enable RTEMS inline functions (default:enabled,
-# disable to use macros)
-# --enable-cxx enable C++ support and build the rtems++ library
-# --enable-tests enable tests (default:samples)
-# --enable-rtems-debug enable RTEMS_DEBUG
-# --enable-rtemsbsp="bsp1 bsp2 .."
-# BSPs to include in build
-# --enable-multilib build many library versions (default=no)
-# --enable-docs enable building documentation (default:disabled)
-# CC_FOR_BUILD
-# c-compiler to be used for build subdirs (default: auto-detected)
-# CFLAGS_FOR_BUILD
-# c-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CXX_FOR_BUILD
-# c++-compiler to be used for build subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_BUILD
-# c++-flags to be used for build subdirs (default: provided by
-# autoconf)
-# CC_FOR_HOST c-compiler to be used for host subdirs (default: auto-detected)
-# CFLAGS_FOR_HOST
-# c-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CXX_FOR_HOST
-# c++-compiler to be used for host subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_HOST
-# c++-flags to be used for host subdirs (default: provided by
-# autoconf)
-# CC_FOR_TARGET
-# c-compiler to be used for target subdirs (default:
-# auto-detected)
-# CFLAGS_FOR_TARGET
-# c-flags to be used for target subdirs (default: provided by
-# autoconf)
-# CXX_FOR_TARGET
-# c++-compiler to be used for target subdirs (default:
-# auto-detected)
-# CXXFLAGS_FOR_TARGET
-# c++-flags to be used for target subdirs (default: provided by
-# autoconf)
-#
-#Report bugs to <rtems-bugs@rtems.com>.
-
+++ /dev/null
-Index: rtems-051009/cpukit/score/cpu/arm/cpu.c
-===================================================================
---- rtems-051009.orig/cpukit/score/cpu/arm/cpu.c
-+++ rtems-051009/cpukit/score/cpu/arm/cpu.c
-@@ -124,9 +124,9 @@ void _defaultExcHandler (CPU_Exception_f
- {
- printk("\n\r");
- printk("----------------------------------------------------------\n\r");
--#if 0
-+#if 1
- printk("Exception 0x%x caught at PC 0x%x by thread %d\n",
-- ctx->register_pc, ctx->register_lr - 4,
-+ ctx->register_ip, ctx->register_lr - 4,
- _Thread_Executing->Object.id);
- #endif
- printk("----------------------------------------------------------\n\r");
-@@ -221,6 +221,47 @@ void rtems_exception_init_mngt()
- #define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v)
- #define GET_OFFSET(insn) (insn & 0xfff)
-
-+char *_print_full_context_mode2txt[0x20]={
-+ [0x10]="user", /* User */
-+ [0x11]="fiq", /* FIQ - Fast Interrupt Request */
-+ [0x12]="irq", /* IRQ - Interrupt Request */
-+ [0x13]="super", /* Supervisor */
-+ [0x17]="abort", /* Abort */
-+ [0x1b]="undef", /* Undefined */
-+ [0x1f]="system" /* System */
-+ };
-+
-+void _print_full_context(uint32_t spsr)
-+{
-+ char *mode;
-+ uint32_t prev_sp,prev_lr,cpsr,tmp;
-+ int i;
-+
-+ printk("active thread thread 0x%08x\n", _Thread_Executing->Object.id);
-+
-+ mode=_print_full_context_mode2txt[spsr&0x1f];
-+ if(!mode) mode="unknown";
-+
-+ asm volatile (" MRS %[cpsr], cpsr \n"
-+ " ORR %[tmp], %[spsr], #0xc0 \n"
-+ " MSR cpsr_c, %[tmp] \n"
-+ " MOV %[prev_sp], sp \n"
-+ " MOV %[prev_lr], lr \n"
-+ " MSR cpsr_c, %[cpsr] \n"
-+ : [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr),
-+ [cpsr] "=&r" (cpsr), [tmp] "=&r" (tmp)
-+ : [spsr] "r" (spsr)
-+ : "cc");
-+
-+ printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n", prev_sp, prev_lr, cpsr);
-+
-+ for(i=0;i<48;){
-+ printk(" 0x%08x",((uint32_t*)prev_sp)[i++]);
-+ if((i%6) == 0)
-+ printk("\n");
-+ }
-+
-+}
-
- /* This function is supposed to figure out what caused the
- * data abort, do that, then return.
-@@ -229,8 +270,10 @@ void rtems_exception_init_mngt()
- */
-
- void do_data_abort(uint32_t insn, uint32_t spsr,
-- CPU_Exception_frame *ctx)
-+ Context_Control *ctx)
- {
-+ /* Clarify, which type is correct, CPU_Exception_frame or Context_Control */
-+
- uint8_t decode;
- uint8_t insn_type;
-
-@@ -268,6 +311,7 @@ void do_data_abort(uint32_t insn, uint
- case INSN_LDR:
- printk("\n\nINSN_LDR\n");
-
-+#if 0
- rn = GET_RN(insn);
- rd = GET_RD(insn);
-
-@@ -299,6 +343,8 @@ void do_data_abort(uint32_t insn, uint
- break;
- }
- }
-+#endif
-+
- break;
- case INSN_LDRB:
- printk("\n\nINSN_LDRB\n");
-@@ -311,6 +357,8 @@ void do_data_abort(uint32_t insn, uint
- printk("data_abort at address 0x%x, instruction: 0x%x, spsr = 0x%x\n",
- ctx->register_lr - 8, insn, spsr);
-
-+ _print_full_context(spsr);
-+
- /* disable interrupts, wait forever */
- _CPU_ISR_Disable(tmp);
- while(1) {
-Index: rtems-051009/cpukit/score/cpu/arm/cpu_asm.S
-===================================================================
---- rtems-051009.orig/cpukit/score/cpu/arm/cpu_asm.S
-+++ rtems-051009/cpukit/score/cpu/arm/cpu_asm.S
-@@ -134,21 +134,31 @@ _go_back_2:
- ldr lr, [r13, #REG_LR]
- add r13,r13,#SIZE_REGS
- subs pc,r14,#4 /* return */
-+
-+#define ABORT_REGS_OFFS 32-REG_R4
-+#define ABORT_SIZE_REGS SIZE_REGS+ABORT_REGS_OFFS
-
- .globl _exc_data_abort
- _exc_data_abort:
-- sub sp, sp, #SIZE_REGS /* reserve register frame */
-- stmia sp, {r0-r12}
-+ sub sp, sp, #ABORT_SIZE_REGS /* reserve register frame */
-+ stmia sp, {r0-r11}
-+ add sp, sp, #ABORT_REGS_OFFS /* the Context_Control structure starts by CPSR, R4, ... */
-+
-+ str ip, [sp, #REG_PC] /* store R12 (ip) somewhere, oh hackery, hackery, hack */
- str lr, [sp, #REG_LR]
-+
- mov r1, lr
- ldr r0, [r1, #-8] /* r0 = bad instruction */
- mrs r1, spsr /* r1 = spsr */
-- mov r2, r13 /* r2 = exception frame */
-+ mov r2, r13 /* r2 = exception frame of Context_Control type */
- bl do_data_abort
-
- ldr lr, [sp, #REG_LR]
-- ldmia sp, {r0-r12}
-- add sp, sp, #SIZE_REGS
-+ ldr ip, [sp, #REG_PC] /* restore R12 (ip) */
-+
-+ sub sp, sp, #ABORT_REGS_OFFS
-+ ldmia sp, {r0-r11}
-+ add sp, sp, #ABORT_SIZE_REGS
-
- subs pc, r14, #4 /* return to the instruction */
- /* _AFTER_ the aborted one */
+++ /dev/null
-Index: rtems/c/src/lib/libbsp/arm/csb336/times
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/times (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/times (working copy)
-@@ -18,155 +18,155 @@
-
-
- == ==================================================================== ===
-- 1 rtems_semaphore_create 16
-- 1 rtems_semaphore_delete 17
-- 1 rtems_semaphore_obtain: available 2
-- 1 rtems_semaphore_obtain: not available -- NO_WAIT 2
-- 1 rtems_semaphore_release: no waiting tasks 5
-+ 1 rtems_semaphore_create 15
-+ 1 rtems_semaphore_delete 15
-+ 1 rtems_semaphore_obtain: available 0
-+ 1 rtems_semaphore_obtain: not available -- NO_WAIT 0
-+ 1 rtems_semaphore_release: no waiting tasks 0
-
-- 2 rtems_semaphore_obtain: not available -- caller blocks 20
-+ 2 rtems_semaphore_obtain: not available -- caller blocks 12
-
-- 3 rtems_semaphore_release: task readied -- preempts caller 16
-+ 3 rtems_semaphore_release: task readied -- preempts caller 11
-
-- 4 rtems_task_restart: blocked task -- preempts caller 48
-- 4 rtems_task_restart: ready task -- preempts caller 36
-- 4 rtems_semaphore_release: task readied -- returns to caller 9
-- 4 rtems_task_create 33
-- 4 rtems_task_start 12
-- 4 rtems_task_restart: suspended task -- returns to caller 14
-- 4 rtems_task_delete: suspended task 31
-- 4 rtems_task_restart: ready task -- returns to caller 14
-- 4 rtems_task_restart: blocked task -- returns to caller 19
-- 4 rtems_task_delete: blocked task 32
-+ 4 rtems_task_restart: blocked task -- preempts caller 38
-+ 4 rtems_task_restart: ready task -- preempts caller 29
-+ 4 rtems_semaphore_release: task readied -- returns to caller 5
-+ 4 rtems_task_create 24
-+ 4 rtems_task_start 8
-+ 4 rtems_task_restart: suspended task -- returns to caller 9
-+ 4 rtems_task_delete: suspended task 20
-+ 4 rtems_task_restart: ready task -- returns to caller 10
-+ 4 rtems_task_restart: blocked task -- returns to caller 11
-+ 4 rtems_task_delete: blocked task 21
-
-- 5 rtems_task_suspend: calling task 14
-- 5 rtems_task_resume: task readied -- preempts caller 12
-+ 5 rtems_task_suspend: calling task 9
-+ 5 rtems_task_resume: task readied -- preempts caller 8
-
-- 6 rtems_task_restart: calling task 14
-- 6 rtems_task_suspend: returns to caller 6
-- 6 rtems_task_resume: task readied -- returns to caller 6
-- 6 rtems_task_delete: ready task 32
-+ 6 rtems_task_restart: calling task 8
-+ 6 rtems_task_suspend: returns to caller 3
-+ 6 rtems_task_resume: task readied -- returns to caller 3
-+ 6 rtems_task_delete: ready task 22
-
-- 7 rtems_task_restart: suspended task -- preempts caller 24
-+ 7 rtems_task_restart: suspended task -- preempts caller 14
-
-- 8 rtems_task_set_priority: obtain current priority 4
-- 8 rtems_task_set_priority: returns to caller 8
-- 8 rtems_task_mode: obtain current mode 2
-- 8 rtems_task_mode: no reschedule 2
-- 8 rtems_task_mode: reschedule -- returns to caller 4
-- 8 rtems_task_mode: reschedule -- preempts caller 19
-- 8 rtems_task_set_note 4
-- 8 rtems_task_get_note 4
-- 8 rtems_clock_set 9
-+ 8 rtems_task_set_priority: obtain current priority 1
-+ 8 rtems_task_set_priority: returns to caller 3
-+ 8 rtems_task_mode: obtain current mode 0
-+ 8 rtems_task_mode: no reschedule 0
-+ 8 rtems_task_mode: reschedule -- returns to caller 3
-+ 8 rtems_task_mode: reschedule -- preempts caller 13
-+ 8 rtems_task_set_note 1
-+ 8 rtems_task_get_note 1
-+ 8 rtems_clock_set 4
- 8 rtems_clock_get 0
-
-- 9 rtems_message_queue_create 54
-- 9 rtems_message_queue_send: no waiting tasks 8
-- 9 rtems_message_queue_urgent: no waiting tasks 8
-- 9 rtems_message_queue_receive: available 7
-- 9 rtems_message_queue_flush: no messages flushed 4
-- 9 rtems_message_queue_flush: messages flushed 5
-- 9 rtems_message_queue_delete 21
-+ 9 rtems_message_queue_create 38
-+ 9 rtems_message_queue_send: no waiting tasks 4
-+ 9 rtems_message_queue_urgent: no waiting tasks 4
-+ 9 rtems_message_queue_receive: available 4
-+ 9 rtems_message_queue_flush: no messages flushed 2
-+ 9 rtems_message_queue_flush: messages flushed 3
-+ 9 rtems_message_queue_delete 19
-
--10 rtems_message_queue_receive: not available -- NO_WAIT 4
--10 rtems_message_queue_receive: not available -- caller blocks 20
-+10 rtems_message_queue_receive: not available -- NO_WAIT 2
-+10 rtems_message_queue_receive: not available -- caller blocks 12
-
--11 rtems_message_queue_send: task readied -- preempts caller 18
-+11 rtems_message_queue_send: task readied -- preempts caller 13
-
--12 rtems_message_queue_send: task readied -- returns to caller 11
-+12 rtems_message_queue_send: task readied -- returns to caller 7
-
--13 rtems_message_queue_urgent: task readied -- preempts caller 19
-+13 rtems_message_queue_urgent: task readied -- preempts caller 13
-
--14 rtems_message_queue_urgent: task readied -- returns to caller 11
-+14 rtems_message_queue_urgent: task readied -- returns to caller 7
-
- 15 rtems_event_receive: obtain current events 0
--15 rtems_event_receive: not available -- NO_WAIT 3
--15 rtems_event_receive: not available -- caller blocks 17
--15 rtems_event_send: no task readied 3
--15 rtems_event_receive: available 5
--15 rtems_event_send: task readied -- returns to caller 10
-+15 rtems_event_receive: not available -- NO_WAIT 1
-+15 rtems_event_receive: not available -- caller blocks 11
-+15 rtems_event_send: no task readied 1
-+15 rtems_event_receive: available 3
-+15 rtems_event_send: task readied -- returns to caller 7
-
--16 rtems_event_send: task readied -- preempts caller 16
-+16 rtems_event_send: task readied -- preempts caller 12
-
--17 rtems_task_set_priority: preempts caller 19
-+17 rtems_task_set_priority: preempts caller 13
-
--18 rtems_task_delete: calling task 41
-+18 rtems_task_delete: calling task 26
-
--19 rtems_signal_catch 6
--19 rtems_signal_send: returns to caller 15
--19 rtems_signal_send: signal to self 25
--19 exit ASR overhead: returns to calling task 11
--19 exit ASR overhead: returns to preempting task 12
-+19 rtems_signal_catch 5
-+19 rtems_signal_send: returns to caller 12
-+19 rtems_signal_send: signal to self 19
-+19 exit ASR overhead: returns to calling task 7
-+19 exit ASR overhead: returns to preempting task 10
-
--20 rtems_partition_create 22
--20 rtems_region_create 30
--20 rtems_partition_get_buffer: available 10
--20 rtems_partition_get_buffer: not available 4
--20 rtems_partition_return_buffer 9
--20 rtems_partition_delete 10
--20 rtems_region_get_segment: available 15
--20 rtems_region_get_segment: not available -- NO_WAIT 16
--20 rtems_region_return_segment: no waiting tasks 13
--20 rtems_region_get_segment: not available -- caller blocks 47
--20 rtems_region_return_segment: task readied -- preempts caller 45
--20 rtems_region_return_segment: task readied -- returns to caller 25
--20 rtems_region_delete 23
--20 rtems_io_initialize 1
-+20 rtems_partition_create 21
-+20 rtems_region_create 33
-+20 rtems_partition_get_buffer: available 9
-+20 rtems_partition_get_buffer: not available 3
-+20 rtems_partition_return_buffer 8
-+20 rtems_partition_delete 8
-+20 rtems_region_get_segment: available 7
-+20 rtems_region_get_segment: not available -- NO_WAIT 7
-+20 rtems_region_return_segment: no waiting tasks 6
-+20 rtems_region_get_segment: not available -- caller blocks 36
-+20 rtems_region_return_segment: task readied -- preempts caller 33
-+20 rtems_region_return_segment: task readied -- returns to caller 13
-+20 rtems_region_delete 18
-+20 rtems_io_initialize 0
- 20 rtems_io_open 0
- 20 rtems_io_close 0
- 20 rtems_io_read 0
- 20 rtems_io_write 0
- 20 rtems_io_control 0
-
--21 rtems_task_ident 39
--21 rtems_message_queue_ident 38
--21 rtems_semaphore_ident 43
--21 rtems_partition_ident 38
--21 rtems_region_ident 38
--21 rtems_port_ident 37
--21 rtems_timer_ident 38
--21 rtems_rate_monotonic_ident 38
-+21 rtems_task_ident 8
-+21 rtems_message_queue_ident 8
-+21 rtems_semaphore_ident 9
-+21 rtems_partition_ident 8
-+21 rtems_region_ident 8
-+21 rtems_port_ident 8
-+21 rtems_timer_ident 8
-+21 rtems_rate_monotonic_ident 8
-
- 22 rtems_message_queue_broadcast: task readied -- returns to caller 27
--22 rtems_message_queue_broadcast: no waiting tasks 6
--22 rtems_message_queue_broadcast: task readied -- preempts caller 22
-+22 rtems_message_queue_broadcast: no waiting tasks 2
-+22 rtems_message_queue_broadcast: task readied -- preempts caller 16
-
--23 rtems_timer_create 4
--23 rtems_timer_fire_after: inactive 7
--23 rtems_timer_fire_after: active 7
--23 rtems_timer_cancel: active 4
--23 rtems_timer_cancel: inactive 3
--23 rtems_timer_reset: inactive 6
--23 rtems_timer_reset: active 7
--23 rtems_timer_fire_when: inactive 9
--23 rtems_timer_fire_when: active 9
--23 rtems_timer_delete: active 5
--23 rtems_timer_delete: inactive 4
--23 rtems_task_wake_when 21
-+23 rtems_timer_create 3
-+23 rtems_timer_fire_after: inactive 4
-+23 rtems_timer_fire_after: active 4
-+23 rtems_timer_cancel: active 2
-+23 rtems_timer_cancel: inactive 1
-+23 rtems_timer_reset: inactive 3
-+23 rtems_timer_reset: active 3
-+23 rtems_timer_fire_when: inactive 4
-+23 rtems_timer_fire_when: active 4
-+23 rtems_timer_delete: active 3
-+23 rtems_timer_delete: inactive 3
-+23 rtems_task_wake_when 12
-
--24 rtems_task_wake_after: yield -- returns to caller 2
--24 rtems_task_wake_after: yields -- preempts caller 12
-+24 rtems_task_wake_after: yield -- returns to caller 1
-+24 rtems_task_wake_after: yields -- preempts caller 9
-
--25 rtems_clock_tick 13
-+25 rtems_clock_tick 10
-
--26 _ISR_Disable 3
-+26 _ISR_Disable 3
- 26 _ISR_Flash 1
- 26 _ISR_Enable 0
- 26 _Thread_Disable_dispatch 1
- 26 _Thread_Enable_dispatch 3
- 26 _Thread_Set_state 6
--26 _Thread_Disptach (NO FP) 13
--26 context switch: no floating point contexts 10
-+26 _Thread_Disptach (NO FP) 9
-+26 context switch: no floating point contexts 7
- 26 context switch: self 1
- 26 context switch: to another task 2
- 26 fp context switch: restore 1st FP task - NA
- 26 fp context switch: save idle, restore initialized - NA
- 26 fp context switch: save idle, restore idle - NA
- 26 fp context switch: save initialized, restore initialized - NA
--26 _Thread_Resume 9
--26 _Thread_Unblock 8
--26 _Thread_Ready 5
--26 _Thread_Get 1
-+26 _Thread_Resume 8
-+26 _Thread_Unblock 7
-+26 _Thread_Ready 4
-+26 _Thread_Get 0
- 26 _Semaphore_Get 0
- 26 _Thread_Get: invalid id 0
-
-@@ -175,15 +175,15 @@
- 27 interrupt entry overhead: returns to nested interrupt 0
- 27 interrupt exit overhead: returns to nested interrupt 0
-
--28 rtems_port_create 13
--28 rtems_port_external_to_internal 3
--28 rtems_port_internal_to_external 3
--28 rtems_port_delete 11
-+28 rtems_port_create 10
-+28 rtems_port_external_to_internal 1
-+28 rtems_port_internal_to_external 1
-+28 rtems_port_delete 8
-
--29 rtems_rate_monotonic_create 13
--29 rtems_rate_monotonic_period: initiate period -- returns to caller 24
--29 rtems_rate_monotonic_period: obtain status 5
--29 rtems_rate_monotonic_cancel 15
-+29 rtems_rate_monotonic_create 12
-+29 rtems_rate_monotonic_period: initiate period -- returns to caller 17
-+29 rtems_rate_monotonic_period: obtain status 3
-+29 rtems_rate_monotonic_cancel 12
- 29 rtems_rate_monotonic_delete: inactive 12
--29 rtems_rate_monotonic_delete: active 7
--29 rtems_rate_monotonic_period: conclude periods -- caller blocks 13
-+29 rtems_rate_monotonic_delete: active 4
-+29 rtems_rate_monotonic_period: conclude periods -- caller blocks 9
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (working copy)
-@@ -153,12 +169,12 @@
- /* Calcuate the frequency for perclk1 */
- int get_perclk1_freq(void)
- {
-- int fin;
-- int fpll;
-- int pd;
-- int mfd;
-- int mfi;
-- int mfn;
-+ unsigned int fin;
-+ unsigned int fpll;
-+ unsigned int pd;
-+ unsigned int mfd;
-+ unsigned int mfi;
-+ unsigned int mfn;
- uint32_t reg;
- int perclk1;
-
-@@ -187,13 +203,14 @@
- printk("mfd = %d\n", mfd);
- printk("mfi = %d\n", mfi);
- printk("mfn = %d\n", mfn);
-- printk("(fin * mfi) / (pd + 1) = %d\n", (fin * mfi) / (pd + 1));
-- printk("(fin * mfn) / ((pd + 1) * (mfd + 1)) = %d\n",
-- (fin * mfn) / ((pd + 1) * (mfd + 1)));
-+ printk("rounded (fin * mfi) / (pd + 1) = %d\n", (fin * mfi) / (pd + 1));
-+ printk("rounded (fin * mfn) / ((pd + 1) * (mfd + 1)) = %d\n",
-+ ((long long)fin * mfn) / ((pd + 1) * (mfd + 1)));
- #endif
-
-- fpll = 2 * ( ((fin * mfi) / (pd + 1)) +
-- ((fin * mfn) / ((pd + 1) * (mfd + 1))) );
-+ fpll = 2 * ( ((fin * mfi + (pd + 1) / 2) / (pd + 1)) +
-+ (((long long)fin * mfn + ((pd + 1) * (mfd + 1)) / 2) /
-+ ((pd + 1) * (mfd + 1))) );
-
- /* calculate the output of the PERCLK1 divider */
- reg = MC9328MXL_PLL_PCDR;
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds (working copy)
-@@ -75,9 +75,6 @@
- rtems_vector_table = .;
- . += (8 * 4); /* 8 ARM interrupts */
-
-- bsp_vector_table = .;
-- . += (64 * 4); /* 64 MC9328MXL interrupts */
--
- . = ALIGN (0x100);
-
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c (working copy)
-@@ -29,7 +29,7 @@
- */
- printk("\n");
- printk(line);
-- while (uart_poll_read(0) < 0) continue;
-+ while (BSP_poll_char() < 0) continue;
-
- bsp_reset();
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/network/network.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/network/network.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/network/network.c (working copy)
-@@ -41,20 +41,20 @@
- /* RTEMS event used to start transmit daemon. */
- #define START_TRANSMIT_EVENT RTEMS_EVENT_2
-
--static rtems_isr enet_isr(rtems_vector_number vector);
-+static void enet_isr(rtems_irq_hdl_param);
- static void enet_isr_on(const rtems_irq_connect_data *unused);
- static void enet_isr_off(const rtems_irq_connect_data *unused);
- static int enet_isr_is_on(const rtems_irq_connect_data *irq);
-
- /* Replace the first value with the clock's interrupt name. */
--rtems_irq_connect_data mc9328mxl_enet_isr_data = {BSP_INT_GPIO_PORTA,
-- (rtems_irq_hdl)enet_isr,
-- enet_isr_on,
-- enet_isr_off,
-- enet_isr_is_on,
-- 3, /* unused for ARM */
-- 0 }; /* unused for ARM */
--
-+rtems_irq_connect_data mc9328mxl_enet_isr_data = {
-+ .name = BSP_INT_GPIO_PORTA,
-+ .hdl = (rtems_irq_hdl)enet_isr,
-+ .handle = (void *)BSP_INT_GPIO_PORTA,
-+ .on = enet_isr_on,
-+ .off = enet_isr_off,
-+ .isOn = enet_isr_is_on,
-+};
- typedef struct {
- unsigned long rx_packets; /* total packets received */
- unsigned long tx_packets; /* total packets transmitted */
-@@ -102,7 +102,8 @@
- void mc9328mxl_enet_sendpacket (struct ifnet *ifp, struct mbuf *m);
- void mc9328mxl_enet_rx_task(void *arg);
- void mc9328mxl_enet_stats(mc9328mxl_enet_softc_t *sc);
--static int mc9328mxl_enet_ioctl(struct ifnet *ifp, int command, caddr_t data);
-+static int mc9328mxl_enet_ioctl(struct ifnet *ifp,
-+ unsigned long command, caddr_t data);
-
-
- int rtems_mc9328mxl_enet_attach (
-@@ -631,7 +632,7 @@
-
- /* Driver ioctl handler */
- static int
--mc9328mxl_enet_ioctl (struct ifnet *ifp, int command, caddr_t data)
-+mc9328mxl_enet_ioctl (struct ifnet *ifp, unsigned long command, caddr_t data)
- {
- mc9328mxl_enet_softc_t *sc = ifp->if_softc;
- int error = 0;
-@@ -678,7 +679,7 @@
- }
-
- /* interrupt handler */
--rtems_isr enet_isr (rtems_vector_number v)
-+static void enet_isr(rtems_irq_hdl_param unused)
- {
- uint16_t int_reg;
-
-Index: rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c (working copy)
-@@ -30,21 +30,14 @@
- void rtems_irq_mngt_init()
- {
- int i;
-- long *vectorTable;
- rtems_interrupt_level level;
-
-- vectorTable = (long *) VECTOR_TABLE;
--
- _CPU_ISR_Disable(level);
-
- /* First, connect the ISR_Handler for IRQ and FIQ interrupts */
- _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ISR_Handler, NULL);
- _CPU_ISR_install_vector(ARM_EXCEPTION_FIQ, _ISR_Handler, NULL);
-
-- /* Initialize the vector table contents with default handler */
-- for (i=0; i<BSP_MAX_INT; i++)
-- *(vectorTable + i) = (long)(default_int_handler);
--
- /* Initialize the INT at the BSP level */
- BSP_rtems_irq_mngt_init();
- }
-Index: rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c (working copy)
-@@ -22,7 +22,16 @@
- void BSP_rtems_irq_mngt_init()
- {
- long int_stat;
-+ long *vectorTable;
-+ int i;
-
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* mask all interrupts */
- *EP7312_INTMR1 = 0x0;
- *EP7312_INTMR2 = 0x0;
-Index: rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c (working copy)
-@@ -29,6 +29,16 @@
- */
- void BSP_rtems_irq_mngt_init(void)
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* clear all interrupt status flags */
- GBA_REG_IF = 0xffff;
- /* disable all interrupts */
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h (working copy)
-@@ -131,6 +131,33 @@
- #define MC9328MXL_UART2_MPR4 (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xcc)))
- #define MC9328MXL_UART2_TS (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xd0)))
-
-+typedef struct {
-+ volatile uint32_t rxd;
-+ volatile uint32_t _res0[15];
-+ volatile uint32_t txd;
-+ volatile uint32_t _res1[15];
-+ volatile uint32_t cr1;
-+ volatile uint32_t cr2;
-+ volatile uint32_t cr3;
-+ volatile uint32_t cr4;
-+ volatile uint32_t fcr;
-+ volatile uint32_t sr1;
-+ volatile uint32_t sr2;
-+ volatile uint32_t esc;
-+ volatile uint32_t tim;
-+ volatile uint32_t bir;
-+ volatile uint32_t bmr;
-+ volatile uint32_t brc;
-+ volatile uint32_t ipr1;
-+ volatile uint32_t ipr2;
-+ volatile uint32_t ipr3;
-+ volatile uint32_t ipr4;
-+ volatile uint32_t mpr1;
-+ volatile uint32_t mpr2;
-+ volatile uint32_t mpr3;
-+ volatile uint32_t mpr4;
-+ volatile uint32_t ts;
-+} mc9328mxl_uart_regs_t;
-
- #define MC9328MXL_UART_RXD_CHARRDY (bit(15))
- #define MC9328MXL_UART_RXD_ERR (bit(14))
-@@ -205,6 +232,17 @@
- #define MC9328MXL_UART_CR4_OREN (bit(1))
- #define MC9328MXL_UART_CR4_DREN (bit(0))
-
-+#define MC9328MXL_UART_FCR_TXTL(x) (((x) & 0x3f) << 10)
-+#define MC9328MXL_UART_FCR_RFDIV_1 (5 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_2 (4 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_3 (3 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_4 (2 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_5 (1 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_6 (0 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_7 (6 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_MASK (7 << 7)
-+#define MC9328MXL_UART_FCR_RXTL(x) (((x) & 0x3f) << 0)
-+
- #define MC9328MXL_UART_SR1_PARERR (bit(15))
- #define MC9328MXL_UART_SR1_RTSS (bit(14))
- #define MC9328MXL_UART_SR1_TRDY (bit(13))
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c (working copy)
-@@ -28,13 +28,14 @@
- static int clock_isr_is_on(const rtems_irq_connect_data *irq);
-
- /* Replace the first value with the clock's interrupt name. */
--rtems_irq_connect_data clock_isr_data = {BSP_INT_TIMER1,
-- (rtems_irq_hdl)Clock_isr,
-- clock_isr_on,
-- clock_isr_off,
-- clock_isr_is_on,
-- 3, /* unused for ARM cpus */
-- 0 }; /* unused for ARM cpus */
-+rtems_irq_connect_data clock_isr_data = {
-+ .name = BSP_INT_TIMER1,
-+ .hdl = (rtems_irq_hdl)Clock_isr,
-+ .handle = (void *)BSP_INT_TIMER1,
-+ .on = clock_isr_on,
-+ .off = clock_isr_off,
-+ .isOn = clock_isr_is_on,
-+};
-
- /* If you follow the code, this is never used, so any value
- * should work
-@@ -82,7 +83,7 @@
- int cnt; \
- freq = get_perclk1_freq(); \
- printk("perclk1 freq is %d\n", freq); \
-- cnt = ((freq / 1000) * BSP_Configuration.microseconds_per_tick) / 1000;\
-+ cnt = ((long long)freq * BSP_Configuration.microseconds_per_tick + 500000) / 1000000;\
- printk("cnt freq is %d\n", cnt); \
- MC9328MXL_TMR1_TCMP = cnt; \
- /* use PERCLK1 as input, enable timer */ \
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S (working copy)
-@@ -31,13 +31,15 @@
-
- /* find the ISR's address based on the vector */
- ldr r0, =bsp_vector_table
-- ldr r0, [r0, r1, LSL #2] /* Read the address */
-+ mov r1, r1, LSL #3 /* Shift vector to get offset into table */
-+ add r1, r0, r1 /* r1 has address of vector entry */
-+ ldr r0, [r1, #4] /* Get the data pointer */
-+ ldr r1, [r1] /* Get the vector */
-
--
- stmdb sp!,{lr}
- ldr lr, =IRQ_return /* prepare the return from handler */
-
-- mov pc, r0 /* EXECUTE INT HANDLER */
-+ mov pc, r1 /* EXECUTE INT HANDLER */
-
- IRQ_return:
- ldmia sp!,{lr}
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h (working copy)
-@@ -15,6 +15,8 @@
- #ifndef __IRQ_H__
- #define __IRQ_H__
-
-+#include <rtems/irq.h>
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -34,7 +36,7 @@
- * Constants
- **********************************************************************/
-
--/* possible interrupt sources on the AT91RM9200 */
-+/* possible interrupt sources on the MC9328MXL */
- #define BSP_INT_UART3_PFERR 0
- #define BSP_INT_UART3_RTS 1
- #define BSP_INT_UART3_DTR 2
-@@ -101,64 +103,21 @@
- #define BSP_INT_WDT 63
- #define BSP_MAX_INT 64
-
--typedef unsigned char rtems_irq_level;
--typedef unsigned char rtems_irq_trigger;
-+typedef struct {
-+ rtems_irq_hdl vector;
-+ rtems_irq_hdl_param data;
-+} mc9328mxl_irq_info_t;
-
--typedef unsigned int rtems_irq_number;
--struct __rtems_irq_connect_data__; /* forward declaratiuon */
-
--typedef void (*rtems_irq_hdl) (void);
--typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*);
--typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*);
--typedef int (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
-
--extern rtems_irq_hdl bsp_vector_table[BSP_MAX_INT];
--#define VECTOR_TABLE bsp_vector_table
--
--typedef struct __rtems_irq_connect_data__ {
-- /* IRQ line */
-- rtems_irq_number name;
-+extern mc9328mxl_irq_info_t bsp_vector_table[BSP_MAX_INT];
-
-- /* Handler */
-- rtems_irq_hdl hdl;
--
-- /* function for enabling interrupts at device level. */
-- rtems_irq_enable on;
--
-- /* function for disabling interrupts at device level. */
-- rtems_irq_disable off;
--
-- /* Function to test if interrupt is enabled */
-- rtems_irq_is_enabled isOn;
--
-- /* priority level of interrupt */
-- rtems_irq_level irqLevel;
--
-- /* Trigger method (rising/falling edge or high/low level) */
-- rtems_irq_trigger irqTrigger;
--} rtems_irq_connect_data;
--
- /*
- * function to initialize the interrupt for a specific BSP
- */
- void BSP_rtems_irq_mngt_init();
-
-
--/*
-- * function to connect a particular irq handler.
-- */
--int BSP_install_rtems_irq_handler (const rtems_irq_connect_data*);
--
--/*
-- * function to get the current RTEMS irq handler for ptr->name.
-- */
--int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* ptr);
--
--/*
-- * function to disconnect the RTEMS irq handler for ptr->name.
-- */
--int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data*);
--
- #endif /* __asm__ */
-
- #ifdef __cplusplus
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c (working copy)
-@@ -23,10 +23,11 @@
- */
- void BSP_rtems_irq_mngt_init()
- {
--#if 0
-- /* disable all interrupts */
-- AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
--#endif
-+ int i;
-
-+ for (i = 0; i < BSP_MAX_INT; i++) {
-+ bsp_vector_table[i].vector = default_int_handler;
-+ bsp_vector_table[i].data = NULL;
-+ }
- }
-
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c (working copy)
-@@ -16,6 +16,8 @@
- #include <rtems/score/apiext.h>
- #include <mc9328mxl.h>
-
-+mc9328mxl_irq_info_t bsp_vector_table[BSP_MAX_INT];
-+
- /*
- * This function check that the value given for the irq line
- * is valid.
-@@ -36,9 +38,6 @@
- int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
- {
- rtems_interrupt_level level;
-- rtems_irq_hdl *bsp_tbl;
--
-- bsp_tbl = (rtems_irq_hdl *)&bsp_vector_table;
-
- if (!isValidInterrupt(irq->name)) {
- return 0;
-@@ -47,8 +46,8 @@
- /*
- * Check if default handler is actually connected. If not issue an error.
- */
-- if (bsp_tbl[irq->name] != default_int_handler) {
-- return 0;
-+ if (bsp_vector_table[irq->name].vector != default_int_handler) {
-+ return 0;
- }
-
- _CPU_ISR_Disable(level);
-@@ -56,7 +55,8 @@
- /*
- * store the new handler
- */
-- bsp_tbl[irq->name] = irq->hdl;
-+ bsp_vector_table[irq->name].vector = irq->hdl;
-+ bsp_vector_table[irq->name].data = irq->handle;
-
- /*
- * Enable interrupt on device
-@@ -80,18 +80,15 @@
- int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
- {
- rtems_interrupt_level level;
-- rtems_irq_hdl *bsp_tbl;
-
-- bsp_tbl = (rtems_irq_hdl *)&bsp_vector_table;
--
- if (!isValidInterrupt(irq->name)) {
- return 0;
- }
- /*
- * Check if the handler is actually connected. If not issue an error.
- */
-- if (bsp_tbl[irq->name] != irq->hdl) {
-- return 0;
-+ if (bsp_vector_table[irq->name].vector != irq->hdl) {
-+ return 0;
- }
-
- _CPU_ISR_Disable(level);
-@@ -106,8 +103,8 @@
- /*
- * restore the default irq value
- */
-- bsp_tbl[irq->name] = default_int_handler;
--
-+ bsp_vector_table[irq->name].vector = default_int_handler;
-+ bsp_vector_table[irq->name].data = NULL;
-
- _CPU_ISR_Enable(level);
-
-Index: rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c (working copy)
-@@ -151,7 +151,7 @@
- static inline uint32_t mmu_get_ctrl(void)
- {
- uint32_t val;
-- asm volatile ("msr 15, 0, %0, cr1, cr0\n" : "=r" (val));
-+ asm volatile ("mrc 15, 0, %0, cr1, cr0\n" : "=r" (val));
- return val;
- }
-
-@@ -240,3 +240,13 @@
- base[i] = MMU_SET_LVL1_INVAL;
- }
- }
-+
-+
-+void mmu_set_cpu_async_mode(void)
-+{
-+ uint32_t reg;
-+ reg = mmu_get_ctrl();
-+ reg |= 0xc0000000;
-+ mmu_set_ctrl(reg);
-+}
-+
-Index: rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c (working copy)
-@@ -23,6 +23,16 @@
- */
- void BSP_rtems_irq_mngt_init()
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* disable all interrupts */
- AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
- }
-Index: rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c (working copy)
-@@ -20,6 +20,16 @@
-
- void BSP_rtems_irq_mngt_init()
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /*
- * Here is the code to initialize the INT for
- * the specified BSP
-Index: rtems/make/custom/csb336.cfg
-===================================================================
---- rtems/make/custom/csb336.cfg (revision 42)
-+++ rtems/make/custom/csb336.cfg (working copy)
-@@ -22,12 +22,12 @@
- # -O4 is ok for RTEMS
- # NOTE2: some level of -O may be actually required by inline assembler (at least
- # -O2 so far.
--CFLAGS_OPTIMIZE_V=-O3
-+CFLAGS_OPTIMIZE_V=-O3 -g
- #CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-
- # debug flags: typically none, but at least -O1 is required due to this
- # BSP using inlined code
--CFLAGS_DEBUG_V = -O1
-+CFLAGS_DEBUG_V = -O1 -g
- #CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
-
+++ /dev/null
-Index: rtems/c/src/lib/libbsp/arm/csb336/console/uart.c
-===================================================================
---- rtems.orig/c/src/lib/libbsp/arm/csb336/console/uart.c
-+++ rtems/c/src/lib/libbsp/arm/csb336/console/uart.c
-@@ -1,262 +1,453 @@
- /*
-- * console driver for MC9328XML UARTs
-+ * Console driver for MC9328XML UARTs.
- *
-- * This driver uses the shared console driver in
-- * ...../libbsp/shared/console.c
-+ * Written Jay Monkman <jtm@lopingdog.com>
-+ * Copyright (c) 2005 by Loping Dog Embedded Systems
- *
-- * If you want the driver to be interrupt driven, you
-- * need to write the ISR, and in the ISR insert the
-- * chars into termios's queue.
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license
- *
-- * Copyright (c) 2004 Cogent Computer Systems
-- * Written by Jay Monkman <jtm@lopingdog.com>
-- *
-- * The license and distribution terms for this file may be
-- * found in the file LICENSE in this distribution or at
-- *
-- * http://www.OARcorp.com/rtems/license.html.
-- *
-- *
-- * $Id: uart.c,v 1.1 2004/07/15 06:12:05 jtm Exp $
--*/
--#include <bsp.h> /* Must be before libio.h */
-+ * $Id:$
-+ */
-+#include <bsp.h>
- #include <rtems/libio.h>
--#include <termios.h>
-+#include <libchip/sersupp.h>
-+#include <rtems/error.h>
- #include <rtems/bspIo.h>
--
--/* Put the CPU (or UART) specific header file #include here */
-+#include <termios.h>
-+#include <irq.h>
- #include <mc9328mxl.h>
--#include <libchip/serial.h>
--#include <libchip/sersupp.h>
-+
-+
-+/* Define this to use interrupt driver UART driver */
-+#define USE_INTERRUPTS 1
-
- /* How many serial ports? */
- #define NUM_DEVS 2
-+#define poll_write(c) imx_uart_poll_write_char(0, c)
-+#define poll_read() imx_uart_poll_read_char(0)
-
--int uart_poll_read(int minor);
-+static int imx_uart_first_open(int, int, void *);
-+static int imx_uart_last_close(int, int, void *);
-+static int imx_uart_poll_read(int);
-+static int imx_uart_set_attrs(int, const struct termios *);
-+static void imx_uart_init(int minor);
-+static void imx_uart_set_baud(int, int);
-+static int imx_uart_poll_write(int, const char *, int);
-+
-+#if defined(USE_INTERRUPTS)
-+static void imx_uart_tx_isr(rtems_irq_hdl_param);
-+static void imx_uart_rx_isr(rtems_irq_hdl_param);
-+static void imx_uart_isr_on(const rtems_irq_connect_data *irq);
-+static void imx_uart_isr_off(const rtems_irq_connect_data *irq);
-+static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq);
-+static int imx_uart_intr_write(int, const char *, int);
-+#endif
-
--int dbg_dly;
-
--/* static function prototypes */
--static int uart_first_open(int major, int minor, void *arg);
--static int uart_last_close(int major, int minor, void *arg);
--static int uart_read(int minor);
--static int uart_write(int minor, const char *buf, int len);
--static void uart_init(int minor);
--static void uart_write_polled(int minor, char c);
--static int uart_set_attributes(int minor, const struct termios *t);
--
--/* These are used by code in console.c */
--unsigned long Console_Port_Count = NUM_DEVS;
--console_data Console_Port_Data[NUM_DEVS];
--
--/* rtems console uses the following minor number */
--rtems_device_minor_number Console_Port_Minor = 0;
--
--/* Pointers to functions for handling the UART. */
--console_fns uart_fns =
--{
-- libchip_serial_default_probe,
-- uart_first_open,
-- uart_last_close,
-- uart_read,
-- uart_write,
-- uart_init,
-- uart_write_polled, /* not used in this driver */
-- uart_set_attributes,
-- FALSE /* TRUE if interrupt driven, FALSE if not. */
-+
-+/* TERMIOS callbacks */
-+#if defined(USE_INTERRUPTS)
-+rtems_termios_callbacks imx_uart_cbacks = {
-+ .firstOpen = imx_uart_first_open,
-+ .lastClose = imx_uart_last_close,
-+ .pollRead = NULL,
-+ .write = imx_uart_intr_write,
-+ .setAttributes = imx_uart_set_attrs,
-+ .stopRemoteTx = NULL,
-+ .startRemoteTx = NULL,
-+ .outputUsesInterrupts = 1,
-+};
-+#else
-+rtems_termios_callbacks imx_uart_cbacks = {
-+ .firstOpen = imx_uart_first_open,
-+ .lastClose = imx_uart_last_close,
-+ .pollRead = imx_uart_poll_read,
-+ .write = imx_uart_poll_write,
-+ .setAttributes = imx_uart_set_attrs,
-+ .stopRemoteTx = NULL,
-+ .startRemoteTx = NULL,
-+ .outputUsesInterrupts = 0,
- };
-+#endif
-
--/*
-- * There's one item in array for each UART.
-- *
-- * Some of these fields are marked "NOT USED". They are not used
-- * by console.c, but may be used by drivers in libchip
-- *
-- */
--console_tbl Console_Port_Tbl[] = {
-- {
-- "/dev/com0", /* sDeviceName */
-- SERIAL_CUSTOM, /* deviceType */
-- &uart_fns, /* pDeviceFns */
-- NULL, /* deviceProbe */
-- NULL, /* pDeviceFlow */
-- 0, /* ulMargin - NOT USED */
-- 0, /* ulHysteresis - NOT USED */
-- NULL, /* pDeviceParams */
-- 0, /* ulCtrlPort1 - NOT USED */
-- 0, /* ulCtrlPort2 - NOT USED */
-- 0, /* ulDataPort - NOT USED */
-- NULL, /* getRegister - NOT USED */
-- NULL, /* setRegister - NOT USED */
-- NULL, /* getData - NOT USED */
-- NULL, /* setData - NOT USED */
-- 0, /* ulClock - NOT USED */
-- 0 /* ulIntVector - NOT USED */
-- },
-- {
-- "/dev/com1", /* sDeviceName */
-- SERIAL_CUSTOM, /* deviceType */
-- &uart_fns, /* pDeviceFns */
-- NULL, /* deviceProbe */
-- NULL, /* pDeviceFlow */
-- 0, /* ulMargin - NOT USED */
-- 0, /* ulHysteresis - NOT USED */
-- NULL, /* pDeviceParams */
-- 0, /* ulCtrlPort1 - NOT USED */
-- 0, /* ulCtrlPort2 - NOT USED */
-- 0, /* ulDataPort - NOT USED */
-- NULL, /* getRegister - NOT USED */
-- NULL, /* setRegister - NOT USED */
-- NULL, /* getData - NOT USED */
-- NULL, /* setData - NOT USED */
-- 0, /* ulClock - NOT USED */
-- 0 /* ulIntVector - NOT USED */
-+#if defined(USE_INTERRUPTS)
-+static rtems_irq_connect_data imx_uart_tx_isr_data[NUM_DEVS];
-+static rtems_irq_connect_data imx_uart_rx_isr_data[NUM_DEVS];
-+#endif
-+
-+typedef struct {
-+ int minor;
-+ mc9328mxl_uart_regs_t * regs;
-+ volatile const char *buf;
-+ volatile int len;
-+ volatile int idx;
-+ void *tty;
-+} imx_uart_data_t;
-+
-+static imx_uart_data_t imx_uart_data[NUM_DEVS];
-+
-+rtems_device_driver console_initialize(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ rtems_status_code status;
-+ int i;
-+
-+ for (i = 0; i < NUM_DEVS; i++) {
-+ imx_uart_init(i);
- }
--};
-
--/*********************************************************************/
--/* Functions called via termios callbacks (i.e. the ones in uart_fns */
--/*********************************************************************/
--
--/*
-- * This is called the first time each device is opened. If the driver
-- * is interrupt driven, you should enable interrupts here. Otherwise,
-- * it's probably safe to do nothing.
-- *
-- * Since micromonitor already set up the UART, we do nothing.
-- */
--static int uart_first_open(int major, int minor, void *arg)
-+ rtems_termios_initialize();
-+
-+ /* /dev/console and /dev/tty0 are the same */
-+ status = rtems_io_register_name("/dev/console", major, 0);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/console :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+
-+ status = rtems_io_register_name("/dev/tty0", major, 0);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/tty0 :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+
-+ status = rtems_io_register_name("/dev/tty1", major, 1);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/tty1 :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+ return RTEMS_SUCCESSFUL;
-+}
-+
-+rtems_device_driver console_open(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
- {
-- return 0;
-+ rtems_status_code rc;
-+
-+ if (minor > (NUM_DEVS - 1)) {
-+ return RTEMS_INVALID_NUMBER;
-+ }
-+
-+ rc = rtems_termios_open(major, minor, arg, &imx_uart_cbacks);
-+
-+ return rc;
- }
-
-+rtems_device_driver console_close(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_close(arg);
-+}
-
--/*
-- * This is called the last time each device is closed. If the driver
-- * is interrupt driven, you should disable interrupts here. Otherwise,
-- * it's probably safe to do nothing.
-- */
--static int uart_last_close(int major, int minor, void *arg)
-+rtems_device_driver console_read(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
- {
-- return 0;
-+ return rtems_termios_read(arg);
- }
-
-+rtems_device_driver console_write(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_write(arg);
-+}
-
--/*
-- * Read one character from UART.
-- *
-- * Return -1 if there's no data, otherwise return
-- * the character in lowest 8 bits of returned int.
-- */
--static int uart_read(int minor)
-+rtems_device_driver console_control(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
- {
-- char c;
-+ return rtems_termios_ioctl(arg);
-+}
-+
-+static void imx_uart_init(int minor)
-+{
-+ imx_uart_data[minor].minor = minor;
-+ imx_uart_data[minor].buf = NULL;
-+ imx_uart_data[minor].len = 0;
-+ imx_uart_data[minor].idx = 0;
-
- if (minor == 0) {
-- if (MC9328MXL_UART1_SR2 & MC9328MXL_UART_SR2_RDR) {
-- c = MC9328MXL_UART1_RXD & MC9328MXL_UART_RXD_CHARMASK;
-- return c;
-- } else {
-- return -1;
-- }
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].name = BSP_INT_UART1_TX;
-+ imx_uart_rx_isr_data[minor].name = BSP_INT_UART1_RX;
-+#endif
-+ imx_uart_data[minor].regs =
-+ (mc9328mxl_uart_regs_t *) MC9328MXL_UART1_BASE;
- } else if (minor == 1) {
-- if (MC9328MXL_UART2_SR2 & MC9328MXL_UART_SR2_RDR) {
-- c = MC9328MXL_UART2_RXD & MC9328MXL_UART_RXD_CHARMASK;
-- return c;
-- } else {
-- return -1;
-- }
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].name = BSP_INT_UART2_TX;
-+ imx_uart_rx_isr_data[minor].name = BSP_INT_UART2_RX;
-+#endif
-+ imx_uart_data[minor].regs =
-+ (mc9328mxl_uart_regs_t *) MC9328MXL_UART2_BASE;
- } else {
-- printk("Unknown console minor number: %d\n", minor);
-- return -1;
-+ rtems_panic("%s:%d Unknown UART minor number %d\n",
-+ __FUNCTION__, __LINE__, minor);
- }
-
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].hdl = imx_uart_tx_isr;
-+ imx_uart_tx_isr_data[minor].handle = &imx_uart_data[minor];
-+ imx_uart_tx_isr_data[minor].on = imx_uart_isr_on;
-+ imx_uart_tx_isr_data[minor].off = imx_uart_isr_off;
-+ imx_uart_tx_isr_data[minor].isOn = imx_uart_isr_is_on;
-+
-+ imx_uart_rx_isr_data[minor].hdl = imx_uart_rx_isr;
-+ imx_uart_rx_isr_data[minor].handle = &imx_uart_data[minor];
-+ imx_uart_rx_isr_data[minor].on = imx_uart_isr_on;
-+ imx_uart_rx_isr_data[minor].off = imx_uart_isr_off;
-+ imx_uart_rx_isr_data[minor].isOn = imx_uart_isr_is_on;
-+#endif
-+
-+ imx_uart_data[minor].regs->cr1 = (
-+ MC9328MXL_UART_CR1_UARTCLKEN |
-+ MC9328MXL_UART_CR1_UARTEN);
-+
-+ imx_uart_data[minor].regs->cr2 = (
-+ MC9328MXL_UART_CR2_IRTS |
-+ MC9328MXL_UART_CR2_WS |
-+ MC9328MXL_UART_CR2_TXEN |
-+ MC9328MXL_UART_CR2_RXEN |
-+ MC9328MXL_UART_CR2_SRST);
-+
-+ imx_uart_data[minor].regs->cr3 = 0;
-+
-+ imx_uart_data[minor].regs->cr4 = 0;
-+
-+ imx_uart_data[minor].regs->fcr = (
-+ MC9328MXL_UART_FCR_TXTL(32) |
-+ MC9328MXL_UART_FCR_RFDIV_1 |
-+ MC9328MXL_UART_FCR_RXTL(1));
-+
-+ imx_uart_set_baud(minor, 38400);
-+
- }
-
-+static int imx_uart_first_open(int major, int minor, void *arg)
-+{
-+ rtems_libio_open_close_args_t *args = arg;
-
--/*
-- * Write buffer to UART
-- *
-- * return 1 on success, -1 on error
-- */
--static int uart_write(int minor, const char *buf, int len)
-+ imx_uart_data[minor].tty = args->iop->data1;
-+
-+#if defined(USE_INTERRUPTS)
-+ BSP_install_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);
-+ BSP_install_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);
-+
-+ imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_RRDYEN;
-+#endif
-+
-+ return 0;
-+}
-+
-+static int imx_uart_last_close(int major, int minor, void *arg)
- {
-- int i;
-+#if defined(USE_INTERRUPTS)
-+ BSP_remove_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);
-+ BSP_remove_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);
-+#endif
-
-- if (minor == 0) {
-- for (i = 0; i < len; i++) {
-- /* Wait for fifo to have room */
-- while(!(MC9328MXL_UART1_SR2 & MC9328MXL_UART_SR2_TXDC)) {
-- continue;
-- }
--
-- MC9328MXL_UART1_TXD = (char) buf[i];
-- }
-- } else if (minor == 1) {
-- for (i = 0; i < len; i++) {
-- /* Wait for fifo to have room */
-- while(!(MC9328MXL_UART2_SR2 & MC9328MXL_UART_SR2_TXDC)) {
-- continue;
-- }
--
-- MC9328MXL_UART2_TXD = (char) buf[i];
-- }
-+ return 0;
-+}
-+
-+static int imx_uart_poll_read(int minor)
-+{
-+ if (imx_uart_data[minor].regs->sr2 & MC9328MXL_UART_SR2_RDR) {
-+ return imx_uart_data[minor].regs->rxd & 0xff;
- } else {
-- printk("Unknown console minor number: %d\n", minor);
- return -1;
- }
--
-- return 1;
- }
-
-
--/* Set up the UART. */
--static void uart_init(int minor)
-+static int imx_uart_poll_write(int minor, const char *buf, int len)
- {
-- /* leave the debug sio port as setup by umon */
-+ int i;
-+ for (i = 0; i < len; i++) {
-+ /* Wait for there to be room in the fifo */
-+ while (!(imx_uart_data[minor].regs->sr2 & MC9328MXL_UART_SR2_TXDC)) {
-+ continue;
-+ }
-+
-+ imx_uart_data[minor].regs->txd = buf[i];
-+ }
-+ return 1;
-+
- }
-
--/* I'm not sure this is needed for the shared console driver. */
--static void uart_write_polled(int minor, char c)
-+#if defined(USE_INTERRUPTS)
-+static int imx_uart_intr_write(int minor, const char *buf, int len)
- {
-- uart_write(minor, &c, 1);
-+ imx_uart_data[minor].buf = buf;
-+ imx_uart_data[minor].len = len;
-+ imx_uart_data[minor].idx = 0;
-+
-+ imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_TXMPTYEN;
-+
-+ return 1;
- }
-+#endif
-+
-
- /* This is for setting baud rate, bits, etc. */
--static int uart_set_attributes(int minor, const struct termios *t)
-+static int imx_uart_set_attrs(int minor, const struct termios *t)
- {
-+ int baud;
-+
-+ baud = termios_baud_to_number(t->c_cflag & CBAUD);
-+ imx_uart_set_baud(minor, baud);
-+
- return 0;
- }
-
--/***********************************************************************/
-+#if defined(USE_INTERRUPTS)
-+static void imx_uart_isr_on(const rtems_irq_connect_data *irq)
-+{
-+ MC9328MXL_AITC_INTENNUM = irq->name;
-+}
-+static void imx_uart_isr_off(const rtems_irq_connect_data *irq)
-+{
-+ MC9328MXL_AITC_INTDISNUM = irq->name;
-+}
-+static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq)
-+{
-+ int irq_num = (int)irq->name;
-+ if (irq_num < 32) {
-+ return MC9328MXL_AITC_INTENABLEL & (1 << irq_num);
-+ } else {
-+ return MC9328MXL_AITC_INTENABLEH & (1 << (irq_num - 32));
-+ }
-+}
-+
-+static void imx_uart_rx_isr(rtems_irq_hdl_param param)
-+{
-+ imx_uart_data_t *uart_data = param;
-+ char buf[32];
-+ int i=0;
-+
-+ while (uart_data->regs->sr2 & MC9328MXL_UART_SR2_RDR) {
-+ buf[i] = uart_data->regs->rxd & 0xff;
-+ i++;
-+ }
-+
-+ rtems_termios_enqueue_raw_characters(uart_data->tty, buf, i);
-+}
-+
-+static void imx_uart_tx_isr(rtems_irq_hdl_param param)
-+{
-+ imx_uart_data_t *uart_data = param;
-+ int len;
-+ int minor = uart_data->minor;
-+
-+
-+ if (uart_data->idx < uart_data->len) {
-+ while ( (uart_data->regs->sr1 & MC9328MXL_UART_SR1_TRDY) &&
-+ (uart_data->idx < uart_data->len)) {
-+ uart_data->regs->txd = uart_data->buf[uart_data->idx];
-+ uart_data->idx++;
-+ }
-+ } else {
-+ len = uart_data->len;
-+ uart_data->len = 0;
-+ imx_uart_data[minor].regs->cr1 &= ~MC9328MXL_UART_CR1_TXMPTYEN;
-+ rtems_termios_dequeue_characters(uart_data->tty, len);
-+ }
-+}
-+#endif
-+
- /*
-- * The following functions are not used by TERMIOS, but other RTEMS
-- * functions use them instead.
-+ * Set the UART's baud rate. The calculation is:
-+ * (baud * 16) / ref_freq = num/demom
-+ *
-+ * ref_freq = perclk1 / RFDIV[2:0]
-+ * BIR = num - 1
-+ * BMR = demom - 1
-+ *
-+ * Setting 'num' to 16 yields this equation:
-+ * demom = ref_freq / baud
- */
--/***********************************************************************/
--/*
-- * Read from UART. This is used in the exit code, and can't
-- * rely on interrupts.
--*/
--int uart_poll_read(int minor)
-+static void imx_uart_set_baud(int minor, int baud)
- {
-- return uart_read(minor);
-+ unsigned int perclk1;
-+ unsigned int denom;
-+ unsigned int ref_freq = 0;
-+ uint32_t fcr;
-+
-+ perclk1 = get_perclk1_freq();
-+ fcr = imx_uart_data[minor].regs->fcr;
-+
-+ switch(fcr & MC9328MXL_UART_FCR_RFDIV_MASK) {
-+ case MC9328MXL_UART_FCR_RFDIV_1: ref_freq = perclk1/1; break;
-+ case MC9328MXL_UART_FCR_RFDIV_2: ref_freq = perclk1/2; break;
-+ case MC9328MXL_UART_FCR_RFDIV_3: ref_freq = perclk1/3; break;
-+ case MC9328MXL_UART_FCR_RFDIV_4: ref_freq = perclk1/4; break;
-+ case MC9328MXL_UART_FCR_RFDIV_5: ref_freq = perclk1/5; break;
-+ case MC9328MXL_UART_FCR_RFDIV_6: ref_freq = perclk1/6; break;
-+ case MC9328MXL_UART_FCR_RFDIV_7: ref_freq = perclk1/7; break;
-+ default:
-+ rtems_panic("%s:%d Unknown RFDIV: 0x%x",
-+ __FUNCTION__, __LINE__,
-+ fcr & MC9328MXL_UART_FCR_RFDIV_MASK);
-+ break;
-+ }
-+
-+ denom = ref_freq / baud;
-+
-+ imx_uart_data[minor].regs->bir = 0xf;
-+ imx_uart_data[minor].regs->bmr = denom;
- }
-
-
- /*
-- * Write a character to the console. This is used by printk() and
-- * maybe other low level functions. It should not use interrupts or any
-- * RTEMS system calls. It needs to be very simple
-+ * Polled, non-blocking read from UART
-+ */
-+int imx_uart_poll_read_char(int minor)
-+{
-+ return imx_uart_poll_read(minor);
-+}
-+
-+/*
-+ * Polled, blocking write from UART
- */
--static void _BSP_put_char( char c ) {
-- uart_write_polled(0, c);
-+void imx_uart_poll_write_char(int minor, char c)
-+{
-+ imx_uart_poll_write(minor, &c, 1);
-+}
-+
-+/*
-+ * Functions for printk() and friends.
-+ */
-+void _BSP_output_char(char c)
-+{
-+ poll_write(c);
- if (c == '\n') {
-- uart_write_polled(0, '\r');
-+ poll_write('\r');
- }
- }
-+BSP_output_char_function_type BSP_output_char = _BSP_output_char;
-
--BSP_output_char_function_type BSP_output_char = _BSP_put_char;
-
-+char _BSP_poll_char()
-+{
-+ return poll_read();
-+}
-+BSP_polling_getchar_function_type BSP_poll_char = _BSP_poll_char;
-
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/Makefile.am
-===================================================================
---- rtems.orig/c/src/lib/libbsp/arm/csb336/Makefile.am
-+++ rtems/c/src/lib/libbsp/arm/csb336/Makefile.am
-@@ -35,7 +35,7 @@ startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
- startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
- noinst_PROGRAMS += console.rel
--console_rel_SOURCES = console/uart.c ../../shared/console.c
-+console_rel_SOURCES = console/uart.c
- console_rel_CPPFLAGS = $(AM_CPPFLAGS)
- console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
+++ /dev/null
-Index: rtems-051009/c/src/lib/libbsp/arm/csb336/start/start.S
-===================================================================
---- rtems-051009.orig/c/src/lib/libbsp/arm/csb336/start/start.S
-+++ rtems-051009/c/src/lib/libbsp/arm/csb336/start/start.S
-@@ -72,6 +72,13 @@ _bss_init:
- ldr sp, =_abt_stack
- add sp, sp, r1
-
-+ /* Enter UNDEF mode and set up the UNDEF stack pointer */
-+ mov r0, #(PSR_MODE_UNDEF | PSR_I | PSR_F) /* No interrupts */
-+ msr cpsr, r0
-+ ldr r1, =_undef_stack_size
-+ ldr sp, =_undef_stack
-+ add sp, sp, r1
-+
- /* Set up the SVC stack pointer last and stay in SVC mode */
- mov r0, #(PSR_MODE_SVC | PSR_I | PSR_F) /* No interrupts */
- msr cpsr, r0
-Index: rtems-051009/c/src/lib/libbsp/arm/csb336/startup/linkcmds
-===================================================================
---- rtems-051009.orig/c/src/lib/libbsp/arm/csb336/startup/linkcmds
-+++ rtems-051009/c/src/lib/libbsp/arm/csb336/startup/linkcmds
-@@ -33,7 +33,8 @@ _sdram_size = DEFINED(_sdram_size) ? _sd
-
- _irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
- _fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
--_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x100;
-+_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x400;
-+_undef_stack_size = DEFINED(_undef_stack_size) ? _undef_stack_size : 0x400;
- _svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
-
-
-@@ -167,6 +168,10 @@ SECTIONS
- . += _abt_stack_size;
-
- . = ALIGN (256);
-+ _undef_stack = .;
-+ . += _undef_stack_size;
-+
-+ . = ALIGN (256);
- _irq_stack = .;
- . += _irq_stack_size;
-
+++ /dev/null
-Index: rtems-051009/cpukit/libfs/src/dosfs/msdos_misc.c
-===================================================================
---- rtems.orig/cpukit/libfs/src/dosfs/msdos_misc.c
-+++ rtems/cpukit/libfs/src/dosfs/msdos_misc.c
-@@ -252,7 +252,7 @@ msdos_find_name(
- * error occured (errno set apropriately)
- *
- */
--int
-+msdos_status_t
- msdos_get_name_node(
- rtems_filesystem_location_info_t *parent_loc,
- char *name,
-@@ -762,7 +762,7 @@ msdos_dir_is_empty(
- * appropriately)
- *
- */
--int
-+msdos_status_t
- msdos_find_name_in_fat_file(
- rtems_filesystem_mount_table_entry_t *mt_entry,
- fat_file_fd_t *fat_fd,
-@@ -880,7 +880,7 @@ msdos_find_name_in_fat_file(
- * RC_OK on success, or error code if error occured
- *
- */
--int
-+msdos_status_t
- msdos_find_node_by_cluster_num_in_fat_file(
- rtems_filesystem_mount_table_entry_t *mt_entry,
- fat_file_fd_t *fat_fd,
+++ /dev/null
-Package: rtems4.9-common
-Version: 4.9.3
-Architecture: amd64
-Source: rtems-4.9.3
-Section: cross-dev
-Priority: extra
-Maintainer: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-Priority: extra
-Description: RTEMS executive common files
- .
- RTEMS support files common to all target architectures
+++ /dev/null
-Index: rtems-051009/cpukit/libcsupport/src/mount.c
-===================================================================
---- rtems-051009.orig/cpukit/libcsupport/src/mount.c
-+++ rtems-051009/cpukit/libcsupport/src/mount.c
-@@ -85,9 +85,9 @@ int mount(
- /*
- * Is there a file system operations table?
- */
--
- if ( fs_ops == NULL ) {
- errno = EINVAL;
-+ printk("mount: fs_ops cannot be zero\n",mount_point);
- return -1;
- }
-
-@@ -98,12 +98,14 @@ int mount(
- if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
- options != RTEMS_FILESYSTEM_READ_WRITE ) {
- errno = EINVAL;
-+ printk("mount: bad options\n");
- return -1;
- }
-
- /* Do they support being mounted at all ? */
- if ( !fs_ops->fsmount_me_h ) {
- errno = ENOTSUP;
-+ printk("mount: mounting not supported for this fs\n");
- goto cleanup_and_bail;
- }
-
-@@ -118,6 +120,7 @@ int mount(
- temp_mt_entry = malloc( size );
-
- if ( !temp_mt_entry ) {
-+ printk("mount: cannot allocate memory for temp_mt_entry\n");
- errno = ENOMEM;
- return -1;
- }
-@@ -139,8 +142,10 @@ int mount(
- if ( mount_point ) {
-
- if ( rtems_filesystem_evaluate_path(
-- mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
-+ mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 ){
-+ printk("mount: evaluate mount point path \"%s\" failed\n",mount_point);
- goto cleanup_and_bail;
-+ }
-
- loc_to_free = &loc;
-
-@@ -150,6 +155,7 @@ int mount(
-
- if (!loc.ops->node_type_h) {
- errno = ENOTSUP;
-+ printk("mount: mount point \"%s\" has no node_type_h\n",mount_point);
- goto cleanup_and_bail;
- }
-
-@@ -159,6 +165,7 @@ int mount(
-
- if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
- errno = ENOTDIR;
-+ printk("mount: mount point \"%s\" is not a directory\n",mount_point);
- goto cleanup_and_bail;
- }
-
-@@ -168,6 +175,7 @@ int mount(
-
- if ( Is_node_fs_root( &loc ) ){
- errno = EBUSY;
-+ printk("mount: mount point \"%s\" Is_node_fs_root\n",mount_point);
- goto cleanup_and_bail;
- }
-
-@@ -191,10 +199,12 @@ int mount(
-
- if ( !loc.ops->mount_h ){
- errno = ENOTSUP;
-+ printk("mount: mount point \"%s\" does not support mount_h\n",mount_point);
- goto cleanup_and_bail;
- }
-
- if ( loc.ops->mount_h( temp_mt_entry ) ) {
-+ printk("mount: mount_h at mount point \"%s\" failed\n",mount_point);
- goto cleanup_and_bail;
- }
- } else {
-@@ -220,6 +230,7 @@ int mount(
- if ( loc.ops->unmount_h ) {
- loc.ops->unmount_h( temp_mt_entry );
- }
-+ printk("mount: unmounting because problem arose\n",mount_point);
- goto cleanup_and_bail;
- }
-
-@@ -240,6 +251,7 @@ cleanup_and_bail:
- if ( loc_to_free )
- rtems_filesystem_freenode( loc_to_free );
-
-+ printk("mount: bailing out\n");
- return -1;
- }
-
-Index: rtems-051009/cpukit/libmisc/fsmount/fsmount.c
-===================================================================
---- rtems-051009.orig/cpukit/libmisc/fsmount/fsmount.c
-+++ rtems-051009/cpukit/libmisc/fsmount/fsmount.c
-@@ -160,13 +160,15 @@ int rtems_fsmount
- fstab_ptr->mount_options,
- fstab_ptr->dev,
- fstab_ptr->mount_point);
-+
- if (tmp_rc != RTEMS_SUCCESSFUL) {
- if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
- fprintf(stdout,"fsmount: mounting of \"%s\" to"
-- " \"%s\" failed: %s\n",
-+ " \"%s\" failed: %s , tmp_rc=%d\n",
- fstab_ptr->dev,
- fstab_ptr->mount_point,
-- strerror(errno));
-+ strerror(errno),
-+ tmp_rc);
- }
- if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
- terminate = TRUE;
-Index: rtems-051009/cpukit/libfs/src/dosfs/msdos_initsupp.c
-===================================================================
---- rtems-051009.orig/cpukit/libfs/src/dosfs/msdos_initsupp.c
-+++ rtems-051009/cpukit/libfs/src/dosfs/msdos_initsupp.c
-@@ -69,6 +69,7 @@ msdos_initialize_support(
- if (rc != RC_OK)
- {
- free(fs_info);
-+ printk("msdos_initialize_support: fat_init_volume_info failed\n");
- return rc;
- }
-
-@@ -84,6 +85,7 @@ msdos_initialize_support(
- {
- fat_shutdown_drive(temp_mt_entry);
- free(fs_info);
-+ printk("msdos_initialize_support: fat_file_open\n");
- return rc;
- }
-
-@@ -104,6 +106,7 @@ msdos_initialize_support(
- cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
- fs_info->fat.vol.bpc :
- fs_info->fat.vol.rdir_size;
-+ printk("msdos_initialize_support: FAT12/16\n");
- }
- else
- {
-@@ -113,9 +116,11 @@ msdos_initialize_support(
- fat_file_close(temp_mt_entry, fat_fd);
- fat_shutdown_drive(temp_mt_entry);
- free(fs_info);
-+ printk("msdos_initialize_support: fat_file_size\n");
- return rc;
- }
- cl_buf_size = fs_info->fat.vol.bpc;
-+ printk("msdos_initialize_support: FAT32\n");
- }
-
- fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
-@@ -124,6 +129,7 @@ msdos_initialize_support(
- fat_file_close(temp_mt_entry, fat_fd);
- fat_shutdown_drive(temp_mt_entry);
- free(fs_info);
-+ printk("msdos_initialize_support: alloc fs_info->cl_buf\n");
- set_errno_and_return_minus_one(ENOMEM);
- }
-
-@@ -138,6 +144,7 @@ msdos_initialize_support(
- fat_shutdown_drive(temp_mt_entry);
- free(fs_info->cl_buf);
- free(fs_info);
-+ printk("msdos_initialize_support: semaphore\n");
- set_errno_and_return_minus_one( EIO );
- }
-
-Index: rtems-051009/cpukit/libfs/src/dosfs/fat.c
-===================================================================
---- rtems-051009.orig/cpukit/libfs/src/dosfs/fat.c
-+++ rtems-051009/cpukit/libfs/src/dosfs/fat.c
-@@ -217,17 +217,23 @@ fat_init_volume_info(rtems_filesystem_mo
- int i = 0;
-
- rc = stat(mt_entry->dev, &stat_buf);
-- if (rc == -1)
-+ if (rc == -1){
-+ printk("fat_init_volume_info: stat\n");
- return rc;
-+ }
-
- /* rtmes feature: no block devices, all are character devices */
-- if (!S_ISCHR(stat_buf.st_mode))
-+ if (!S_ISCHR(stat_buf.st_mode)){
-+ printk("fat_init_volume_info: S_ISCHR\n");
- set_errno_and_return_minus_one(ENOTBLK);
-+ }
-
- /* check that device is registred as block device and lock it */
- vol->dd = rtems_disk_lookup(stat_buf.st_dev);
-- if (vol->dd == NULL)
-+ if (vol->dd == NULL){
-+ printk("fat_init_volume_info: vol->dd == NULL\n");
- set_errno_and_return_minus_one(ENOTBLK);
-+ }
-
- vol->dev = stat_buf.st_dev;
-
-@@ -235,6 +241,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if (fd == -1)
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: open\n");
- return -1;
- }
-
-@@ -243,6 +250,7 @@ fat_init_volume_info(rtems_filesystem_mo
- {
- close(fd);
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: read BPB\n");
- set_errno_and_return_minus_one( EIO );
- }
- close(fd);
-@@ -255,6 +263,7 @@ fat_init_volume_info(rtems_filesystem_mo
- (vol->bps != 4096))
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: vol->bps %d\n",vol->bps);
- set_errno_and_return_minus_one( EINVAL );
- }
-
-@@ -271,6 +280,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if (vol->spc == 0)
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: vol->spc == 0\n");
- set_errno_and_return_minus_one(EINVAL);
- }
-
-@@ -283,6 +293,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT)
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: bytes per cluster value greater than 32K is invalid\n");
- set_errno_and_return_minus_one(EINVAL);
- }
-
-@@ -357,6 +368,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if( vol->info_sec == 0 )
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: FAT_GET_BR_FAT32_FS_INFO_SECTOR\n");
- set_errno_and_return_minus_one( EINVAL );
- }
- else
-@@ -366,6 +378,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if ( ret < 0 )
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: _fat_block_read 0\n");
- return -1;
- }
-
-@@ -373,6 +386,7 @@ fat_init_volume_info(rtems_filesystem_mo
- FAT_FSINFO_LEAD_SIGNATURE_VALUE)
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: FAT_GET_FSINFO_LEAD_SIGNATURE\n");
- set_errno_and_return_minus_one( EINVAL );
- }
- else
-@@ -382,6 +396,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if ( ret < 0 )
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: _fat_block_read FAT_FSI_INFO\n");
- return -1;
- }
-
-@@ -392,6 +407,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if ( rc != RC_OK )
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: fat_fat32_update_fsinfo_sector\n");
- return rc;
- }
- }
-@@ -412,6 +428,7 @@ fat_init_volume_info(rtems_filesystem_mo
- if ( fs_info->vhash == NULL )
- {
- rtems_disk_release(vol->dd);
-+ printk("fat_init_volume_info: fs_info->vhash == NULL\n");
- set_errno_and_return_minus_one( ENOMEM );
- }
-
-@@ -423,6 +440,7 @@ fat_init_volume_info(rtems_filesystem_mo
- {
- rtems_disk_release(vol->dd);
- free(fs_info->vhash);
-+ printk("fat_init_volume_info: fs_info->rhash == NULL\n");
- set_errno_and_return_minus_one( ENOMEM );
- }
- for (i = 0; i < FAT_HASH_SIZE; i++)
-@@ -437,6 +455,7 @@ fat_init_volume_info(rtems_filesystem_mo
- rtems_disk_release(vol->dd);
- free(fs_info->vhash);
- free(fs_info->rhash);
-+ printk("fat_init_volume_info: fs_info->uino == NULL\n");
- set_errno_and_return_minus_one( ENOMEM );
- }
- fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
-@@ -446,6 +465,7 @@ fat_init_volume_info(rtems_filesystem_mo
- free(fs_info->vhash);
- free(fs_info->rhash);
- free(fs_info->uino);
-+ printk("fat_init_volume_info: fs_info->sec_buf\n");
- set_errno_and_return_minus_one( ENOMEM );
- }
-
+++ /dev/null
----
- c/src/lib/libbsp/m68k/mo376/ChangeLog | 567 ++++
- c/src/lib/libbsp/m68k/mo376/Makefile.am | 50
- c/src/lib/libbsp/m68k/mo376/README | 24
- c/src/lib/libbsp/m68k/mo376/bsp_specs | 13
- c/src/lib/libbsp/m68k/mo376/clock/ckinit.c | 96
- c/src/lib/libbsp/m68k/mo376/configure.ac | 20
- c/src/lib/libbsp/m68k/mo376/console/console.c | 171 +
- c/src/lib/libbsp/m68k/mo376/console/sci.c | 1596 ++++++++++++++
- c/src/lib/libbsp/m68k/mo376/console/sci.h | 234 ++
- c/src/lib/libbsp/m68k/mo376/include/bsp.h | 131 +
- c/src/lib/libbsp/m68k/mo376/include/bspopts.h.in | 16
- c/src/lib/libbsp/m68k/mo376/include/mrm332.h | 70
- c/src/lib/libbsp/m68k/mo376/include/tm27.h | 34
- c/src/lib/libbsp/m68k/mo376/misc/dotests | 15
- c/src/lib/libbsp/m68k/mo376/misc/gdbinit68 | 16
- c/src/lib/libbsp/m68k/mo376/misc/interr.c | 99
- c/src/lib/libbsp/m68k/mo376/preinstall.am | 66
- c/src/lib/libbsp/m68k/mo376/spurious/spinit.c | 105
- c/src/lib/libbsp/m68k/mo376/start/start.S | 150 +
- c/src/lib/libbsp/m68k/mo376/startup/bspclean.c | 27
- c/src/lib/libbsp/m68k/mo376/startup/bspstart.c | 59
- c/src/lib/libbsp/m68k/mo376/startup/except_vect_332_ROM.S | 293 ++
- c/src/lib/libbsp/m68k/mo376/startup/linkcmds | 164 +
- c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM | 200 +
- c/src/lib/libbsp/m68k/mo376/startup/start_c.c | 125 +
- c/src/lib/libbsp/m68k/mo376/timer/timer.c | 61
- c/src/lib/libbsp/m68k/mo376/times | 195 +
- make/custom/mo376.cfg | 55
- 28 files changed, 4652 insertions(+)
-
-Index: rtems/make/custom/mo376.cfg
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/make/custom/mo376.cfg 2009-11-29 01:21:43.173939736 +0100
-@@ -0,0 +1,55 @@
-+#
-+# Config file for the mrm332 BSP
-+#
-+# $Id: mrm332.cfg,v 1.18 2008/06/11 08:17:27 ccj Exp $
-+#
-+
-+include $(RTEMS_ROOT)/make/custom/default.cfg
-+
-+RTEMS_CPU=m68k
-+RTEMS_CPU_MODEL=m68332
-+
-+# This is the actual bsp directory used during the build process.
-+RTEMS_BSP_FAMILY=mrm332
-+
-+# This contains the compiler options necessary to select the CPU model
-+# and (hopefully) optimize for it.
-+CPU_CFLAGS = -mcpu=cpu32
-+
-+# optimize flag: typically -O2
-+CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
-+
-+ifeq ($(MRM_IN_ROM),yes)
-+# Build a rommable image - move the .data section after the .text section
-+# in the image.
-+CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
-+endif
-+
-+ifeq ($(MRM_IN_ROM),yes)
-+define bsp-post-link
-+ $(OBJCOPY) --adjust-section-vma \
-+ .data=`m68k-rtems-objdump --section-headers $(basename $@).pxe | \
-+ awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
-+ for (p=digits; p>0; p--) \
-+ s += (16^(p-1)) * ( index("0123456789ABCDEF",\
-+ substr(x,1+digits-p,1)) -1 );\
-+ return s } ;\
-+ /\.text/ { base = $$4 ; size = $$3 };\
-+ END { printf("0x%x", h2d(base) + h2d(size)) }'\
-+ ` $(basename $@).pxe $(basename $@).exe
-+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
-+ sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
-+ $(PACKHEX) > $(basename $@)$(DOWNEXT)
-+ $(NM) -g -n $(basename $@).pxe > $(basename $@).pnum
-+ rm -f $(basename $@).srec $(basename $@).srec
-+ $(default-bsp-post-link)
-+endef
-+else
-+define bsp-post-link
-+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec
-+ sed -e 's/.$$//' -e '/^S0/d' $(basename $@).srec | \
-+ $(PACKHEX) > $(basename $@)$(DOWNEXT)
-+ rm -f $(basename $@).srec
-+ $(default-bsp-post-link)
-+endef
-+endif
-Index: rtems/c/src/lib/libbsp/m68k/mo376/console/sci.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/console/sci.h 2006-09-11 23:43:55.000000000 +0200
-@@ -0,0 +1,234 @@
-+/****************************************************************************
-+* File: sci.h
-+*
-+* Desc: This is the include file for the serial communications interface.
-+*
-+* Note: See bsp.h,confdefs.h,system.h for installing drivers into RTEMS.
-+*
-+* $Id: sci.h,v 1.5 2006/09/11 21:43:55 joel Exp $
-+****************************************************************************/
-+
-+#ifndef _sci_h_
-+#define _sci_h_
-+
-+/*******************************************************************************
-+ IOCTL commands for the sci driver.
-+ I'm still working on these...
-+*******************************************************************************/
-+
-+#define SCI_IOCTL_PARITY_NONE 0x00 /* no parity bit after the data bits */
-+#define SCI_IOCTL_PARITY_ODD 0x01 /* parity bit added after data bits */
-+#define SCI_IOCTL_PARITY_EVEN 0x02 /* parity bit added after data bits */
-+#define SCI_IOCTL_PARITY_MARK 0x03 /* parity bit is lo, -12 volts, logical 1 */
-+#define SCI_IOCTL_PARITY_SPACE 0x04 /* parity bit is hi, +12 volts, logical 0 */
-+#define SCI_IOCTL_PARITY_FORCED_ON 0x03 /* parity bit is forced hi or lo */
-+#define SCI_IOCTL_PARITY_FORCED_OFF 0x04 /* parity bit is forced hi or lo */
-+
-+#define SCI_IOCTL_BAUD_RATE 0x20 /* set the baud rate, arg is baud */
-+
-+#define SCI_IOCTL_DATA_BITS 0x30 /* set the data bits, arg is # bits */
-+
-+#define SCI_IOCTL_STOP_BITS_1 0x40 /* 1 stop bit after char frame */
-+#define SCI_IOCTL_STOP_BITS_2 0x41 /* 2 stop bit after char frame */
-+
-+#define SCI_IOCTL_MODE_NORMAL 0x50 /* normal operating mode */
-+#define SCI_IOCTL_MODE_LOOP 0x51 /* internal loopback mode */
-+
-+#define SCI_IOCTL_FLOW_NONE 0x60 /* no flow control */
-+#define SCI_IOCTL_FLOW_RTS_CTS 0x61 /* hardware flow control */
-+
-+#define SCI_IOCTL_SEND_BREAK 0x70 /* send an rs-232 break */
-+
-+#define SCI_IOCTL_MODE_1200 0x80 /* 1200,n,8,1 download mode */
-+#define SCI_IOCTL_MODE_9600 0x81 /* 9600,n,8,1 download mode */
-+#define SCI_IOCTL_MODE_9_BIT 0x82 /* 9600,forced,8,1 command mode */
-+\f
-+
-+/*******************************************************************************
-+ SCI Registers
-+*******************************************************************************/
-+
-+/* SCI Control Register 0 (SCCR0) $FFFC08
-+
-+ 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
-+ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
-+ | | | | | | | | | | | | | | | |
-+ | | | | | | | | | | | | | | | +----- 0 baud rate divisor
-+ | | | | | | | | | | | | | | +------- 1 baud rate divisor
-+ | | | | | | | | | | | | | +--------- 2 baud rate divisor
-+ | | | | | | | | | | | | +----------- 3 baud rate divisor
-+ | | | | | | | | | | | |
-+ | | | | | | | | | | | +--------------- 4 baud rate divisor
-+ | | | | | | | | | | +----------------- 5 baud rate divisor
-+ | | | | | | | | | +------------------- 6 baud rate divisor
-+ | | | | | | | | +--------------------- 7 baud rate divisor
-+ | | | | | | | |
-+ | | | | | | | +------------------------- 8 baud rate divisor
-+ | | | | | | +--------------------------- 9 baud rate divisor
-+ | | | | | +----------------------------- 10 baud rate divisor
-+ | | | | +------------------------------- 11 baud rate divisor
-+ | | | |
-+ | | | +----------------------------------- 12 baud rate divisor
-+ | | +------------------------------------- 13 unused
-+ | +--------------------------------------- 14 unused
-+ +----------------------------------------- 15 unused
-+
-+ 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 1 0 0 reset value - (64k baud?)
-+ */
-+
-+#define SCI_BAUD_57_6K 9
-+#define SCI_BAUD_38_4K 14
-+#define SCI_BAUD_19_2K 27
-+#define SCI_BAUD_9600 55
-+#define SCI_BAUD_4800 109
-+#define SCI_BAUD_2400 218
-+#define SCI_BAUD_1200 437
-+\f
-+
-+/* SCI Control Register 1 (SCCR1) $FFFC0A
-+
-+ 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
-+ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
-+ | | | | | | | | | | | | | | | |
-+ | | | | | | | | | | | | | | | +----- 0 send a break
-+ | | | | | | | | | | | | | | +------- 1 rcvr wakeup mode
-+ | | | | | | | | | | | | | +--------- 2 rcvr enable
-+ | | | | | | | | | | | | +----------- 3 xmtr enable
-+ | | | | | | | | | | | |
-+ | | | | | | | | | | | +--------------- 4 idle line intr enable
-+ | | | | | | | | | | +----------------- 5 rcvr intr enable
-+ | | | | | | | | | +------------------- 6 xmit complete intr enable
-+ | | | | | | | | +--------------------- 7 xmtr intr enable
-+ | | | | | | | |
-+ | | | | | | | +------------------------- 8 wakeup on address mark
-+ | | | | | | +--------------------------- 9 mode 1=9 bits, 0=8 bits
-+ | | | | | +----------------------------- 10 parity enable 1=on, 0=off
-+ | | | | +------------------------------- 11 parity type 1=odd, 0=even
-+ | | | |
-+ | | | +----------------------------------- 12 idle line select
-+ | | +------------------------------------- 13 wired-or mode
-+ | +--------------------------------------- 14 loop mode
-+ +----------------------------------------- 15 unused
-+
-+ 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 reset value
-+*/
-+
-+#define SCI_SEND_BREAK 0x0001 /* 0000-0000-0000-0001 */
-+#define SCI_RCVR_WAKEUP 0x0002 /* 0000-0000-0000-0010 */
-+#define SCI_ENABLE_RCVR 0x0004 /* 0000-0000-0000-0100 */
-+#define SCI_ENABLE_XMTR 0x0008 /* 0000-0000-0000-1000 */
-+
-+#define SCI_DISABLE_RCVR 0xFFFB /* 1111-1111-1111-1011 */
-+#define SCI_DISABLE_XMTR 0xFFF7 /* 1111-1111-1111-0111 */
-+
-+#define SCI_ENABLE_INT_IDLE 0x0010 /* 0000-0000-0001-0000 */
-+#define SCI_ENABLE_INT_RX 0x0020 /* 0000-0000-0010-0000 */
-+#define SCI_ENABLE_INT_TX_DONE 0x0040 /* 0000-0000-0100-0000 */
-+#define SCI_ENABLE_INT_TX 0x0080 /* 0000-0000-1000-0000 */
-+
-+#define SCI_DISABLE_INT_ALL 0xFF00 /* 1111-1111-0000-0000 ??? */
-+
-+#define SCI_DISABLE_INT_RX 0xFFDF /* 1111-1111-1101-1111 */
-+#define SCI_CLEAR_RX_INT 0xFFBF /* 1111-1111-1011-1111 */
-+#define SCI_DISABLE_INT_TX 0xFF7F /* 1111-1111-0111-1111 */
-+#define SCI_CLEAR_TDRE 0xFEFF /* 1111-1110-1111-1111 */
-+
-+#define SCI_RCVR_WAKE_ON_MARK 0x0100 /* 0000-0001-0000-0000 */
-+#define SCI_9_DATA_BITS 0x0200 /* 0000-0010-0000-0000 */
-+#define SCI_PARITY_ENABLE 0x0400 /* 0000-0100-0000-0000 */
-+#define SCI_PARITY_ODD 0x0800 /* 0000-1000-0000-0000 */
-+
-+#define SCI_RCVR_WAKE_ON_IDLE 0xFEFF /* 1111-1110-1111-1111 */
-+#define SCI_8_DATA_BITS 0xFDFF /* 1111-1101-1111-1111 */
-+#define SCI_PARITY_DISABLE 0xFBFF /* 1111-1011-1111-1111 */
-+#define SCI_PARITY_EVEN 0xF7FF /* 1111-0111-1111-1111 */
-+
-+#define SCI_PARITY_NONE 0xF3FF /* 1111-0011-1111-1111 */
-+
-+#define SCI_IDLE_LINE_LONG 0x1000 /* 0001-0000-0000-0000 */
-+#define SCI_TXD_OPEN_DRAIN 0x2000 /* 0010-0000-0000-0000 */
-+#define SCI_LOOPBACK_MODE 0x4000 /* 0100-0000-0000-0000 */
-+#define SCI_SCCR1_UNUSED 0x8000 /* 1000-0000-0000-0000 */
-+\f
-+
-+/* SCI Status Register (SCSR) $FFFC0C
-+
-+ 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
-+ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
-+ | | | | | | | | | | | | | | | |
-+ | | | | | | | | | | | | | | | +----- 0 PF - parity error
-+ | | | | | | | | | | | | | | +------- 1 FE - framing error
-+ | | | | | | | | | | | | | +--------- 2 NF - noise flag
-+ | | | | | | | | | | | | +----------- 3 OR - overrun flag
-+ | | | | | | | | | | | |
-+ | | | | | | | | | | | +--------------- 4 IDLE - idle line detected
-+ | | | | | | | | | | +----------------- 5 RAF - rcvr active flag
-+ | | | | | | | | | +------------------- 6 RDRF - rcv data reg full
-+ | | | | | | | | +--------------------- 7 TC - xmt complete flag
-+ | | | | | | | |
-+ | | | | | | | +------------------------- 8 TDRE - xmt data reg empty
-+ | | | | | | +--------------------------- 9 always zero
-+ | | | | | +----------------------------- 10 always zero
-+ | | | | +------------------------------- 11 always zero
-+ | | | |
-+ | | | +----------------------------------- 12 always zero
-+ | | +------------------------------------- 13 always zero
-+ | +--------------------------------------- 14 always zero
-+ +----------------------------------------- 15 always zero
-+
-+ 0 0 0 0 - 0 0 0 1 - 1 0 0 0 - 0 0 0 0 reset value
-+*/
-+
-+#define SCI_ERROR_PARITY 0x0001 /* 0000-0000-0000-0001 */
-+#define SCI_ERROR_FRAMING 0x0002 /* 0000-0000-0000-0010 */
-+#define SCI_ERROR_NOISE 0x0004 /* 0000-0000-0000-0100 */
-+#define SCI_ERROR_OVERRUN 0x0008 /* 0000-0000-0000-1000 */
-+
-+#define SCI_IDLE_LINE 0x0010 /* 0000-0000-0001-0000 */
-+#define SCI_RCVR_ACTIVE 0x0020 /* 0000-0000-0010-0000 */
-+#define SCI_RCVR_READY 0x0040 /* 0000-0000-0100-0000 */
-+#define SCI_XMTR_IDLE 0x0080 /* 0000-0000-1000-0000 */
-+
-+#define SCI_CLEAR_RX_INT 0xFFBF /* 1111-1111-1011-1111 */
-+
-+#define SCI_XMTR_READY 0x0100 /* 0000-0001-0000-0000 */
-+
-+#define SCI_CLEAR_TDRE 0xFEFF /* 1111-1110-1111-1111 */
-+
-+#define SCI_XMTR_AVAILABLE 0x0180 /* 0000-0001-1000-0000 */
-+
-+\f
-+
-+/*******************************************************************************
-+ Function prototypes
-+*******************************************************************************/
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/* look at console_open to see how this is called */
-+
-+const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled );
-+
-+/* SCI interrupt */
-+
-+/*rtems_isr SciIsr( rtems_vector_number vector ); */
-+
-+/*int32_t SciOpenPolled ( int32_t major, int32_t minor, void *arg ); */
-+/*int32_t SciOpenInterrupt ( int32_t major, int32_t minor, void *arg ); */
-+
-+/*int32_t SciClose ( int32_t major, int32_t minor, void *arg ); */
-+
-+/*int32_t SciWritePolled ( int32_t minor, const char *buf, int32_t len ); */
-+/*int32_t SciWriteInterrupt( int32_t minor, const char *buf, int32_t len ); */
-+
-+/*int32_t SciReadPolled ( int32_t minor ); */
-+
-+/*int32_t SciSetAttributes ( int32_t minor, const struct termios *t ); */
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* _sci_h_ */
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM 2008-03-04 00:06:30.000000000 +0100
-@@ -0,0 +1,200 @@
-+/* linkcmds
-+ *
-+ * $Id: linkcmds_ROM,v 1.5 2008/03/03 23:06:30 joel Exp $
-+ */
-+
-+OUTPUT_ARCH(m68k)
-+STARTUP(except_vect_332_ROM.o)
-+__DYNAMIC = 0;
-+
-+/*
-+ * ROM:
-+ * +--------------------+ <- low memory
-+ * | .text |
-+ * | etext |
-+ * | ctor list | the ctor and dtor lists are for
-+ * | dtor list | C++ support
-+ * | _endtext |
-+ * | temporary .data | .data is moved to RAM by crt0
-+ * | |
-+ * +--------------------+ <- high memory
-+ *
-+ *
-+ * RAM:
-+ * +--------------------+ <- low memory
-+ * | .data | initialized data goes here
-+ * | _sdata |
-+ * | _edata |
-+ * +--------------------+
-+ * | .bss |
-+ * | __bss_start | start of bss, cleared by crt0
-+ * | _end | start of heap, used by sbrk()
-+ * +--------------------+
-+ * | heap space |
-+ * | _ENDHEAP |
-+ * | stack space |
-+ * | __stack | top of stack
-+ * +--------------------+ <- high memory
-+ */
-+
-+MEMORY
-+{
-+ rom : ORIGIN = 0x90000, LENGTH = 0x70000
-+ ram : ORIGIN = 0x03000, LENGTH = 0x7d000
-+}
-+
-+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x003000;
-+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x7d000;
-+_RamEnd = _RamBase + _RamSize;
-+
-+__end_of_ram = 0x080000;
-+_copy_data_from_rom = 1;
-+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
-+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
-+
-+/*
-+ *
-+ */
-+SECTIONS
-+{
-+ .text :
-+ {
-+ . = .;
-+ CREATE_OBJECT_SYMBOLS
-+ text_start = .;
-+ _text_start = .;
-+ *(.text*)
-+ . = ALIGN (16);
-+
-+
-+ /*
-+ * Initialization and finalization code.
-+ *
-+ * Various files can provide initialization and finalization
-+ * functions. crtbegin.o and crtend.o are two instances. The
-+ * body of these functions are in .init and .fini sections. We
-+ * accumulate the bodies here, and prepend function prologues
-+ * from crti.o and function epilogues from crtn.o. crti.o must
-+ * be linked first; crtn.o must be linked last. Because these
-+ * are wildcards, it doesn't matter if the user does not
-+ * actually link against crti.o and crtn.o; the linker won't
-+ * look for a file to match a wildcard. The wildcard also
-+ * means that it doesn't matter which directory crti.o and
-+ * crtn.o are in.
-+ */
-+ PROVIDE (_init = .);
-+ *crti.o(.init)
-+ *(.init)
-+ *crtn.o(.init)
-+ PROVIDE (_fini = .);
-+ *crti.o(.fini)
-+ *(.fini)
-+ *crtn.o(.fini)
-+
-+ /*
-+ * Special FreeBSD sysctl sections.
-+ */
-+ . = ALIGN (16);
-+ __start_set_sysctl_set = .;
-+ *(set_sysctl_*);
-+ __stop_set_sysctl_set = ABSOLUTE(.);
-+ *(set_domain_*);
-+ *(set_pseudo_*);
-+
-+ /*
-+ * C++ constructors/destructors
-+ *
-+ * gcc uses crtbegin.o to find the start of the constructors
-+ * and destructors so we make sure it is first. Because this
-+ * is a wildcard, it doesn't matter if the user does not
-+ * actually link against crtbegin.o; the linker won't look for
-+ * a file to match a wildcard. The wildcard also means that
-+ * it doesn't matter which directory crtbegin.o is in. The
-+ * constructor and destructor list are terminated in
-+ * crtend.o. The same comments apply to it.
-+ */
-+ . = ALIGN (16);
-+ *crtbegin.o(.ctors)
-+ *(.ctors)
-+ *crtend.o(.ctors)
-+ *crtbegin.o(.dtors)
-+ *(.dtors)
-+ *crtend.o(.dtors)
-+
-+ *(.eh_frame)
-+ . = ALIGN (16);
-+
-+ /*
-+ * Read-only data
-+ */
-+ . = ALIGN (16);
-+ _rodata_start = . ;
-+ *(.rodata*)
-+ *(.gnu.linkonce.r*)
-+
-+ etext = ALIGN(0x10);
-+ __CTOR_LIST__ = .;
-+ LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
-+ *(.ctors)
-+ LONG(0)
-+ __CTOR_END__ = .;
-+ __DTOR_LIST__ = .;
-+ LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
-+ *(.dtors)
-+ LONG(0)
-+ __DTOR_END__ = .;
-+ *(.lit)
-+ *(.shdata)
-+ _etext = .;
-+ _endtext = .;
-+ } > rom
-+ .gcc_exc :
-+ AT ( ADDR(.text) + SIZEOF( .text ) )
-+ {
-+ *(.gcc_exc)
-+ } > ram
-+ .data :
-+ {
-+ data_start = .;
-+ _data_start = .;
-+ _copy_start = .;
-+ _sdata = . ;
-+ *(.data)
-+ *(.gnu.linkonce.d*)
-+ *(.gcc_except_table*)
-+ *(.jcr)
-+
-+ CONSTRUCTORS
-+ edata = ALIGN(0x10);
-+ _edata = .;
-+ } > ram
-+ .shbss :
-+ {
-+ *(.shbss)
-+ } > ram
-+ .bss :
-+ {
-+ __bss_start = ALIGN(0x8);
-+ bss_start = .;
-+ _bss_start = .;
-+ _clear_start = .;
-+ *(.shbss)
-+ *(.dynbss)
-+ *(.bss* .gnu.linkonce.b.*)
-+ *(COMMON)
-+ . = ALIGN (16);
-+ end = .;
-+ _end = ALIGN(0x8);
-+ __end = ALIGN(0x8);
-+
-+ _WorkspaceBase = . + _StackSize;
-+ } > ram
-+ .stab . (NOLOAD) :
-+ {
-+ [ .stab ]
-+ }
-+ .stabstr . (NOLOAD) :
-+ {
-+ [ .stabstr ]
-+ }
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/except_vect_332_ROM.S
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/except_vect_332_ROM.S 2004-04-21 18:01:35.000000000 +0200
-@@ -0,0 +1,293 @@
-+/*
-+ * $Id: except_vect_332_ROM.S,v 1.3 2004/04/21 16:01:35 ralf Exp $
-+ */
-+
-+/* Exception Vector definitions follow */
-+
-+ /* !!! Warning !!! This table is not tested, and
-+ the user must make sure it is complete. */
-+
-+ /* If we use TRAP #15 for reboot, note that group 0 and 1 exceptions
-+ will have priority. */
-+
-+ /* This is the "magic word" that CPU32bug uses to indicate that
-+ there is a bootable image here. */
-+ .long 0xBEEFBEEF
-+
-+ /* Vector 0: RESET: Initial SSP */
-+ .long _RamEnd
-+ /* Vector 1: RESET: Initial PC */
-+ .long start
-+
-+ /* default action for undefined vectors is to re-boot */
-+
-+ /* Note group 0 and 1 exception (like trace) have priority
-+ over other exceptions (like trap #15) that may call this. */
-+
-+ /* Vectors 2-255 */
-+ .long reboot /* exception vector: 2 */
-+ .long reboot /* exception vector: 3 */
-+ .long reboot /* exception vector: 4 */
-+ .long reboot /* exception vector: 5 */
-+ .long reboot /* exception vector: 6 */
-+ .long reboot /* exception vector: 7 */
-+ .long reboot /* exception vector: 8 */
-+ .long reboot /* exception vector: 9 */
-+ .long reboot /* exception vector: 10 */
-+ .long reboot /* exception vector: 11 */
-+ .long reboot /* exception vector: 12 */
-+ .long reboot /* exception vector: 13 */
-+ .long reboot /* exception vector: 14 */
-+ .long reboot /* exception vector: 15 */
-+ .long reboot /* exception vector: 16 */
-+ .long reboot /* exception vector: 17 */
-+ .long reboot /* exception vector: 18 */
-+ .long reboot /* exception vector: 19 */
-+ .long reboot /* exception vector: 20 */
-+ .long reboot /* exception vector: 21 */
-+ .long reboot /* exception vector: 22 */
-+ .long reboot /* exception vector: 23 */
-+ .long reboot /* exception vector: 24 */
-+ .long reboot /* exception vector: 25 */
-+ .long reboot /* exception vector: 26 */
-+ .long reboot /* exception vector: 27 */
-+ .long reboot /* exception vector: 28 */
-+ .long reboot /* exception vector: 29 */
-+ .long reboot /* exception vector: 30 */
-+ .long reboot /* exception vector: 31 */
-+ .long reboot /* exception vector: 32 */
-+ .long reboot /* exception vector: 33 */
-+ .long reboot /* exception vector: 34 */
-+ .long reboot /* exception vector: 35 */
-+ .long reboot /* exception vector: 36 */
-+ .long reboot /* exception vector: 37 */
-+ .long reboot /* exception vector: 38 */
-+ .long reboot /* exception vector: 39 */
-+ .long reboot /* exception vector: 40 */
-+ .long reboot /* exception vector: 41 */
-+ .long reboot /* exception vector: 42 */
-+ .long reboot /* exception vector: 43 */
-+ .long reboot /* exception vector: 44 */
-+ .long reboot /* exception vector: 45 */
-+ .long reboot /* exception vector: 46 */
-+ .long _reboot /* the reboot trap: 47 */
-+ .long reboot /* exception vector: 48 */
-+ .long reboot /* exception vector: 49 */
-+ .long reboot /* exception vector: 50 */
-+ .long reboot /* exception vector: 51 */
-+ .long reboot /* exception vector: 52 */
-+ .long reboot /* exception vector: 53 */
-+ .long reboot /* exception vector: 54 */
-+ .long reboot /* exception vector: 55 */
-+ .long reboot /* exception vector: 56 */
-+ .long reboot /* exception vector: 57 */
-+ .long reboot /* exception vector: 58 */
-+ .long reboot /* exception vector: 59 */
-+ .long reboot /* exception vector: 60 */
-+ .long reboot /* exception vector: 61 */
-+ .long reboot /* exception vector: 62 */
-+ .long reboot /* exception vector: 63 */
-+ .long reboot /* exception vector: 64 */
-+ .long reboot /* exception vector: 65 */
-+ .long reboot /* exception vector: 66 */
-+ .long reboot /* exception vector: 67 */
-+ .long reboot /* exception vector: 68 */
-+ .long reboot /* exception vector: 69 */
-+ .long reboot /* exception vector: 70 */
-+ .long reboot /* exception vector: 71 */
-+ .long reboot /* exception vector: 72 */
-+ .long reboot /* exception vector: 73 */
-+ .long reboot /* exception vector: 74 */
-+ .long reboot /* exception vector: 75 */
-+ .long reboot /* exception vector: 76 */
-+ .long reboot /* exception vector: 77 */
-+ .long reboot /* exception vector: 78 */
-+ .long reboot /* exception vector: 79 */
-+ .long reboot /* exception vector: 80 */
-+ .long reboot /* exception vector: 81 */
-+ .long reboot /* exception vector: 82 */
-+ .long reboot /* exception vector: 83 */
-+ .long reboot /* exception vector: 84 */
-+ .long reboot /* exception vector: 85 */
-+ .long reboot /* exception vector: 86 */
-+ .long reboot /* exception vector: 87 */
-+ .long reboot /* exception vector: 88 */
-+ .long reboot /* exception vector: 89 */
-+ .long reboot /* exception vector: 90 */
-+ .long reboot /* exception vector: 91 */
-+ .long reboot /* exception vector: 92 */
-+ .long reboot /* exception vector: 93 */
-+ .long reboot /* exception vector: 94 */
-+ .long reboot /* exception vector: 95 */
-+ .long reboot /* exception vector: 96 */
-+ .long reboot /* exception vector: 97 */
-+ .long reboot /* exception vector: 98 */
-+ .long reboot /* exception vector: 99 */
-+ .long reboot /* exception vector: 100 */
-+ .long reboot /* exception vector: 101 */
-+ .long reboot /* exception vector: 102 */
-+ .long reboot /* exception vector: 103 */
-+ .long reboot /* exception vector: 104 */
-+ .long reboot /* exception vector: 105 */
-+ .long reboot /* exception vector: 106 */
-+ .long reboot /* exception vector: 107 */
-+ .long reboot /* exception vector: 108 */
-+ .long reboot /* exception vector: 109 */
-+ .long reboot /* exception vector: 110 */
-+ .long reboot /* exception vector: 111 */
-+ .long reboot /* exception vector: 112 */
-+ .long reboot /* exception vector: 113 */
-+ .long reboot /* exception vector: 114 */
-+ .long reboot /* exception vector: 115 */
-+ .long reboot /* exception vector: 116 */
-+ .long reboot /* exception vector: 117 */
-+ .long reboot /* exception vector: 118 */
-+ .long reboot /* exception vector: 119 */
-+ .long reboot /* exception vector: 120 */
-+ .long reboot /* exception vector: 121 */
-+ .long reboot /* exception vector: 122 */
-+ .long reboot /* exception vector: 123 */
-+ .long reboot /* exception vector: 124 */
-+ .long reboot /* exception vector: 125 */
-+ .long reboot /* exception vector: 126 */
-+ .long reboot /* exception vector: 127 */
-+ .long reboot /* exception vector: 128 */
-+ .long reboot /* exception vector: 129 */
-+ .long reboot /* exception vector: 130 */
-+ .long reboot /* exception vector: 131 */
-+ .long reboot /* exception vector: 132 */
-+ .long reboot /* exception vector: 133 */
-+ .long reboot /* exception vector: 134 */
-+ .long reboot /* exception vector: 135 */
-+ .long reboot /* exception vector: 136 */
-+ .long reboot /* exception vector: 137 */
-+ .long reboot /* exception vector: 138 */
-+ .long reboot /* exception vector: 139 */
-+ .long reboot /* exception vector: 140 */
-+ .long reboot /* exception vector: 141 */
-+ .long reboot /* exception vector: 142 */
-+ .long reboot /* exception vector: 143 */
-+ .long reboot /* exception vector: 144 */
-+ .long reboot /* exception vector: 145 */
-+ .long reboot /* exception vector: 146 */
-+ .long reboot /* exception vector: 147 */
-+ .long reboot /* exception vector: 148 */
-+ .long reboot /* exception vector: 149 */
-+ .long reboot /* exception vector: 150 */
-+ .long reboot /* exception vector: 151 */
-+ .long reboot /* exception vector: 152 */
-+ .long reboot /* exception vector: 153 */
-+ .long reboot /* exception vector: 154 */
-+ .long reboot /* exception vector: 155 */
-+ .long reboot /* exception vector: 156 */
-+ .long reboot /* exception vector: 157 */
-+ .long reboot /* exception vector: 158 */
-+ .long reboot /* exception vector: 159 */
-+ .long reboot /* exception vector: 160 */
-+ .long reboot /* exception vector: 161 */
-+ .long reboot /* exception vector: 162 */
-+ .long reboot /* exception vector: 163 */
-+ .long reboot /* exception vector: 164 */
-+ .long reboot /* exception vector: 165 */
-+ .long reboot /* exception vector: 166 */
-+ .long reboot /* exception vector: 167 */
-+ .long reboot /* exception vector: 168 */
-+ .long reboot /* exception vector: 169 */
-+ .long reboot /* exception vector: 170 */
-+ .long reboot /* exception vector: 171 */
-+ .long reboot /* exception vector: 172 */
-+ .long reboot /* exception vector: 173 */
-+ .long reboot /* exception vector: 174 */
-+ .long reboot /* exception vector: 175 */
-+ .long reboot /* exception vector: 176 */
-+ .long reboot /* exception vector: 177 */
-+ .long reboot /* exception vector: 178 */
-+ .long reboot /* exception vector: 179 */
-+ .long reboot /* exception vector: 180 */
-+ .long reboot /* exception vector: 181 */
-+ .long reboot /* exception vector: 182 */
-+ .long reboot /* exception vector: 183 */
-+ .long reboot /* exception vector: 184 */
-+ .long reboot /* exception vector: 185 */
-+ .long reboot /* exception vector: 186 */
-+ .long reboot /* exception vector: 187 */
-+ .long reboot /* exception vector: 188 */
-+ .long reboot /* exception vector: 189 */
-+ .long reboot /* exception vector: 190 */
-+ .long reboot /* exception vector: 191 */
-+ .long reboot /* exception vector: 192 */
-+ .long reboot /* exception vector: 193 */
-+ .long reboot /* exception vector: 194 */
-+ .long reboot /* exception vector: 195 */
-+ .long reboot /* exception vector: 196 */
-+ .long reboot /* exception vector: 197 */
-+ .long reboot /* exception vector: 198 */
-+ .long reboot /* exception vector: 199 */
-+ .long reboot /* exception vector: 200 */
-+ .long reboot /* exception vector: 201 */
-+ .long reboot /* exception vector: 202 */
-+ .long reboot /* exception vector: 203 */
-+ .long reboot /* exception vector: 204 */
-+ .long reboot /* exception vector: 205 */
-+ .long reboot /* exception vector: 206 */
-+ .long reboot /* exception vector: 207 */
-+ .long reboot /* exception vector: 208 */
-+ .long reboot /* exception vector: 209 */
-+ .long reboot /* exception vector: 210 */
-+ .long reboot /* exception vector: 211 */
-+ .long reboot /* exception vector: 212 */
-+ .long reboot /* exception vector: 213 */
-+ .long reboot /* exception vector: 214 */
-+ .long reboot /* exception vector: 215 */
-+ .long reboot /* exception vector: 216 */
-+ .long reboot /* exception vector: 217 */
-+ .long reboot /* exception vector: 218 */
-+ .long reboot /* exception vector: 219 */
-+ .long reboot /* exception vector: 220 */
-+ .long reboot /* exception vector: 221 */
-+ .long reboot /* exception vector: 222 */
-+ .long reboot /* exception vector: 223 */
-+ .long reboot /* exception vector: 224 */
-+ .long reboot /* exception vector: 225 */
-+ .long reboot /* exception vector: 226 */
-+ .long reboot /* exception vector: 227 */
-+ .long reboot /* exception vector: 228 */
-+ .long reboot /* exception vector: 229 */
-+ .long reboot /* exception vector: 230 */
-+ .long reboot /* exception vector: 231 */
-+ .long reboot /* exception vector: 232 */
-+ .long reboot /* exception vector: 233 */
-+ .long reboot /* exception vector: 234 */
-+ .long reboot /* exception vector: 235 */
-+ .long reboot /* exception vector: 236 */
-+ .long reboot /* exception vector: 237 */
-+ .long reboot /* exception vector: 238 */
-+ .long reboot /* exception vector: 239 */
-+ .long reboot /* exception vector: 240 */
-+ .long reboot /* exception vector: 241 */
-+ .long reboot /* exception vector: 242 */
-+ .long reboot /* exception vector: 243 */
-+ .long reboot /* exception vector: 244 */
-+ .long reboot /* exception vector: 245 */
-+ .long reboot /* exception vector: 246 */
-+ .long reboot /* exception vector: 247 */
-+ .long reboot /* exception vector: 248 */
-+ .long reboot /* exception vector: 249 */
-+ .long reboot /* exception vector: 250 */
-+ .long reboot /* exception vector: 251 */
-+ .long reboot /* exception vector: 252 */
-+ .long reboot /* exception vector: 253 */
-+ .long reboot /* exception vector: 254 */
-+ .long reboot /* exception vector: 255 */
-+
-+_reboot:
-+ move #0x2700,%sr /* mask interrupts */
-+ movea.l (0x0).w,%a7 /* load stack */
-+ movea.l (0x4).w,%a0 /* jmp to location of reset vector */
-+ jmp (%a0)
-+
-+reboot:
-+ trap #15 /* use trap exception to enter supervisor
-+ state. Trace mode ( and other group 0
-+ and 1 exceptions) *could* screw this up if
-+ not vectored to reboot or did not return. */
-Index: rtems/c/src/lib/libbsp/m68k/mo376/console/console.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/console/console.c 2008-05-12 20:43:28.000000000 +0200
-@@ -0,0 +1,171 @@
-+/*
-+ * This file contains the generic console driver shell used
-+ * by all console drivers using libchip.
-+ *
-+ * This driver uses the termios pseudo driver.
-+ *
-+ * COPYRIGHT (c) 1989-1997.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: console.c,v 1.9 2008/05/12 18:43:28 joel Exp $
-+ */
-+
-+#include <bsp.h>
-+#include <rtems/libio.h>
-+#include <termios.h>
-+#include "sci.h"
-+
-+/*PAGE
-+ *
-+ * console_open
-+ *
-+ * open a port as a termios console.
-+ */
-+
-+rtems_device_driver console_open(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_status_code status;
-+
-+ /* the console is opened three times at startup */
-+ /* for standard input, output, and error */
-+
-+ /* Get correct callback structure for the device */
-+
-+ /* argument of FALSE gives us interrupt driven serial io */
-+ /* argument of TRUE gives us polling based serial io */
-+
-+ /* SCI internal uart */
-+
-+ status = rtems_termios_open( major, minor, arg, SciGetTermiosHandlers( TRUE ) );
-+
-+ return status;
-+}
-+
-+/*PAGE
-+ *
-+ * console_close
-+ *
-+ * This routine closes a port that has been opened as console.
-+ */
-+
-+rtems_device_driver console_close(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_close (arg);
-+}
-+
-+/*PAGE
-+ *
-+ * console_read
-+ *
-+ * This routine uses the termios driver to read a character.
-+ */
-+
-+rtems_device_driver console_read(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_read (arg);
-+}
-+
-+/*PAGE
-+ *
-+ * console_write
-+ *
-+ * this routine uses the termios driver to write a character.
-+ */
-+
-+rtems_device_driver console_write(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_write (arg);
-+}
-+
-+/*PAGE
-+ *
-+ * console_control
-+ *
-+ * this routine uses the termios driver to process io
-+ */
-+
-+rtems_device_driver console_control(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_ioctl (arg);
-+}
-+
-+/*PAGE
-+ *
-+ * console_initialize
-+ *
-+ * Routine called to initialize the console device driver.
-+ */
-+
-+rtems_device_driver console_initialize(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor_arg,
-+ void *arg
-+)
-+{
-+ rtems_status_code status;
-+
-+ /*
-+ * initialize the termio interface.
-+ */
-+ rtems_termios_initialize();
-+
-+ /*
-+ * register the SCI device name for termios
-+ * do this over in the sci driver init routine?
-+ */
-+
-+ status = rtems_io_register_name( "/dev/sci", major, 0 );
-+
-+ if (status != RTEMS_SUCCESSFUL)
-+ {
-+ rtems_fatal_error_occurred(status);
-+ }
-+
-+ /*
-+ * Link the uart device to the console device
-+ */
-+
-+#if 1
-+ status = rtems_io_register_name( "/dev/console", major, 0 );
-+
-+ if (status != RTEMS_SUCCESSFUL)
-+ {
-+ rtems_fatal_error_occurred(status);
-+ }
-+#else
-+ if ( link( "/dev/sci", "/dev/console") < 0 )
-+ {
-+ rtems_fatal_error_occurred( RTEMS_IO_ERROR );
-+ }
-+#endif
-+
-+ /*
-+ * Console Initialize Succesful
-+ */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/start/start.S
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/start/start.S 2009-11-29 01:11:56.463558538 +0100
-@@ -0,0 +1,150 @@
-+/*
-+ * $Id
-+ */
-+
-+#include "mrm332.h"
-+#include <rtems/asm.h>
-+#include <rtems/m68k/sim.h>
-+
-+BEGIN_CODE
-+
-+ /* Put the header necessary for the modified CPU32bug to automatically
-+ start up rtems: */
-+#if 0
-+.long 0xbeefbeef ;
-+#endif
-+.long 0 ;
-+.long start ;
-+
-+.global start
-+ start:
-+
-+ oriw #0x0700,sr
-+ movel #end, d0
-+ addl #_StackSize,d0
-+ movel d0,sp
-+ movel d0,a6
-+
-+ /* include in ram_init.S */
-+ /*
-+ * Initalize the SIM module.
-+ * The stack pointer is not usable until the RAM chip select lines
-+ * are configured. The following code must remain inline.
-+ */
-+
-+ /* Module Configuration Register */
-+ /* see section(s) 3.1.3-3.1.6 of the SIM Reference Manual */
-+ lea SIMCR, a0
-+ movew #FRZSW,d0
-+ oriw #SAM(0,8,SHEN),d0
-+ oriw #(MM*SIM_MM),d0
-+ oriw #SAM(SIM_IARB,0,IARB),d0
-+ movew d0, a0@
-+
-+ jsr start_c /* Jump to the C startup code */
-+
-+END_CODE
-+
-+#if 0
-+
-+ /* Synthesizer Control Register */
-+ /* see section(s) 4.8 */
-+ /* end include in ram_init.S */
-+ *SYNCR = (unsigned short int)
-+ ( SAM(MRM_W,15,VCO) | SAM(0x0,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
-+ while (! (*SYNCR & SLOCK)); /* protect from clock overshoot */
-+ /* include in ram_init.S */
-+ *SYNCR = (unsigned short int)
-+ ( SAM(MRM_W,15,VCO) | SAM(MRM_X,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
-+
-+ /* System Protection Control Register */
-+ /* !!! can only write to once after reset !!! */
-+ /* see section 3.8.4 of the SIM Reference Manual */
-+ *SYPCR = (unsigned char)( HME | BME );
-+
-+ /* Periodic Interrupr Control Register */
-+ /* see section 3.8.2 of the SIM Reference Manual */
-+ *PICR = (unsigned short int)
-+ ( SAM(0,8,PIRQL) | SAM(MRM_PIV,0,PIV) );
-+ /* ^^^ zero disables interrupt, don't enable here or ram_init will
-+ be wrong. It's enabled below. */
-+
-+ /* Periodic Interrupt Timer Register */
-+ /* see section 3.8.3 of the SIM Reference Manual */
-+ *PITR = (unsigned short int)( SAM(0x09,0,PITM) );
-+ /* 1.098mS interrupt, assuming 32.768 KHz input clock */
-+
-+ /* Port C Data */
-+ /* load values before enabled */
-+ *PORTC = (unsigned char) 0x0;
-+
-+ /* Port E and F Data Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *PORTE0 = (unsigned char) 0;
-+ *PORTF0 = (unsigned char) 0;
-+
-+ /* Port E and F Data Direction Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *DDRE = (unsigned char) 0xff;
-+ *DDRF = (unsigned char) 0xfd;
-+
-+ /* Port E and F Pin Assignment Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *PEPAR = (unsigned char) 0;
-+ *PFPAR = (unsigned char) 0;
-+
-+ /* end of SIM initalization code */
-+ /* end include in ram_init.S */
-+
-+ /*
-+ * Initialize RAM by copying the .data section out of ROM (if
-+ * needed) and "zero-ing" the .bss section.
-+ */
-+ {
-+ register char *src = _etext;
-+ register char *dst = _copy_start;
-+
-+ if (_copy_data_from_rom)
-+ /* ROM has data at end of text; copy it. */
-+ while (dst < _edata)
-+ *dst++ = *src++;
-+
-+ /* Zero bss */
-+ for (dst = _clear_start; dst< end; dst++)
-+ {
-+ *dst = 0;
-+ }
-+ }
-+
-+ /*
-+ * Initialize vector table.
-+ */
-+ {
-+ m68k_isr_entry *monitors_vector_table;
-+
-+ m68k_get_vbr(monitors_vector_table);
-+
-+ M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
-+ M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
-+ M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
-+ M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
-+ M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
-+
-+ m68k_set_vbr(&M68Kvec);
-+ }
-+
-+ /*
-+ * Initalize the board.
-+ */
-+ Spurious_Initialize();
-+ console_init();
-+
-+ /*
-+ * Execute main with arguments argc and agrv.
-+ */
-+ boot_card(1,__argv);
-+ reboot();
-+
-+}
-+
-+#endif
-Index: rtems/c/src/lib/libbsp/m68k/mo376/misc/dotests
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/misc/dotests 2009-11-29 01:11:56.463558538 +0100
-@@ -0,0 +1,15 @@
-+#! /bin/bash
-+#
-+# $Id: dotests,v 1.1 2001/05/25 16:28:46 joel Exp $
-+#
-+
-+mkdir MyTests
-+find -name MyTests -prune -or -name "*.nxe" -exec cp {} MyTests \;
-+
-+stty 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 </dev/ttyS1
-+/bin/cp /dev/ttyS1 screen &
-+cpJob=$!
-+
-+( cd MyTests; for f in *nxe; do m68k-elf-gdb ${f} </dev/null; done )
-+
-+kill -9 $cpJob
-Index: rtems/c/src/lib/libbsp/m68k/mo376/include/bsp.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/include/bsp.h 2007-12-11 16:49:20.000000000 +0100
-@@ -0,0 +1,131 @@
-+/* bsp.h
-+ *
-+ * This include file contains all mrm board IO definitions.
-+ *
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: bsp.h,v 1.17 2007/12/11 15:49:20 joel Exp $
-+ */
-+
-+#ifndef _BSP_H
-+#define _BSP_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <bspopts.h>
-+
-+#include <rtems.h>
-+#include <rtems/bspIo.h>
-+#include <rtems/clockdrv.h>
-+#include <rtems/console.h>
-+#include <rtems/iosupp.h>
-+#include <mrm332.h>
-+#include <rtems/m68k/sim.h>
-+#include <rtems/m68k/qsm.h>
-+
-+/*
-+ * confdefs.h overrides for this BSP:
-+ * - number of termios serial ports (defaults to 1)
-+ * - Interrupt stack space is not minimum if defined.
-+ */
-+
-+#define CONSOLE_SCI
-+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
-+
-+/*
-+ * Simple spin delay in microsecond units for device drivers.
-+ * This is very dependent on the clock speed of the target.
-+ */
-+
-+#define rtems_bsp_delay( microseconds ) \
-+ { register uint32_t _delay=(microseconds); \
-+ register uint32_t _tmp=123; \
-+ asm volatile( "0: \
-+ nbcd %0 ; \
-+ nbcd %0 ; \
-+ dbf %1,0b" \
-+ : "=d" (_tmp), "=d" (_delay) \
-+ : "0" (_tmp), "1" (_delay) ); \
-+ }
-+
-+/* externals */
-+
-+extern char _etext[];
-+extern char _copy_start[];
-+extern char _edata[];
-+extern char _clear_start[];
-+extern char end[];
-+extern char _copy_data_from_rom[];
-+
-+/* constants */
-+
-+#ifdef __START_C__
-+#define STACK_SIZE "#0x800"
-+#else
-+#define STACK_SIZE 0x800
-+#endif
-+
-+/* macros */
-+
-+#define RAW_PUTS(str) \
-+ { register char *ptr = str; \
-+ while (*ptr) SCI_output_char(*ptr++); \
-+ }
-+
-+#define RAW_PUTI(n) { \
-+ register int i, j; \
-+ \
-+ RAW_PUTS("0x"); \
-+ for (i=28;i>=0;i -= 4) { \
-+ j = (n>>i) & 0xf; \
-+ SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \
-+ } \
-+ }
-+
-+/* miscellaneous stuff assumed to exist */
-+
-+extern m68k_isr_entry M68Kvec[]; /* vector table address */
-+
-+extern int stack_size;
-+extern int stack_start;
-+
-+/*
-+ * Device Driver Table Entries
-+ */
-+
-+/*
-+ * NOTE: Use the standard Console driver entry
-+ */
-+
-+/*
-+ * NOTE: Use the standard Clock driver entry
-+ */
-+
-+/* functions */
-+
-+void bsp_cleanup( void );
-+
-+m68k_isr_entry set_vector(
-+ rtems_isr_entry handler,
-+ rtems_vector_number vector,
-+ int type
-+);
-+
-+void Spurious_Initialize(void);
-+
-+void _UART_flush(void);
-+
-+void outbyte(char);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-Index: rtems/c/src/lib/libbsp/m68k/mo376/misc/interr.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/misc/interr.c 2008-09-06 19:09:08.000000000 +0200
-@@ -0,0 +1,99 @@
-+/*
-+ * Internal Error Handler
-+ *
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: interr.c,v 1.5 2008/09/06 17:09:08 ralf Exp $
-+ */
-+
-+#include <rtems/system.h>
-+#include <rtems/score/interr.h>
-+#include <rtems/score/sysstate.h>
-+#include <rtems/score/userext.h>
-+
-+/*PAGE
-+ *
-+ * _Internal_error_Occurred
-+ *
-+ * This routine will invoke the fatal error handler supplied by the user
-+ * followed by the the default one provided by the executive. The default
-+ * error handler assumes no hardware is present to help inform the user
-+ * of the problem. Halt stores the error code in a known register,
-+ * disables interrupts, and halts the CPU. If the CPU does not have a
-+ * halt instruction, it will loop to itself.
-+ *
-+ * Input parameters:
-+ * the_source - what subsystem the error originated in
-+ * is_internal - if the error was internally generated
-+ * the_error - fatal error status code
-+ *
-+ * Output parameters:
-+ * As much information as possible is stored in a CPU dependent fashion.
-+ * See the CPU dependent code for more information.
-+ *
-+ * NOTE: The the_error is not necessarily a directive status code.
-+ */
-+
-+/*
-+ * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this
-+ * change, the_error is only known only to the cpu :).
-+ *
-+ * From "bsp.h" which is not yet available in the arch tree during
-+ * this phase of install. jsg
-+ */
-+void outbyte(char);
-+void bsp_cleanup( void );
-+
-+#define RAW_PUTS(str) \
-+ { register char *ptr = str; \
-+ while (*ptr) outbyte(*ptr++); \
-+ }
-+
-+#define RAW_PUTI(n) { \
-+ register int i, j; \
-+ \
-+ RAW_PUTS("0x"); \
-+ for (i=28;i>=0;i -= 4) { \
-+ j = (n>>i) & 0xf; \
-+ outbyte( (j>9 ? j-10+'a' : j+'0') ); \
-+ } \
-+ }
-+
-+void volatile _Internal_error_Occurred(
-+ Internal_errors_Source the_source,
-+ bool is_internal,
-+ uint32_t the_error
-+)
-+{
-+
-+ _Internal_errors_What_happened.the_source = the_source;
-+ _Internal_errors_What_happened.is_internal = is_internal;
-+ _Internal_errors_What_happened.the_error = the_error;
-+
-+ _User_extensions_Fatal( the_source, is_internal, the_error );
-+
-+ _System_state_Set( SYSTEM_STATE_FAILED );
-+
-+ /* try to print error message to outbyte */
-+ RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
-+ RAW_PUTS("RTEMS: fatal error ");
-+ RAW_PUTI( the_error );
-+ RAW_PUTS(" (");
-+ outbyte( (char)((the_error>>24) & 0xff) );
-+ outbyte( (char)((the_error>>16) & 0xff) );
-+ outbyte( (char)((the_error>>8) & 0xff) );
-+ outbyte( (char)(the_error & 0xff) );
-+ RAW_PUTS(").\r\n");
-+
-+ /* configure peripherals for a safe exit */
-+ bsp_cleanup();
-+
-+ _CPU_Fatal_halt( the_error );
-+
-+ /* will not return from this routine */
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/ChangeLog
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/ChangeLog 2008-12-08 06:15:06.000000000 +0100
-@@ -0,0 +1,567 @@
-+2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * bsp_specs: Backport from CVS-HEAD.
-+
-+2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * timer/timer.c: Eliminate uses of old benchmark timer names.
-+
-+2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Remove noinst_PROGRAMS (Unused).
-+
-+2008-09-06 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * misc/interr.c: Convert to "bool".
-+
-+2008-09-05 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * clock/ckinit.c: The Shared Memory Driver no longer requires the
-+ special IOCTL in Clock_control. This was a hack which has existed
-+ since before the Classic API Timer Manager was implemented. All
-+ implementations of and references to Clock_control were removed.
-+
-+2008-09-05 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * timer/timer.c: Convert to "bool".
-+
-+2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * timer/timer.c: Eliminate empty function from every benchmark timer
-+ driver. Fix spelling.
-+
-+2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * timer/timer.c: Rename timer driver methods to follow RTEMS
-+ programming conventions.
-+
-+2008-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * console/sci.c, startup/bspstart.c, startup/start_c.c,
-+ timer/timer.c: Add missing prototypes.
-+
-+2008-06-02 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * misc/interr.c: Convention calls for leading underscore on private
-+ RTEMS variables.
-+
-+2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * Makefile.am: Rework to avoid .rel files.
-+
-+2008-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * console/console.c, startup/bspstart.c: Refactored and renamed
-+ initialization routines to rtems_initialize_data_structures,
-+ rtems_initialize_before_drivers, rtems_initialize_device_drivers, and
-+ rtems_initialize_start_multitasking. This opened the sequence up so
-+ that bootcard() could provide a more robust and flexible framework
-+ which is easier to explain and understand. This also lays the
-+ groundwork for sharing the division of available memory between the
-+ RTEMS workspace and heap and the C library initialization across all
-+ BSPs.
-+
-+2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/linkcmds, startup/linkcmds_ROM: Add wildcard to
-+ gcc_except_table section so programs compiled with gcc 4.3.x can
-+ link.
-+
-+2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * clock/ckinit.c, include/bsp.h, startup/bspstart.c: Eliminate copies
-+ of the Configuration Table. Use the RTEMS provided accessor macros to
-+ obtain configuration fields.
-+
-+2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field
-+ from CPU Table to Configuration Table. Eliminate CPU Table from all
-+ ports. Delete references to CPU Table in all forms.
-+
-+2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Moved most of the remaining CPU Table fields to
-+ the Configuration Table. This included pretasking_hook,
-+ predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace,
-+ extra_mpci_receive_server_stack, stack_allocate_hook, and
-+ stack_free_hook. As a side-effect of this effort some multiprocessing
-+ code was made conditional and some style clean up occurred.
-+
-+2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
-+
-+ * startup/bspstart.c: Eliminate the interrupt_vector_table field in the
-+ m68k CPU Table since it is never read.
-+
-+2007-05-03 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds: Handle .data.* sections
-+
-+2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * bsp_specs: Remove qrtems_debug.
-+
-+2007-03-13 Joel Sherrill <joel@OARcorp.com>
-+
-+ * include/bsp.h: Remove redundant prototypes.
-+
-+2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: New BUG-REPORT address.
-+
-+2006-11-15 Joel Sherrill <joel@OARcorp.com>
-+
-+ * Makefile.am: Merge c_rtems_main() into boot_card(). This eliminated a
-+ file and simplified initialization.
-+
-+2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Remove superfluous -DASM.
-+
-+2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: Require autoconf-2.60. Require automake-1.10.
-+
-+2006-09-11 Joel Sherrill <joel@OARcorp.com>
-+
-+ * console/console.c, console/sci.c, console/sci.h, spurious/spinit.c,
-+ startup/bspclean.c, startup/start_c.c: Convert C++ style comments to
-+ C style.
-+
-+2006-02-08 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds, startup/linkcmds_ROM: Add sections required by
-+ newer gcc versions.
-+
-+2006-01-11 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Add preinstall.am.
-+
-+2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * include/bsp.h: New header guard.
-+
-+2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
-+
-+2005-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * console/sci.c: Remove CVS Log.
-+
-+2005-01-04 Joel Sherrill <joel@OARcorp.com>
-+
-+ * console/sci.c: Remove warnings.
-+
-+2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Remove build-variant support.
-+
-+2004-11-25 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds, startup/linkcmds_ROM: Add new bss sections .bss.*
-+ and .gnu.linkonce.b*.
-+
-+2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * configure.ac: Require automake > 1.9.
-+
-+2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 610/bsps
-+ * Makefile.am: Add include/tm27.h, Cosmetics.
-+ * include/tm27.h: Final cosmetics.
-+
-+2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * include/bsp.h: Split out tmtest27 support.
-+ * include/tm27.h: New.
-+
-+2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 613/bsps
-+ * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
-+
-+2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 614/bsps
-+ * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
-+
-+2004-04-03 Ralf Corsepiu <ralf_corsepiu@rtems.org>
-+
-+ * c/src/lib/libbsp/m68k/mrm332/include/bsp.h,
-+ c/src/lib/libbsp/m68k/mrm332/start/start.S,
-+ c/src/lib/libbsp/m68k/mrm332/startup/start_c.c: Include
-+ <rtems/m68k/sim.h> instead of <sim.h>.
-+ * c/src/lib/libbsp/m68k/mrm332/include/bsp.h: Include
-+ <rtems/m68k/qsm.h> instead of <qsm.h>.
-+
-+2004-04-02 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * start/start.S: Include <rtems/asm.h> instead of <asm.h>.
-+
-+2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
-+ * include/bsp.h: Include <rtems/console.h> instead of <console.h>.
-+ * include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
-+
-+2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * clock/ckinit.c, console/sci.c, console/sci.h, include/bsp.h,
-+ misc/interr.c, startup/bspstart.c, timer/timer.c: Convert to using
-+ c99 fixed size types.
-+
-+2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Reflect changes to bsp.am.
-+ Preinstall dist_project_lib*.
-+
-+2004-02-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Reflect changes to bsp.am.
-+
-+2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Use CPPASCOMPILE instead of CCASCOMPILE.
-+
-+2004-02-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Pickup files from ../../m68k/shared instead of
-+ ../shared. Reformat.
-+
-+2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: Add nostdinc to AUTOMAKE_OPTIONS.
-+
-+2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Don't include subdirs.am.
-+
-+2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Fix typo.
-+
-+2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am,
-+ spurious/Makefile.am, startup/Makefile.am, timer/Makefile.am,
-+ wrapup/Makefile.am.
-+ Use automake compilation rules.
-+ * clock/Makefile.am, console/Makefile.am, spurious/Makefile.am,
-+ startup/Makefile.am, timer/Makefile.am, wrapup/Makefile.am:
-+ Remove.
-+ * configure.ac: Reflect changes above.
-+
-+2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Add PREINSTALL_DIRS.
-+ * wrapup/Makefile.am: Reflect changes to libcpu.
-+
-+2004-01-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * wrapup/Makefile.am: Reflect changes to libcpu.
-+
-+2004-01-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Re-add dirstamps to PRE/TMPINSTALL_FILES.
-+ Add PRE/TMPINSTALL_FILES to CLEANFILES.
-+ * startup/Makefile.am: Ditto.
-+
-+2004-01-07 Joel Sherrill <joel@OARcorp.com>
-+
-+ * times, console/sci.c: Remove efi68k and efi332 references as they are
-+ no longer in the tree.
-+
-+2004-01-07 Joel Sherrill <joel@OARcorp.com>
-+
-+ * timer/timer.c: Remove efi68k and efi332 references as they are no
-+ longer in the tree.
-+
-+2004-01-07 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: Remove.
-+ * Makefile.am: Merge-in start/Makefile.am.
-+ * configure.ac: Reflect changes above.
-+
-+2004-01-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * wrapup/Makefile.am: Eliminate $(LIB).
-+ Use noinst_DATA to trigger building libbsp.a.
-+
-+2003-12-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
-+ * startup/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
-+
-+2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
-+ * startup/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
-+
-+2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: Require automake >= 1.8, autoconf >= 2.59.
-+
-+2003-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: Misc cleanups and fixes.
-+ * startup/Makefile.am: Misc cleanups and fixes.
-+ * wrapup/Makefile.am: Misc cleanups and fixes.
-+
-+2003-12-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Add preinstallation dirstamp support.
-+ * clock/Makefile.am: Cosmetics.
-+ * console/Makefile.am: Cosmetics.
-+ * spurious/Makefile.am: Cosmetics.
-+ * startup/Makefile.am: Cosmetics.
-+ * timer/Makefile.am: Cosmetics.
-+ * wrapup/Makefile.am: Cosmetics.
-+
-+2003-12-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * clock/Makefile.am: Remove all-local: $(ARCH).
-+ * console/Makefile.am: Remove all-local: $(ARCH).
-+ * spurious/Makefile.am: Remove all-local: $(ARCH).
-+ * start/Makefile.am: Remove all-local: $(ARCH).
-+ * startup/Makefile.am: Remove all-local: $(ARCH).
-+ * timer/Makefile.am: Remove all-local: $(ARCH).
-+ * wrapup/Makefile.am: Remove all-local: $(ARCH).
-+
-+2003-09-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Merge-in include/Makefile.am.
-+ Reflect changes to bsp.am.
-+ * include/Makefile.am: Remove.
-+ * configure.ac: Reflect changes above.
-+
-+2003-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * bsp_specs: Remove *lib:.
-+
-+2003-09-15 Joel Sherrill <joel@OARcorp.com>
-+
-+ PR 483/bsps
-+ * startup/bspstart.c, startup/start_c.c: Spurious interrupt handlers
-+ cannot be installed until RTEMS has initialized the vector table.
-+
-+2003-09-04 Joel Sherrill <joel@OARcorp.com>
-+
-+ * clock/ckinit.c, console/console.c, include/bsp.h, misc/interr.c,
-+ spurious/spinit.c, startup/bspclean.c, startup/bspstart.c,
-+ timer/timer.c: URL for license changed.
-+
-+2003-08-20 Joel Sherrill <joel@OARcorp.com>
-+
-+ * console/console.c: Correct copyright statements.
-+
-+2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Reflect having moved aclocal/.
-+
-+2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: Reflect having moved automake/.
-+ * clock/Makefile.am: Reflect having moved automake/.
-+ * console/Makefile.am: Reflect having moved automake/.
-+ * include/Makefile.am: Reflect having moved automake/.
-+ * spurious/Makefile.am: Reflect having moved automake/.
-+ * start/Makefile.am: Reflect having moved automake/.
-+ * startup/Makefile.am: Reflect having moved automake/.
-+ * timer/Makefile.am: Reflect having moved automake/.
-+ * wrapup/Makefile.am: Reflect having moved automake/.
-+
-+2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ PR 452/bsps
-+ * startup/Makefile.am: Remove USE_INIT_FINI.
-+
-+2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: Use rtems-bugs@rtems.com as bug report email address.
-+
-+2003-08-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ PR 445/bsps
-+ * bsp_specs: Remove -D__embedded__ -Asystem(embedded) from cpp.
-+ Remove cpp, old_cpp (now unused).
-+
-+2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: Remove AC_CONFIG_AUX_DIR.
-+
-+2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
-+
-+2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: AC_PREREQ(2.57).
-+
-+2003-01-20 Duane Gustavus <duane@unt.edu>
-+
-+ * console/sci.c, include/mrm332.h, startup/linkcmds,
-+ startup/linkcmds_ROM: Various updates to make this run properly
-+ from ROM.
-+
-+2002-12-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+ * console/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+ * spurious/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+ * start/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+ * startup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+ * timer/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+
-+2002-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: Use install-data-local to install startfile.
-+
-+2002-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * wrapup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
-+
-+2002-11-04 Joel Sherrill <joel@OARcorp.com>
-+
-+ * console/sci.c, spurious/spinit.c: Removed warnings.
-+
-+2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * .cvsignore: Reformat.
-+ Add autom4te*cache.
-+ Remove autom4te.cache.
-+
-+2002-09-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * Makefile.am: ACLOCAL_AMFLAGS = -I ../../../../../../aclocal.
-+
-+2002-08-21 Joel Sherrill <joel@OARcorp.com>
-+
-+ * wrapup/Makefile.am: PR217 required that the idle task be moved to
-+ libcpu so it could be more acutely aware of the CPU model. This
-+ file was modified to pick up the idle task from there.
-+
-+2002-08-21 Joel Sherrill <joel@OARcorp.com>
-+
-+ * bsp_specs: Added support for -nostdlibs.
-+
-+2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * clock/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * console/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * spurious/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * start/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * startup/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * timer/Makefile.am: Use .$(OBJEXT) instead of .o.
-+ * wrapup/Makefile.am: Use .$(OBJEXT) instead of .o.
-+
-+2002-08-05 Joel Sherrill <joel@OARcorp.com>
-+
-+ * Per PR260 eliminate use of make-target-options. This impacted
-+ RTEMS allowing a distinction between the CPU32 and CPU32+ in the
-+ SuperCore and required that the m68k optimized memcpy be moved
-+ to libcpu.
-+ * wrapup/Makefile.am: Pick up memcpy.o from libcpu.
-+
-+2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * start/Makefile.am: Eliminate PGM.
-+ Add bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o.
-+
-+2002-07-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * startup/Makefile.am: Add bsplib_DATA = linkcmds linkcmds_ROM.
-+
-+2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * wrapup/Makefile.am: Eliminate TMPINSTALL_FILES.
-+ Remove $(OBJS) from all-local.
-+
-+2002-06-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * wrapup/Makefile.am: Remove preinstallation of libbsp.a,
-+
-+2001-05-09 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds: In support of gcc 3.1, added one of more
-+ of the sections .jcr, .rodata*, .data.*, .gnu.linkonce.s2.*,
-+ .gnu.linkonce.sb2.*, and .gnu.linkonce.s.*. Spacing corrections
-+ and direction of segments to memory regions may also have been
-+ addressed. This was a sweep across all BSPs.
-+
-+2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac:
-+ AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
-+ AM_INIT_AUTOMAKE([no-define foreign 1.6]).
-+ * clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * console/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * include/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * spurious/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * start/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * startup/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * timer/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+ * wrapup/Makefile.am: Remove AUTOMAKE_OPTIONS.
-+
-+2002-02-28 Mike Panetta <ahuitzot@mindspring.com>
-+
-+ * console/sci.c, console/sci.h,
-+ console/console.c: Added new SCI driver.
-+ * start/start.c: Removed file.
-+ * start/start.S: New file, the asm portion of the updated start code.
-+ * start/configure.am: Added start.S, removed start.c
-+ * startup/start_c.c: New file, the C portion of the updated start code. Contains most of the code that was in the old start.c.
-+ * startup/configure.am: Added start_c.c to C_FILES.
-+ * include/bsp.h: Added include <rtems/bspIo.h>
-+
-+2001-11-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.ac: Introduce RTEMS_BSP_CONFIGURE.
-+
-+2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * .cvsignore: Add autom4te.cache for autoconf > 2.52.
-+ * configure.in: Remove.
-+ * configure.ac: New file, generated from configure.in by autoupdate.
-+
-+2001-09-27 Joel Sherrill <joel@OARcorp.com>
-+
-+ * include/bsp.h: Renamed delay() to rtems_bsp_delay().
-+
-+2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * include/Makefile.am: Use 'TMPINSTALL_FILES ='.
-+
-+2001-05-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-+
-+ * configure.in: Add bspopts.h.
-+ * include/.cvsignore: Add bspopts.h*, stamp-h*.
-+ * include/Makefile.am: Use *_HEADERS instead of *H_FILES.
-+ * include/bsp.h: Include bspopts.h.
-+
-+2001-05-25 Joel Sherrill <joel@OARcorp.com>
-+
-+ * clock/Makefile.am, console/Makefile.am, spurious/Makefile.am,
-+ start/Makefile.am, startup/Makefile.am, timer/Makefile.am,
-+ wrapup/Makefile.am: Modified to include compile.am.
-+ * startup/bspstart.c: Removed include of <libcsupport.h>
-+
-+2000-05-25 Matt Cross <profesor@gweep.net>
-+
-+ * New MRM332 BSP for the Mini RoboMind board based
-+ on the 68332 microcontroller designed and build by Mark
-+ Castelluccio. For details on the MRM see http://www.robominds.com.
-+ * .cvsignore, ChangeLog Makefile.am, README, bsp_specs,
-+ clock/.cvsignore, clock/Makefile.am, clock/ckinit.c, configure.in,
-+ console/.cvsignore, console/Makefile.am, console/console.c,
-+ include/.cvsignore, include/Makefile.am, include/bsp.h,
-+ include/mrm332.h, misc/dotests, misc/gdbinit68, misc/interr.c,
-+ spurious/.cvsignore, spurious/Makefile.am, spurious/spinit.c,
-+ start/.cvsignore, start/Makefile.am, start/start.c, startup/.cvsignore,
-+ startup/Makefile.am, startup/bspclean.c, startup/bspstart.c,
-+ startup/except_vect_332_ROM.S, startup/linkcmds, startup/linkcmds_ROM,
-+ timer/.cvsignore, timer/Makefile.am, timer/timer.c, times,
-+ wrapup/.cvsignore, wrapup/Makefile.am: Initial files.
-+
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/bspclean.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/bspclean.c 2006-09-11 23:43:56.000000000 +0200
-@@ -0,0 +1,27 @@
-+/* bsp_cleanup()
-+ *
-+ * This routine cleans up in the sense that it places the board
-+ * in a safe state and flushes the I/O buffers before exiting.
-+ *
-+ * INPUT: NONE
-+ *
-+ * OUTPUT: NONE
-+ *
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: bspclean.c,v 1.5 2006/09/11 21:43:56 joel Exp $
-+ */
-+
-+#include <bsp.h>
-+
-+void bsp_cleanup(void)
-+{
-+ /* interrupt driven stdio must be flushed */
-+ _CPU_ISR_Set_level( 7 );
-+ /*_UART_flush(); */
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/timer/timer.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/timer/timer.c 2008-09-30 18:28:07.000000000 +0200
-@@ -0,0 +1,61 @@
-+/*
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: timer.c,v 1.10.2.1 2008/09/30 16:28:07 joel Exp $
-+ */
-+
-+#include <bsp.h>
-+
-+bool benchmark_timer_find_average_overhead;
-+
-+extern rtems_isr Clock_isr(void);
-+
-+void benchmark_timer_initialize( void )
-+{
-+}
-+
-+/*
-+ * The following controls the behavior of benchmark_timer_read().
-+ *
-+ * FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count.
-+ *
-+ * AVG_OVEREHAD is the overhead for starting and stopping the timer. It
-+ * is usually deducted from the number returned.
-+ *
-+ * LEAST_VALID is the lowest number this routine should trust. Numbers
-+ * below this are "noise" and zero is returned.
-+ */
-+
-+#define AVG_OVERHEAD 0 /* It typically takes X.X microseconds */
-+ /* (Y countdowns) to start/stop the timer. */
-+ /* This value is in microseconds. */
-+#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-+
-+/*
-+ * Return timer value in 1/2-microsecond units
-+ */
-+int benchmark_timer_read( void )
-+{
-+ uint32_t total;
-+ total = 0;
-+
-+ if ( benchmark_timer_find_average_overhead == true )
-+ return total; /* in XXX microsecond units */
-+
-+ if ( total < LEAST_VALID )
-+ return 0; /* below timer resolution */
-+
-+ return (total - AVG_OVERHEAD);
-+}
-+
-+void benchmark_timer_disable_subtracting_average_overhead(
-+ bool find_flag
-+)
-+{
-+ benchmark_timer_find_average_overhead = find_flag;
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c 2008-09-06 00:05:15.000000000 +0200
-@@ -0,0 +1,96 @@
-+/* Clock_init()
-+ *
-+ * This routine initailizes the periodic interrupt timer on
-+ * the Motorola 68332.
-+ *
-+ * Input parameters: NONE
-+ *
-+ * Output parameters: NONE
-+ *
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: ckinit.c,v 1.7 2008/09/05 22:05:15 joel Exp $
-+ */
-+
-+#include <stdlib.h>
-+#include <bsp.h>
-+#include <rtems/libio.h>
-+#include <mrm332.h>
-+
-+#define CLOCK_VECTOR MRM_PIV
-+
-+uint32_t Clock_isrs; /* ISRs until next tick */
-+volatile uint32_t Clock_driver_ticks;
-+ /* ticks since initialization */
-+rtems_isr_entry Old_ticker;
-+
-+void Clock_exit( void );
-+
-+/*
-+ * These are set by clock driver during its init
-+ */
-+
-+rtems_device_major_number rtems_clock_major = ~0;
-+rtems_device_minor_number rtems_clock_minor;
-+
-+rtems_isr Clock_isr(rtems_vector_number vector)
-+{
-+ Clock_driver_ticks += 1;
-+
-+ if ( Clock_isrs == 1 ) {
-+ rtems_clock_tick();
-+ Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
-+ }
-+ else
-+ Clock_isrs -= 1;
-+}
-+
-+void Install_clock(
-+ rtems_isr_entry clock_isr
-+)
-+{
-+ Clock_driver_ticks = 0;
-+ Clock_isrs = rtems_configuration_get_microseconds_per_tick() / 1000;
-+
-+ Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
-+
-+ /* enable 1mS interrupts */
-+ *PITR = (unsigned short int)( SAM(0x09,0,PITM) );/* load counter */
-+ *PICR = (unsigned short int) /* enable interrupt */
-+ ( SAM(ISRL_PIT,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
-+
-+ atexit( Clock_exit );
-+}
-+
-+void Clock_exit( void )
-+{
-+ /* shutdown the periodic interrupt */
-+ *PICR = (unsigned short int)
-+ ( SAM(0,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
-+ /* ^^ zero disables interrupt */
-+
-+ /* do not restore old vector */
-+}
-+
-+rtems_device_driver Clock_initialize(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *pargp
-+)
-+{
-+ Install_clock( Clock_isr );
-+
-+ /*
-+ * make major/minor avail to others such as shared memory driver
-+ */
-+
-+ rtems_clock_major = major;
-+ rtems_clock_minor = minor;
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68 2009-11-29 01:11:56.471556761 +0100
-@@ -0,0 +1,16 @@
-+#
-+# $Id: gdbinit68,v 1.1 2001/05/25 16:28:46 joel Exp $
-+#
-+echo Setting up the environment for mrm debuging.\n
-+
-+target bdm /dev/bdmcpu320
-+bdm_setdelay 1000
-+bdm_autoreset on
-+set remotecache off
-+bdm_timetocomeup 0
-+bdm_init
-+bdm_reset
-+set $sfc=5
-+set $dfc=5
-+r
-+q
-Index: rtems/c/src/lib/libbsp/m68k/mo376/configure.ac
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/configure.ac 2006-12-02 06:55:13.000000000 +0100
-@@ -0,0 +1,20 @@
-+## Process this file with autoconf to produce a configure script.
-+##
-+## $Id: configure.ac,v 1.16 2006/12/02 05:55:13 ralf Exp $
-+
-+AC_PREREQ(2.60)
-+AC_INIT([rtems-c-src-lib-libbsp-m68k-mrm332],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
-+AC_CONFIG_SRCDIR([bsp_specs])
-+RTEMS_TOP(../../../../../..)
-+
-+RTEMS_CANONICAL_TARGET_CPU
-+AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
-+RTEMS_BSP_CONFIGURE
-+
-+RTEMS_PROG_CC_FOR_TARGET
-+RTEMS_CANONICALIZE_TOOLS
-+RTEMS_PROG_CCAS
-+
-+# Explicitly list all Makefiles here
-+AC_CONFIG_FILES([Makefile])
-+AC_OUTPUT
-Index: rtems/c/src/lib/libbsp/m68k/mo376/README
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/README 2009-11-29 01:11:56.471556761 +0100
-@@ -0,0 +1,24 @@
-+#
-+# $Id: README,v 1.1 2001/05/25 16:28:46 joel Exp $
-+#
-+
-+Description: mrm332
-+============
-+CPU: MC68332 @16 or 25MHz
-+RAM: 32k or 512k
-+ROM: 512k flash
-+
-+ The Mini RoboMind is a small board based on the 68332 microcontroller
-+designed and build by Mark Castelluccio. For details, see:
-+
-+ http://www.robominds.com
-+
-+ This BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
-+the efi332 BSP was written by John S Gwynne.
-+
-+TODO:
-+=====
-+- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
-+ the interrupt priority and (2) to prevent it from blocking.
-+- add a timer driver for the tmtest set.
-+
-Index: rtems/c/src/lib/libbsp/m68k/mo376/Makefile.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/Makefile.am 2008-09-29 03:47:41.000000000 +0200
-@@ -0,0 +1,50 @@
-+##
-+## $Id: Makefile.am,v 1.27.2.1 2008/09/29 01:47:41 ralf Exp $
-+##
-+
-+ACLOCAL_AMFLAGS = -I ../../../../aclocal
-+
-+include $(top_srcdir)/../../../../automake/compile.am
-+include $(top_srcdir)/../../bsp.am
-+
-+dist_project_lib_DATA = bsp_specs
-+
-+include_HEADERS = include/bsp.h
-+include_HEADERS += include/tm27.h
-+
-+nodist_include_HEADERS = include/bspopts.h
-+DISTCLEANFILES = include/bspopts.h
-+
-+include_HEADERS += include/mrm332.h
-+nodist_include_HEADERS += ../../shared/include/coverhd.h
-+
-+EXTRA_DIST = times
-+
-+EXTRA_DIST += start/start.S
-+start.$(OBJEXT): start/start.S
-+ $(CPPASCOMPILE) -o $@ -c $<
-+
-+project_lib_DATA = start.$(OBJEXT)
-+
-+dist_project_lib_DATA += startup/linkcmds startup/linkcmds_ROM
-+
-+startup_SOURCES = startup/start_c.c ../../shared/bsplibc.c \
-+ ../../shared/bsppost.c startup/bspstart.c startup/bspclean.c \
-+ ../../shared/bootcard.c ../../m68k/shared/m68kpretaskinghook.c \
-+ ../../shared/sbrk.c ../../m68k/shared/setvec.c \
-+ ../../shared/gnatinstallhandler.c startup/except_vect_332_ROM.S
-+clock_SOURCES = clock/ckinit.c
-+console_SOURCES = console/console.c console/sci.c console/sci.h
-+spurious_SOURCES = spurious/spinit.c
-+timer_SOURCES = timer/timer.c
-+
-+noinst_LIBRARIES = libbsp.a
-+libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
-+ $(spurious_SOURCES) $(timer_SOURCES)
-+
-+libbsp_a_LIBADD = \
-+ ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
-+ ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
-+
-+include $(srcdir)/preinstall.am
-+include $(top_srcdir)/../../../../automake/local.am
-Index: rtems/c/src/lib/libbsp/m68k/mo376/console/sci.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/console/sci.c 2008-08-19 12:23:15.000000000 +0200
-@@ -0,0 +1,1596 @@
-+/*****************************************************************************
-+* File: sci.c
-+*
-+* Desc: This file contains the console IO routines for the SCI port.
-+* There are two interfaces in this module. One is for the rtems
-+* termios/console code and the other is a device driver interface.
-+* This module works together with the termio module which is
-+* sometimes referred to as the "line disciplines" which implements
-+* terminal i/o processing like tabs, backspaces, and newlines.
-+* The rtems printf uses interrupt io and the rtems printk routine
-+* uses polled io which is better for debugging.
-+*
-+* Index: Documentation
-+* Section A - Include Files
-+* Section B - Manifest Constants
-+* Section C - External Data
-+* Section D - External Functions
-+* Section E - Local Functions
-+* Section F - Local Variables
-+* Section G - A circular data buffer for rcv chars
-+* Section H - RTEMS termios callbacks for the interrupt api
-+* Section I - RTEMS termios callbacks for the polled api
-+
-+* Section 0 - Miscellaneous routines
-+* Section 1 - Routines to manipulate the circular buffer
-+* Section 2 - Interrupt based entry points for the termios module
-+* Section 3 - Polling based entry points for the termios module
-+* Section 4 - Device driver public api entry points
-+* Section 5 - Hardware level routines
-+* Section 6 - Testing and debugging code
-+*
-+* Refer: Motorola QSM Reference Manual - Chapter 5 - SCI sub-module
-+*
-+* Note: See bsp.h,confdefs.h,system.h for installing drivers into RTEMS.
-+*
-+* $Id: sci.c,v 1.12 2008/08/19 10:23:15 ralf Exp $
-+*
-+*****************************************************************************/
-+\f
-+/*****************************************************************************
-+ Overview of serial port console terminal input/output
-+*****************************************************************************/
-+
-+/*
-+ +-----------+ +---------+
-+ | app | | app |
-+ +-----------+ +---------+
-+ | |
-+ | (printf,scanf,etc.) |
-+ v |
-+ +-----------+ |
-+ | libc | |
-+ +-----------+ |
-+ | |
-+ | |
-+ | (open,close,read,write,ioctl) |
-+ ======|==========================================|========================
-+ | /dev/console | /dev/sci
-+ | (stdin,stdout,stderr) |
-+ ======|==========================================|========================
-+ | |
-+ | |
-+ v v
-+ +-----------+ +-----------+ +---------+
-+ | console | <---> | termios | <---> | sci |
-+ | driver | | module | | driver |
-+ +-----------+ +-----------+ +---------+
-+ |
-+ |
-+ v
-+ +---------+
-+ | |
-+ | uart |
-+ | |
-+ +---------+
-+*/
-+\f
-+
-+/*****************************************************************************
-+ Section A - Include Files
-+*****************************************************************************/
-+
-+#include <rtems.h>
-+#include <bsp.h>
-+#include <rtems/bspIo.h>
-+#include <stdio.h>
-+#include <rtems/libio.h>
-+#include <libchip/serial.h>
-+#include <libchip/sersupp.h>
-+#include "sci.h"
-+/*#include "../misc/include/cpu332.h" */
-+\f
-+
-+/*****************************************************************************
-+ Section B - Manifest Constants
-+*****************************************************************************/
-+
-+#define SCI_MINOR 0 /* minor device number */
-+
-+/* IMPORTANT - if the device driver api is opened, it means the sci is being
-+ * used for direct hardware access, so other users (like termios) get ignored
-+ */
-+#define DRIVER_CLOSED 0 /* the device driver api is closed */
-+#define DRIVER_OPENED 1 /* the device driver api is opened */
-+
-+/* system clock definitions, i dont have documentation on this... */
-+
-+#if 0 /* Not needed, this is provided in mrm332.h */
-+#define XTAL 32768.0 /* crystal frequency in Hz */
-+#define NUMB_W 0 /* system clock parameters */
-+#define NUMB_X 1
-+#define NUMB_Y 0x38 /* for 14.942 Mhz */
-+#define NUMB_Y 0x3F /* for 16.777 Mhz */
-+
-+#define SYS_CLOCK (XTAL * 4.0 * (NUMB_Y+1) * (1 << (2 * NUMB_W + NUMB_X)))
-+
-+#endif
-+\f
-+
-+/*****************************************************************************
-+ Section C - External Data
-+*****************************************************************************/
-+
-+\f
-+
-+/*****************************************************************************
-+ Section D - External Functions
-+*****************************************************************************/
-+
-+\f
-+
-+/*****************************************************************************
-+ Section E - Local Functions
-+*****************************************************************************/
-+
-+void SCI_output_char(char c);
-+
-+/*rtems_isr SciIsr( rtems_vector_number vector ); interrupt handler */
-+
-+const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled );
-+
-+rtems_device_driver SciInitialize( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciOpen( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciClose( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciRead( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciWrite( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciControl( /* device driver api */
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+rtems_device_driver SciRead (
-+ rtems_device_major_number, rtems_device_minor_number, void *);
-+
-+int SciInterruptOpen(int, int, void *); /* termios api */
-+int SciInterruptClose(int, int, void *); /* termios api */
-+int SciInterruptWrite(int, const char *, int); /* termios api */
-+
-+int SciSetAttributes(int, const struct termios*); /* termios api */
-+int SciPolledOpen(int, int, void *); /* termios api */
-+int SciPolledClose(int, int, void *); /* termios api */
-+int SciPolledRead(int); /* termios api */
-+int SciPolledWrite(int, const char *, int); /* termios api */
-+
-+static void SciSetBaud(uint32_t rate); /* hardware routine */
-+static void SciSetDataBits(uint16_t bits); /* hardware routine */
-+static void SciSetParity(uint16_t parity); /* hardware routine */
-+
-+static void inline SciDisableAllInterrupts( void ); /* hardware routine */
-+static void inline SciDisableTransmitInterrupts( void );/* hardware routine */
-+static void inline SciDisableReceiveInterrupts( void ); /* hardware routine */
-+
-+static void inline SciEnableTransmitInterrupts( void ); /* hardware routine */
-+static void inline SciEnableReceiveInterrupts( void ); /* hardware routine */
-+
-+static void inline SciDisableReceiver( void ); /* hardware routine */
-+static void inline SciDisableTransmitter( void ); /* hardware routine */
-+
-+static void inline SciEnableReceiver( void ); /* hardware routine */
-+static void inline SciEnableTransmitter( void ); /* hardware routine */
-+
-+void SciWriteCharWait ( uint8_t ); /* hardware routine */
-+void SciWriteCharNoWait( uint8_t ); /* hardware routine */
-+
-+uint8_t inline SciCharAvailable( void ); /* hardware routine */
-+
-+uint8_t inline SciReadCharWait( void ); /* hardware routine */
-+uint8_t inline SciReadCharNoWait( void ); /* hardware routine */
-+
-+void SciSendBreak( void ); /* test routine */
-+
-+static int8_t SciRcvBufGetChar(void); /* circular rcv buf */
-+static void SciRcvBufPutChar( uint8_t); /* circular rcv buf */
-+#if 0
-+static void SciRcvBufFlush( void ); /* unused routine */
-+#endif
-+
-+void SciUnitTest(void); /* test routine */
-+void SciPrintStats(void); /* test routine */
-+\f
-+
-+/*****************************************************************************
-+ Section F - Local Variables
-+*****************************************************************************/
-+
-+static struct rtems_termios_tty *SciTermioTty;
-+
-+static uint8_t SciInited = 0; /* has the driver been inited */
-+
-+static uint8_t SciOpened; /* has the driver been opened */
-+
-+static uint8_t SciMajor; /* major device number */
-+
-+static uint16_t SciBaud; /* current value in baud register */
-+
-+static uint32_t SciBytesIn = 0; /* bytes received */
-+static uint32_t SciBytesOut = 0; /* bytes transmitted */
-+
-+static uint32_t SciErrorsParity = 0; /* error counter */
-+static uint32_t SciErrorsNoise = 0; /* error counter */
-+static uint32_t SciErrorsFraming = 0; /* error counter */
-+static uint32_t SciErrorsOverrun = 0; /* error counter */
-+
-+#if defined(CONSOLE_SCI)
-+
-+/* this is what rtems printk uses to do polling based output */
-+
-+BSP_output_char_function_type BSP_output_char = SCI_output_char;
-+BSP_polling_getchar_function_type BSP_poll_char = NULL;
-+
-+#endif
-+
-+/* cvs id string so you can use the unix ident command on the object */
-+
-+#ifdef ID_STRINGS
-+static const char SciIdent[]="$Id: sci.c,v 1.12 2008/08/19 10:23:15 ralf Exp $";
-+#endif
-+\f
-+
-+/*****************************************************************************
-+ Section G - A circular buffer for rcv chars when the driver interface is used.
-+*****************************************************************************/
-+
-+/* it is trivial to wrap your buffer pointers when size is a power of two */
-+
-+#define SCI_RCV_BUF_SIZE 256 /* must be a power of 2 !!! */
-+
-+/* if someone opens the sci device using the device driver interface,
-+ * then the receive data interrupt handler will put characters in this buffer
-+ * instead of sending them up to the termios module for the console
-+ */
-+static uint8_t SciRcvBuffer[SCI_RCV_BUF_SIZE];
-+
-+static uint8_t SciRcvBufPutIndex = 0; /* array index to put in next char */
-+
-+static uint8_t SciRcvBufGetIndex = 0; /* array index to take out next char */
-+
-+static uint16_t SciRcvBufCount = 0; /* how many bytes are in the buffer */
-+
-+\f
-+
-+/*****************************************************************************
-+ Section H - RTEMS termios callbacks for the interrupt version of the driver
-+*****************************************************************************/
-+
-+static const rtems_termios_callbacks SciInterruptCallbacks =
-+{
-+ SciInterruptOpen, /* first open */
-+ SciInterruptClose, /* last close */
-+ NULL, /* polled read (not required) */
-+ SciInterruptWrite, /* write */
-+ SciSetAttributes, /* set attributes */
-+ NULL, /* stop remote xmit */
-+ NULL, /* start remote xmit */
-+ TRUE /* output uses interrupts */
-+};
-+
-+/*****************************************************************************
-+ Section I - RTEMS termios callbacks for the polled version of the driver
-+*****************************************************************************/
-+
-+static const rtems_termios_callbacks SciPolledCallbacks =
-+{
-+ SciPolledOpen, /* first open */
-+ SciPolledClose, /* last close */
-+ SciPolledRead, /* polled read */
-+ SciPolledWrite, /* write */
-+ SciSetAttributes, /* set attributes */
-+ NULL, /* stop remote xmit */
-+ NULL, /* start remote xmit */
-+ FALSE /* output uses interrupts */
-+};
-+\f
-+
-+/*
-+ * SECTION 0
-+ * MISCELLANEOUS ROUTINES
-+ */
-+
-+/****************************************************************************
-+ * Func: SCI_output_char
-+ * Desc: used by rtems printk function to send a char to the uart
-+ * Inputs: the character to transmit
-+ * Outputs: none
-+ * Errors: none
-+ * Scope: public
-+ ****************************************************************************/
-+
-+void SCI_output_char(char c)
-+{
-+/* ( minor device number, pointer to the character, length ) */
-+
-+ SciPolledWrite( SCI_MINOR, &c, 1);
-+
-+ return;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciGetTermiosHandlers
-+* Desc: returns a pointer to the table of serial io functions
-+* this is called from console_open with polled set to false
-+* Inputs: flag indicating whether we want polled or interrupt driven io
-+* Outputs: pointer to function table
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled )
-+{
-+ if ( polled )
-+ {
-+ return &SciPolledCallbacks; /* polling based */
-+ }
-+ else
-+ {
-+ return &SciInterruptCallbacks; /* interrupt driven */
-+ }
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciIsr
-+* Desc: interrupt handler for serial communications interface
-+* Inputs: vector number - unused
-+* Outputs: none
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_isr SciIsr( rtems_vector_number vector )
-+{
-+ uint8_t ch;
-+
-+ if ( (*SCSR) & SCI_ERROR_PARITY ) SciErrorsParity ++;
-+ if ( (*SCSR) & SCI_ERROR_FRAMING ) SciErrorsFraming ++;
-+ if ( (*SCSR) & SCI_ERROR_NOISE ) SciErrorsNoise ++;
-+ if ( (*SCSR) & SCI_ERROR_OVERRUN ) SciErrorsOverrun ++;
-+
-+ /* see if it was a transmit interrupt */
-+
-+ if ( (*SCSR) & SCI_XMTR_AVAILABLE ) /* data reg empty, xmt complete */
-+ {
-+ SciDisableTransmitInterrupts();
-+
-+ /* tell termios module that the charcter was sent */
-+ /* he will call us later to transmit more if there are any */
-+
-+ if (rtems_termios_dequeue_characters( SciTermioTty, 1 ))
-+ {
-+ /* there are more bytes to transmit so enable TX interrupt */
-+
-+ SciEnableTransmitInterrupts();
-+ }
-+ }
-+
-+ /* see if it was a receive interrupt */
-+ /* on the sci uart we just get one character per interrupt */
-+
-+ while ( SciCharAvailable() ) /* char in data register? */
-+ {
-+ ch = SciReadCharNoWait(); /* get the char from the uart */
-+
-+ /* IMPORTANT!!! */
-+ /* either send it to the termios module or keep it locally */
-+
-+ if ( SciOpened == DRIVER_OPENED ) /* the driver is open */
-+ {
-+ SciRcvBufPutChar(ch); /* keep it locally */
-+ }
-+ else /* put in termios buffer */
-+ {
-+ char c = (char) ch;
-+ rtems_termios_enqueue_raw_characters( SciTermioTty, &c, 1 );
-+ }
-+
-+ *SCSR &= SCI_CLEAR_RX_INT; /* clear the interrupt */
-+ }
-+}
-+\f
-+
-+/*
-+ * SECTION 1
-+ * ROUTINES TO MANIPULATE THE CIRCULAR BUFFER
-+ */
-+
-+/****************************************************************************
-+* Func: SciRcvBufGetChar
-+* Desc: read a character from the circular buffer
-+* make sure there is data before you call this!
-+* Inputs: none
-+* Outputs: the character or -1
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static int8_t SciRcvBufGetChar(void)
-+{
-+ rtems_interrupt_level level;
-+ uint8_t ch;
-+
-+ if ( SciRcvBufCount == 0 )
-+ {
-+ rtems_fatal_error_occurred(0xDEAD); /* check the count first! */
-+ }
-+
-+ rtems_interrupt_disable( level ); /* disable interrupts */
-+
-+ ch = SciRcvBuffer[SciRcvBufGetIndex]; /* get next byte */
-+
-+ SciRcvBufGetIndex++; /* bump the index */
-+
-+ SciRcvBufGetIndex &= SCI_RCV_BUF_SIZE - 1; /* and wrap it */
-+
-+ SciRcvBufCount--; /* decrement counter */
-+
-+ rtems_interrupt_enable( level ); /* restore interrupts */
-+
-+ return ch; /* return the char */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciRcvBufPutChar
-+* Desc: put a character into the rcv data circular buffer
-+* Inputs: the character
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void SciRcvBufPutChar( uint8_t ch )
-+{
-+ rtems_interrupt_level level;
-+
-+ if ( SciRcvBufCount == SCI_RCV_BUF_SIZE ) /* is there room? */
-+ {
-+ return; /* no, throw it away */
-+ }
-+
-+ rtems_interrupt_disable( level ); /* disable interrupts */
-+
-+ SciRcvBuffer[SciRcvBufPutIndex] = ch; /* put it in the buf */
-+
-+ SciRcvBufPutIndex++; /* bump the index */
-+
-+ SciRcvBufPutIndex &= SCI_RCV_BUF_SIZE - 1; /* and wrap it */
-+
-+ SciRcvBufCount++; /* increment counter */
-+
-+ rtems_interrupt_enable( level ); /* restore interrupts */
-+
-+ return; /* return */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciRcvBufFlush
-+* Desc: completely reset and clear the rcv buffer
-+* Inputs: none
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+#if 0 /* prevents compiler warning */
-+static void SciRcvBufFlush( void )
-+{
-+ rtems_interrupt_level level;
-+
-+ rtems_interrupt_disable( level ); /* disable interrupts */
-+
-+ memset( SciRcvBuffer, 0, sizeof(SciRcvBuffer) );
-+
-+ SciRcvBufPutIndex = 0; /* clear */
-+
-+ SciRcvBufGetIndex = 0; /* clear */
-+
-+ SciRcvBufCount = 0; /* clear */
-+
-+ rtems_interrupt_enable( level ); /* restore interrupts */
-+
-+ return; /* return */
-+}
-+#endif
-+\f
-+
-+/*
-+ *
-+ * SECTION 2
-+ * INTERRUPT BASED ENTRY POINTS FOR THE TERMIOS MODULE
-+ */
-+
-+/****************************************************************************
-+* Func: SciInterruptOpen
-+* Desc: open routine for the interrupt based device driver
-+* Default state is 9600 baud, 8 bits, No parity, and 1 stop bit. ??
-+**CHANGED** Default baud rate is now 19200, 8N1
-+* called from rtems_termios_open which is called from console_open
-+* Inputs: major - device number
-+* minor - device number
-+* args - points to terminal info
-+* Outputs: success/fail
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+int SciInterruptOpen(
-+ int major,
-+ int minor,
-+ void *arg
-+)
-+{
-+ rtems_libio_open_close_args_t * args = arg;
-+ rtems_isr_entry old_vector;
-+
-+ if ( minor != SCI_MINOR ) /* check minor device num */
-+ {
-+ return -1;
-+ }
-+
-+ if ( !args ) /* must have args */
-+ {
-+ return -1;
-+ }
-+
-+ SciTermioTty = args->iop->data1; /* save address of struct */
-+
-+ SciDisableAllInterrupts(); /* turn off sci interrupts */
-+
-+ /* THIS IS ACTUALLY A BAD THING - SETTING LINE PARAMETERS HERE */
-+ /* IT SHOULD BE DONE THROUGH TCSETATTR() WHEN THE CONSOLE IS OPENED!!! */
-+
-+/* SciSetBaud(115200); set the baud rate */
-+/* SciSetBaud( 57600); set the baud rate */
-+/* SciSetBaud( 38400); set the baud rate */
-+ SciSetBaud( 19200); /* set the baud rate */
-+/* SciSetBaud( 9600); set the baud rate */
-+
-+ SciSetParity(SCI_PARITY_NONE); /* set parity to none */
-+
-+ SciSetDataBits(SCI_8_DATA_BITS); /* set data bits to 8 */
-+
-+ /* Install our interrupt handler into RTEMS, where does 66 come from? */
-+
-+ rtems_interrupt_catch( SciIsr, 66, &old_vector );
-+
-+ *QIVR = 66;
-+ *QIVR &= 0xf8;
-+ *QILR |= 0x06 & 0x07;
-+
-+ SciEnableTransmitter(); /* enable the transmitter */
-+
-+ SciEnableReceiver(); /* enable the receiver */
-+
-+ SciEnableReceiveInterrupts(); /* enable rcv interrupts */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciInterruptClose
-+* Desc: close routine called by the termios module
-+* Inputs: major - device number
-+* minor - device number
-+* args - unused
-+* Outputs: success/fail
-+* Errors: none
-+* Scope: public - termio entry point
-+****************************************************************************/
-+
-+int SciInterruptClose(
-+ int major,
-+ int minor,
-+ void *arg
-+)
-+{
-+ SciDisableAllInterrupts();
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciInterruptWrite
-+* Desc: writes data to the uart using transmit interrupts
-+* Inputs: minor - device number
-+* buf - points to the data
-+* len - number of bytes to send
-+* Outputs: success/fail
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+int SciInterruptWrite(
-+ int minor,
-+ const char *buf,
-+ int len
-+)
-+{
-+ /* We are using interrupt driven output so termios only sends us */
-+ /* one character at a time. The sci does not have a fifo. */
-+
-+ if ( !len ) /* no data? */
-+ {
-+ return 0; /* return error */
-+ }
-+
-+ if ( minor != SCI_MINOR ) /* check the minor dev num */
-+ {
-+ return 0; /* return error */
-+ }
-+
-+ if ( SciOpened == DRIVER_OPENED ) /* is the driver api open? */
-+ {
-+ return 1; /* yep, throw this away */
-+ }
-+
-+ SciWriteCharNoWait(*buf); /* try to send a char */
-+
-+ *SCSR &= SCI_CLEAR_TDRE; /* clear tx data reg empty flag */
-+
-+ SciEnableTransmitInterrupts(); /* enable the tx interrupt */
-+
-+ return 1; /* return success */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciSetAttributes
-+* Desc: setup the uart based on the termios modules requests
-+* Inputs: minor - device number
-+* t - pointer to the termios info struct
-+* Outputs: none
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+int SciSetAttributes(
-+ int minor,
-+ const struct termios *t
-+)
-+{
-+ uint32_t baud_requested;
-+ uint32_t sci_rate = 0;
-+ uint16_t sci_parity = 0;
-+ uint16_t sci_databits = 0;
-+
-+ if ( minor != SCI_MINOR ) /* check the minor dev num */
-+ {
-+ return -1; /* return error */
-+ }
-+
-+ /* if you look closely you will see this is the only thing we use */
-+ /* set the baud rate */
-+
-+ baud_requested = t->c_cflag & CBAUD; /* baud rate */
-+
-+ if (!baud_requested)
-+ {
-+/* baud_requested = B9600; default to 9600 baud */
-+ baud_requested = B19200; /* default to 19200 baud */
-+ }
-+
-+ sci_rate = termios_baud_to_number( baud_requested );
-+
-+ /* parity error detection */
-+
-+ if (t->c_cflag & PARENB) /* enable parity detection? */
-+ {
-+ if (t->c_cflag & PARODD)
-+ {
-+ sci_parity = SCI_PARITY_ODD; /* select odd parity */
-+ }
-+ else
-+ {
-+ sci_parity = SCI_PARITY_EVEN; /* select even parity */
-+ }
-+ }
-+ else
-+ {
-+ sci_parity = SCI_PARITY_NONE; /* no parity, most common */
-+ }
-+
-+ /* set the number of data bits, 8 is most common */
-+
-+ if (t->c_cflag & CSIZE) /* was it specified? */
-+ {
-+ switch (t->c_cflag & CSIZE)
-+ {
-+ case CS8: sci_databits = SCI_8_DATA_BITS; break;
-+ default : sci_databits = SCI_9_DATA_BITS; break;
-+ }
-+ }
-+ else
-+ {
-+ sci_databits = SCI_8_DATA_BITS; /* default to 8 data bits */
-+ }
-+
-+ /* the number of stop bits; always 1 for SCI */
-+
-+ if (t->c_cflag & CSTOPB)
-+ {
-+ /* do nothing */
-+ }
-+
-+ /* setup the hardware with these serial port parameters */
-+
-+ SciSetBaud(sci_rate); /* set the baud rate */
-+ SciSetParity(sci_parity); /* set the parity type */
-+ SciSetDataBits(sci_databits); /* set the data bits */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/*
-+ *
-+ * SECTION 3
-+ * POLLING BASED ENTRY POINTS FOR THE TERMIOS MODULE
-+ */
-+
-+/****************************************************************************
-+* Func: SciPolledOpen
-+* Desc: open routine for the polled i/o version of the driver
-+* called from rtems_termios_open which is called from console_open
-+* Inputs: major - device number
-+* minor - device number
-+* args - points to terminal info struct
-+* Outputs: success/fail
-+* Errors: none
-+* Scope: public - termios entry point
-+****************************************************************************/
-+
-+int SciPolledOpen(
-+ int major,
-+ int minor,
-+ void *arg
-+)
-+{
-+ rtems_libio_open_close_args_t * args = arg;
-+
-+ if ( minor != SCI_MINOR ) /* check minor device num */
-+ {
-+ return -1;
-+ }
-+
-+ if ( !args ) /* must have args */
-+ {
-+ return -1;
-+ }
-+
-+ SciTermioTty = args->iop->data1; /* Store tty pointer */
-+
-+ SciDisableAllInterrupts(); /* don't generate interrupts */
-+
-+ /* THIS IS ACTUALLY A BAD THING - SETTING LINE PARAMETERS HERE */
-+ /* IT SHOULD BE DONE THROUGH TCSETATTR() WHEN THE CONSOLE IS OPENED!!! */
-+
-+/* SciSetBaud(115200); set the baud rate */
-+/* SciSetBaud( 57600); set the baud rate */
-+/* SciSetBaud( 38400); set the baud rate */
-+ SciSetBaud( 19200); /* set the baud rate */
-+/* SciSetBaud( 9600); set the baud rate */
-+
-+ SciSetParity(SCI_PARITY_NONE); /* set no parity */
-+
-+ SciSetDataBits(SCI_8_DATA_BITS); /* set 8 data bits */
-+
-+ SciEnableTransmitter(); /* enable the xmitter */
-+
-+ SciEnableReceiver(); /* enable the rcvr */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciPolledClose
-+* Desc: close routine for the device driver, same for both
-+* Inputs: major - device number
-+* minor - device number
-+* args - unused
-+* Outputs: success/fail
-+* Errors: none
-+* Scope: public termios API
-+****************************************************************************/
-+
-+int SciPolledClose(
-+ int major,
-+ int minor,
-+ void *arg
-+)
-+{
-+ SciDisableAllInterrupts();
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciPolledRead
-+* Desc: polling based read routine for the uart
-+* Inputs: minor - device number
-+* Outputs: error or the character read
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+int SciPolledRead(
-+ int minor
-+)
-+{
-+ if ( minor != SCI_MINOR ) /* check the type-punned dev num */
-+ {
-+ return -1; /* return error */
-+ }
-+
-+ if ( SciCharAvailable() ) /* if a char is available */
-+ {
-+ return SciReadCharNoWait(); /* read the rx data register */
-+ }
-+
-+ return -1; /* return error */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciPolledWrite
-+* Desc: writes out characters in polled mode, waiting for the uart
-+* check in console_open, but we only seem to use interrupt mode
-+* Inputs: minor - device number
-+* buf - points to the data
-+* len - how many bytes
-+* Outputs: error or number of bytes written
-+* Errors: none
-+* Scope: public termios API
-+****************************************************************************/
-+
-+int SciPolledWrite(
-+ int minor,
-+ const char *buf,
-+ int len
-+)
-+{
-+ int32_t written = 0;
-+
-+ if ( minor != SCI_MINOR ) /* check minor device num */
-+ {
-+ return -1;
-+ }
-+
-+ if ( SciOpened == DRIVER_OPENED ) /* is the driver api open? */
-+ {
-+ return -1; /* toss the data */
-+ }
-+
-+ /* send each byte in the string out the port */
-+
-+ while ( written < len )
-+ {
-+ SciWriteCharWait(*buf++); /* send a byte */
-+
-+ written++; /* increment counter */
-+ }
-+
-+ return written; /* return count */
-+}
-+\f
-+
-+/*
-+ *
-+ * SECTION 4
-+ * DEVICE DRIVER PUBLIC API ENTRY POINTS
-+ */
-+
-+/****************************************************************************
-+* Func: SciInit
-+* Desc: Initialize the lasers device driver and hardware
-+* Inputs: major - the major device number which is assigned by rtems
-+* minor - the minor device number which is undefined at this point
-+* arg - ?????
-+* Outputs: RTEMS_SUCCESSFUL
-+* Errors: None.
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciInitialize (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+/* rtems_status_code status; */
-+
-+/*printk("%s\r\n", __FUNCTION__); */
-+
-+ /* register the SCI device name for termios console i/o
-+ * this is done over in console.c which doesn't seem exactly right
-+ * but there were problems doing it here...
-+ */
-+
-+/* status = rtems_io_register_name( "/dev/sci", major, 0 ); */
-+
-+/* if (status != RTEMS_SUCCESSFUL) */
-+/* rtems_fatal_error_occurred(status); */
-+
-+ SciMajor = major; /* save the rtems major number */
-+
-+ SciOpened = DRIVER_CLOSED; /* initial state is closed */
-+
-+ /* if you have an interrupt handler, install it here */
-+
-+ SciInited = 1; /* set the inited flag */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciOpen
-+* Desc: device driver open routine
-+* you must open a device before you can anything else
-+* only one process can have the device opened at a time
-+* you could look at the task id to restrict access if you want
-+* Inputs: major - the major device number assigned by rtems
-+* minor - the minor device number assigned by us
-+* arg - ?????
-+* Outputs: see below
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciOpen (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+/*printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor); */
-+
-+ if (SciInited == 0) /* must be initialized first! */
-+ {
-+ return RTEMS_NOT_CONFIGURED;
-+ }
-+
-+ if (minor != SCI_MINOR)
-+ {
-+ return RTEMS_INVALID_NAME; /* verify minor number */
-+ }
-+
-+ if (SciOpened == DRIVER_OPENED)
-+ {
-+ return RTEMS_RESOURCE_IN_USE; /* already opened! */
-+ }
-+
-+ SciOpened = DRIVER_OPENED; /* set the opened flag */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciClose
-+* Desc: device driver close routine
-+* the device must be opened before you can close it
-+* the device must be closed before someone (else) can open it
-+* Inputs: major - the major device number
-+* minor - the minor device number
-+* arg - ?????
-+* Outputs: see below
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciClose (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+/*printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor); */
-+
-+ if (minor != SCI_MINOR)
-+ {
-+ return RTEMS_INVALID_NAME; /* check the minor number */
-+ }
-+
-+ if (SciOpened != DRIVER_OPENED)
-+ {
-+ return RTEMS_INCORRECT_STATE; /* must be opened first */
-+ }
-+
-+ SciOpened = DRIVER_CLOSED; /* set the flag */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciRead
-+* Desc: device driver read routine
-+* this function is not meaningful for the laser devices
-+* Inputs: major - the major device number
-+* minor - the minor device number
-+* arg - read/write arguments
-+* Outputs: see below
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciRead (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ rtems_libio_rw_args_t *rw_args; /* ptr to argument struct */
-+ char *buffer;
-+ uint16_t length;
-+
-+ rw_args = (rtems_libio_rw_args_t *) arg; /* arguments to read() */
-+
-+ if (minor != SCI_MINOR)
-+ {
-+ return RTEMS_INVALID_NAME; /* check the minor number */
-+ }
-+
-+ if (SciOpened == DRIVER_CLOSED)
-+ {
-+ return RTEMS_INCORRECT_STATE; /* must be opened first */
-+ }
-+
-+ buffer = rw_args->buffer; /* points to user's buffer */
-+
-+ length = rw_args->count; /* how many bytes they want */
-+
-+/* *buffer = SciReadCharWait(); wait for a character */
-+
-+ /* if there isn't a character available, wait until one shows up */
-+ /* or the timeout period expires, which ever happens first */
-+
-+ if ( SciRcvBufCount == 0 ) /* no chars */
-+ {
-+ /* wait for someone to wake me up... */
-+ /*rtems_task_wake_after(SciReadTimeout); */
-+ }
-+
-+ if ( SciRcvBufCount ) /* any characters locally? */
-+ {
-+ *buffer = SciRcvBufGetChar(); /* get the character */
-+
-+ rw_args->bytes_moved = 1; /* how many we actually read */
-+ }
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciWrite
-+* Desc: device driver write routine
-+* this function is not meaningful for the laser devices
-+* Inputs: major - the major device number
-+* minor - the minor device number
-+* arg - read/write arguments
-+* Outputs: see below
-+* Errors: non3
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciWrite (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_libio_rw_args_t *rw_args; /* ptr to argument struct */
-+ uint8_t *buffer;
-+ uint16_t length;
-+
-+ rw_args = (rtems_libio_rw_args_t *) arg;
-+
-+ if (minor != SCI_MINOR)
-+ {
-+ return RTEMS_INVALID_NAME; /* check the minor number */
-+ }
-+
-+ if (SciOpened == DRIVER_CLOSED)
-+ {
-+ return RTEMS_INCORRECT_STATE; /* must be opened first */
-+ }
-+
-+ buffer = (uint8_t*)rw_args->buffer; /* points to data */
-+
-+ length = rw_args->count; /* how many bytes */
-+
-+ while (length--)
-+ {
-+ SciWriteCharWait(*buffer++); /* send the bytes out */
-+ }
-+
-+ rw_args->bytes_moved = rw_args->count; /* how many we wrote */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciControl
-+* Desc: device driver control routine
-+* see below for an example of how to use the ioctl interface
-+* Inputs: major - the major device number
-+* minor - the minor device number
-+* arg - io control args
-+* Outputs: see below
-+* Errors: none
-+* Scope: public API
-+****************************************************************************/
-+
-+rtems_device_driver SciControl (
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_libio_ioctl_args_t *args = arg; /* rtems arg struct */
-+ uint16_t command; /* the cmd to execute */
-+ uint16_t unused; /* maybe later */
-+ uint16_t *ptr; /* ptr to user data */
-+
-+/*printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor); */
-+
-+ /* do some sanity checking */
-+
-+ if (minor != SCI_MINOR)
-+ {
-+ return RTEMS_INVALID_NAME; /* check the minor number */
-+ }
-+
-+ if (SciOpened == DRIVER_CLOSED)
-+ {
-+ return RTEMS_INCORRECT_STATE; /* must be open first */
-+ }
-+
-+ if (args == 0)
-+ {
-+ return RTEMS_INVALID_ADDRESS; /* must have args */
-+ }
-+
-+ args->ioctl_return = -1; /* assume an error */
-+
-+ command = args->command; /* get the command */
-+ ptr = args->buffer; /* this is an address */
-+ unused = *ptr; /* brightness */
-+
-+ if (command == SCI_SEND_BREAK) /* process the command */
-+ {
-+ SciSendBreak(); /* send break char */
-+ }
-+
-+ args->ioctl_return = 0; /* return status */
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+\f
-+
-+/*
-+ *
-+ * SECTION 5
-+ * HARDWARE LEVEL ROUTINES
-+ */
-+
-+/****************************************************************************
-+* Func: SciSetBaud
-+* Desc: setup the uart based on the termios modules requests
-+* Inputs: baud rate
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void SciSetBaud(uint32_t rate)
-+{
-+ uint16_t value;
-+ uint16_t save_sccr1;
-+
-+/* when you open the console you need to set the termio struct baud rate */
-+/* it has a default value of 9600, when someone calls tcsetattr it reverts! */
-+
-+ SciBaud = rate; /* save the rate */
-+
-+ /* calculate the register value as a float and convert to an int */
-+ /* set baud rate - you must define the system clock constant */
-+ /* see mrm332.h for an example */
-+
-+ value = ( (uint16_t) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff );
-+
-+ save_sccr1 = *SCCR1; /* save register */
-+
-+ /* also turns off the xmtr and rcvr */
-+
-+ *SCCR1 &= SCI_DISABLE_INT_ALL; /* disable interrupts */
-+
-+ *SCCR0 = value; /* write the register */
-+
-+ *SCCR1 = save_sccr1; /* restore register */
-+
-+ return;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciSetParity
-+* Desc: setup the uart based on the termios modules requests
-+* Inputs: parity
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void SciSetParity(uint16_t parity)
-+{
-+ uint16_t value;
-+
-+ value = *SCCR1; /* get the register */
-+
-+ if (parity == SCI_PARITY_ODD)
-+ {
-+ value |= SCI_PARITY_ENABLE; /* parity enabled */
-+ value |= SCI_PARITY_ODD; /* parity odd */
-+ }
-+
-+ else if (parity == SCI_PARITY_EVEN)
-+ {
-+ value |= SCI_PARITY_ENABLE; /* parity enabled */
-+ value &= ~SCI_PARITY_ODD; /* parity even */
-+ }
-+
-+ else if (parity == SCI_PARITY_NONE)
-+ {
-+ value &= ~SCI_PARITY_ENABLE; /* disabled, most common */
-+ }
-+
-+ /* else no changes */
-+
-+ *SCCR1 = value; /* write the register */
-+
-+ return;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciSetDataBits
-+* Desc: setup the uart based on the termios modules requests
-+* Inputs: data bits
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void SciSetDataBits(uint16_t bits)
-+{
-+ uint16_t value;
-+
-+ value = *SCCR1; /* get the register */
-+
-+ /* note - the parity setting affects the number of data bits */
-+
-+ if (bits == SCI_9_DATA_BITS)
-+ {
-+ value |= SCI_9_DATA_BITS; /* 9 data bits */
-+ }
-+
-+ else if (bits == SCI_8_DATA_BITS)
-+ {
-+ value &= SCI_8_DATA_BITS; /* 8 data bits */
-+ }
-+
-+ /* else no changes */
-+
-+ *SCCR1 = value; /* write the register */
-+
-+ return;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciDisableAllInterrupts
-+* Func: SciEnableTransmitInterrupts
-+* Func: SciEnableReceiveInterrupts
-+* Desc: handles generation of interrupts by the sci module
-+* Inputs: none
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void inline SciDisableAllInterrupts( void )
-+{
-+ /* this also turns off the xmtr and rcvr */
-+
-+ *SCCR1 &= SCI_DISABLE_INT_ALL;
-+}
-+
-+static void inline SciEnableReceiveInterrupts( void )
-+{
-+ *SCCR1 |= SCI_ENABLE_INT_RX;
-+}
-+
-+static void inline SciDisableReceiveInterrupts( void )
-+{
-+ *SCCR1 &= SCI_DISABLE_INT_RX;
-+}
-+
-+static void inline SciEnableTransmitInterrupts( void )
-+{
-+ *SCCR1 |= SCI_ENABLE_INT_TX;
-+}
-+
-+static void inline SciDisableTransmitInterrupts( void )
-+{
-+ *SCCR1 &= SCI_DISABLE_INT_TX;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciEnableTransmitter, SciDisableTransmitter
-+* Func: SciEnableReceiver, SciDisableReceiver
-+* Desc: turns the transmitter and receiver on and off
-+* Inputs: none
-+* Outputs: none
-+* Errors: none
-+* Scope: private
-+****************************************************************************/
-+
-+static void inline SciEnableTransmitter( void )
-+{
-+ *SCCR1 |= SCI_ENABLE_XMTR;
-+}
-+
-+static void inline SciDisableTransmitter( void )
-+{
-+ *SCCR1 &= SCI_DISABLE_XMTR;
-+}
-+
-+static void inline SciEnableReceiver( void )
-+{
-+ *SCCR1 |= SCI_ENABLE_RCVR;
-+}
-+
-+static void inline SciDisableReceiver( void )
-+{
-+ *SCCR1 &= SCI_DISABLE_RCVR;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciWriteCharWait
-+* Desc: wait for room in the fifo and then put a char in
-+* Inputs: a byte to send
-+* Outputs: none
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+void SciWriteCharWait(uint8_t c)
-+{
-+ /* poll the fifo, waiting for room for another character */
-+
-+ while ( ( *SCSR & SCI_XMTR_AVAILABLE ) == 0 )
-+ {
-+ /* Either we are writing to the fifo faster than
-+ * the uart can clock bytes out onto the cable,
-+ * or we are in flow control (actually no, we
-+ * are ignoring flow control from the other end).
-+ * In the first case, higher baud rates will help.
-+ */
-+ /* relinquish processor while waiting */
-+ rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
-+ }
-+
-+ *SCDR = c; /* send the charcter */
-+
-+ SciBytesOut++; /* increment the counter */
-+
-+ return;
-+}
-+
-+/****************************************************************************
-+* Func: SciWriteCharNoWait
-+* Desc: if no room in the fifo throw the char on the floor
-+* Inputs: a byte to send
-+* Outputs: none
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+void SciWriteCharNoWait(uint8_t c)
-+{
-+ if ( ( *SCSR & SCI_XMTR_AVAILABLE ) == 0 )
-+ {
-+ return; /* no room, throw it away */
-+ }
-+
-+ *SCDR = c; /* put the char in the fifo */
-+
-+ SciBytesOut++; /* increment the counter */
-+
-+ return;
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciReadCharWait
-+* Desc: read a character, waiting for one to show up, if need be
-+* Inputs: none
-+* Outputs: a character
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+uint8_t inline SciReadCharWait( void )
-+{
-+ uint8_t ch;
-+
-+ while ( SciCharAvailable() == 0 ) /* anything there? */
-+ {
-+ /* relinquish processor while waiting */
-+ rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
-+ }
-+
-+ /* if you have rcv ints enabled, then the isr will probably */
-+ /* get the character before you will unless you turn off ints */
-+ /* ie polling and ints don't mix that well */
-+
-+ ch = *SCDR; /* get the charcter */
-+
-+ SciBytesIn++; /* increment the counter */
-+
-+ return ch; /* return the char */
-+}
-+
-+/****************************************************************************
-+* Func: SciReadCharNoWait
-+* Desc: try to get a char but dont wait for one
-+* Inputs: none
-+* Outputs: a character or -1 if none
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+uint8_t inline SciReadCharNoWait( void )
-+{
-+ uint8_t ch;
-+
-+ if ( SciCharAvailable() == 0 ) /* anything there? */
-+ return -1;
-+
-+ ch = *SCDR; /* get the character */
-+
-+ SciBytesIn++; /* increment the count */
-+
-+ return ch; /* return the char */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciCharAvailable
-+* Desc: is there a receive character in the data register
-+* Inputs: none
-+* Outputs: false if no char available, else true
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+uint8_t inline SciCharAvailable( void )
-+{
-+ return ( *SCSR & SCI_RCVR_READY ); /* char in data register? */
-+}
-+\f
-+
-+/****************************************************************************
-+* Func: SciSendBreak
-+* Desc: send 1 or tow breaks (all zero bits)
-+* Inputs: none
-+* Outputs: none
-+* Errors: none
-+* Scope: public
-+****************************************************************************/
-+
-+void SciSendBreak( void )
-+{
-+ /* From the Motorola QSM reference manual - */
-+
-+ /* "if SBK is toggled by writing it first to a one and then immediately */
-+ /* to a zero (in less than one serial frame interval), the transmitter */
-+ /* sends only one or two break frames before reverting to mark (idle) */
-+ /* or before commencing to send more data" */
-+
-+ *SCCR1 |= SCI_SEND_BREAK; /* set the bit */
-+
-+ *SCCR1 &= ~SCI_SEND_BREAK; /* clear the bit */
-+
-+ return;
-+}
-+\f
-+
-+/*
-+ *
-+ * SECTION 6
-+ * TEST CODE
-+ */
-+
-+/****************************************************************************
-+* Func: SciUnitTest
-+* Desc: test the device driver
-+* Inputs: nothing
-+* Outputs: nothing
-+* Scope: public
-+****************************************************************************/
-+
-+#if 0
-+#define O_RDWR LIBIO_FLAGS_READ_WRITE /* dont like this but... */
-+
-+void SciUnitTest()
-+{
-+ uint8_t byte; /* a character */
-+ uint16_t fd; /* file descriptor for device */
-+ uint16_t result; /* result of ioctl */
-+
-+ fd = open("/dev/sci",O_RDWR); /* open the device */
-+
-+printk("SCI open fd=%d\r\n",fd);
-+
-+ result = write(fd, "abcd\r\n", 6); /* send a string */
-+
-+printk("SCI write result=%d\r\n",result);
-+
-+ result = read(fd, &byte, 1); /* read a byte */
-+
-+printk("SCI read result=%d,byte=%x\r\n",result,byte);
-+
-+ return;
-+}
-+#endif
-+\f
-+
-+/****************************************************************************
-+* Func: SciPrintStats
-+* Desc: print out some driver information
-+* Inputs: nothing
-+* Outputs: nothing
-+* Scope: public
-+****************************************************************************/
-+
-+void SciPrintStats ( void )
-+{
-+ printk("\r\n");
-+
-+ printk( "SYS_CLOCK is %2.6f Mhz\r\n\n", SYS_CLOCK / 1000000.0 );
-+
-+ printk( "Current baud rate is %d bps or %d cps\r\n\n", SciBaud, SciBaud / 10 );
-+
-+ printk( "SCI Uart chars in %8d\r\n", SciBytesIn );
-+ printk( "SCI Uart chars out %8d\r\n", SciBytesOut );
-+ printk( "SCI Uart framing errors %8d\r\n", SciErrorsFraming );
-+ printk( "SCI Uart parity errors %8d\r\n", SciErrorsParity );
-+ printk( "SCI Uart overrun errors %8d\r\n", SciErrorsOverrun );
-+ printk( "SCI Uart noise errors %8d\r\n", SciErrorsNoise );
-+
-+ return;
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/bspstart.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/bspstart.c 2008-08-19 12:23:15.000000000 +0200
-@@ -0,0 +1,59 @@
-+/*
-+ * This routine starts the application. It includes application,
-+ * board, and monitor specific initialization and configuration.
-+ * The generic CPU dependent initialization has been performed
-+ * before this routine is invoked.
-+ *
-+ * COPYRIGHT (c) 1989-1999.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: bspstart.c,v 1.13 2008/08/19 10:23:15 ralf Exp $
-+ */
-+
-+#include <bsp.h>
-+#include <rtems/libio.h>
-+
-+#include <string.h>
-+
-+/*
-+ * Use the shared implementations of the following routines
-+ */
-+
-+void bsp_libc_init( void *, uint32_t, int );
-+void bsp_pretasking_hook(void); /* m68k version */
-+
-+/*
-+ * Call Spurious_Initialize in bsp_predriver_hook because
-+ * bsp_predriver_hook is call after the _ISR_Vector_Table allocation
-+ */
-+
-+void bsp_predriver_hook(void)
-+{
-+ extern void Spurious_Initialize(void);
-+ Spurious_Initialize();
-+}
-+
-+/*
-+ * bsp_start
-+ *
-+ * This routine does the bulk of the system initialization.
-+ */
-+
-+void bsp_start( void )
-+{
-+ void *vbr;
-+ extern void *_WorkspaceBase;
-+ extern void *_RamSize;
-+ extern unsigned long _M68k_Ramsize;
-+
-+ /* RAM size set in linker script */
-+ _M68k_Ramsize = (unsigned long)&_RamSize;
-+
-+ m68k_get_vbr( vbr );
-+
-+ Configuration.work_space_start = (void *) &_WorkspaceBase;
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2008-08-19 12:23:15.000000000 +0200
-@@ -0,0 +1,125 @@
-+/*
-+ * $Id
-+ */
-+
-+#include <mrm332.h>
-+#include <rtems/m68k/sim.h>
-+#define __START_C__
-+#include "bsp.h"
-+
-+m68k_isr_entry M68Kvec[256];
-+m68k_isr_entry vectors[256];
-+char * const __argv[]= {"main", ""};
-+
-+void boot_card(int argc, char * const argv[]);
-+
-+/*
-+ * This prototype really should have the noreturn attribute but
-+ * that causes a warning. Not sure how to fix that.
-+ */
-+/* void dumby_start () __attribute__ ((noreturn)); */
-+void start_c(void);
-+
-+void start_c(void) {
-+
-+ /* Synthesizer Control Register */
-+ /* see section(s) 4.8 */
-+ /* end include in ram_init.S */
-+ *SYNCR = (unsigned short int)
-+ ( SAM(MRM_W,15,VCO) | SAM(0x0,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
-+ while (! (*SYNCR & SLOCK)); /* protect from clock overshoot */
-+ /* include in ram_init.S */
-+ *SYNCR = (unsigned short int)
-+ ( SAM(MRM_W,15,VCO) | SAM(MRM_X,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
-+
-+ /* System Protection Control Register */
-+ /* !!! can only write to once after reset !!! */
-+ /* see section 3.8.4 of the SIM Reference Manual */
-+ *SYPCR = (unsigned char)( HME | BME );
-+
-+ /* Periodic Interrupr Control Register */
-+ /* see section 3.8.2 of the SIM Reference Manual */
-+ *PICR = (unsigned short int)
-+ ( SAM(0,8,PIRQL) | SAM(MRM_PIV,0,PIV) );
-+ /* ^^^ zero disables interrupt, don't enable here or ram_init will
-+ be wrong. It's enabled below. */
-+
-+ /* Periodic Interrupt Timer Register */
-+ /* see section 3.8.3 of the SIM Reference Manual */
-+ *PITR = (unsigned short int)( SAM(0x09,0,PITM) );
-+ /* 1.098mS interrupt, assuming 32.768 KHz input clock */
-+
-+ /* Port C Data */
-+ /* load values before enabled */
-+ *PORTC = (unsigned char) 0x0;
-+
-+ /* Port E and F Data Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *PORTE0 = (unsigned char) 0;
-+ *PORTF0 = (unsigned char) 0;
-+
-+ /* Port E and F Data Direction Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *DDRE = (unsigned char) 0xff;
-+ *DDRF = (unsigned char) 0xfd;
-+
-+ /* Port E and F Pin Assignment Register */
-+ /* see section 9 of the SIM Reference Manual */
-+ *PEPAR = (unsigned char) 0;
-+ *PFPAR = (unsigned char) 0;
-+
-+ /* end of SIM initalization code */
-+ /* end include in ram_init.S */
-+
-+ /*
-+ * Initialize RAM by copying the .data section out of ROM (if
-+ * needed) and "zero-ing" the .bss section.
-+ */
-+ {
-+ register char *src = _etext;
-+ register char *dst = _copy_start;
-+
-+ if (_copy_data_from_rom)
-+ /* ROM has data at end of text; copy it. */
-+ while (dst < _edata)
-+ *dst++ = *src++;
-+
-+ /* Zero bss */
-+ for (dst = _clear_start; dst< end; dst++)
-+ {
-+ *dst = 0;
-+ }
-+ }
-+
-+ /*
-+ * Initialize vector table.
-+ */
-+ {
-+ m68k_isr_entry *monitors_vector_table;
-+
-+ m68k_get_vbr(monitors_vector_table);
-+
-+ M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
-+ M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
-+ M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
-+ M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
-+ M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
-+
-+ m68k_set_vbr(&M68Kvec);
-+ }
-+
-+ /*
-+ * Initalize the board.
-+ */
-+
-+ /* Spurious should be called in the predriver hook */
-+ /* Spurious_Initialize(); */
-+ /*console_init(); */
-+
-+ /*
-+ * Execute main with arguments argc and agrv.
-+ */
-+ boot_card(1,__argv);
-+ reboot();
-+
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/include/tm27.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/include/tm27.h 2009-11-29 01:11:56.475557339 +0100
-@@ -0,0 +1,34 @@
-+/*
-+ * tm27.h
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: tm27.h,v 1.2 2004/04/23 04:47:36 ralf Exp $
-+ */
-+
-+#ifndef _RTEMS_TMTEST27
-+#error "This is an RTEMS internal file you must not include directly."
-+#endif
-+
-+#ifndef __tm27_h
-+#define __tm27_h
-+
-+/*
-+ * Define the interrupt mechanism for Time Test 27
-+ */
-+
-+/* XXX - JRS - I want to compile the tmtests */
-+
-+#define MUST_WAIT_FOR_INTERRUPT 1
-+
-+#define Install_tm27_vector( handler ) /* empty */
-+
-+#define Cause_tm27_intr() /* empty */
-+
-+#define Clear_tm27_intr() /* empty */
-+
-+#define Lower_tm27_intr() /* empty */
-+
-+#endif
-Index: rtems/c/src/lib/libbsp/m68k/mo376/times
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/times 2009-11-29 01:11:56.479557220 +0100
-@@ -0,0 +1,195 @@
-+#
-+# Timing Test Suite Results for the MRM332 BSP
-+#
-+# $Id: times,v 1.2 2004/01/07 21:13:50 joel Exp $
-+#
-+
-+NOTE: This BSP is user submitted and no information is currently available.
-+
-+TBD: MATT - update this with real times!
-+
-+Board: MRM332
-+CPU: 68332
-+Clock Speed: 20 Mhz
-+Memory Configuration: SRAM, DRAM, cache, etc
-+Wait States:
-+
-+Times Reported in: cycles, microseconds, etc
-+Timer Source: Count Down Timer, on-CPU cycle counter, etc
-+
-+Column A: unused
-+Column B: unused
-+
-+# DESCRIPTION A B
-+== ================================================================= ==== ====
-+ 1 rtems_semaphore_create 20
-+ rtems_semaphore_delete 21
-+ rtems_semaphore_obtain: available 15
-+ rtems_semaphore_obtain: not available -- NO_WAIT 15
-+ rtems_semaphore_release: no waiting tasks 16
-+
-+ 2 rtems_semaphore_obtain: not available -- caller blocks 62
-+
-+ 3 rtems_semaphore_release: task readied -- preempts caller 55
-+
-+ 4 rtems_task_restart: blocked task -- preempts caller 77
-+ rtems_task_restart: ready task -- preempts caller 70
-+ rtems_semaphore_release: task readied -- returns to caller 25
-+ rtems_task_create 57
-+ rtems_task_start 31
-+ rtems_task_restart: suspended task -- returns to caller 36
-+ rtems_task_delete: suspended task 47
-+ rtems_task_restart: ready task -- returns to caller 37
-+ rtems_task_restart: blocked task -- returns to caller 46
-+ rtems_task_delete: blocked task 50
-+
-+ 5 rtems_task_suspend: calling task 51
-+ rtems_task_resume: task readied -- preempts caller 49
-+
-+ 6 rtems_task_restart: calling task 59
-+ rtems_task_suspend: returns to caller 18
-+ rtems_task_resume: task readied -- returns to caller 19
-+ rtems_task_delete: ready task 50
-+
-+ 7 rtems_task_restart: suspended task -- preempts caller 70
-+
-+ 8 rtems_task_set_priority: obtain current priority 12
-+ rtems_task_set_priority: returns to caller 27
-+ rtems_task_mode: obtain current mode 5
-+ rtems_task_mode: no reschedule 5
-+ rtems_task_mode: reschedule -- returns to caller 8
-+ rtems_task_mode: reschedule -- preempts caller 39
-+ rtems_task_set_note 13
-+ rtems_task_get_note 13
-+ rtems_clock_set 33
-+ rtems_clock_get 3
-+
-+ 9 rtems_message_queue_create 110
-+ rtems_message_queue_send: no waiting tasks 37
-+ rtems_message_queue_urgent: no waiting tasks 37
-+ rtems_message_queue_receive: available 31
-+ rtems_message_queue_flush: no messages flushed 12
-+ rtems_message_queue_flush: messages flushed 16
-+ rtems_message_queue_delete 26
-+
-+10 rtems_message_queue_receive: not available -- NO_WAIT 15
-+ rtems_message_queue_receive: not available -- caller blocks 62
-+
-+11 rtems_message_queue_send: task readied -- preempts caller 72
-+
-+12 rtems_message_queue_send: task readied -- returns to caller 39
-+
-+13 rtems_message_queue_urgent: task readied -- preempts caller 72
-+
-+14 rtems_message_queue_urgent: task readied -- returns to caller 39
-+
-+15 rtems_event_receive: obtain current events 1
-+ rtems_event_receive: not available -- NO_WAIT 12
-+ rtems_event_receive: not available -- caller blocks 56
-+ rtems_event_send: no task readied 12
-+ rtems_event_receive: available 12
-+ rtems_event_send: task readied -- returns to caller 24
-+
-+16 rtems_event_send: task readied -- preempts caller 55
-+
-+17 rtems_task_set_priority: preempts caller 62
-+
-+18 rtems_task_delete: calling task 83
-+
-+19 rtems_signal_catch 9
-+ rtems_signal_send: returns to caller 15
-+ rtems_signal_send: signal to self 18
-+ exit ASR overhead: returns to calling task 22
-+ exit ASR overhead: returns to preempting task 49
-+
-+20 rtems_partition_create 35
-+ rtems_region_create 23
-+ rtems_partition_get_buffer: available 15
-+ rtems_partition_get_buffer: not available 13
-+ rtems_partition_return_buffer 18
-+ rtems_partition_delete 16
-+ rtems_region_get_segment: available 22
-+ rtems_region_get_segment: not available -- NO_WAIT 21
-+ rtems_region_return_segment: no waiting tasks 19
-+ rtems_region_get_segment: not available -- caller blocks 64
-+ rtems_region_return_segment: task readied -- preempts caller 74
-+ rtems_region_return_segment: task readied -- returns to caller 44
-+ rtems_region_delete 16
-+ rtems_io_initialize 2
-+ rtems_io_open 1
-+ rtems_io_close 1
-+ rtems_io_read 1
-+ rtems_io_write 1
-+ rtems_io_control 1
-+
-+21 rtems_task_ident 149
-+ rtems_message_queue_ident 145
-+ rtems_semaphore_ident 156
-+ rtems_partition_ident 145
-+ rtems_region_ident 148
-+ rtems_port_ident 145
-+ rtems_timer_ident 145
-+ rtems_rate_monotonic_ident 145
-+
-+22 rtems_message_queue_broadcast: task readied -- returns to caller 42
-+ rtems_message_queue_broadcast: no waiting tasks 17
-+ rtems_message_queue_broadcast: task readied -- preempts caller 78
-+
-+23 rtems_timer_create 14
-+ rtems_timer_fire_after: inactive 22
-+ rtems_timer_fire_after: active 24
-+ rtems_timer_cancel: active 15
-+ rtems_timer_cancel: inactive 13
-+ rtems_timer_reset: inactive 21
-+ rtems_timer_reset: active 23
-+ rtems_timer_fire_when: inactive 34
-+ rtems_timer_fire_when: active 34
-+ rtems_timer_delete: active 19
-+ rtems_timer_delete: inactive 17
-+ rtems_task_wake_when 69
-+
-+24 rtems_task_wake_after: yield -- returns to caller 9
-+ rtems_task_wake_after: yields -- preempts caller 45
-+
-+25 rtems_clock_tick 4
-+
-+26 _ISR_Disable 0
-+ _ISR_Flash 1
-+ _ISR_Enable 1
-+ _Thread_Disable_dispatch 0
-+ _Thread_Enable_dispatch 7
-+ _Thread_Set_state 11
-+ _Thread_Disptach (NO FP) 31
-+ context switch: no floating point contexts 21
-+ context switch: self 10
-+ context switch: to another task 10
-+ context switch: restore 1st FP task 25
-+ fp context switch: save idle, restore idle 31
-+ fp context switch: save idle, restore initialized 19
-+ fp context switch: save initialized, restore initialized 20
-+ _Thread_Resume 7
-+ _Thread_Unblock 7
-+ _Thread_Ready 9
-+ _Thread_Get 4
-+ _Semaphore_Get 2
-+ _Thread_Get: invalid id 0
-+
-+27 interrupt entry overhead: returns to interrupted task 6
-+ interrupt exit overhead: returns to interrupted task 6
-+ interrupt entry overhead: returns to nested interrupt 6
-+ interrupt exit overhead: returns to nested interrupt 5
-+ interrupt entry overhead: returns to preempting task 7
-+ interrupt exit overhead: returns to preempting task 36
-+
-+28 rtems_port_create 16
-+ rtems_port_external_to_internal 11
-+ rtems_port_internal_to_external 11
-+ rtems_port_delete 16
-+
-+29 rtems_rate_monotonic_create 15
-+ rtems_rate_monotonic_period: initiate period -- returns to caller 21
-+ rtems_rate_monotonic_period: obtain status 13
-+ rtems_rate_monotonic_cancel 16
-+ rtems_rate_monotonic_delete: inactive 18
-+ rtems_rate_monotonic_delete: active 20
-+ rtems_rate_monotonic_period: conclude periods -- caller blocks 53
-Index: rtems/c/src/lib/libbsp/m68k/mo376/include/mrm332.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/include/mrm332.h 2009-11-29 01:11:56.479557220 +0100
-@@ -0,0 +1,70 @@
-+/* mrm332.h
-+ *
-+ * $Id: mrm332.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
-+ */
-+
-+#ifndef _MRM332_H_
-+#define _MRM332_H_
-+
-+/* SIM_MM (SIM Module Mapping) determines the location of the control
-+ register block. When MM=0, register addresses range fom 0x7ff000 to
-+ 0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
-+ 0xffffff. */
-+#define SIM_MM 1
-+
-+/* Interrupt related definitions */
-+#define SIM_IARB 15
-+#define QSM_IARB 10
-+
-+#define MRM_PIV 64
-+#define ISRL_PIT 4 /* zero disables PIT */
-+
-+#define EFI_QIVR 66 /* 66=>SCI and 67=>QSPI interrupt */
-+#define ISRL_QSPI 0
-+
-+#define EFI_SPINT 24 /* spurious interrupt */
-+#define EFI_INT1 25 /* CTS interrupt */
-+#define ISRL_SCI 6
-+
-+/* System Clock definitions */
-+#define XTAL 32768.0 /* crystal frequency in Hz */
-+
-+#if 0
-+/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
-+#define MRM_W 0 /* system clock parameters */
-+#define MRM_X 0
-+#define MRM_Y 0x3f
-+#endif
-+
-+#if 1
-+/* 16.77722 MHz: */
-+#define MRM_W 1 /* system clock parameters */
-+#define MRM_X 1
-+#define MRM_Y 0x0f
-+#endif
-+
-+#if 0
-+/* 25.16582 MHz: */
-+#define MRM_W 1 /* system clock parameters */
-+#define MRM_X 1
-+#define MRM_Y 0x17
-+#endif
-+
-+#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
-+#define SCI_BAUD 19200 /* RS232 Baud Rate */
-+
-+/* macros/functions */
-+
-+#ifndef ASM
-+
-+/*
-+ * This prototype really should have the noreturn attribute but
-+ * that causes a warning. Not sure how to fix that.
-+ */
-+/* static void reboot(void) __attribute__ ((noreturn)); */
-+static void reboot(void);
-+__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
-+
-+#endif /* ASM */
-+
-+#endif /* _MRM_H_ */
-Index: rtems/c/src/lib/libbsp/m68k/mo376/include/bspopts.h.in
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/include/bspopts.h.in 2009-11-29 01:11:56.479557220 +0100
-@@ -0,0 +1,16 @@
-+/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
-+
-+/* Define to the address where bug reports for this package should be sent. */
-+#undef PACKAGE_BUGREPORT
-+
-+/* Define to the full name of this package. */
-+#undef PACKAGE_NAME
-+
-+/* Define to the full name and version of this package. */
-+#undef PACKAGE_STRING
-+
-+/* Define to the one symbol short name of this package. */
-+#undef PACKAGE_TARNAME
-+
-+/* Define to the version of this package. */
-+#undef PACKAGE_VERSION
-Index: rtems/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c 2009-11-29 01:11:56.479557220 +0100
-@@ -0,0 +1,105 @@
-+/* Spurious_driver
-+ *
-+ * This routine installs spurious interrupt handlers for the mrm.
-+ *
-+ * Input parameters: NONE
-+ *
-+ * Output parameters: NONE
-+ *
-+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: spinit.c,v 1.6 2006/09/11 21:43:55 joel Exp $
-+ */
-+
-+#include <bsp.h>
-+#include <stdio.h>
-+
-+const char * const _Spurious_Error_[] = {"Reset","Bus Error","Address Error",
-+ "Illegal Instruction","Zero Division","CHK, CHK2 Instruction",
-+ "TRAPcc, TRAPV Instruction","Privilege Violation","Trace",
-+ "Line 1010 Emulation","Line 1111 Emulation","Hardware Breakpoint",
-+ "Coprocessor Protocal Violation",
-+ "Format Error ans Uninitialized Interrupt","Unassigned",
-+ "Spurious Interrupt","AVec1","AVec2","AVec3","AVec4","AVec5","AVec6",
-+ "AVec7","Trap Instruction","Debug","Reboot","Reserved Coprocessor",
-+ "Reserved Unassigned","User Defined"};
-+
-+rtems_isr Spurious_Isr(
-+ rtems_vector_number vector
-+)
-+{
-+ /*int sp = 0; */
-+#if 0
-+ const char * const VectDescrip[] = {
-+ _Spurious_Error_[0], _Spurious_Error_[0], _Spurious_Error_[1],
-+ _Spurious_Error_[2], _Spurious_Error_[3], _Spurious_Error_[4],
-+ _Spurious_Error_[5], _Spurious_Error_[6], _Spurious_Error_[7],
-+ _Spurious_Error_[8], _Spurious_Error_[9], _Spurious_Error_[10],
-+ _Spurious_Error_[11], _Spurious_Error_[12], _Spurious_Error_[13],
-+ _Spurious_Error_[13], _Spurious_Error_[14], _Spurious_Error_[14],
-+ _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
-+ _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
-+ _Spurious_Error_[15], _Spurious_Error_[16], _Spurious_Error_[17],
-+ _Spurious_Error_[18], _Spurious_Error_[19], _Spurious_Error_[20],
-+ _Spurious_Error_[21], _Spurious_Error_[22], _Spurious_Error_[23],
-+ _Spurious_Error_[24], _Spurious_Error_[23], _Spurious_Error_[23],
-+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
-+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
-+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
-+ _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[25],
-+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
-+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
-+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
-+ _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[27],
-+ _Spurious_Error_[27], _Spurious_Error_[27], _Spurious_Error_[27],
-+ _Spurious_Error_[27], _Spurious_Error_[28]};
-+#endif
-+
-+ /*asm volatile ( "movea.l %%sp,%0 " : "=a" (sp) : "0" (sp) ); */
-+
-+ _CPU_ISR_Set_level( 7 );
-+ /*_UART_flush(); */
-+#if 0
-+ RAW_PUTS("\n\rRTEMS: Spurious interrupt: ");
-+ RAW_PUTS((char *)VectDescrip[( (vector>64) ? 64 : vector )]);
-+ RAW_PUTS("\n\rRTEMS: Vector: ");
-+ RAW_PUTI(vector);
-+ RAW_PUTS(" sp: ");
-+ RAW_PUTI(sp);
-+ RAW_PUTS("\n\r");
-+#endif
-+ bsp_cleanup();
-+
-+ /* BDM SIGEMT */
-+ asm(" .word 0x4afa");
-+
-+ for(;;);
-+}
-+
-+void Spurious_Initialize(void)
-+{
-+ rtems_vector_number vector;
-+
-+ for ( vector = 0x0 ; vector <= 0xFF ; vector++ )
-+ {
-+ switch (vector)
-+ {
-+ case 4:
-+ case 9:
-+ case 31:
-+ case 47:
-+ case 66:
-+ /* These vectors used by CPU32bug - don't overwrite them. */
-+ break;
-+
-+ default:
-+ (void) set_vector( Spurious_Isr, vector, 1 );
-+ break;
-+ }
-+ }
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds 2008-03-04 00:06:30.000000000 +0100
-@@ -0,0 +1,164 @@
-+/* linkcmds
-+ *
-+ * $Id: linkcmds,v 1.8 2008/03/03 23:06:30 joel Exp $
-+ */
-+
-+OUTPUT_ARCH(m68k)
-+__DYNAMIC = 0;
-+
-+/*
-+ * The memory map looks like this:
-+ * +--------------------+ <- low memory
-+ * | .text |
-+ * | etext |
-+ * | ctor list | the ctor and dtor lists are for
-+ * | dtor list | C++ support
-+ * | _endtext |
-+ * +--------------------+
-+ * | .data | initialized data goes here
-+ * | _sdata |
-+ * | _edata |
-+ * +--------------------+
-+ * | .bss |
-+ * | _clear_start| start of bss, cleared by crt0
-+ * | _end | start of heap, used by sbrk()
-+ * +--------------------+
-+ * | heap space |
-+ * | _ENDHEAP |
-+ * | stack space |
-+ * | __stack | top of stack
-+ * +--------------------+ <- high memory
-+ */
-+
-+/*
-+ * Declare some sizes.
-+ */
-+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x10000;
-+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x70000;
-+_RamEnd = _RamBase + _RamSize;
-+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
-+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
-+
-+MEMORY
-+{
-+ ram : ORIGIN = 0x10000, LENGTH = 0x70000
-+}
-+
-+_copy_data_from_rom = 0;
-+
-+/*
-+ * stick everything in ram (of course)
-+ */
-+SECTIONS
-+{
-+ ram : {
-+ . = .;
-+ } >ram
-+
-+ /*
-+ * Text, data and bss segments
-+ */
-+ .text : {
-+ *(.text*)
-+
-+ /*
-+ * C++ constructors/destructors
-+ */
-+ *(.gnu.linkonce.t.*)
-+
-+ /*
-+ * Initialization and finalization code.
-+ *
-+ * Various files can provide initialization and finalization
-+ * functions. crtbegin.o and crtend.o are two instances. The
-+ * body of these functions are in .init and .fini sections. We
-+ * accumulate the bodies here, and prepend function prologues
-+ * from crti.o and function epilogues from crtn.o. crti.o must
-+ * be linked first; crtn.o must be linked last. Because these
-+ * are wildcards, it doesn't matter if the user does not
-+ * actually link against crti.o and crtn.o; the linker won't
-+ * look for a file to match a wildcard. The wildcard also
-+ * means that it doesn't matter which directory crti.o and
-+ * crtn.o are in.
-+ */
-+ PROVIDE (_init = .);
-+ *crti.o(.init)
-+ *(.init)
-+ *crtn.o(.init)
-+ PROVIDE (_fini = .);
-+ *crti.o(.fini)
-+ *(.fini)
-+ *crtn.o(.fini)
-+
-+ /*
-+ * Special FreeBSD sysctl sections.
-+ */
-+ . = ALIGN (16);
-+ __start_set_sysctl_set = .;
-+ *(set_sysctl_*);
-+ __stop_set_sysctl_set = ABSOLUTE(.);
-+ *(set_domain_*);
-+ *(set_pseudo_*);
-+
-+ /*
-+ * C++ constructors/destructors
-+ *
-+ * gcc uses crtbegin.o to find the start of the constructors
-+ * and destructors so we make sure it is first. Because this
-+ * is a wildcard, it doesn't matter if the user does not
-+ * actually link against crtbegin.o; the linker won't look for
-+ * a file to match a wildcard. The wildcard also means that
-+ * it doesn't matter which directory crtbegin.o is in. The
-+ * constructor and destructor list are terminated in
-+ * crtend.o. The same comments apply to it.
-+ */
-+ . = ALIGN (16);
-+ *crtbegin.o(.ctors)
-+ *(.ctors)
-+ *crtend.o(.ctors)
-+ *crtbegin.o(.dtors)
-+ *(.dtors)
-+ *crtend.o(.dtors)
-+
-+ /*
-+ * Exception frame info
-+ */
-+ . = ALIGN (16);
-+ *(.eh_frame)
-+
-+ /*
-+ * Read-only data
-+ */
-+ . = ALIGN (16);
-+ _rodata_start = .;
-+ *(.rodata*)
-+ *(.gnu.linkonce.r*)
-+
-+ . = ALIGN (16);
-+ PROVIDE (_etext = .);
-+ } >ram
-+ .data : {
-+ PROVIDE (_copy_start = .);
-+ *(.data*)
-+ *(.gnu.linkonce.d*)
-+ *(.gcc_except_table*)
-+ *(.jcr)
-+ . = ALIGN (16);
-+ PROVIDE (_edata = .);
-+ PROVIDE (_copy_end = .);
-+ } >ram
-+ .bss : {
-+ _clear_start = .;
-+ *(.dynbss)
-+ *(.bss* .gnu.linkonce.b.*)
-+ *(COMMON)
-+ . = ALIGN (16);
-+ PROVIDE (end = .);
-+ . += _StackSize;
-+ . = ALIGN (16);
-+ _stack_init = .;
-+ _clear_end = .;
-+
-+ _WorkspaceBase = .;
-+ } >ram
-+}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/bsp_specs
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/bsp_specs 2008-12-08 06:15:06.000000000 +0100
-@@ -0,0 +1,13 @@
-+%rename endfile old_endfile
-+%rename startfile old_startfile
-+%rename link old_link
-+
-+*startfile:
-+%{!qrtems: %(old_startfile)} \
-+%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}}
-+
-+*link:
-+%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
-+
-+*endfile:
-+%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
-Index: rtems/c/src/lib/libbsp/m68k/mo376/preinstall.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems/c/src/lib/libbsp/m68k/mo376/preinstall.am 2009-11-29 01:11:56.483556820 +0100
-@@ -0,0 +1,66 @@
-+## Automatically generated by ampolish3 - Do not edit
-+
-+if AMPOLISH3
-+$(srcdir)/preinstall.am: Makefile.am
-+ $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-+endif
-+
-+PREINSTALL_DIRS =
-+DISTCLEANFILES += $(PREINSTALL_DIRS)
-+
-+all-local: $(TMPINSTALL_FILES)
-+
-+TMPINSTALL_FILES =
-+CLEANFILES = $(TMPINSTALL_FILES)
-+
-+all-am: $(PREINSTALL_FILES)
-+
-+PREINSTALL_FILES =
-+CLEANFILES += $(PREINSTALL_FILES)
-+
-+$(PROJECT_LIB)/$(dirstamp):
-+ @$(MKDIR_P) $(PROJECT_LIB)
-+ @: > $(PROJECT_LIB)/$(dirstamp)
-+PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-+
-+$(PROJECT_INCLUDE)/$(dirstamp):
-+ @$(MKDIR_P) $(PROJECT_INCLUDE)
-+ @: > $(PROJECT_INCLUDE)/$(dirstamp)
-+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-+
-+$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-+PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-+
-+$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-+
-+$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-+
-+$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-+
-+$(PROJECT_INCLUDE)/mrm332.h: include/mrm332.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mrm332.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/mrm332.h
-+
-+$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-+
-+$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
-+TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
-+
-+$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-+
-+$(PROJECT_LIB)/linkcmds_ROM: startup/linkcmds_ROM $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds_ROM
-+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds_ROM
-+
+++ /dev/null
----
- c/src/lib/libbsp/powerpc/ec555/ChangeLog | 225 ++++++++++++
- c/src/lib/libbsp/powerpc/ec555/Makefile.am | 50 ++
- c/src/lib/libbsp/powerpc/ec555/README | 262 ++++++++++++++
- c/src/lib/libbsp/powerpc/ec555/bsp_specs | 13
- c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c | 69 +++
- c/src/lib/libbsp/powerpc/ec555/configure.ac | 52 ++
- c/src/lib/libbsp/powerpc/ec555/console/console.c | 368 +++++++++++++++++++
- c/src/lib/libbsp/powerpc/ec555/include/bsp.h | 112 +++++
- c/src/lib/libbsp/powerpc/ec555/include/coverhd.h | 116 ++++++
- c/src/lib/libbsp/powerpc/ec555/include/tm27.h | 54 ++
- c/src/lib/libbsp/powerpc/ec555/irq/irq.h | 55 ++
- c/src/lib/libbsp/powerpc/ec555/preinstall.am | 58 +++
- c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c | 177 +++++++++
- c/src/lib/libbsp/powerpc/ec555/startup/iss555.c | 148 +++++++
- c/src/lib/libbsp/powerpc/ec555/startup/linkcmds | 319 +++++++++++++++++
- c/src/lib/libbsp/powerpc/ec555/startup/start.S | 411 ++++++++++++++++++++++
- c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c | 29 +
- c/src/lib/libbsp/powerpc/ec555/times | 189 ++++++++++
- make/custom/ec555.cfg | 38 ++
- 19 files changed, 2745 insertions(+)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog 2008-12-08 06:15:50.000000000 +0100
-@@ -0,0 +1,225 @@
-+2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * bsp_specs: Backport from CVS-HEAD.
-+
-+2008-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Remove noinst_PROGRAMS (Unused).
-+
-+2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Add capability for bootcard.c BSP Initialization
-+ Framework to ask the BSP where it has memory for the RTEMS Workspace
-+ and C Program Heap. These collectively are referred to as work area.
-+ If the BSP supports this, then it does not have to include code to
-+ split the available memory between the two areas. This reduces the
-+ amount of code in the BSP specific bspstart.c file. Additionally, the
-+ shared framework can initialize the C Library, call
-+ rtems_debug_enable(), and dirty the work area memory. Until most/all
-+ BSPs support this new capability, if the BSP supports this, it should
-+ call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac.
-+ When the transition is complete, this autoconf macro can be removed.
-+
-+2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * Makefile.am: Rework to avoid .rel files.
-+
-+2008-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Refactored and renamed initialization routines to
-+ rtems_initialize_data_structures, rtems_initialize_before_drivers,
-+ rtems_initialize_device_drivers, and
-+ rtems_initialize_start_multitasking. This opened the sequence up so
-+ that bootcard() could provide a more robust and flexible framework
-+ which is easier to explain and understand. This also lays the
-+ groundwork for sharing the division of available memory between the
-+ RTEMS workspace and heap and the C library initialization across all
-+ BSPs.
-+
-+2008-04-23 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Remove all references to
-+ console_reserve_resources and termios_reserve_resources.
-+
-+2008-03-03 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/linkcmds: Add wildcard to gcc_except_table section so
-+ programs compiled with gcc 4.3.x can link.
-+
-+2008-01-18 David Erickson <David.Erickson@drdc-rddc.gc.ca>
-+
-+ * startup/bspstart.c: Add semicolon.
-+
-+2008-01-11 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Add bsp_timer_least_valid and
-+ bsp_timer_average_overhead so tmtests link.
-+
-+2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * include/bsp.h, startup/bspstart.c: Eliminate copies of the
-+ Configuration Table. Use the RTEMS provided accessor macros to obtain
-+ configuration fields.
-+
-+2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Move interrupt_stack_size field from CPU Table to
-+ Configuration Table. Eliminate CPU Table from all ports. Delete
-+ references to CPU Table in all forms.
-+
-+2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * Makefile.am, startup/bspstart.c: Moved most of the remaining CPU
-+ Table fields to the Configuration Table. This included
-+ pretasking_hook, predriver_hook, postdriver_hook, idle_task,
-+ do_zero_of_workspace, extra_mpci_receive_server_stack,
-+ stack_allocate_hook, and stack_free_hook. As a side-effect of this
-+ effort some multiprocessing code was made conditional and some style
-+ clean up occurred.
-+
-+2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
-+
-+ * startup/bspstart.c: Eliminate PowerPC specific elements from the CPU
-+ Table. They have been replaced with variables named bsp_XXX as
-+ needed.
-+
-+2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * bsp_specs: Remove qrtems_debug.
-+
-+2007-04-06 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * bsp_specs: Remove lib (Now expected to exist in GCC).
-+
-+2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: New BUG-REPORT address.
-+
-+2006-11-15 Joel Sherrill <joel@OARcorp.com>
-+
-+ * Makefile.am: Merge c_rtems_main() into boot_card(). This eliminated a
-+ file and simplified initialization.
-+
-+2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: Require autoconf-2.60. Require automake-1.10.
-+
-+2006-03-08 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds: Add .gnu.linkonce.b.* section.
-+
-+2006-02-08 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/linkcmds: Add sections required by newer gcc versions.
-+
-+2006-01-11 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: Remove explicit ampolish3 support (now in
-+ RTEMS_BSP_CONFIGURE).
-+
-+2006-01-10 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: Add ampolish3 support.
-+ * Makefile.am: Add preinstall.am.
-+
-+2006-01-09 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Don't include subdirs.am.
-+
-+2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * include/bsp.h: New header guard.
-+
-+2005-05-10 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * console/console.c: Eliminate unsigned8.
-+
-+2005-04-26 Joel Sherrill <joel@OARcorp.com>
-+
-+ * startup/bspstart.c: Eliminate warnings.
-+
-+2005-04-25 Jennifer Averett <jennifer.averett@oarcorp.com>
-+
-+ PR 779/bsp
-+ * clock/p_clock.c: Add parameter to powerpc exception handler routines
-+
-+2005-02-17 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * startup/bspstart.c: include <rtems/powerpc/powerpc.h>.
-+ Use PPC_MINIMUM_STACK_FRAME_SIZE instead of
-+ CPU_MINIMUM_STACK_FRAME_SIZE.
-+
-+2005-02-16 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * configure.ac: Remove argument from RTEMS_PPC_EXCEPTIONS.
-+
-+2005-02-11 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Merge-in wrapup/Makefile.am.
-+ * wrapup/Makefile.am: Remove.
-+ * configure.ac: Reflect changes above.
-+
-+2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
-+
-+2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
-+
-+ * Makefile.am, wrapup/Makefile.am: Remove build-variant support.
-+
-+2004-10-20 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * console/console.c, include/bsp.h, startup/bspstart.c,
-+ startup/iss555.c: Use POSIX fixed size types.
-+
-+2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * configure.ac: Require automake > 1.9.
-+
-+2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 610/bsps
-+ * Makefile.am: Add include/tm27.h, Cosmetics.
-+ * include/tm27.h: Final cosmetics.
-+
-+2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * include/bsp.h: Split out tmtest27 support.
-+ * include/tm27.h: New.
-+
-+2004-04-21 Joel Sherrill <joel@OARcorp.com>
-+
-+ PR 611/bsps
-+ * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
-+ for tm27 and do not add another macro definition.
-+ * startup/tm27supp.c: New file.
-+
-+2004-04-21 Joel Sherrill <joel@OARcorp.com>
-+
-+ PR 611/bsps
-+ * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
-+ for tm27 and do not add another macro definition.
-+ * startup/tm27supp.c: New file.
-+
-+2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 613/bsps
-+ * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
-+
-+2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ PR 614/bsps
-+ * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
-+
-+2004-04-13 Ralf Corsepius <ralf_corsepius@rtems.org>
-+
-+ * include/bsp.h, startup/start.S: Reflect new locations of cpukit headers.
-+
-+2004-04-12 David Querbach <querbach@realtime.bc.ca>
-+
-+ * .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
-+ times, clock/p_clock.c, console/console.c, include/.cvsignore,
-+ include/bsp.h, include/coverhd.h, irq/irq.h, startup/bspstart.c,
-+ startup/iss555.c, startup/linkcmds, startup/start.S,
-+ wrapup/.cvsignore, wrapup/Makefile.am: New files.
-+
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/Makefile.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/Makefile.am 2008-09-29 03:47:53.000000000 +0200
-@@ -0,0 +1,50 @@
-+##
-+## $Id: Makefile.am,v 1.13.2.1 2008/09/29 01:47:53 ralf Exp $
-+##
-+
-+ACLOCAL_AMFLAGS = -I ../../../../aclocal
-+
-+include $(top_srcdir)/../../../../automake/compile.am
-+include $(top_srcdir)/../../bsp.am
-+
-+dist_project_lib_DATA = bsp_specs
-+
-+include_HEADERS = include/bsp.h
-+include_HEADERS += include/tm27.h
-+
-+nodist_include_HEADERS = include/bspopts.h
-+DISTCLEANFILES = include/bspopts.h
-+
-+include_bspdir = $(includedir)/bsp
-+
-+include_HEADERS += include/coverhd.h
-+include_bsp_HEADERS = irq/irq.h
-+
-+EXTRA_DIST = times
-+
-+dist_project_lib_DATA += startup/linkcmds
-+
-+pclock_SOURCES = clock/p_clock.c
-+console_SOURCES = console/console.c
-+startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
-+ ../../shared/bsppost.c ../../shared/bsppredriverhook.c \
-+ startup/bspstart.c ../../shared/bootcard.c startup/iss555.c \
-+ ../../shared/sbrk.c ../../shared/gnatinstallhandler.c startup/start.S
-+tm27supp_SOURCES = startup/tm27supp.c
-+
-+noinst_LIBRARIES = libbsp.a
-+libbsp_a_SOURCES = $(pclock_SOURCES) $(console_SOURCES) $(startup_SOURCES) \
-+ $(tm27supp_SOURCES)
-+
-+libbsp_a_LIBADD = \
-+ ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
-+ ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/clock.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/console-generic.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/exceptions.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/irq.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/timer.rel \
-+ ../../../libcpu/@RTEMS_CPU@/mpc5xx/vectors.rel
-+
-+include $(srcdir)/preinstall.am
-+include $(top_srcdir)/../../../../automake/local.am
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README 2009-11-29 01:38:37.608590025 +0100
-@@ -0,0 +1,262 @@
-+#
-+# $Id: README,v 1.1 2004/04/12 21:52:13 joel Exp $
-+#
-+
-+This is a README file for the Intec SS555 of RTEMS 4.6.0
-+
-+The SS555 port was sponsored by Defence Research and Development
-+Canada - Suffield, and is Copyright (C) 2004, Real-Time Systems Inc.
-+
-+Please send any comments, improvements, or bug reports to:
-+
-+David Querbach
-+querbach@realtime.bc.ca
-+
-+
-+Summary
-+-------
-+
-+BSP NAME: ss555
-+BOARD: Intec Automation Inc. SS555
-+BUS: None
-+CPU FAMILY: PowerPC
-+CPU: PowerPC MPC555
-+COPROCESSORS: Built-in Motorola TPU
-+MODE: 32 bit mode
-+
-+DEBUG MONITOR: None
-+
-+PERIPHERALS
-+===========
-+TIMERS: PIT / Timebase
-+ RESOLUTION: 1 microsecond (4 MHz crystal / 4)
-+SERIAL PORTS: 2 SCI
-+REAL-TIME CLOCK: On-chip.
-+DMA: None.
-+VIDEO: None.
-+SCSI: None.
-+NETWORKING: None.
-+
-+
-+DRIVER INFORMATION
-+==================
-+CLOCK DRIVER: yes
-+CONSOLE DRIVER: yes
-+SHMSUPP: N/A
-+TIMER DRIVER: yes
-+NETWORK DRIVER: no
-+
-+NOTES
-+=====
-+On-chip resources:
-+ SCI1 serial port
-+ SCI2 serial port (console)
-+ PIT clock
-+ TB timing test support
-+ DEC
-+ SWT watchdog timer -- enable in startup/iss555.c
-+ *CS0 external 512k 2-1-1-1 Burst SRAM
-+ *CS1
-+ *CS2
-+ *CS3 CPLD
-+ IRQ0
-+ IRQ1
-+ IRQ2
-+ IRQ3
-+ IRQ4
-+ IRQ5
-+ IRQ6
-+ IRQ7
-+ IRQ_LVL0
-+ IRQ_LVL1
-+ IRQ_LVL2
-+ IRQ_LVL3
-+ IRQ_LVL4
-+ IRQ_LVL5 SCI
-+ IRQ_LVL6 PIT
-+ IRQ_LVL7
-+
-+
-+Board description
-+-----------------
-+Clock rate: 40 MHz development/embeddable board
-+Bus width: 32-bit on-board RAM, 16-bit off-board I/O
-+FLASH: 512k on-chip
-+RAM: 512k 2-1-1-1 burst SRAM
-+
-+
-+Installation
-+------------
-+
-+The ss555 port uses the Intec SS555's external RAM in two different ways,
-+depending on whether or not it is built for debugging by giving the
-+VARIANT=DEBUG switch to make:
-+
-+ make VARIANT=DEBUG all
-+
-+1. In the debugging case, the linker script concanttenates the .text,
-+.data, and .bss sections starting at location zero, so they all can be
-+loaded into the external RAM for debugging. We assume that the debugger
-+disables the internal Flash ROM and enables the external RAM before loading
-+the code into the external RAM.
-+
-+2. In the normal (non-debugging) case, the linker script still places the
-+.text section near zero, but places the start of the .data and .bss sections
-+at the start location of the MPC555's internal RAM. The system startup code
-+then configures the external RAM just after the internal RAM in memory,
-+forming one large block from the two RAM devices.
-+
-+
-+Console driver
-+---------------
-+
-+This BSP includes an termios-capable asynchronous serial line driver that
-+supports SCI1 and SCI2. The RTEMS console is selected at configuration time
-+with the CONSOLE_MINOR variable (see .../ss555/configure.ac). We default to
-+SCI2 for the console, since SCI1 has some extra features which may be
-+desired for application use.
-+
-+The BSP console supports three different modes of operation:
-+
-+ 1. polled I/O done with termios support,
-+ 2. polled I/O done without termios support,
-+ 3. interrupt-driven I/O with termios support.
-+
-+The mode of operation of the serial driver is determined at configure time in
-+part by the value of the UARTS_IO_MODE variable (see .../ss555/configure.ac).
-+
-+ 0 - polled I/O.
-+ 1 - interrupt-driven I/O.
-+
-+Also, set the value of UARTS_USE_TERMIOS to select whether termios should be
-+used to perform buffering and input/output processing. Without termios
-+support, input processing is limited to the substitution of LF for a
-+received CR, and output processing is limited to the transmission of a CR
-+following the transmission of a LF. The choices for UARTS_USE_TERMIOS are:
-+
-+ 0 - do not use termios
-+ 1 - use termios
-+
-+In most real-time applications, the driver should be configured to use
-+termios and interrupt-driven I/O. Special requirements may dictate otherwise.
-+
-+Polled I/O must be used when running the timing tests. It must also be used
-+to run some other tests and some samples, such as the cdtest. Some tests
-+change the interrupt mask and will hang interrupt-driven I/O indefinitely.
-+Others, such as cdtest, perform console output from the static constructors
-+before the console is opened, causing the test to hang. Still other tests
-+produce output that is supposed to be in some specific order. For these
-+tests, termios should not be used, as termios buffers output and the
-+transmission of the buffers occur at somewhat unpredictable times.
-+
-+The real solution is to fix the tests so that they work with interrupt-driven
-+I/O and termios.
-+
-+
-+printk() and debug output
-+-----------------------
-+
-+The implementation of printk() in RTEMS is mostly independent of most system
-+services. The printk() function can therefore be used to print messages to a
-+debug console, particularly when debugging startup code or device drivers,
-+i.e. code that runs before the console driver is opened or that runs with
-+interrupts disabled.
-+
-+Support is provided to send printk output to either port. Specify the
-+desired port at configure time by setting the value of PRINTK_MINOR to one
-+of SCI1_MINOR or SCI2_MINOR.
-+
-+printk() always uses polled I/O, and never uses termios.
-+
-+If the printk() port is opened by RTEMS, then UARTS_IO_MODE must be set for
-+polled I/O, otherwise the I/O functions will be in conflict. Using printk()
-+before the port is initialized is, of course, not possible. This
-+initialization occurs in console_initialize(), which is called by
-+rtems_initialize_executive_early().
-+
-+
-+Watchdog Timer
-+--------------
-+
-+The MPC555 watchdog timer can be enabled at configuration time by defining
-+the WATCHDOG_TIMEOUT variable. This variable sets the watchdog timeout
-+period in steps of
-+
-+ 2048 2048
-+ --------- = --------- = 51.2 usec
-+ Fsystem 40 MHz
-+
-+or about 1/20 msec. When WATCHDOG_TIMEOUT is left undefined, the watchdog
-+timer is disabled.
-+
-+
-+Miscellaneous
-+-------------
-+
-+Most code came from the mbx8xx port, except for the floating-point handling
-+which came from the mpc8260ads.
-+
-+
-+Host System
-+-----------
-+
-+The port was developed on an x86 box running Debian 3.0. The toolchain was
-+built from the sources at rtems.org, except for the autotools which came
-+from the Debian distribution.
-+
-+
-+Test Configuration
-+------------------
-+
-+Board: Intec SS555 v1.1
-+CPU: Motorola MPC555LFMZP40, mask 1K83H
-+Clock Speed: Crystal 4.0 MHz, CPU 40.0 MHz
-+RAM: 512K bytes of 2-1-1-1 Burst SRAM
-+Times Reported in: Microseconds
-+Timer Source: Timebase clock
-+GCC Flags: -O4 -fno-keep-inline-functions -mcpu=(821/860)
-+Console: Operates in polled mode on SMC2. No I/O through EPPC-Bug.
-+
-+
-+Test Results
-+------------
-+
-+Single processor tests:
-+ All tests passed, except that:
-+ - sp09 aborts due to memory shortage
-+ - sp20 needs to be run with output buffering enabled (see
-+ buffer_test_io.h)
-+
-+Multi-processor tests:
-+ Not applicable.
-+
-+Library tests:
-+ All tests passed. Note that the termios test only works if the system is
-+ rebuilt with termios enabled.
-+
-+Posix tests:
-+ All tests passed, except that:
-+ - the message queue test failed with "errno (91 - File or path name too
-+ long)"
-+
-+Timing tests:
-+ Due to memory limitations, many of the tests will not run unless you set
-+ OPERATION_COUNT=20 at configuration time.
-+
-+ To run tm27 (the interrupt latency timer test), short CN5-48 to CN5-50 on
-+ the SS555 board.
-+
-+ All tests run cleanly, except for tm26, which gives a "PANIC 12" after it
-+ exits. This doesn't seem to cause a problem otherwise.
-+
-+ See the times file for the results of the timing tests.
-+
-+Network tests:
-+ Not applicable.
-+
-+Sample programs:
-+ These run correctly, except that:
-+ - The "minimum" sample is not designed to run properly on any system.
-+ - The loopback, fileio, unilimited, and pppd tests fail due to memory
-+ limitations.
-+ - The paranoia program dies on a floating-point assist exception.
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/bsp_specs
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/bsp_specs 2008-12-08 06:15:50.000000000 +0100
-@@ -0,0 +1,13 @@
-+%rename endfile old_endfile
-+%rename startfile old_startfile
-+%rename link old_link
-+
-+*startfile:
-+%{!qrtems: %(old_startfile)} \
-+%{!nostdlib: %{qrtems: ecrti%O%s -u __vectors -N -u start -e start}}
-+
-+*endfile:
-+%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
-+
-+*link:
-+%{!qrtems: %(old_link)} %{qrtems: -dc -dp}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c 2009-11-29 01:38:37.612589905 +0100
-@@ -0,0 +1,69 @@
-+/*
-+ * Clock Tick interrupt conexion code.
-+ *
-+ * COPYRIGHT (c) 1989-1997.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may in
-+ * the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c:
-+ *
-+ * Modified to support the MPC750.
-+ * Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
-+ *
-+ * $Id: p_clock.c,v 1.3 2005/04/25 14:46:37 jennifer Exp $
-+ */
-+
-+#include <bsp.h>
-+#include <bsp/irq.h>
-+#include <rtems/bspIo.h>
-+
-+extern void clockOn(void*);
-+extern void clockOff (void*);
-+extern int clockIsOn(void*);
-+extern void Clock_isr(void *);
-+
-+static rtems_irq_connect_data clockIrqData = {
-+ CPU_PERIODIC_TIMER,
-+ (rtems_irq_hdl)Clock_isr,
-+ NULL,
-+ (rtems_irq_enable)clockOn,
-+ (rtems_irq_disable)clockOff,
-+ (rtems_irq_is_enabled)clockIsOn
-+};
-+
-+int BSP_disconnect_clock_handler (void)
-+{
-+ if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
-+ printk("Unable to stop system clock\n");
-+ rtems_fatal_error_occurred(1);
-+ }
-+ return BSP_remove_rtems_irq_handler (&clockIrqData);
-+}
-+
-+int BSP_connect_clock_handler (rtems_irq_hdl hdl)
-+{
-+ if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
-+ printk("Unable to get system clock handler\n");
-+ rtems_fatal_error_occurred(1);
-+ }
-+ if (!BSP_remove_rtems_irq_handler (&clockIrqData)) {
-+ printk("Unable to remove current system clock handler\n");
-+ rtems_fatal_error_occurred(1);
-+ }
-+ /*
-+ * Reinit structure
-+ */
-+ clockIrqData.name = CPU_PERIODIC_TIMER;
-+ clockIrqData.hdl = (rtems_irq_hdl) hdl;
-+ clockIrqData.on = (rtems_irq_enable)clockOn;
-+ clockIrqData.off = (rtems_irq_enable)clockOff;
-+ clockIrqData.isOn = (rtems_irq_is_enabled)clockIsOn;
-+
-+ return BSP_install_rtems_irq_handler (&clockIrqData);
-+}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac 2006-12-02 06:59:47.000000000 +0100
-@@ -0,0 +1,52 @@
-+## Process this file with autoconf to produce a configure script.
-+##
-+## $Id: configure.ac,v 1.9 2006/12/02 05:59:47 ralf Exp $
-+
-+AC_PREREQ(2.60)
-+AC_INIT([rtems-c-src-lib-libbsp-powerpc-mbx5xx],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
-+AC_CONFIG_SRCDIR([bsp_specs])
-+RTEMS_TOP(../../../../../..)
-+
-+RTEMS_CANONICAL_TARGET_CPU
-+AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
-+RTEMS_BSP_CONFIGURE
-+
-+RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
-+RTEMS_CANONICALIZE_TOOLS
-+RTEMS_PROG_CCAS
-+
-+RTEMS_CHECK_NETWORKING
-+AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
-+
-+RTEMS_BSPOPTS_SET([WATCHDOG_TIMEOUT],[*],[0xFFFF])
-+RTEMS_BSPOPTS_HELP([WATCHDOG_TIMEOUT],
-+[Define to the desired timeout (in steps of 1/20 msec) to enable the
-+ watchdog. Default is to disable the watchdog entirely.])
-+
-+RTEMS_BSPOPTS_SET([UARTS_USE_TERMIOS],[*],[0])
-+RTEMS_BSPOPTS_HELP([UARTS_USE_TERMIOS],
-+[Define to 1 if you want termios support for every port.
-+ Termios support is independent of the choice of UART I/O mode.])
-+
-+RTEMS_BSPOPTS_SET([CONSOLE_MINOR],[*],[SCI2_MINOR])
-+RTEMS_BSPOPTS_HELP([CONSOLE_MINOR],
-+[Must be defined to be one of SCI1_MINOR or SCI2_MINOR. Determines which
-+ device will be registered as /dev/console.])
-+
-+RTEMS_BSPOPTS_SET([UARTS_IO_MODE],[*],[0])
-+RTEMS_BSPOPTS_HELP([UARTS_IO_MODE],
-+[Define to 1 if you want interrupt-driven I/O for the SCI ports.])
-+
-+RTEMS_BSPOPTS_SET([PRINTK_MINOR],[*],[SCI2_MINOR])
-+RTEMS_BSPOPTS_HELP([PRINTK_MINOR],
-+[Must be defined to be one of SCI1_MINOR or SCI2_MINOR. Determines which
-+ device is used for output by printk(). The printk port always uses polled
-+ I/O. Don't open the printk port from RTEMS unless also using polled I/O
-+ for the SCI ports.])
-+
-+# Explicitly list a Makefile here
-+AC_CONFIG_FILES([Makefile])
-+
-+RTEMS_PPC_EXCEPTIONS
-+
-+AC_OUTPUT
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/console/console.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/console/console.c 2009-11-29 01:38:37.612589905 +0100
-@@ -0,0 +1,368 @@
-+/*
-+ * console.c
-+ *
-+ * This file contains the Intec SS555 termios serial I/O package.
-+ *
-+ * The SCI channels are assigned as follows
-+ *
-+ * Channel Device Minor
-+ * SCI1 /dev/tty0 0
-+ * SCI2 /dev/tty1 1
-+ *
-+ * All ports support termios. The use of termios is recommended for real-time
-+ * applications. Termios provides buffering and input processing. When not
-+ * using termios, processing is limited to the substitution of LF for CR on
-+ * input, and the output of a CR following the output of a LF character.
-+ * Note that the terminal should not send CR/LF pairs when the return key
-+ * is pressed, and that output lines are terminated with LF/CR, not CR/LF
-+ * (although that would be easy to change).
-+ *
-+ * I/O may be interrupt-driven (recommended for real-time applications) or
-+ * polled.
-+ *
-+ * LIMITATIONS:
-+ *
-+ * It is not possible to use different I/O modes on the different ports. The
-+ * exception is with printk. The printk port can use a different mode from
-+ * the other ports. If this is done, it is important not to open the printk
-+ * port from an RTEMS application.
-+ *
-+ * Currently, the I/O modes are determined at build time. It would be much
-+ * better to have the mode selected at boot time based on parameters in
-+ * NVRAM.
-+ *
-+ * Interrupt-driven I/O requires termios.
-+ *
-+ * TESTS:
-+ *
-+ * TO RUN THE TESTS, USE POLLED I/O WITHOUT TERMIOS SUPPORT. Some tests
-+ * play with the interrupt masks and turn off I/O. Those tests will hang
-+ * when interrupt-driven I/O is used. Other tests, such as cdtest, do I/O
-+ * from the static constructors before the console is open. This test
-+ * will not work with interrupt-driven I/O. Because of the buffering
-+ * performed in termios, test output may not be in sequence.The tests
-+ * should all be fixed to work with interrupt-driven I/O and to
-+ * produce output in the expected sequence. Obviously, the termios test
-+ * requires termios support in the driver.
-+ *
-+ * Set CONSOLE_MINOR to the appropriate device minor number in the
-+ * config file. This allows the RTEMS application console to be different
-+ * from the GDB port.
-+ *
-+ * This driver handles both available serial ports: it distinguishes
-+ * the sub-devices using minor device numbers. It is not possible to have
-+ * other protocols running on the other ports when this driver is used as
-+ * currently written.
-+ *
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from c/src/lib/libbsp/powerpc/mbx8xx/console/console.c:
-+ *
-+ * Based on code (alloc860.c in eth_comm port) by
-+ * Jay Monkman (jmonkman@frasca.com),
-+ * Copyright (C) 1998 by Frasca International, Inc.
-+ *
-+ * Modifications by Darlene Stewart <Darlene.Stewart@iit.nrc.ca>
-+ * and Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>.
-+ * Copyright (c) 2000, National Research Council of Canada
-+ *
-+ */
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <bsp.h> /* Must be before libio.h */
-+#include <rtems/bspIo.h>
-+#include <rtems/libio.h>
-+#include <termios.h>
-+
-+static void _BSP_output_char( char c );
-+static rtems_status_code do_poll_read( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
-+static rtems_status_code do_poll_write( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
-+
-+static void _BSP_null_char( char c ) {return;}
-+
-+BSP_output_char_function_type BSP_output_char = _BSP_null_char;
-+
-+/*
-+ * do_poll_read
-+ *
-+ * Input characters through polled I/O. Returns as soon as a character has
-+ * been received. Otherwise, if we wait for the number of requested
-+ * characters, we could be here forever!
-+ *
-+ * CR is converted to LF on input. The terminal should not send a CR/LF pair
-+ * when the return or enter key is pressed.
-+ *
-+ * Input parameters:
-+ * major - ignored. Should be the major number for this driver.
-+ * minor - selected channel.
-+ * arg->buffer - where to put the received characters.
-+ * arg->count - number of characters to receive before returning--Ignored.
-+ *
-+ * Output parameters:
-+ * arg->bytes_moved - the number of characters read. Always 1.
-+ *
-+ * Return value: RTEMS_SUCCESSFUL
-+ *
-+ * CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
-+ */
-+static rtems_status_code do_poll_read(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_libio_rw_args_t *rw_args = arg;
-+ int c;
-+
-+ while( (c = m5xx_uart_pollRead(minor)) == -1 );
-+ rw_args->buffer[0] = (uint8_t)c;
-+ if( rw_args->buffer[0] == '\r' )
-+ rw_args->buffer[0] = '\n';
-+ rw_args->bytes_moved = 1;
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+
-+/*
-+ * do_poll_write
-+ *
-+ * Output characters through polled I/O. Returns only once every character has
-+ * been sent.
-+ *
-+ * CR is transmitted AFTER a LF on output.
-+ *
-+ * Input parameters:
-+ * major - ignored. Should be the major number for this driver.
-+ * minor - selected channel
-+ * arg->buffer - where to get the characters to transmit.
-+ * arg->count - the number of characters to transmit before returning.
-+ *
-+ * Output parameters:
-+ * arg->bytes_moved - the number of characters read
-+ *
-+ * Return value: RTEMS_SUCCESSFUL
-+ *
-+ * CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
-+ */
-+static rtems_status_code do_poll_write(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_libio_rw_args_t *rw_args = arg;
-+ uint32_t i;
-+ char cr ='\r';
-+
-+ for( i = 0; i < rw_args->count; i++ ) {
-+ m5xx_uart_pollWrite(minor, &(rw_args->buffer[i]), 1);
-+ if ( rw_args->buffer[i] == '\n' )
-+ m5xx_uart_pollWrite(minor, &cr, 1);
-+ }
-+ rw_args->bytes_moved = i;
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+
-+/*
-+ * Print functions prototyped in bspIo.h
-+ */
-+
-+static void _BSP_output_char( char c )
-+{
-+ char cr = '\r';
-+
-+ /*
-+ * Can't rely on console_initialize having been called before this
-+ * function is used, so it may fail.
-+ */
-+
-+ m5xx_uart_pollWrite( PRINTK_MINOR, &c, 1 );
-+ if( c == '\n' )
-+ m5xx_uart_pollWrite( PRINTK_MINOR, &cr, 1 );
-+}
-+
-+/*
-+ ***************
-+ * BOILERPLATE *
-+ ***************
-+ *
-+ * All these functions are prototyped in rtems/c/src/lib/include/console.h.
-+ */
-+
-+/*
-+ * Initialize and register the device
-+ */
-+rtems_device_driver console_initialize(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ rtems_status_code status;
-+
-+ /*
-+ * Set up TERMIOS if needed
-+ */
-+ #if UARTS_USE_TERMIOS == 1
-+ rtems_termios_initialize ();
-+ #endif /* UARTS_USE_TERMIOS */
-+
-+ /*
-+ * Do device-specific initialization
-+ */
-+ BSP_output_char = _BSP_output_char;
-+
-+ m5xx_uart_initialize(SCI1_MINOR);
-+ status = rtems_io_register_name ("/dev/tty0", major, SCI1_MINOR);
-+ if (status != RTEMS_SUCCESSFUL)
-+ rtems_fatal_error_occurred (status);
-+
-+ m5xx_uart_initialize(SCI2_MINOR);
-+ status = rtems_io_register_name ("/dev/tty1", major, SCI2_MINOR);
-+ if (status != RTEMS_SUCCESSFUL)
-+ rtems_fatal_error_occurred (status);
-+
-+ /* Now register the RTEMS console */
-+ status = rtems_io_register_name ("/dev/console", major, CONSOLE_MINOR);
-+ if (status != RTEMS_SUCCESSFUL)
-+ rtems_fatal_error_occurred (status);
-+
-+ return RTEMS_SUCCESSFUL;
-+}
-+
-+/*
-+ * Open the device
-+ */
-+rtems_device_driver console_open(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ rtems_status_code sc;
-+
-+ if ( minor > NUM_PORTS - 1 )
-+ return RTEMS_INVALID_NUMBER;
-+
-+ #if (UARTS_USE_TERMIOS == 1)
-+ {
-+ #if (UARTS_IO_MODE == 1) /* RTEMS interrupt-driven I/O with termios */
-+
-+ static const rtems_termios_callbacks callbacks = {
-+ m5xx_uart_firstOpen, /* firstOpen */
-+ m5xx_uart_lastClose, /* lastClose */
-+ NULL, /* pollRead */
-+ m5xx_uart_write, /* write */
-+ m5xx_uart_setAttributes, /* setAttributes */
-+ NULL, /* stopRemoteTx */
-+ NULL, /* startRemoteTx */
-+ TERMIOS_IRQ_DRIVEN /* outputUsesInterrupts */
-+ };
-+ sc = rtems_termios_open( major, minor, arg, &callbacks );
-+
-+ #else /* UARTS_IO_MODE != 1 */ /* RTEMS polled I/O with termios */
-+
-+ static const rtems_termios_callbacks callbacks = {
-+ m5xx_uart_firstOpen, /* firstOpen */
-+ m5xx_uart_lastClose, /* lastClose */
-+ m5xx_uart_pollRead, /* pollRead */
-+ m5xx_uart_pollWrite, /* write */
-+ m5xx_uart_setAttributes, /* setAttributes */
-+ NULL, /* stopRemoteTx */
-+ NULL, /* startRemoteTx */
-+ TERMIOS_POLLED /* outputUsesInterrupts */
-+ };
-+ sc = rtems_termios_open( major, minor, arg, &callbacks );
-+
-+ #endif
-+
-+ return sc;
-+ }
-+
-+ #else /* no termios -- default to polled I/O */
-+ {
-+ sc = RTEMS_SUCCESSFUL;
-+ }
-+ #endif
-+
-+ return sc;
-+}
-+
-+/*
-+ * Close the device
-+ */
-+rtems_device_driver console_close(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ if ( minor > NUM_PORTS-1 )
-+ return RTEMS_INVALID_NUMBER;
-+
-+ #if UARTS_USE_TERMIOS == 1
-+ return rtems_termios_close( arg );
-+ #else
-+ return RTEMS_SUCCESSFUL;
-+ #endif
-+}
-+
-+/*
-+ * Read from the device
-+ */
-+rtems_device_driver console_read(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ if ( minor > NUM_PORTS-1 )
-+ return RTEMS_INVALID_NUMBER;
-+
-+ #if UARTS_USE_TERMIOS == 1
-+ return rtems_termios_read( arg );
-+ #else
-+ return do_poll_read( major, minor, arg );
-+ #endif
-+}
-+
-+/*
-+ * Write to the device
-+ */
-+rtems_device_driver console_write(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ if ( minor > NUM_PORTS-1 )
-+ return RTEMS_INVALID_NUMBER;
-+
-+ #if UARTS_USE_TERMIOS == 1
-+ return rtems_termios_write( arg );
-+ #else
-+ return do_poll_write( major, minor, arg );
-+ #endif
-+}
-+
-+/*
-+ * Handle ioctl request.
-+ */
-+rtems_device_driver console_control(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ if ( minor > NUM_PORTS-1 )
-+ return RTEMS_INVALID_NUMBER;
-+
-+ #if UARTS_USE_TERMIOS == 1
-+ return rtems_termios_ioctl( arg );
-+ #else
-+ return RTEMS_SUCCESSFUL;
-+ #endif
-+}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h 2007-12-11 16:46:51.000000000 +0100
-@@ -0,0 +1,112 @@
-+/* bsp.h
-+ *
-+ * This include file contains all board IO definitions.
-+ *
-+ * This file includes definitions for the Intec SS555.
-+ *
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h:
-+ *
-+ * COPYRIGHT (c) 1989-1998.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: bsp.h,v 1.11 2007/12/11 15:46:51 joel Exp $
-+ */
-+
-+#ifndef _BSP_H
-+#define _BSP_H
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+#include <bspopts.h>
-+
-+#include <rtems.h>
-+#include <rtems/console.h>
-+#include <rtems/clockdrv.h>
-+#include <mpc5xx.h>
-+#include <mpc5xx/console.h>
-+#include <libcpu/vectors.h>
-+#include <bsp/irq.h>
-+
-+/*
-+ * Clock definitions
-+ */
-+
-+#define BSP_CRYSTAL_HZ 4000000 /* crystal frequency, Hz */
-+#define BSP_CLOCK_HZ 40000000 /* CPU clock frequency, Hz
-+
-+/*
-+ * I/O definitions
-+ *
-+ * The SS555 board includes a CPLD to control on-board features and
-+ * off-board devices.
-+ */
-+typedef struct cpld_ {
-+ uint8_t cs3a[32]; /* Chip select 3A */
-+ uint8_t pad0[0x200000 - 0x000020];
-+
-+ uint8_t cs3b[32]; /* Chip select 3B */
-+ uint8_t pad2[0x400000 - 0x200020];
-+
-+ uint8_t cs3c[32]; /* Chip select 3C */
-+ uint8_t pad4[0x600000 - 0x400020];
-+
-+ uint8_t cs3d[32]; /* Chip select 3D */
-+ uint8_t pad6[0x800000 - 0x600020];
-+
-+ uint8_t serial_ints; /* Enable/disable serial interrupts */
-+ uint8_t serial_resets; /* Enable/disable serial resets */
-+ uint8_t serial_ack; /* Acknowledge serial transfers */
-+ uint8_t pad8[0xA00000 - 0x800003];
-+
-+ uint8_t iflash_writess; /* Enable/disable internal-flash writes */
-+ uint8_t nflash_writess; /* Enable/disable NAND-flash writes */
-+ uint8_t padA[0xC00000 - 0xA00002];
-+} cpld_t;
-+
-+extern volatile cpld_t cpld; /* defined in linkcmds */
-+
-+/* miscellaneous stuff assumed to exist */
-+
-+/*
-+ * Device Driver Table Entries
-+ */
-+
-+/*
-+ * NOTE: Use the standard Console driver entry
-+ */
-+
-+/*
-+ * NOTE: Use the standard Clock driver entry
-+ */
-+
-+/*
-+ * How many libio files we want
-+ */
-+
-+#define BSP_LIBIO_MAX_FDS 20
-+
-+/* functions */
-+
-+void bsp_cleanup( void );
-+
-+rtems_isr_entry set_vector( /* returns old vector */
-+ rtems_isr_entry handler, /* isr routine */
-+ rtems_vector_number vector, /* vector number */
-+ int type /* RTEMS or RAW intr */
-+);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h 2009-11-29 01:38:37.612589905 +0100
-@@ -0,0 +1,116 @@
-+/* coverhd.h
-+ *
-+ * This include file has defines to represent the overhead associated
-+ * with calling a particular directive from C. These are used in the
-+ * Timing Test Suite to ignore the overhead required to pass arguments
-+ * to directives. On some CPUs and/or target boards, this overhead
-+ * is significant and makes it difficult to distinguish internal
-+ * RTEMS execution time from that used to call the directive.
-+ * This file should be updated after running the C overhead timing
-+ * test. Once this update has been performed, the RTEMS Time Test
-+ * Suite should be rebuilt to account for these overhead times in the
-+ * timing results.
-+ *
-+ * NOTE: If these are all zero, then the times reported include
-+ * all calling overhead including passing of arguments.
-+ *
-+ * COPYRIGHT (c) 1989-1998.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: coverhd.h,v 1.2 2006/03/17 10:11:37 ralf Exp $
-+ */
-+
-+#ifndef __COVERHD_h
-+#define __COVERHD_h
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+ * 40 MHz processor, running from external 2-1-1-1 burst SRAM.
-+ */
-+#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0
-+#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0
-+#define CALLING_OVERHEAD_TASK_CREATE 0
-+#define CALLING_OVERHEAD_TASK_IDENT 0
-+#define CALLING_OVERHEAD_TASK_START 0
-+#define CALLING_OVERHEAD_TASK_RESTART 0
-+#define CALLING_OVERHEAD_TASK_DELETE 0
-+#define CALLING_OVERHEAD_TASK_SUSPEND 0
-+#define CALLING_OVERHEAD_TASK_RESUME 0
-+#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0
-+#define CALLING_OVERHEAD_TASK_MODE 0
-+#define CALLING_OVERHEAD_TASK_GET_NOTE 0
-+#define CALLING_OVERHEAD_TASK_SET_NOTE 0
-+#define CALLING_OVERHEAD_TASK_WAKE_WHEN 2
-+#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0
-+#define CALLING_OVERHEAD_INTERRUPT_CATCH 0
-+#define CALLING_OVERHEAD_CLOCK_GET 2
-+#define CALLING_OVERHEAD_CLOCK_SET 3
-+#define CALLING_OVERHEAD_CLOCK_TICK 0
-+
-+#define CALLING_OVERHEAD_TIMER_CREATE 0
-+#define CALLING_OVERHEAD_TIMER_IDENT 0
-+#define CALLING_OVERHEAD_TIMER_DELETE 0
-+#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0
-+#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 3
-+#define CALLING_OVERHEAD_TIMER_RESET 0
-+#define CALLING_OVERHEAD_TIMER_CANCEL 0
-+#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0
-+#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0
-+#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0
-+#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0
-+#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0
-+#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0
-+
-+#define CALLING_OVERHEAD_EVENT_SEND 0
-+#define CALLING_OVERHEAD_EVENT_RECEIVE 0
-+#define CALLING_OVERHEAD_SIGNAL_CATCH 0
-+#define CALLING_OVERHEAD_SIGNAL_SEND 0
-+#define CALLING_OVERHEAD_PARTITION_CREATE 0
-+#define CALLING_OVERHEAD_PARTITION_IDENT 0
-+#define CALLING_OVERHEAD_PARTITION_DELETE 0
-+#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0
-+#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0
-+#define CALLING_OVERHEAD_REGION_CREATE 0
-+#define CALLING_OVERHEAD_REGION_IDENT 0
-+#define CALLING_OVERHEAD_REGION_DELETE 0
-+#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0
-+#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0
-+#define CALLING_OVERHEAD_PORT_CREATE 0
-+#define CALLING_OVERHEAD_PORT_IDENT 0
-+#define CALLING_OVERHEAD_PORT_DELETE 0
-+#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0
-+#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0
-+
-+#define CALLING_OVERHEAD_IO_INITIALIZE 0
-+#define CALLING_OVERHEAD_IO_OPEN 0
-+#define CALLING_OVERHEAD_IO_CLOSE 0
-+#define CALLING_OVERHEAD_IO_READ 0
-+#define CALLING_OVERHEAD_IO_WRITE 0
-+#define CALLING_OVERHEAD_IO_CONTROL 0
-+#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0
-+#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0
-+#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0
-+#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0
-+#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0
-+#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0
-+#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/tm27.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/tm27.h 2009-11-29 01:38:37.616586852 +0100
-@@ -0,0 +1,54 @@
-+/*
-+ * tm27.h
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: tm27.h,v 1.2 2004/04/23 04:47:38 ralf Exp $
-+ */
-+
-+#ifndef _RTEMS_TMTEST27
-+#error "This is an RTEMS internal file you must not include directly."
-+#endif
-+
-+#ifndef __tm27_h
-+#define __tm27_h
-+
-+/*
-+ * Stuff for Time Test 27
-+ *
-+ * The following require that IRQ7 be jumpered to ground. On the SS555,
-+ * this can be done by shorting together CN5 pin 48 and CN5 pin 50.
-+ */
-+
-+#define MUST_WAIT_FOR_INTERRUPT 1
-+
-+#define Install_tm27_vector( handler ) \
-+{ \
-+ extern rtems_irq_connect_data tm27IrqData; \
-+ usiu.siel |= (1 << 17); \
-+ usiu.sipend |= (1 << 17); \
-+ \
-+ tm27IrqData.hdl = (rtems_irq_hdl)handler; \
-+ BSP_install_rtems_irq_handler (&tm27IrqData); \
-+}
-+
-+#define Cause_tm27_intr() \
-+{ \
-+ usiu.siel &= ~(1 << 17); \
-+}
-+
-+#define Clear_tm27_intr() \
-+{ \
-+ usiu.siel |= (1 << 17); \
-+ usiu.sipend |= (1 << 17); \
-+}
-+
-+#define Lower_tm27_intr() \
-+{ \
-+ ppc_cached_irq_mask |= (1 << 17); \
-+ usiu.simask = ppc_cached_irq_mask; \
-+}
-+
-+#endif
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/irq/irq.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/irq/irq.h 2009-11-29 01:38:37.616586852 +0100
-@@ -0,0 +1,55 @@
-+/* irq.h
-+ *
-+ * This include file describe the data structure and the functions implemented
-+ * by rtems to write interrupt handlers.
-+ *
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from libbsp/powerpc/mbx8xx/irq/irq.h:
-+ *
-+ * CopyRight (C) 1999 valette@crf.canon.fr
-+ *
-+ * This code is heavilly inspired by the public specification of STREAM V2
-+ * that can be found at :
-+ *
-+ * <http://www.chorus.com/Documentation/index.html> by following
-+ * the STREAM API Specification Document link.
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * $Id: irq.h,v 1.2 2004/04/21 10:43:03 ralf Exp $
-+ */
-+
-+#ifndef LIBBSP_POWERPC_SS555_IRQ_IRQ_H
-+#define LIBBSP_POWERPC_SS555_IRQ_IRQ_H
-+
-+#include <libcpu/irq.h>
-+
-+#ifndef ASM
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/*
-+ * The SS555 has no external interrupt controller chip, so use the standard
-+ * routines from the CPU-dependent code.
-+ */
-+#define BSP_install_rtems_irq_handler(ptr) CPU_install_rtems_irq_handler(ptr)
-+#define BSP_get_current_rtems_irq_handler(ptr) CPU_get_current_rtems_irq_handler(ptr)
-+#define BSP_remove_rtems_irq_handler(ptr) CPU_remove_rtems_irq_handler(ptr)
-+#define BSP_rtems_irq_mngt_set(config) CPU_rtems_irq_mngt_set(config)
-+#define BSP_rtems_irq_mngt_get(config) CPU_rtems_irq_mngt_get(config)
-+#define BSP_rtems_irq_mng_init(cpuId) CPU_rtems_irq_mng_init(cpuId)
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* ASM */
-+
-+#endif /* LIBBSP_POWERPC_SS555_IRQ_IRQ_H */
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c 2008-07-11 12:01:37.000000000 +0200
-@@ -0,0 +1,177 @@
-+/* bspstart.c
-+ *
-+ * This set of routines starts the application. It includes application,
-+ * board, and monitor specific initialization and configuration.
-+ * The generic CPU dependent initialization has been performed
-+ * before this routine is invoked.
-+ *
-+ * COPYRIGHT (c) 1989-2007.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c:
-+ *
-+ * Modifications for MBX860:
-+ * Copyright (c) 1999, National Research Council of Canada
-+ *
-+ * $Id: bspstart.c,v 1.17 2008/07/11 10:01:37 thomas Exp $
-+ */
-+
-+#warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c).
-+
-+#include <string.h>
-+
-+#include <rtems/libio.h>
-+#include <rtems/libcsupport.h>
-+#include <rtems/bspIo.h>
-+#include <rtems/powerpc/powerpc.h>
-+
-+#include <libcpu/cpuIdent.h>
-+#include <libcpu/spr.h>
-+
-+#include <bsp/irq.h>
-+#include <bsp.h>
-+
-+SPR_RW(SPRG1)
-+
-+extern unsigned long intrStackPtr;
-+
-+/*
-+ * Driver configuration parameters
-+ */
-+uint32_t bsp_clicks_per_usec;
-+uint32_t bsp_clock_speed; /* Serial clocks per second */
-+uint32_t bsp_timer_least_valid;
-+uint32_t bsp_timer_average_overhead;
-+
-+/*
-+ * Use the shared implementations of the following routines.
-+ * Look in rtems/c/src/lib/libbsp/shared/bsplibc.c.
-+ */
-+void bsp_libc_init( void *, uint32_t, int );
-+
-+void BSP_panic(char *s)
-+{
-+ printk("%s PANIC %s\n",_RTEMS_version, s);
-+ __asm__ __volatile ("sc");
-+}
-+
-+void _BSP_Fatal_error(unsigned int v)
-+{
-+ printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
-+ __asm__ __volatile ("sc");
-+}
-+
-+/*
-+ * bsp_pretasking_hook
-+ *
-+ * Called when RTEMS initialization is complete but before interrupts and
-+ * tasking are enabled. Used to setup libc and install any BSP extensions.
-+ *
-+ * Must not use libc (to do io) from here, since drivers are not yet
-+ * initialized.
-+ *
-+ * Input parameters: NONE
-+ *
-+ * Output parameters: NONE
-+ *
-+ * Return values: NONE
-+ */
-+void bsp_pretasking_hook(void)
-+{
-+ /*
-+ * These are assigned addresses in the linkcmds file for the BSP. This
-+ * approach is better than having these defined as manifest constants and
-+ * compiled into the kernel, but it is still not ideal when dealing with
-+ * multiprocessor configuration in which each board as a different memory
-+ * map. A better place for defining these symbols might be the makefiles.
-+ * Consideration should also be given to developing an approach in which
-+ * the kernel and the application can be linked and burned into ROM
-+ * independently of each other.
-+ */
-+ uint8_t *_HeapStart =
-+ (uint8_t *)Configuration.work_space_start
-+ + rtems_configuration_get_work_space_size();
-+ extern uint8_t _HeapEnd[];
-+
-+ bsp_libc_init( _HeapStart, _HeapEnd - _HeapStart, 0 );
-+}
-+
-+/*
-+ * bsp_start()
-+ *
-+ * Board-specific initialization code. Called from the generic boot_card()
-+ * function defined in rtems/c/src/lib/libbsp/shared/main.c. That function
-+ * does some of the board independent initialization. It is called from the
-+ * SS555 entry point _start() defined in
-+ * rtems/c/src/lib/libbsp/powerpc/ss555/startup/start.S
-+ *
-+ * _start() has set up a stack, has zeroed the .bss section, has set up the
-+ * .data section from contents stored in ROM, has turned off interrupts,
-+ * and placed the processor in the supervisor mode. boot_card() has left
-+ * the processor in that state when bsp_start() was called.
-+ *
-+ * Input parameters: NONE
-+ *
-+ * Output parameters: NONE
-+ *
-+ * Return values: NONE
-+ */
-+void bsp_start(void)
-+{
-+ extern char _WorkspaceBase[];
-+
-+ ppc_cpu_id_t myCpu;
-+ ppc_cpu_revision_t myCpuRevision;
-+ register unsigned char* intrStack;
-+
-+ /*
-+ * Get CPU identification dynamically. Note that the get_ppc_cpu_type()
-+ * function stores the result in global variables so that it can be used
-+ * later.
-+ */
-+ myCpu = get_ppc_cpu_type();
-+ myCpuRevision = get_ppc_cpu_revision();
-+
-+ /*
-+ * Initialize some SPRG registers related to irq handling
-+ */
-+ intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE);
-+ _write_SPRG1((unsigned int)intrStack);
-+
-+ /*
-+ * Install our own set of exception vectors
-+ */
-+ initialize_exceptions();
-+
-+ /*
-+ * Allocate the memory for the RTEMS Work Space. This can come from
-+ * a variety of places: hard coded address, malloc'ed from outside
-+ * RTEMS world (e.g. simulator or primitive memory manager), or (as
-+ * typically done by stock BSPs) by subtracting the required amount
-+ * of work space from the last physical address on the CPU board.
-+ *
-+ * In this case, the memory is not malloc'ed. It is just
-+ * "pulled from the air".
-+ */
-+ Configuration.work_space_start = _WorkspaceBase;
-+
-+ /*
-+ * initialize the device driver parameters
-+ */
-+ bsp_clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
-+ bsp_clock_speed = BSP_CLOCK_HZ; /* for SCI baud rate generator */
-+ bsp_timer_least_valid = 0;
-+ bsp_timer_average_overhead = 0;
-+
-+ /*
-+ * Initalize RTEMS IRQ system
-+ */
-+ BSP_rtems_irq_mng_init(0);
-+}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c 2009-11-29 01:38:37.616586852 +0100
-@@ -0,0 +1,148 @@
-+/*
-+ * iss555.c
-+ *
-+ * Intec SS555 initialization routines.
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ *
-+ * Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/imbx8xx.c:
-+ *
-+ * Copyright (c) 1999, National Research Council of Canada
-+ *
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ */
-+
-+#include <bsp.h>
-+
-+SPR_RW(ICTRL);
-+SPR_RW(DEC);
-+SPR_RW(TBWU);
-+SPR_RW(TBWL);
-+SPR_RO(IMMR);
-+SPR_RW(MI_GRA);
-+SPR_RW(L2U_GRA);
-+SPR_RW(BBCMCR);
-+
-+/*
-+ * Initialize SS555
-+ */
-+void _InitSS555 (void)
-+{
-+ register uint32_t plprcr, msr;
-+
-+ /*
-+ * Initialize the System Protection Control Register (SYPCR).
-+ * The SYPCR can only be written once after Reset.
-+ */
-+ usiu.sypcr =
-+ USIU_SYPCR_SWTC(WATCHDOG_TIMEOUT) /* set watchdog timeout */
-+ | USIU_SYPCR_BMT(0xFF) /* set bus monitor timeout */
-+ | USIU_SYPCR_BME /* enable bus monitor */
-+ | USIU_SYPCR_SWF /* watchdog halted in freeze */
-+#if WATCHDOG_TIMEOUT != 0xFFFF
-+ | USIU_SYPCR_SWE /* enable watchdog */
-+#endif
-+ | USIU_SYPCR_SWRI /* watchdog forces reset */
-+ | USIU_SYPCR_SWP; /* prescale watchdog by 2048 */
-+
-+ TICKLE_WATCHDOG(); /* restart watchdog timer */
-+
-+ /*
-+ * Re-tune the PLL to the desired system clock frequency.
-+ */
-+ usiu.plprck = USIU_UNLOCK_KEY; /* unlock PLPRCR */
-+ usiu.plprcr =
-+ USIU_PLPRCR_TEXPS /* assert TEXP always */
-+ | USIU_PLPRCR_MF(BSP_CLOCK_HZ / BSP_CRYSTAL_HZ);
-+ /* PLL multiplication factor */
-+ usiu.plprck = 0; /* lock PLPRCR */
-+
-+ while (((plprcr = usiu.plprcr) & USIU_PLPRCR_SPLS) == 0)
-+ ; /* wait for PLL to re-lock */
-+
-+ /*
-+ * Enable the timebase and decrementer, then initialize decrementer
-+ * register to a large value to guarantee that a decrementer interrupt
-+ * will not be generated before the kernel is fully initialized.
-+ * Initialize the timebase register to zero.
-+ */
-+ usiu.tbscrk = USIU_UNLOCK_KEY;
-+ usiu.tbscr |= USIU_TBSCR_TBE; /* enable time base and decrementer */
-+ usiu.tbscrk = 0;
-+
-+ usiu.tbk = USIU_UNLOCK_KEY;
-+ _write_DEC(0x7FFFFFFF);
-+ _write_TBWU(0x00000000 );
-+ _write_TBWL(0x00000000 );
-+ usiu.tbk = 0;
-+
-+ /*
-+ * Run the Inter-Module Bus at full speed.
-+ */
-+ imb.uimb.umcr &= ~UIMB_UMCR_HSPEED;
-+
-+ /*
-+ * Initialize Memory Controller for External RAM
-+ *
-+ * Initialize the Base and Option Registers (BR0-BR7 and OR0-OR7). Note
-+ * that for all chip selects, ORx should be programmed before BRx.
-+ *
-+ * If booting from internal flash ROM, configure the external RAM to
-+ * extend the internal RAM. If booting from external RAM, leave it at
-+ * zero but set it up appropriately.
-+ */
-+ extern char int_ram_top[]; /* top of internal ram */
-+
-+ usiu.memc[0]._or =
-+ USIU_MEMC_OR_512K /* bank size */
-+ | USIU_MEMC_OR_SCY(0) /* wait states in first beat of burst */
-+ | USIU_MEMC_OR_BSCY(0); /* wait states in subsequent beats */
-+
-+ usiu.memc[0]._br =
-+ USIU_MEMC_BR_BA(_read_IMMR() & IMMR_FLEN
-+ ? (uint32_t)int_ram_top : 0) /* base address */
-+ | USIU_MEMC_BR_PS32 /* 32-bit data bus */
-+ | USIU_MEMC_BR_TBDIP /* toggle bdip */
-+ | USIU_MEMC_BR_V; /* base register valid */
-+
-+ /*
-+ * Initialize Memory Controller for External CPLD
-+ *
-+ * The SS555 board includes a CPLD to control on-board features and
-+ * off-board devices. (Configuration taken from Intec's hwhook.c)
-+ */
-+ usiu.memc[3]._or =
-+ USIU_MEMC_OR_16M /* bank size */
-+ | USIU_MEMC_OR_CSNT /* negate CS/WE early */
-+ | USIU_MEMC_OR_ACS_HALF /* assert CS half cycle after address */
-+ | USIU_MEMC_OR_SCY(15) /* wait states in first beat of burst */
-+ | USIU_MEMC_OR_TRLX; /* relaxed timing */
-+
-+ usiu.memc[3]._br =
-+ USIU_MEMC_BR_BA(&cpld) /* base address */
-+ | USIU_MEMC_BR_PS16 /* 16-bit data bus */
-+ | USIU_MEMC_BR_BI /* inhibit bursting */
-+ | USIU_MEMC_BR_V; /* base register valid */
-+
-+ /*
-+ * Disable show cycles and serialization so that burst accesses will work
-+ * properly. A different value, such as 0x0, may be more appropriate for
-+ * debugging, but can be set with the debugger, if needed.
-+ */
-+ _write_ICTRL(0x00000007);
-+
-+ /*
-+ * Set up Burst Buffer Controller (BBC)
-+ */
-+ _write_BBCMCR(
-+ BBCMCR_ETRE /* enable exception relocation */
-+ | BBCMCR_BE); /* enable burst accesses */
-+ _isync;
-+
-+ _CPU_MSR_GET(msr);
-+ msr |= MSR_IP; /* set prefix for exception relocation */
-+ _CPU_MSR_SET(msr);
-+}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds 2008-03-04 00:07:19.000000000 +0100
-@@ -0,0 +1,319 @@
-+/*
-+ * Linker command file for Intec SS555 board
-+ *
-+ * When debugging, we assume that the internal flash ROM will be replaced by
-+ * the external RAM on the SS555 board. All sections are stacked starting
-+ * at address zero. Nothing is placed in the internal RAM, since it's not
-+ * contiguous with the external SRAM when the external RAM is placed at
-+ * zero.
-+ *
-+ * For final production, we assume that the .text section will be burned
-+ * into flash ROM starting at address zero. The .data, .bss, heap, and
-+ * workspace will reside in RAM, starting at the beginning of the internal
-+ * RAM. The system startup code will configure the external RAM to begin
-+ * where the internal RAM ends, so as to make one large RAM block.
-+ *
-+ * Debugging mode is chosen when the RTEMS_DEBUG symbol is defined. The
-+ * RTEMS_DEBUG symbol is defined in the bsp_specs file whenever make(1) is
-+ * invoked with VARIANT=DEBUG.
-+ *
-+ * $Id: linkcmds,v 1.4 2008/03/03 23:07:19 joel Exp $
-+ */
-+
-+OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
-+OUTPUT_ARCH(powerpc)
-+ENTRY(start)
-+
-+int_ram_org = 0x003F9800; /* base of internal RAM */
-+int_ram_top = 0x00400000; /* top of internal RAM */
-+ext_ram_size = 0x00080000; /* size of external RAM */
-+
-+
-+SECTIONS
-+{
-+ .vectors 0x0:
-+ {
-+ /*
-+ * For the MPC555, we use the compressed vector table format which puts
-+ * all of the exception vectors before 0x100.
-+ */
-+ *(.vectors)
-+ }
-+
-+ .text 0x100:
-+ {
-+ /* Read-only sections, merged into text segment: */
-+
-+ text.start = .;
-+
-+ /* Entry point is the .entry section */
-+ *(.entry)
-+ *(.entry2)
-+
-+ /* Actual code */
-+ *(.text*)
-+
-+ /* C++ constructors/destructors */
-+ *(.gnu.linkonce.t*)
-+
-+ /* Initialization and finalization code.
-+ *
-+ * Various files can provide initialization and finalization functions.
-+ * The bodies of these functions are in .init and .fini sections. We
-+ * accumulate the bodies here, and prepend function prologues from
-+ * ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
-+ * first; ecrtn.o must be linked last. Because these are wildcards, it
-+ * doesn't matter if the user does not actually link against ecrti.o and
-+ * ecrtn.o; the linker won't look for a file to match a wildcard. The
-+ * wildcard also means that it doesn't matter which directory ecrti.o
-+ * and ecrtn.o are in.
-+ */
-+ PROVIDE (_init = .);
-+ *ecrti.o(.init)
-+ *(.init)
-+ *ecrtn.o(.init)
-+
-+ PROVIDE (_fini = .);
-+ *ecrti.o(.fini)
-+ *(.fini)
-+ *ecrtn.o(.init)
-+
-+ /*
-+ * C++ constructors and destructors for static objects.
-+ * PowerPC EABI does not use crtstuff yet, so we build "old-style"
-+ * constructor and destructor lists that begin with the list length
-+ * end terminate with a NULL entry.
-+ */
-+ PROVIDE (__CTOR_LIST__ = .);
-+ /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
-+ *crtbegin.o(.ctors)
-+ *(.ctors)
-+ *crtend.o(.ctors)
-+ LONG(0)
-+ PROVIDE (__CTOR_END__ = .);
-+
-+ PROVIDE (__DTOR_LIST__ = .);
-+ /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
-+ *crtbegin.o(.dtors)
-+ *(.dtors)
-+ *crtend.o(.dtors)
-+ LONG(0)
-+ PROVIDE (__DTOR_END__ = .);
-+
-+ /*
-+ * Special FreeBSD sysctl sections.
-+ */
-+ . = ALIGN (16);
-+ __start_set_sysctl_set = .;
-+ *(set_sysctl_*);
-+ __stop_set_sysctl_set = ABSOLUTE(.);
-+ *(set_domain_*);
-+ *(set_pseudo_*);
-+
-+ /* Exception frame info */
-+ *(.eh_frame)
-+
-+ /* Miscellaneous read-only data */
-+ _rodata_start = . ;
-+ *(.gnu.linkonce.r*)
-+ *(.lit)
-+ *(.shdata)
-+ *(.rodata*)
-+ *(.rodata1)
-+ *.(eh_frame)
-+ *(.descriptors)
-+ *(rom_ver)
-+ _erodata = .;
-+
-+ /* Various possible names for the end of the .text section */
-+ etext = ALIGN(0x10);
-+ _etext = .;
-+ _endtext = .;
-+ text.end = .;
-+ PROVIDE (etext = .);
-+ PROVIDE (__etext = .);
-+
-+ /*
-+ * .data section contents, copied to RAM at system startup.
-+ */
-+ . = ALIGN(0x20);
-+ data.contents.start = .;
-+ }
-+ text.size = text.end - text.start;
-+
-+ /*
-+ * If debugging, stack the read/write sections directly after the text
-+ * section. Otherwise, stack the read/write sections starting at base of
-+ * internal RAM.
-+ */
-+ . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
-+
-+ .data : AT (data.contents.start)
-+ {
-+ data.start = .;
-+
-+ *(.data)
-+ *(.data.*)
-+ *(.data1)
-+
-+ PROVIDE (__SDATA_START__ = .);
-+ *(.sdata*)
-+ *(.gnu.linkonce.d*)
-+ *(.gnu.linkonce.s.*)
-+ PROVIDE (__SDATA_END__ = .);
-+
-+ PROVIDE (__EXCEPT_START__ = .);
-+ *(.gcc_except_table*)
-+ PROVIDE (__EXCEPT_END__ = .);
-+
-+ PROVIDE(__GOT_START__ = .);
-+ *(.got.plt)
-+ *(.got)
-+ PROVIDE(__GOT_END__ = .);
-+
-+ *(.got1)
-+
-+ PROVIDE (__GOT2_START__ = .);
-+ PROVIDE (_GOT2_START_ = .);
-+ *(.got2)
-+ PROVIDE (__GOT2_END__ = .);
-+ PROVIDE (_GOT2_END_ = .);
-+
-+ PROVIDE (__FIXUP_START__ = .);
-+ PROVIDE (_FIXUP_START_ = .);
-+ *(.fixup)
-+ PROVIDE (_FIXUP_END_ = .);
-+ PROVIDE (__FIXUP_END__ = .);
-+
-+ /* We want the small data sections together, so single-instruction
-+ * offsets can access them all.
-+ */
-+ PROVIDE (__SDATA2_START__ = .);
-+ *(.sdata2)
-+ *(.gnu.linkonce.s2.*)
-+ PROVIDE (__SDATA2_END__ = .);
-+
-+ data.end = .;
-+ }
-+ data.size = data.end - data.start;
-+
-+ .bss :
-+ {
-+ bss.start = .;
-+
-+ PROVIDE (__SBSS2_START__ = .);
-+ *(.sbss2)
-+ PROVIDE (__SBSS2_END__ = .);
-+
-+ PROVIDE (__SBSS_START__ = .);
-+ *(.sbss*)
-+ PROVIDE (__SBSS_END__ = .);
-+
-+ *(.bss .bss* .gnu.linkonce.b*)
-+ *(COMMON)
-+
-+ . = ALIGN(4);
-+ bss.end = .;
-+ }
-+ bss.size = bss.end - bss.start;
-+
-+ PROVIDE(_end = bss.end);
-+
-+ /*
-+ * Initialization stack
-+ */
-+ InitStack_start = ALIGN(0x10);
-+ . += 0x1000;
-+ initStack = .;
-+ PROVIDE(initStackPtr = initStack);
-+
-+ /*
-+ * Interrupt stack
-+ */
-+ IntrStack_start = ALIGN(0x10);
-+ . += 0x4000;
-+ intrStack = .;
-+ PROVIDE(intrStackPtr = intrStack);
-+
-+ _WorkspaceBase = .;
-+ __WorkspaceBase = .;
-+
-+ /*
-+ * Heap
-+ *
-+ * The heap is configured at run-time to use all available memory. It
-+ * begins just after the end of the Workspace and continues to the end of
-+ * the external RAM.
-+ */
-+ . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
-+ _HeapEnd = .;
-+ __HeapEnd = .;
-+
-+
-+ /*
-+ * Internal I/O devices
-+ */
-+ .usiu 0x002FC000: /* unified system interface unit */
-+ {
-+ usiu = .;
-+ }
-+
-+ .imb 0x00300000: /* inter-module bus and devices */
-+ {
-+ imb = .;
-+ }
-+
-+ .sram 0x00380000: /* internal SRAM control registers */
-+ {
-+ sram = .;
-+ }
-+
-+ /*
-+ * SS555 external devices managed by on-board CPLD
-+ */
-+ .cpld 0xFF000000: /* SS555 external CPLD devices */
-+ {
-+ cpld = .;
-+ }
-+
-+
-+ /* Stabs debugging sections. */
-+ .stab 0 : { *(.stab) }
-+ .stabstr 0 : { *(.stabstr) }
-+ .stab.excl 0 : { *(.stab.excl) }
-+ .stab.exclstr 0 : { *(.stab.exclstr) }
-+ .stab.index 0 : { *(.stab.index) }
-+ .stab.indexstr 0 : { *(.stab.indexstr) }
-+ .comment 0 : { *(.comment) }
-+
-+ /* DWARF debug sections.
-+ Symbols in the DWARF debugging sections are relative to the beginning
-+ of the section so we begin them at 0. */
-+ /* DWARF 1 */
-+ .debug 0 : { *(.debug) }
-+ .line 0 : { *(.line) }
-+
-+ /* GNU DWARF 1 extensions */
-+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
-+ .debug_sfnames 0 : { *(.debug_sfnames) }
-+
-+ /* DWARF 1.1 and DWARF 2 */
-+ .debug_aranges 0 : { *(.debug_aranges) }
-+ .debug_pubnames 0 : { *(.debug_pubnames) }
-+
-+ /* DWARF 2 */
-+ .debug_info 0 : { *(.debug_info) }
-+ .debug_abbrev 0 : { *(.debug_abbrev) }
-+ .debug_line 0 : { *(.debug_line) }
-+ .debug_frame 0 : { *(.debug_frame) }
-+ .debug_str 0 : { *(.debug_str) }
-+ .debug_loc 0 : { *(.debug_loc) }
-+ .debug_macinfo 0 : { *(.debug_macinfo) }
-+
-+ /* SGI/MIPS DWARF 2 extensions */
-+ .debug_weaknames 0 : { *(.debug_weaknames) }
-+ .debug_funcnames 0 : { *(.debug_funcnames) }
-+ .debug_typenames 0 : { *(.debug_typenames) }
-+ .debug_varnames 0 : { *(.debug_varnames) }
-+ /* These must appear regardless of . */
-+}
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/start.S
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/start.S 2009-11-29 01:38:37.620589246 +0100
-@@ -0,0 +1,411 @@
-+/* start.S
-+ *
-+ * This file contains the entry veneer for RTEMS programs on the Intec
-+ * SS555 board. It jumps to the BSP which is responsible for performing
-+ * all remaining initialization.
-+ *
-+ * This file is based on several others:
-+ *
-+ * (1) start360.s from the gen68360 BSP by
-+ * W. Eric Norum (eric@skatter.usask.ca)
-+ * with the following copyright and license:
-+ *
-+ * COPYRIGHT (c) 1989-1998.
-+ * On-Line Applications Research Corporation (OAR).
-+ *
-+ * The license and distribution terms for this file may in
-+ * the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license/LICENSE.
-+ *
-+ * (2) start.s for the eth_comm port by
-+ * Jay Monkman (jmonkman@fracsa.com),
-+ * which itself is based on the
-+ *
-+ * (3) dlentry.s for the Papyrus BSP, written by:
-+ * Andrew Bray <andy@i-cubed.co.uk>
-+ * with the following copyright and license:
-+ *
-+ * COPYRIGHT (c) 1995 by i-cubed ltd.
-+ *
-+ * (4) start860.S for the MBX821/MBX860, written by:
-+ * Darlene A. Stewart <darlene.stewart@iit.nrc.ca>
-+ * Copyright (c) 1999, National Research Council of Canada
-+ *
-+ * To anyone who acknowledges that this file is provided "AS IS"
-+ * without any express or implied warranty:
-+ * permission to use, copy, modify, and distribute this file
-+ * for any purpose is hereby granted without fee, provided that
-+ * the above copyright notice and this notice appears in all
-+ * copies, and that the name of i-cubed limited not be used in
-+ * advertising or publicity pertaining to distribution of the
-+ * software without specific, written prior permission.
-+ * i-cubed limited makes no representations about the suitability
-+ * of this software for any purpose.
-+ *
-+ * (5) Modifications (for MBX8xx) of respective RTEMS files:
-+ * Copyright (c) 1999, National Research Council of Canada
-+ *
-+ * SS555 port sponsored by Defence Research and Development Canada - Suffield
-+ * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
-+ */
-+
-+#include <rtems/asm.h>
-+#include <rtems/powerpc/registers.h>
-+
-+/*
-+ * The initial stack is set to the top of the internal RAM.
-+ *
-+ * All the entry veneer has to do is to clear the .bss section and copy the
-+ * initializers into the .data section.
-+ */
-+
-+/*
-+ * GDB likes to have debugging information for the entry veneer.
-+ * Play compiler and provide some DWARF information.
-+ *
-+ * CHANGE TO SUIT YOUR SETUP!
-+ */
-+
-+ .section .entry,"ax",@progbits
-+.L_text_b:
-+.L_LC1:
-+ .previous
-+
-+.section .debug_sfnames
-+.L_sfnames_b:
-+ .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
-+ .byte 0
-+.L_F0:
-+ .byte "start.S"
-+ .byte 0
-+ .previous
-+
-+.section .line
-+.L_line_b:
-+ .4byte .L_line_e-.L_line_b
-+ .4byte .L_text_b
-+.L_LE1:
-+.L_line_last:
-+ .4byte 0x0
-+ .2byte 0xffff
-+ .4byte .L_text_e-.L_text_b
-+.L_line_e:
-+ .previous
-+
-+.section .debug_srcinfo
-+.L_srcinfo_b:
-+ .4byte .L_line_b
-+ .4byte .L_sfnames_b
-+ .4byte .L_text_b
-+ .4byte .L_text_e
-+ .4byte 0xffffffff
-+ .4byte .L_LE1-.L_line_b
-+ .4byte .L_F0-.L_sfnames_b
-+ .4byte .L_line_last-.L_line_b
-+ .4byte 0xffffffff
-+ .previous
-+
-+.section .debug_pubnames
-+ .4byte .L_debug_b
-+ .4byte .L_P0
-+ .byte "start"
-+ .byte 0
-+ .4byte 0x0
-+ .byte 0
-+ .previous
-+
-+.section .debug_aranges
-+ .4byte .L_debug_b
-+ .4byte .L_text_b
-+ .4byte .L_text_e-.L_text_b
-+ .4byte 0
-+ .4byte 0
-+ .4byte 0
-+ .4byte 0
-+ .4byte 0
-+ .4byte 0
-+ .4byte 0x0
-+ .4byte 0x0
-+ .previous
-+
-+.section .debug
-+.L_debug_b:
-+.L_D1:
-+ .4byte .L_D1_e-.L_D1
-+ .2byte 0x11 /* TAG_compile_unit */
-+ .2byte 0x12 /* AT_sibling */
-+ .4byte .L_D2
-+ .2byte 0x38 /* AT_name */
-+ .byte "start.S"
-+ .byte 0
-+ .2byte 0x258 /* AT_producer */
-+ .byte "GAS 2.5.2"
-+ .byte 0
-+ .2byte 0x111 /* AT_low_pc */
-+ .4byte .L_text_b
-+ .2byte 0x121 /* AT_high_pc */
-+ .4byte .L_text_e
-+ .2byte 0x106 /* AT_stmt_list */
-+ .4byte .L_line_b
-+ .2byte 0x1b8 /* AT_comp_dir */
-+ .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
-+ .byte 0
-+ .2byte 0x8006 /* AT_sf_names */
-+ .4byte .L_sfnames_b
-+ .2byte 0x8016 /* AT_src_info */
-+ .4byte .L_srcinfo_b
-+.L_D1_e:
-+.L_P0:
-+.L_D3:
-+ .4byte .L_D3_e-.L_D3
-+ .2byte 0x6 /* TAG_global_subroutine */
-+ .2byte 0x12 /* AT_sibling */
-+ .4byte .L_D4
-+ .2byte 0x38 /* AT_name */
-+ .byte "start"
-+ .byte 0
-+ .2byte 0x278 /* AT_prototyped */
-+ .byte 0
-+ .2byte 0x111 /* AT_low_pc */
-+ .4byte .L_text_b
-+ .2byte 0x121 /* AT_high_pc */
-+ .4byte .L_text_e
-+ .2byte 0x8041 /* AT_body_begin */
-+ .4byte .L_text_b
-+ .2byte 0x8051 /* AT_body_end */
-+ .4byte .L_text_e
-+.L_D3_e:
-+
-+.L_D4:
-+ .4byte .L_D4_e-.L_D4
-+ .align 2
-+.L_D4_e:
-+.L_D2:
-+ .previous
-+
-+/*
-+ * Tell C's eabi-ctor's that we have an atexit function,
-+ * and that it is to register __do_global_dtors.
-+ */
-+ EXTERN_PROC(atexit)
-+ PUBLIC_VAR(__atexit)
-+ .section ".sdata","aw"
-+ .align 2
-+SYM(__atexit):
-+ EXT_PROC_REF(atexit)@fixup
-+ .previous
-+
-+ .section ".fixup","aw"
-+ .align 2
-+ EXT_SYM_REF(__atexit)
-+ .previous
-+
-+/* That should do it */
-+
-+/*
-+ * Put the entry point in its own section. That way, we can guarantee
-+ * to put it first in the .text section in the linker script.
-+ */
-+ .section .entry
-+
-+ PUBLIC_VAR (start)
-+SYM(start):
-+ bl .startup /* or bl .spin */
-+base_addr:
-+
-+/*
-+ * Parameters from linker
-+ */
-+stack_top:
-+ .long initStackPtr
-+
-+toc_pointer:
-+ .long __GOT_START__
-+
-+bss_length:
-+ .long bss.size
-+bss_addr:
-+ .long bss.start
-+
-+data_length:
-+ .long data.size
-+data_addr:
-+ .long data.start
-+contents_addr:
-+ .long data.contents.start
-+
-+PUBLIC_VAR (text_addr)
-+text_addr:
-+ .long text.start
-+
-+PUBLIC_VAR (text_length)
-+text_length:
-+ .long text.size
-+
-+/*
-+ * Spin, if necessary, to acquire control from debugger (CodeWarrior).
-+ */
-+spin:
-+ .long 0x0001
-+.spin:
-+ lis r3, spin@ha
-+ lwz r3, spin@l(r3)
-+ cmpwi r3, 0x1
-+ beq .spin
-+
-+/*
-+ * Initialization code
-+ */
-+.startup:
-+ /* Capture address of linker parameters. */
-+ mflr r3
-+
-+ /* Set initial stack pointer to end of internal RAM - 56. */
-+ lwz r1, stack_top-base_addr(r3)
-+ addi r1, r1, -56
-+
-+ /* Initialize essential registers. */
-+ bl initregs
-+
-+ /* Set TOC pointer */
-+ lwz r2, toc_pointer-base_addr(r3)
-+
-+ /* Initialize the memory mapped MPC555 registers (done in C). */
-+ EXTERN_PROC (_InitSS555)
-+ bl PROC (_InitSS555)
-+
-+ /* Clear the .bss section. */
-+ bl bssclr
-+
-+ /* Copy initializers into the .data section */
-+ bl datacopy
-+
-+ /* Enable floating point, since gcc sometimes uses the floating
-+ * point registers for data moves, even if the C source code doesn't
-+ * include floating point operations.
-+ */
-+ mfmsr r0
-+ ori r0, r0, MSR_FP
-+ mtmsr r0
-+
-+ /* Start system. */
-+ lis r5, environ@ha
-+ la r5,environ@l(r5) /* environp */
-+ li r4, 0 /* argv */
-+ li r3, 0 /* argc */
-+ EXTERN_PROC (boot_card)
-+ bl PROC (boot_card) /* call the first C routine */
-+
-+ /* We should never return from boot_card, but in case we do ... */
-+ /* The next instructions are dependent on your runtime environment. */
-+
-+stop_here:
-+ b stop_here
-+
-+/*
-+ * datacopy - copy initializers into .data section
-+ */
-+datacopy:
-+ lis r3, base_addr@ha /* point to linker data */
-+ addi r3, r3, base_addr@l
-+
-+ lwz r4, contents_addr-base_addr(r3) /* .data contents in ROM */
-+ lwz r5, data_addr-base_addr(r3) /* .data section in RAM */
-+ lwz r6, data_length-base_addr(r3) /* length of .data */
-+
-+ rlwinm. r6, r6, 30, 0x3FFFFFFF /* form length / 4 */
-+ beqlr /* no .data - return */
-+
-+ mtctr r6 /* set ctr reg */
-+dc1:
-+ lwz r6, 0(r4) /* get word */
-+ stw r6, 0(r5) /* store word */
-+ addi r4, r4, 0x4 /* next source */
-+ addi r5, r5, 0x4 /* next target */
-+ bdnz dc1 /* dec counter and loop */
-+
-+ blr /* return */
-+
-+/*
-+ * bssclr - zero out bss
-+ */
-+bssclr:
-+ lis r3, base_addr@ha /* point to linker data */
-+ addi r3, r3, base_addr@l
-+
-+ lwz r4, bss_addr-base_addr(r3) /* Start of bss */
-+ lwz r5, bss_length-base_addr(r3) /* Length of bss */
-+
-+ rlwinm. r5, r5, 30, 0x3FFFFFFF /* form length/4 */
-+ beqlr /* no bss - return */
-+
-+ mtctr r5 /* set ctr reg */
-+ li r5, 0x0000 /* r5 = 0 */
-+clear_bss:
-+ stw r5, 0(r4) /* store r6 */
-+ addi r4, r4, 0x4 /* update r4 */
-+ bdnz clear_bss /* dec counter and loop */
-+
-+ blr /* return */
-+
-+/*
-+ * initregs
-+ * Initialize the MSR and basic core PowerPC registers
-+ *
-+ * Register usage:
-+ * r0 - scratch
-+ */
-+initregs:
-+ /*
-+ * Set the processor for big-endian mode, exceptions vectored to
-+ * 0x000n_nnnn, no execution tracing, machine check exceptions
-+ * enabled, floating-point not available, supervisor priviledge
-+ * level, external interrupts disabled, power management disabled
-+ * (normal operation mode).
-+ */
-+ li r0, 0x1000 /* MSR_ME */
-+ mtmsr r0 /* Context-synchronizing */
-+ isync
-+
-+ /*
-+ * Clear the exception handling registers.
-+ */
-+ li r0, 0x0000
-+ mtdar r0
-+ mtspr sprg0, r0
-+ mtspr sprg1, r0
-+ mtspr sprg2, r0
-+ mtspr sprg3, r0
-+ mtspr srr0, r0
-+ mtspr srr1, r0
-+
-+ mr r6, r0
-+ mr r7, r0
-+ mr r8, r0
-+ mr r9, r0
-+ mr r10, r0
-+ mr r11, r0
-+ mr r12, r0
-+ mr r13, r0
-+ mr r14, r0
-+ mr r15, r0
-+ mr r16, r0
-+ mr r17, r0
-+ mr r18, r0
-+ mr r19, r0
-+ mr r20, r0
-+ mr r21, r0
-+ mr r22, r0
-+ mr r23, r0
-+ mr r24, r0
-+ mr r25, r0
-+ mr r26, r0
-+ mr r27, r0
-+ mr r28, r0
-+ mr r29, r0
-+ mr r30, r0
-+ mr r31, r0
-+
-+ blr /* return */
-+
-+.L_text_e:
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c 2009-11-29 01:38:37.620589246 +0100
-@@ -0,0 +1,29 @@
-+/*
-+ * Support routines for TM27
-+ *
-+ * $Id: tm27supp.c,v 1.1 2004/04/21 20:24:36 joel Exp $
-+ */
-+
-+#include <bsp.h>
-+
-+void tm27On()
-+{
-+}
-+
-+void tm27Off()
-+{
-+}
-+
-+int tm27IsOn()
-+{
-+ return 1;
-+}
-+
-+rtems_irq_connect_data tm27IrqData = {
-+ CPU_USIU_EXT_IRQ_7,
-+ (rtems_irq_hdl)0,
-+ (rtems_irq_enable)tm27On,
-+ (rtems_irq_disable)tm27Off,
-+ (rtems_irq_is_enabled)tm27IsOn
-+};
-+
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/times
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/times 2009-11-29 01:38:37.620589246 +0100
-@@ -0,0 +1,189 @@
-+#
-+# Timing Test Suite Results for the Intec SS555
-+#
-+# $Id: times,v 1.1 2004/04/12 21:52:13 joel Exp $
-+#
-+
-+Board: SS555
-+CPU: MPC555
-+Clock Speed: 40 MHz
-+Memory Configuration: 512k external 2-1-1-1 SRAM
-+Wait States: 0
-+
-+Times Reported in: microseconds
-+Timer Source: Timebase register (TMBCLK = (4 MHz crystal / 4) = 1.0 Mhz)
-+
-+# DESCRIPTION A B
-+== ================================================================= ==== ====
-+
-+ 1 rtems_semaphore_create 21
-+ rtems_semaphore_delete 22
-+ rtems_semaphore_obtain: available 7
-+ rtems_semaphore_obtain: not available -- NO_WAIT 7
-+ rtems_semaphore_release: no waiting tasks 18
-+
-+ 2 rtems_semaphore_obtain: not available -- caller blocks 50
-+
-+ 3 rtems_semaphore_release: task readied -- preempts caller 41
-+
-+ 4 rtems_task_restart: blocked task -- preempts caller 69
-+ rtems_task_restart: ready task -- preempts caller 67
-+ rtems_semaphore_release: task readied -- returns to caller 23
-+ rtems_task_create 75
-+ rtems_task_start 30
-+ rtems_task_restart: suspended task -- returns to caller 37
-+ rtems_task_delete: suspended task 68
-+ rtems_task_restart: ready task -- returns to caller 38
-+ rtems_task_restart: blocked task -- returns to caller 44
-+ rtems_task_delete: blocked task 70
-+
-+ 5 rtems_task_suspend: calling task 40
-+ rtems_task_resume: task readied -- preempts caller 35
-+
-+ 6 rtems_task_restart: calling task 46
-+ rtems_task_suspend: returns to caller 16
-+ rtems_task_resume: task readied -- returns to caller 18
-+ rtems_task_delete: ready task 71
-+
-+ 7 rtems_task_restart: suspended task -- preempts caller 64
-+
-+ 8 rtems_task_set_priority: obtain current priority 13
-+ rtems_task_set_priority: returns to caller 24
-+ rtems_task_mode: obtain current mode 4
-+ rtems_task_mode: no reschedule 5
-+ rtems_task_mode: reschedule -- returns to caller 7
-+ rtems_task_mode: reschedule -- preempts caller 37
-+ rtems_task_set_note 13
-+ rtems_task_get_note 13
-+ rtems_clock_set 27
-+ rtems_clock_get 1
-+
-+ 9 rtems_message_queue_create 34
-+ rtems_message_queue_send: no waiting tasks 26
-+ rtems_message_queue_urgent: no waiting tasks 26
-+ rtems_message_queue_receive: available 24
-+ rtems_message_queue_flush: no messages flushed 12
-+ rtems_message_queue_flush: messages flushed 15
-+ rtems_message_queue_delete 26
-+
-+10 rtems_message_queue_receive: not available -- NO_WAIT 15
-+ rtems_message_queue_receive: not available -- caller blocks 52
-+
-+11 rtems_message_queue_send: task readied -- preempts caller 47
-+
-+12 rtems_message_queue_send: task readied -- returns to caller 29
-+
-+13 rtems_message_queue_urgent: task readied -- preempts caller 46
-+
-+14 rtems_message_queue_urgent: task readied -- returns to caller 29
-+
-+15 rtems_event_receive: obtain current events 1
-+ rtems_event_receive: not available -- NO_WAIT 12
-+ rtems_event_receive: not available -- caller blocks 44
-+ rtems_event_send: no task readied 13
-+ rtems_event_receive: available 13
-+ rtems_event_send: task readied -- returns to caller 21
-+
-+16 rtems_event_send: task readied -- preempts caller 41
-+
-+17 rtems_task_set_priority: preempts caller 49
-+
-+18 rtems_task_delete: calling task 95
-+
-+19 rtems_signal_catch 10
-+ rtems_signal_send: returns to caller 15
-+ rtems_signal_send: signal to self 20
-+ exit ASR overhead: returns to calling task 15
-+ exit ASR overhead: returns to preempting task 30
-+
-+20 rtems_partition_create 25
-+ rtems_region_create 38
-+ rtems_partition_get_buffer: available 14
-+ rtems_partition_get_buffer: not available 13
-+ rtems_partition_return_buffer 15
-+ rtems_partition_delete 16
-+ rtems_region_get_segment: available 34
-+ rtems_region_get_segment: not available -- NO_WAIT 32
-+ rtems_region_return_segment: no waiting tasks 33
-+ rtems_region_get_segment: not available -- caller blocks 68
-+ rtems_region_return_segment: task readied -- preempts caller 67
-+ rtems_region_return_segment: task readied -- returns to caller 48
-+ rtems_region_delete 30
-+ rtems_io_initialize 2
-+ rtems_io_open 1
-+ rtems_io_close 1
-+ rtems_io_read 1
-+ rtems_io_write 1
-+ rtems_io_control 1
-+
-+21 rtems_task_ident 25
-+ rtems_message_queue_ident 22
-+ rtems_semaphore_ident 29
-+ rtems_partition_ident 22
-+ rtems_region_ident 24
-+ rtems_port_ident 22
-+ rtems_timer_ident 22
-+ rtems_rate_monotonic_ident 22
-+
-+22 rtems_message_queue_broadcast: task readied -- returns to caller 33
-+ rtems_message_queue_broadcast: no waiting tasks 20
-+ rtems_message_queue_broadcast: task readied -- preempts caller 50
-+
-+23 rtems_timer_create 13
-+ rtems_timer_fire_after: inactive 22
-+ rtems_timer_fire_after: active 24
-+ rtems_timer_cancel: active 13
-+ rtems_timer_cancel: inactive 12
-+ rtems_timer_reset: inactive 21
-+ rtems_timer_reset: active 22
-+ rtems_timer_fire_when: inactive 26
-+ rtems_timer_fire_when: active 26
-+ rtems_timer_delete: active 18
-+ rtems_timer_delete: inactive 16
-+ rtems_task_wake_when 49
-+
-+24 rtems_task_wake_after: yield -- returns to caller 10
-+ rtems_task_wake_after: yields -- preempts caller 36
-+
-+25 rtems_clock_tick 8
-+
-+26 _ISR_Disable 1
-+ _ISR_Flash 1
-+ _ISR_Enable 1
-+ _Thread_Disable_dispatch 1
-+ _Thread_Enable_dispatch 7
-+ _Thread_Set_state 7
-+ _Thread_Disptach (NO FP) 32
-+ context switch: no floating point contexts 25
-+ context switch: self 11
-+ context switch: to another task 12
-+ fp context switch: restore 1st FP task 37
-+ fp context switch: save idle, restore initialized 34
-+ fp context switch: save idle, restore idle 48
-+ fp context switch: save initialized, restore initialized 34
-+ _Thread_Resume 7
-+ _Thread_Unblock 6
-+ _Thread_Ready 7
-+ _Thread_Get 4
-+ _Semaphore_Get 2
-+ _Thread_Get: invalid id 1
-+
-+27 interrupt entry overhead: returns to interrupted task 13
-+ interrupt exit overhead: returns to interrupted task 11
-+ interrupt entry overhead: returns to nested interrupt 12
-+ interrupt exit overhead: returns to nested interrupt 10
-+ interrupt entry overhead: returns to preempting task 12
-+ interrupt exit overhead: returns to preempting task 38
-+
-+28 rtems_port_create 16
-+ rtems_port_external_to_internal 11
-+ rtems_port_internal_to_external 11
-+ rtems_port_delete 16
-+
-+29 rtems_rate_monotonic_create 15
-+ rtems_rate_monotonic_period: initiate period -- returns to caller 20
-+ rtems_rate_monotonic_period: obtain status 12
-+ rtems_rate_monotonic_cancel 15
-+ rtems_rate_monotonic_delete: inactive 18
-+ rtems_rate_monotonic_delete: active 20
-+ rtems_rate_monotonic_period: conclude periods -- caller blocks 36
-Index: rtems-4.9.3/make/custom/ec555.cfg
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/make/custom/ec555.cfg 2009-11-29 01:43:49.127556601 +0100
-@@ -0,0 +1,38 @@
-+#
-+# Config file for an Intec Automation SS555 MPC555-based card
-+#
-+# This file is derived from:
-+#
-+# Config file for a PowerPC MPC860-based MBX821-001 card.
-+# Config file for a PowerPC 403 based helas403 card
-+# Config file for MPC860 based Ethernet Comm Board
-+#
-+# $Id: ss555.cfg,v 1.11 2008/03/11 20:50:58 joel Exp $
-+#
-+
-+include $(RTEMS_ROOT)/make/custom/default.cfg
-+
-+RTEMS_CPU=powerpc
-+GCC_CPU_MODEL=505
-+RTEMS_CPU_MODEL=mpc555
-+
-+# This is the actual bsp directory used during the build process.
-+RTEMS_BSP_FAMILY=ss555
-+
-+# This contains the compiler options necessary to select the CPU model
-+# and (hopefully) optimize for it.
-+#
-+CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL) -D$(RTEMS_BSP_FAMILY)
-+
-+# optimize flag: typically -O2
-+CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions
-+
-+define bsp-post-link
-+ $(default-bsp-post-link)
-+ cp $(basename $@).exe $(basename $@)$(DOWNEXT)
-+ $(STRIP) $(basename $@)$(DOWNEXT)
-+endef
-+
-+# Override default start file
-+START_BASE=
-+
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/preinstall.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/preinstall.am 2009-11-29 01:38:37.620589246 +0100
-@@ -0,0 +1,58 @@
-+## Automatically generated by ampolish3 - Do not edit
-+
-+if AMPOLISH3
-+$(srcdir)/preinstall.am: Makefile.am
-+ $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
-+endif
-+
-+PREINSTALL_DIRS =
-+DISTCLEANFILES += $(PREINSTALL_DIRS)
-+
-+all-am: $(PREINSTALL_FILES)
-+
-+PREINSTALL_FILES =
-+CLEANFILES = $(PREINSTALL_FILES)
-+
-+$(PROJECT_LIB)/$(dirstamp):
-+ @$(MKDIR_P) $(PROJECT_LIB)
-+ @: > $(PROJECT_LIB)/$(dirstamp)
-+PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
-+
-+$(PROJECT_INCLUDE)/$(dirstamp):
-+ @$(MKDIR_P) $(PROJECT_INCLUDE)
-+ @: > $(PROJECT_INCLUDE)/$(dirstamp)
-+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
-+
-+$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
-+PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
-+
-+$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
-+
-+$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
-+
-+$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-+
-+$(PROJECT_INCLUDE)/bsp/$(dirstamp):
-+ @$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
-+ @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
-+PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
-+
-+$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
-+
-+$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
-+
-+$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
-+PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
-+
+++ /dev/null
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (working copy)
-@@ -86,9 +86,25 @@
- /* Since RTEMS is not configured, no RTEMS functions can be called. */
- /* */
- /**************************************************************************/
-+void mmu_set_cpu_async_mode(void);
- void bsp_start_default( void )
- {
-+ int i;
-
-+ /* Set the MCU prescaler to divide by 1 */
-+ MC9328MXL_PLL_CSCR &= ~MC9328MXL_PLL_CSCR_PRESC;
-+
-+ /* Enable the MCU PLL */
-+ MC9328MXL_PLL_CSCR |= MC9328MXL_PLL_CSCR_MPEN;
-+
-+ /* Delay to allow time for PLL to get going */
-+ for (i = 0; i < 100; i++) {
-+ asm volatile ("nop\n");
-+ }
-+
-+ /* Set the CPU to asynchrous clock mode, so it uses its fastest clock */
-+ mmu_set_cpu_async_mode();
-+
- /* disable interrupts */
- MC9328MXL_AITC_INTENABLEL = 0;
- MC9328MXL_AITC_INTENABLEH = 0;
---
+++ /dev/null
-Index: rtems/c/src/lib/libbsp/arm/csb336/times
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/times (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/times (working copy)
-@@ -18,155 +18,155 @@
-
-
- == ==================================================================== ===
-- 1 rtems_semaphore_create 16
-- 1 rtems_semaphore_delete 17
-- 1 rtems_semaphore_obtain: available 2
-- 1 rtems_semaphore_obtain: not available -- NO_WAIT 2
-- 1 rtems_semaphore_release: no waiting tasks 5
-+ 1 rtems_semaphore_create 15
-+ 1 rtems_semaphore_delete 15
-+ 1 rtems_semaphore_obtain: available 0
-+ 1 rtems_semaphore_obtain: not available -- NO_WAIT 0
-+ 1 rtems_semaphore_release: no waiting tasks 0
-
-- 2 rtems_semaphore_obtain: not available -- caller blocks 20
-+ 2 rtems_semaphore_obtain: not available -- caller blocks 12
-
-- 3 rtems_semaphore_release: task readied -- preempts caller 16
-+ 3 rtems_semaphore_release: task readied -- preempts caller 11
-
-- 4 rtems_task_restart: blocked task -- preempts caller 48
-- 4 rtems_task_restart: ready task -- preempts caller 36
-- 4 rtems_semaphore_release: task readied -- returns to caller 9
-- 4 rtems_task_create 33
-- 4 rtems_task_start 12
-- 4 rtems_task_restart: suspended task -- returns to caller 14
-- 4 rtems_task_delete: suspended task 31
-- 4 rtems_task_restart: ready task -- returns to caller 14
-- 4 rtems_task_restart: blocked task -- returns to caller 19
-- 4 rtems_task_delete: blocked task 32
-+ 4 rtems_task_restart: blocked task -- preempts caller 38
-+ 4 rtems_task_restart: ready task -- preempts caller 29
-+ 4 rtems_semaphore_release: task readied -- returns to caller 5
-+ 4 rtems_task_create 24
-+ 4 rtems_task_start 8
-+ 4 rtems_task_restart: suspended task -- returns to caller 9
-+ 4 rtems_task_delete: suspended task 20
-+ 4 rtems_task_restart: ready task -- returns to caller 10
-+ 4 rtems_task_restart: blocked task -- returns to caller 11
-+ 4 rtems_task_delete: blocked task 21
-
-- 5 rtems_task_suspend: calling task 14
-- 5 rtems_task_resume: task readied -- preempts caller 12
-+ 5 rtems_task_suspend: calling task 9
-+ 5 rtems_task_resume: task readied -- preempts caller 8
-
-- 6 rtems_task_restart: calling task 14
-- 6 rtems_task_suspend: returns to caller 6
-- 6 rtems_task_resume: task readied -- returns to caller 6
-- 6 rtems_task_delete: ready task 32
-+ 6 rtems_task_restart: calling task 8
-+ 6 rtems_task_suspend: returns to caller 3
-+ 6 rtems_task_resume: task readied -- returns to caller 3
-+ 6 rtems_task_delete: ready task 22
-
-- 7 rtems_task_restart: suspended task -- preempts caller 24
-+ 7 rtems_task_restart: suspended task -- preempts caller 14
-
-- 8 rtems_task_set_priority: obtain current priority 4
-- 8 rtems_task_set_priority: returns to caller 8
-- 8 rtems_task_mode: obtain current mode 2
-- 8 rtems_task_mode: no reschedule 2
-- 8 rtems_task_mode: reschedule -- returns to caller 4
-- 8 rtems_task_mode: reschedule -- preempts caller 19
-- 8 rtems_task_set_note 4
-- 8 rtems_task_get_note 4
-- 8 rtems_clock_set 9
-+ 8 rtems_task_set_priority: obtain current priority 1
-+ 8 rtems_task_set_priority: returns to caller 3
-+ 8 rtems_task_mode: obtain current mode 0
-+ 8 rtems_task_mode: no reschedule 0
-+ 8 rtems_task_mode: reschedule -- returns to caller 3
-+ 8 rtems_task_mode: reschedule -- preempts caller 13
-+ 8 rtems_task_set_note 1
-+ 8 rtems_task_get_note 1
-+ 8 rtems_clock_set 4
- 8 rtems_clock_get 0
-
-- 9 rtems_message_queue_create 54
-- 9 rtems_message_queue_send: no waiting tasks 8
-- 9 rtems_message_queue_urgent: no waiting tasks 8
-- 9 rtems_message_queue_receive: available 7
-- 9 rtems_message_queue_flush: no messages flushed 4
-- 9 rtems_message_queue_flush: messages flushed 5
-- 9 rtems_message_queue_delete 21
-+ 9 rtems_message_queue_create 38
-+ 9 rtems_message_queue_send: no waiting tasks 4
-+ 9 rtems_message_queue_urgent: no waiting tasks 4
-+ 9 rtems_message_queue_receive: available 4
-+ 9 rtems_message_queue_flush: no messages flushed 2
-+ 9 rtems_message_queue_flush: messages flushed 3
-+ 9 rtems_message_queue_delete 19
-
--10 rtems_message_queue_receive: not available -- NO_WAIT 4
--10 rtems_message_queue_receive: not available -- caller blocks 20
-+10 rtems_message_queue_receive: not available -- NO_WAIT 2
-+10 rtems_message_queue_receive: not available -- caller blocks 12
-
--11 rtems_message_queue_send: task readied -- preempts caller 18
-+11 rtems_message_queue_send: task readied -- preempts caller 13
-
--12 rtems_message_queue_send: task readied -- returns to caller 11
-+12 rtems_message_queue_send: task readied -- returns to caller 7
-
--13 rtems_message_queue_urgent: task readied -- preempts caller 19
-+13 rtems_message_queue_urgent: task readied -- preempts caller 13
-
--14 rtems_message_queue_urgent: task readied -- returns to caller 11
-+14 rtems_message_queue_urgent: task readied -- returns to caller 7
-
- 15 rtems_event_receive: obtain current events 0
--15 rtems_event_receive: not available -- NO_WAIT 3
--15 rtems_event_receive: not available -- caller blocks 17
--15 rtems_event_send: no task readied 3
--15 rtems_event_receive: available 5
--15 rtems_event_send: task readied -- returns to caller 10
-+15 rtems_event_receive: not available -- NO_WAIT 1
-+15 rtems_event_receive: not available -- caller blocks 11
-+15 rtems_event_send: no task readied 1
-+15 rtems_event_receive: available 3
-+15 rtems_event_send: task readied -- returns to caller 7
-
--16 rtems_event_send: task readied -- preempts caller 16
-+16 rtems_event_send: task readied -- preempts caller 12
-
--17 rtems_task_set_priority: preempts caller 19
-+17 rtems_task_set_priority: preempts caller 13
-
--18 rtems_task_delete: calling task 41
-+18 rtems_task_delete: calling task 26
-
--19 rtems_signal_catch 6
--19 rtems_signal_send: returns to caller 15
--19 rtems_signal_send: signal to self 25
--19 exit ASR overhead: returns to calling task 11
--19 exit ASR overhead: returns to preempting task 12
-+19 rtems_signal_catch 5
-+19 rtems_signal_send: returns to caller 12
-+19 rtems_signal_send: signal to self 19
-+19 exit ASR overhead: returns to calling task 7
-+19 exit ASR overhead: returns to preempting task 10
-
--20 rtems_partition_create 22
--20 rtems_region_create 30
--20 rtems_partition_get_buffer: available 10
--20 rtems_partition_get_buffer: not available 4
--20 rtems_partition_return_buffer 9
--20 rtems_partition_delete 10
--20 rtems_region_get_segment: available 15
--20 rtems_region_get_segment: not available -- NO_WAIT 16
--20 rtems_region_return_segment: no waiting tasks 13
--20 rtems_region_get_segment: not available -- caller blocks 47
--20 rtems_region_return_segment: task readied -- preempts caller 45
--20 rtems_region_return_segment: task readied -- returns to caller 25
--20 rtems_region_delete 23
--20 rtems_io_initialize 1
-+20 rtems_partition_create 21
-+20 rtems_region_create 33
-+20 rtems_partition_get_buffer: available 9
-+20 rtems_partition_get_buffer: not available 3
-+20 rtems_partition_return_buffer 8
-+20 rtems_partition_delete 8
-+20 rtems_region_get_segment: available 7
-+20 rtems_region_get_segment: not available -- NO_WAIT 7
-+20 rtems_region_return_segment: no waiting tasks 6
-+20 rtems_region_get_segment: not available -- caller blocks 36
-+20 rtems_region_return_segment: task readied -- preempts caller 33
-+20 rtems_region_return_segment: task readied -- returns to caller 13
-+20 rtems_region_delete 18
-+20 rtems_io_initialize 0
- 20 rtems_io_open 0
- 20 rtems_io_close 0
- 20 rtems_io_read 0
- 20 rtems_io_write 0
- 20 rtems_io_control 0
-
--21 rtems_task_ident 39
--21 rtems_message_queue_ident 38
--21 rtems_semaphore_ident 43
--21 rtems_partition_ident 38
--21 rtems_region_ident 38
--21 rtems_port_ident 37
--21 rtems_timer_ident 38
--21 rtems_rate_monotonic_ident 38
-+21 rtems_task_ident 8
-+21 rtems_message_queue_ident 8
-+21 rtems_semaphore_ident 9
-+21 rtems_partition_ident 8
-+21 rtems_region_ident 8
-+21 rtems_port_ident 8
-+21 rtems_timer_ident 8
-+21 rtems_rate_monotonic_ident 8
-
- 22 rtems_message_queue_broadcast: task readied -- returns to caller 27
--22 rtems_message_queue_broadcast: no waiting tasks 6
--22 rtems_message_queue_broadcast: task readied -- preempts caller 22
-+22 rtems_message_queue_broadcast: no waiting tasks 2
-+22 rtems_message_queue_broadcast: task readied -- preempts caller 16
-
--23 rtems_timer_create 4
--23 rtems_timer_fire_after: inactive 7
--23 rtems_timer_fire_after: active 7
--23 rtems_timer_cancel: active 4
--23 rtems_timer_cancel: inactive 3
--23 rtems_timer_reset: inactive 6
--23 rtems_timer_reset: active 7
--23 rtems_timer_fire_when: inactive 9
--23 rtems_timer_fire_when: active 9
--23 rtems_timer_delete: active 5
--23 rtems_timer_delete: inactive 4
--23 rtems_task_wake_when 21
-+23 rtems_timer_create 3
-+23 rtems_timer_fire_after: inactive 4
-+23 rtems_timer_fire_after: active 4
-+23 rtems_timer_cancel: active 2
-+23 rtems_timer_cancel: inactive 1
-+23 rtems_timer_reset: inactive 3
-+23 rtems_timer_reset: active 3
-+23 rtems_timer_fire_when: inactive 4
-+23 rtems_timer_fire_when: active 4
-+23 rtems_timer_delete: active 3
-+23 rtems_timer_delete: inactive 3
-+23 rtems_task_wake_when 12
-
--24 rtems_task_wake_after: yield -- returns to caller 2
--24 rtems_task_wake_after: yields -- preempts caller 12
-+24 rtems_task_wake_after: yield -- returns to caller 1
-+24 rtems_task_wake_after: yields -- preempts caller 9
-
--25 rtems_clock_tick 13
-+25 rtems_clock_tick 10
-
--26 _ISR_Disable 3
-+26 _ISR_Disable 3
- 26 _ISR_Flash 1
- 26 _ISR_Enable 0
- 26 _Thread_Disable_dispatch 1
- 26 _Thread_Enable_dispatch 3
- 26 _Thread_Set_state 6
--26 _Thread_Disptach (NO FP) 13
--26 context switch: no floating point contexts 10
-+26 _Thread_Disptach (NO FP) 9
-+26 context switch: no floating point contexts 7
- 26 context switch: self 1
- 26 context switch: to another task 2
- 26 fp context switch: restore 1st FP task - NA
- 26 fp context switch: save idle, restore initialized - NA
- 26 fp context switch: save idle, restore idle - NA
- 26 fp context switch: save initialized, restore initialized - NA
--26 _Thread_Resume 9
--26 _Thread_Unblock 8
--26 _Thread_Ready 5
--26 _Thread_Get 1
-+26 _Thread_Resume 8
-+26 _Thread_Unblock 7
-+26 _Thread_Ready 4
-+26 _Thread_Get 0
- 26 _Semaphore_Get 0
- 26 _Thread_Get: invalid id 0
-
-@@ -175,15 +175,15 @@
- 27 interrupt entry overhead: returns to nested interrupt 0
- 27 interrupt exit overhead: returns to nested interrupt 0
-
--28 rtems_port_create 13
--28 rtems_port_external_to_internal 3
--28 rtems_port_internal_to_external 3
--28 rtems_port_delete 11
-+28 rtems_port_create 10
-+28 rtems_port_external_to_internal 1
-+28 rtems_port_internal_to_external 1
-+28 rtems_port_delete 8
-
--29 rtems_rate_monotonic_create 13
--29 rtems_rate_monotonic_period: initiate period -- returns to caller 24
--29 rtems_rate_monotonic_period: obtain status 5
--29 rtems_rate_monotonic_cancel 15
-+29 rtems_rate_monotonic_create 12
-+29 rtems_rate_monotonic_period: initiate period -- returns to caller 17
-+29 rtems_rate_monotonic_period: obtain status 3
-+29 rtems_rate_monotonic_cancel 12
- 29 rtems_rate_monotonic_delete: inactive 12
--29 rtems_rate_monotonic_delete: active 7
--29 rtems_rate_monotonic_period: conclude periods -- caller blocks 13
-+29 rtems_rate_monotonic_delete: active 4
-+29 rtems_rate_monotonic_period: conclude periods -- caller blocks 9
-Index: rtems/c/src/lib/libbsp/arm/csb336/console/uart.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/console/uart.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/console/uart.c (working copy)
-@@ -1,262 +1,453 @@
- /*
-- * console driver for MC9328XML UARTs
-+ * Console driver for MC9328XML UARTs.
- *
-- * This driver uses the shared console driver in
-- * ...../libbsp/shared/console.c
-+ * Written Jay Monkman <jtm@lopingdog.com>
-+ * Copyright (c) 2005 by Loping Dog Embedded Systems
- *
-- * If you want the driver to be interrupt driven, you
-- * need to write the ISR, and in the ISR insert the
-- * chars into termios's queue.
-+ * The license and distribution terms for this file may be
-+ * found in the file LICENSE in this distribution or at
-+ * http://www.rtems.com/license
- *
-- * Copyright (c) 2004 Cogent Computer Systems
-- * Written by Jay Monkman <jtm@lopingdog.com>
-- *
-- * The license and distribution terms for this file may be
-- * found in the file LICENSE in this distribution or at
-- *
-- * http://www.OARcorp.com/rtems/license.html.
-- *
-- *
-- * $Id$
--*/
--#include <bsp.h> /* Must be before libio.h */
-+ * $Id:$
-+ */
-+#include <bsp.h>
- #include <rtems/libio.h>
-+#include <libchip/sersupp.h>
-+#include <rtems/error.h>
-+#include <rtems/bspIo.h>
- #include <termios.h>
--#include <rtems/bspIo.h>
--
--/* Put the CPU (or UART) specific header file #include here */
-+#include <irq.h>
- #include <mc9328mxl.h>
--#include <libchip/serial.h>
--#include <libchip/sersupp.h>
-
-+
-+/* Define this to use interrupt driver UART driver */
-+#define USE_INTERRUPTS 1
-+
- /* How many serial ports? */
- #define NUM_DEVS 2
-+#define poll_write(c) imx_uart_poll_write_char(0, c)
-+#define poll_read() imx_uart_poll_read_char(0)
-
--int uart_poll_read(int minor);
-+static int imx_uart_first_open(int, int, void *);
-+static int imx_uart_last_close(int, int, void *);
-+static int imx_uart_poll_read(int);
-+static int imx_uart_set_attrs(int, const struct termios *);
-+static void imx_uart_init(int minor);
-+static void imx_uart_set_baud(int, int);
-+static int imx_uart_poll_write(int, const char *, int);
-
--int dbg_dly;
-+#if defined(USE_INTERRUPTS)
-+static void imx_uart_tx_isr(rtems_irq_hdl_param);
-+static void imx_uart_rx_isr(rtems_irq_hdl_param);
-+static void imx_uart_isr_on(const rtems_irq_connect_data *irq);
-+static void imx_uart_isr_off(const rtems_irq_connect_data *irq);
-+static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq);
-+static int imx_uart_intr_write(int, const char *, int);
-+#endif
-
--/* static function prototypes */
--static int uart_first_open(int major, int minor, void *arg);
--static int uart_last_close(int major, int minor, void *arg);
--static int uart_read(int minor);
--static int uart_write(int minor, const char *buf, int len);
--static void uart_init(int minor);
--static void uart_write_polled(int minor, char c);
--static int uart_set_attributes(int minor, const struct termios *t);
-
--/* These are used by code in console.c */
--unsigned long Console_Port_Count = NUM_DEVS;
--console_data Console_Port_Data[NUM_DEVS];
-
--/* rtems console uses the following minor number */
--rtems_device_minor_number Console_Port_Minor = 0;
--
--/* Pointers to functions for handling the UART. */
--console_fns uart_fns =
--{
-- libchip_serial_default_probe,
-- uart_first_open,
-- uart_last_close,
-- uart_read,
-- uart_write,
-- uart_init,
-- uart_write_polled, /* not used in this driver */
-- uart_set_attributes,
-- FALSE /* TRUE if interrupt driven, FALSE if not. */
-+/* TERMIOS callbacks */
-+#if defined(USE_INTERRUPTS)
-+rtems_termios_callbacks imx_uart_cbacks = {
-+ .firstOpen = imx_uart_first_open,
-+ .lastClose = imx_uart_last_close,
-+ .pollRead = NULL,
-+ .write = imx_uart_intr_write,
-+ .setAttributes = imx_uart_set_attrs,
-+ .stopRemoteTx = NULL,
-+ .startRemoteTx = NULL,
-+ .outputUsesInterrupts = 1,
- };
-+#else
-+rtems_termios_callbacks imx_uart_cbacks = {
-+ .firstOpen = imx_uart_first_open,
-+ .lastClose = imx_uart_last_close,
-+ .pollRead = imx_uart_poll_read,
-+ .write = imx_uart_poll_write,
-+ .setAttributes = imx_uart_set_attrs,
-+ .stopRemoteTx = NULL,
-+ .startRemoteTx = NULL,
-+ .outputUsesInterrupts = 0,
-+};
-+#endif
-
--/*
-- * There's one item in array for each UART.
-- *
-- * Some of these fields are marked "NOT USED". They are not used
-- * by console.c, but may be used by drivers in libchip
-- *
-- */
--console_tbl Console_Port_Tbl[] = {
-- {
-- "/dev/com0", /* sDeviceName */
-- SERIAL_CUSTOM, /* deviceType */
-- &uart_fns, /* pDeviceFns */
-- NULL, /* deviceProbe */
-- NULL, /* pDeviceFlow */
-- 0, /* ulMargin - NOT USED */
-- 0, /* ulHysteresis - NOT USED */
-- NULL, /* pDeviceParams */
-- 0, /* ulCtrlPort1 - NOT USED */
-- 0, /* ulCtrlPort2 - NOT USED */
-- 0, /* ulDataPort - NOT USED */
-- NULL, /* getRegister - NOT USED */
-- NULL, /* setRegister - NOT USED */
-- NULL, /* getData - NOT USED */
-- NULL, /* setData - NOT USED */
-- 0, /* ulClock - NOT USED */
-- 0 /* ulIntVector - NOT USED */
-- },
-- {
-- "/dev/com1", /* sDeviceName */
-- SERIAL_CUSTOM, /* deviceType */
-- &uart_fns, /* pDeviceFns */
-- NULL, /* deviceProbe */
-- NULL, /* pDeviceFlow */
-- 0, /* ulMargin - NOT USED */
-- 0, /* ulHysteresis - NOT USED */
-- NULL, /* pDeviceParams */
-- 0, /* ulCtrlPort1 - NOT USED */
-- 0, /* ulCtrlPort2 - NOT USED */
-- 0, /* ulDataPort - NOT USED */
-- NULL, /* getRegister - NOT USED */
-- NULL, /* setRegister - NOT USED */
-- NULL, /* getData - NOT USED */
-- NULL, /* setData - NOT USED */
-- 0, /* ulClock - NOT USED */
-- 0 /* ulIntVector - NOT USED */
-+#if defined(USE_INTERRUPTS)
-+static rtems_irq_connect_data imx_uart_tx_isr_data[NUM_DEVS];
-+static rtems_irq_connect_data imx_uart_rx_isr_data[NUM_DEVS];
-+#endif
-+
-+typedef struct {
-+ int minor;
-+ mc9328mxl_uart_regs_t * regs;
-+ volatile const char *buf;
-+ volatile int len;
-+ volatile int idx;
-+ void *tty;
-+} imx_uart_data_t;
-+
-+static imx_uart_data_t imx_uart_data[NUM_DEVS];
-+
-+rtems_device_driver console_initialize(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void *arg
-+)
-+{
-+ rtems_status_code status;
-+ int i;
-+
-+ for (i = 0; i < NUM_DEVS; i++) {
-+ imx_uart_init(i);
- }
--};
-
--/*********************************************************************/
--/* Functions called via termios callbacks (i.e. the ones in uart_fns */
--/*********************************************************************/
-+ rtems_termios_initialize();
-
--/*
-- * This is called the first time each device is opened. If the driver
-- * is interrupt driven, you should enable interrupts here. Otherwise,
-- * it's probably safe to do nothing.
-- *
-- * Since micromonitor already set up the UART, we do nothing.
-- */
--static int uart_first_open(int major, int minor, void *arg)
--{
-- return 0;
-+ /* /dev/console and /dev/tty0 are the same */
-+ status = rtems_io_register_name("/dev/console", major, 0);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/console :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+
-+ status = rtems_io_register_name("/dev/tty0", major, 0);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/tty0 :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+
-+ status = rtems_io_register_name("/dev/tty1", major, 1);
-+ if (status != RTEMS_SUCCESSFUL) {
-+ rtems_panic("%s:%d Error registering /dev/tty1 :: %d\n",
-+ __FUNCTION__, __LINE__, status);
-+ }
-+ return RTEMS_SUCCESSFUL;
- }
-
-+rtems_device_driver console_open(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ rtems_status_code rc;
-
--/*
-- * This is called the last time each device is closed. If the driver
-- * is interrupt driven, you should disable interrupts here. Otherwise,
-- * it's probably safe to do nothing.
-- */
--static int uart_last_close(int major, int minor, void *arg)
-+ if (minor > (NUM_DEVS - 1)) {
-+ return RTEMS_INVALID_NUMBER;
-+ }
-+
-+ rc = rtems_termios_open(major, minor, arg, &imx_uart_cbacks);
-+
-+ return rc;
-+}
-+
-+rtems_device_driver console_close(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
- {
-- return 0;
-+ return rtems_termios_close(arg);
- }
-+
-+rtems_device_driver console_read(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_read(arg);
-+}
-+
-+rtems_device_driver console_write(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_write(arg);
-+}
-+
-+rtems_device_driver console_control(
-+ rtems_device_major_number major,
-+ rtems_device_minor_number minor,
-+ void * arg
-+)
-+{
-+ return rtems_termios_ioctl(arg);
-+}
-
--
--/*
-- * Read one character from UART.
-- *
-- * Return -1 if there's no data, otherwise return
-- * the character in lowest 8 bits of returned int.
-- */
--static int uart_read(int minor)
-+static void imx_uart_init(int minor)
- {
-- char c;
-+ imx_uart_data[minor].minor = minor;
-+ imx_uart_data[minor].buf = NULL;
-+ imx_uart_data[minor].len = 0;
-+ imx_uart_data[minor].idx = 0;
-
- if (minor == 0) {
-- if (MC9328MXL_UART1_SR2 & MC9328MXL_UART_SR2_RDR) {
-- c = MC9328MXL_UART1_RXD & MC9328MXL_UART_RXD_CHARMASK;
-- return c;
-- } else {
-- return -1;
-- }
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].name = BSP_INT_UART1_TX;
-+ imx_uart_rx_isr_data[minor].name = BSP_INT_UART1_RX;
-+#endif
-+ imx_uart_data[minor].regs =
-+ (mc9328mxl_uart_regs_t *) MC9328MXL_UART1_BASE;
- } else if (minor == 1) {
-- if (MC9328MXL_UART2_SR2 & MC9328MXL_UART_SR2_RDR) {
-- c = MC9328MXL_UART2_RXD & MC9328MXL_UART_RXD_CHARMASK;
-- return c;
-- } else {
-- return -1;
-- }
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].name = BSP_INT_UART2_TX;
-+ imx_uart_rx_isr_data[minor].name = BSP_INT_UART2_RX;
-+#endif
-+ imx_uart_data[minor].regs =
-+ (mc9328mxl_uart_regs_t *) MC9328MXL_UART2_BASE;
- } else {
-- printk("Unknown console minor number: %d\n", minor);
-- return -1;
-+ rtems_panic("%s:%d Unknown UART minor number %d\n",
-+ __FUNCTION__, __LINE__, minor);
- }
-
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].hdl = imx_uart_tx_isr;
-+ imx_uart_tx_isr_data[minor].handle = &imx_uart_data[minor];
-+ imx_uart_tx_isr_data[minor].on = imx_uart_isr_on;
-+ imx_uart_tx_isr_data[minor].off = imx_uart_isr_off;
-+ imx_uart_tx_isr_data[minor].isOn = imx_uart_isr_is_on;
-+
-+ imx_uart_rx_isr_data[minor].hdl = imx_uart_rx_isr;
-+ imx_uart_rx_isr_data[minor].handle = &imx_uart_data[minor];
-+ imx_uart_rx_isr_data[minor].on = imx_uart_isr_on;
-+ imx_uart_rx_isr_data[minor].off = imx_uart_isr_off;
-+ imx_uart_rx_isr_data[minor].isOn = imx_uart_isr_is_on;
-+#endif
-+
-+ imx_uart_data[minor].regs->cr1 = (
-+ MC9328MXL_UART_CR1_UARTCLKEN |
-+ MC9328MXL_UART_CR1_UARTEN);
-+
-+ imx_uart_data[minor].regs->cr2 = (
-+ MC9328MXL_UART_CR2_IRTS |
-+ MC9328MXL_UART_CR2_WS |
-+ MC9328MXL_UART_CR2_TXEN |
-+ MC9328MXL_UART_CR2_RXEN |
-+ MC9328MXL_UART_CR2_SRST);
-+
-+ imx_uart_data[minor].regs->cr3 = 0;
-+
-+ imx_uart_data[minor].regs->cr4 = 0;
-+
-+ imx_uart_data[minor].regs->fcr = (
-+ MC9328MXL_UART_FCR_TXTL(32) |
-+ MC9328MXL_UART_FCR_RFDIV_1 |
-+ MC9328MXL_UART_FCR_RXTL(1));
-+
-+ imx_uart_set_baud(minor, 38400);
-+
- }
-
-+static int imx_uart_first_open(int major, int minor, void *arg)
-+{
-+ rtems_libio_open_close_args_t *args = arg;
-
--/*
-- * Write buffer to UART
-- *
-- * return 1 on success, -1 on error
-- */
--static int uart_write(int minor, const char *buf, int len)
-+ imx_uart_data[minor].tty = args->iop->data1;
-+
-+#if defined(USE_INTERRUPTS)
-+ BSP_install_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);
-+ BSP_install_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);
-+
-+ imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_RRDYEN;
-+#endif
-+
-+ return 0;
-+}
-+
-+static int imx_uart_last_close(int major, int minor, void *arg)
- {
-- int i;
-+#if defined(USE_INTERRUPTS)
-+ BSP_remove_rtems_irq_handler(&imx_uart_tx_isr_data[minor]);
-+ BSP_remove_rtems_irq_handler(&imx_uart_rx_isr_data[minor]);
-+#endif
-
-- if (minor == 0) {
-- for (i = 0; i < len; i++) {
-- /* Wait for fifo to have room */
-- while(!(MC9328MXL_UART1_SR2 & MC9328MXL_UART_SR2_TXDC)) {
-- continue;
-- }
--
-- MC9328MXL_UART1_TXD = (char) buf[i];
-- }
-- } else if (minor == 1) {
-- for (i = 0; i < len; i++) {
-- /* Wait for fifo to have room */
-- while(!(MC9328MXL_UART2_SR2 & MC9328MXL_UART_SR2_TXDC)) {
-- continue;
-- }
--
-- MC9328MXL_UART2_TXD = (char) buf[i];
-- }
-+ return 0;
-+}
-+
-+static int imx_uart_poll_read(int minor)
-+{
-+ if (imx_uart_data[minor].regs->sr2 & MC9328MXL_UART_SR2_RDR) {
-+ return imx_uart_data[minor].regs->rxd & 0xff;
- } else {
-- printk("Unknown console minor number: %d\n", minor);
- return -1;
- }
--
-- return 1;
- }
-
-
--/* Set up the UART. */
--static void uart_init(int minor)
-+static int imx_uart_poll_write(int minor, const char *buf, int len)
- {
-- /* leave the debug sio port as setup by umon */
-+ int i;
-+ for (i = 0; i < len; i++) {
-+ /* Wait for there to be room in the fifo */
-+ while (!(imx_uart_data[minor].regs->sr2 & MC9328MXL_UART_SR2_TXDC)) {
-+ continue;
-+ }
-+
-+ imx_uart_data[minor].regs->txd = buf[i];
-+ }
-+ return 1;
-+
- }
-
--/* I'm not sure this is needed for the shared console driver. */
--static void uart_write_polled(int minor, char c)
-+#if defined(USE_INTERRUPTS)
-+static int imx_uart_intr_write(int minor, const char *buf, int len)
- {
-- uart_write(minor, &c, 1);
-+ imx_uart_data[minor].buf = buf;
-+ imx_uart_data[minor].len = len;
-+ imx_uart_data[minor].idx = 0;
-+
-+ imx_uart_data[minor].regs->cr1 |= MC9328MXL_UART_CR1_TXMPTYEN;
-+
-+ return 1;
- }
-+#endif
-
-+
- /* This is for setting baud rate, bits, etc. */
--static int uart_set_attributes(int minor, const struct termios *t)
-+static int imx_uart_set_attrs(int minor, const struct termios *t)
- {
-+ int baud;
-+
-+ baud = termios_baud_to_number(t->c_cflag & CBAUD);
-+ imx_uart_set_baud(minor, baud);
-+
- return 0;
- }
-
--/***********************************************************************/
-+#if defined(USE_INTERRUPTS)
-+static void imx_uart_isr_on(const rtems_irq_connect_data *irq)
-+{
-+ MC9328MXL_AITC_INTENNUM = irq->name;
-+}
-+static void imx_uart_isr_off(const rtems_irq_connect_data *irq)
-+{
-+ MC9328MXL_AITC_INTDISNUM = irq->name;
-+}
-+static int imx_uart_isr_is_on(const rtems_irq_connect_data *irq)
-+{
-+ int irq_num = (int)irq->name;
-+ if (irq_num < 32) {
-+ return MC9328MXL_AITC_INTENABLEL & (1 << irq_num);
-+ } else {
-+ return MC9328MXL_AITC_INTENABLEH & (1 << (irq_num - 32));
-+ }
-+}
-+
-+static void imx_uart_rx_isr(rtems_irq_hdl_param param)
-+{
-+ imx_uart_data_t *uart_data = param;
-+ char buf[32];
-+ int i=0;
-+
-+ while (uart_data->regs->sr2 & MC9328MXL_UART_SR2_RDR) {
-+ buf[i] = uart_data->regs->rxd & 0xff;
-+ i++;
-+ }
-+
-+ rtems_termios_enqueue_raw_characters(uart_data->tty, buf, i);
-+}
-+
-+static void imx_uart_tx_isr(rtems_irq_hdl_param param)
-+{
-+ imx_uart_data_t *uart_data = param;
-+ int len;
-+ int minor = uart_data->minor;
-+
-+
-+ if (uart_data->idx < uart_data->len) {
-+ while ( (uart_data->regs->sr1 & MC9328MXL_UART_SR1_TRDY) &&
-+ (uart_data->idx < uart_data->len)) {
-+ uart_data->regs->txd = uart_data->buf[uart_data->idx];
-+ uart_data->idx++;
-+ }
-+ } else {
-+ len = uart_data->len;
-+ uart_data->len = 0;
-+ imx_uart_data[minor].regs->cr1 &= ~MC9328MXL_UART_CR1_TXMPTYEN;
-+ rtems_termios_dequeue_characters(uart_data->tty, len);
-+ }
-+}
-+#endif
-+
- /*
-- * The following functions are not used by TERMIOS, but other RTEMS
-- * functions use them instead.
-+ * Set the UART's baud rate. The calculation is:
-+ * (baud * 16) / ref_freq = num/demom
-+ *
-+ * ref_freq = perclk1 / RFDIV[2:0]
-+ * BIR = num - 1
-+ * BMR = demom - 1
-+ *
-+ * Setting 'num' to 16 yields this equation:
-+ * demom = ref_freq / baud
- */
--/***********************************************************************/
-+static void imx_uart_set_baud(int minor, int baud)
-+{
-+ unsigned int perclk1;
-+ unsigned int denom;
-+ unsigned int ref_freq = 0;
-+ uint32_t fcr;
-+
-+ perclk1 = get_perclk1_freq();
-+ fcr = imx_uart_data[minor].regs->fcr;
-+
-+ switch(fcr & MC9328MXL_UART_FCR_RFDIV_MASK) {
-+ case MC9328MXL_UART_FCR_RFDIV_1: ref_freq = perclk1/1; break;
-+ case MC9328MXL_UART_FCR_RFDIV_2: ref_freq = perclk1/2; break;
-+ case MC9328MXL_UART_FCR_RFDIV_3: ref_freq = perclk1/3; break;
-+ case MC9328MXL_UART_FCR_RFDIV_4: ref_freq = perclk1/4; break;
-+ case MC9328MXL_UART_FCR_RFDIV_5: ref_freq = perclk1/5; break;
-+ case MC9328MXL_UART_FCR_RFDIV_6: ref_freq = perclk1/6; break;
-+ case MC9328MXL_UART_FCR_RFDIV_7: ref_freq = perclk1/7; break;
-+ default:
-+ rtems_panic("%s:%d Unknown RFDIV: 0x%x",
-+ __FUNCTION__, __LINE__,
-+ fcr & MC9328MXL_UART_FCR_RFDIV_MASK);
-+ break;
-+ }
-+
-+ denom = ref_freq / baud;
-+
-+ imx_uart_data[minor].regs->bir = 0xf;
-+ imx_uart_data[minor].regs->bmr = denom;
-+}
-+
-+
- /*
-- * Read from UART. This is used in the exit code, and can't
-- * rely on interrupts.
--*/
--int uart_poll_read(int minor)
-+ * Polled, non-blocking read from UART
-+ */
-+int imx_uart_poll_read_char(int minor)
- {
-- return uart_read(minor);
-+ return imx_uart_poll_read(minor);
- }
-
-+/*
-+ * Polled, blocking write from UART
-+ */
-+void imx_uart_poll_write_char(int minor, char c)
-+{
-+ imx_uart_poll_write(minor, &c, 1);
-+}
-
- /*
-- * Write a character to the console. This is used by printk() and
-- * maybe other low level functions. It should not use interrupts or any
-- * RTEMS system calls. It needs to be very simple
-+ * Functions for printk() and friends.
- */
--static void _BSP_put_char( char c ) {
-- uart_write_polled(0, c);
-+void _BSP_output_char(char c)
-+{
-+ poll_write(c);
- if (c == '\n') {
-- uart_write_polled(0, '\r');
-+ poll_write('\r');
- }
- }
-+BSP_output_char_function_type BSP_output_char = _BSP_output_char;
-
--BSP_output_char_function_type BSP_output_char = _BSP_put_char;
-
-+char _BSP_poll_char()
-+{
-+ return poll_read();
-+}
-+BSP_polling_getchar_function_type BSP_poll_char = _BSP_poll_char;
-
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c (working copy)
-@@ -86,9 +86,25 @@
- /* Since RTEMS is not configured, no RTEMS functions can be called. */
- /* */
- /**************************************************************************/
-+void mmu_set_cpu_async_mode(void);
- void bsp_start_default( void )
- {
-+ int i;
-
-+ /* Set the MCU prescaler to divide by 1 */
-+ MC9328MXL_PLL_CSCR &= ~MC9328MXL_PLL_CSCR_PRESC;
-+
-+ /* Enable the MCU PLL */
-+ MC9328MXL_PLL_CSCR |= MC9328MXL_PLL_CSCR_MPEN;
-+
-+ /* Delay to allow time for PLL to get going */
-+ for (i = 0; i < 100; i++) {
-+ asm volatile ("nop\n");
-+ }
-+
-+ /* Set the CPU to asynchrous clock mode, so it uses its fastest clock */
-+ mmu_set_cpu_async_mode();
-+
- /* disable interrupts */
- MC9328MXL_AITC_INTENABLEL = 0;
- MC9328MXL_AITC_INTENABLEH = 0;
-@@ -153,12 +169,12 @@
- /* Calcuate the frequency for perclk1 */
- int get_perclk1_freq(void)
- {
-- int fin;
-- int fpll;
-- int pd;
-- int mfd;
-- int mfi;
-- int mfn;
-+ unsigned int fin;
-+ unsigned int fpll;
-+ unsigned int pd;
-+ unsigned int mfd;
-+ unsigned int mfi;
-+ unsigned int mfn;
- uint32_t reg;
- int perclk1;
-
-@@ -187,13 +203,14 @@
- printk("mfd = %d\n", mfd);
- printk("mfi = %d\n", mfi);
- printk("mfn = %d\n", mfn);
-- printk("(fin * mfi) / (pd + 1) = %d\n", (fin * mfi) / (pd + 1));
-- printk("(fin * mfn) / ((pd + 1) * (mfd + 1)) = %d\n",
-- (fin * mfn) / ((pd + 1) * (mfd + 1)));
-+ printk("rounded (fin * mfi) / (pd + 1) = %d\n", (fin * mfi) / (pd + 1));
-+ printk("rounded (fin * mfn) / ((pd + 1) * (mfd + 1)) = %d\n",
-+ ((long long)fin * mfn) / ((pd + 1) * (mfd + 1)));
- #endif
-
-- fpll = 2 * ( ((fin * mfi) / (pd + 1)) +
-- ((fin * mfn) / ((pd + 1) * (mfd + 1))) );
-+ fpll = 2 * ( ((fin * mfi + (pd + 1) / 2) / (pd + 1)) +
-+ (((long long)fin * mfn + ((pd + 1) * (mfd + 1)) / 2) /
-+ ((pd + 1) * (mfd + 1))) );
-
- /* calculate the output of the PERCLK1 divider */
- reg = MC9328MXL_PLL_PCDR;
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/linkcmds (working copy)
-@@ -75,9 +75,6 @@
- rtems_vector_table = .;
- . += (8 * 4); /* 8 ARM interrupts */
-
-- bsp_vector_table = .;
-- . += (64 * 4); /* 64 MC9328MXL interrupts */
--
- . = ALIGN (0x100);
-
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/exit.c (working copy)
-@@ -29,7 +29,7 @@
- */
- printk("\n");
- printk(line);
-- while (uart_poll_read(0) < 0) continue;
-+ while (BSP_poll_char() < 0) continue;
-
- bsp_reset();
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/Makefile.am
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/Makefile.am (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/Makefile.am (working copy)
-@@ -35,7 +35,7 @@
- startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
- noinst_PROGRAMS += console.rel
--console_rel_SOURCES = console/uart.c ../../shared/console.c
-+console_rel_SOURCES = console/uart.c
- console_rel_CPPFLAGS = $(AM_CPPFLAGS)
- console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/network/network.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/csb336/network/network.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/csb336/network/network.c (working copy)
-@@ -41,20 +41,20 @@
- /* RTEMS event used to start transmit daemon. */
- #define START_TRANSMIT_EVENT RTEMS_EVENT_2
-
--static rtems_isr enet_isr(rtems_vector_number vector);
-+static void enet_isr(rtems_irq_hdl_param);
- static void enet_isr_on(const rtems_irq_connect_data *unused);
- static void enet_isr_off(const rtems_irq_connect_data *unused);
- static int enet_isr_is_on(const rtems_irq_connect_data *irq);
-
- /* Replace the first value with the clock's interrupt name. */
--rtems_irq_connect_data mc9328mxl_enet_isr_data = {BSP_INT_GPIO_PORTA,
-- (rtems_irq_hdl)enet_isr,
-- enet_isr_on,
-- enet_isr_off,
-- enet_isr_is_on,
-- 3, /* unused for ARM */
-- 0 }; /* unused for ARM */
--
-+rtems_irq_connect_data mc9328mxl_enet_isr_data = {
-+ .name = BSP_INT_GPIO_PORTA,
-+ .hdl = (rtems_irq_hdl)enet_isr,
-+ .handle = (void *)BSP_INT_GPIO_PORTA,
-+ .on = enet_isr_on,
-+ .off = enet_isr_off,
-+ .isOn = enet_isr_is_on,
-+};
- typedef struct {
- unsigned long rx_packets; /* total packets received */
- unsigned long tx_packets; /* total packets transmitted */
-@@ -102,7 +102,8 @@
- void mc9328mxl_enet_sendpacket (struct ifnet *ifp, struct mbuf *m);
- void mc9328mxl_enet_rx_task(void *arg);
- void mc9328mxl_enet_stats(mc9328mxl_enet_softc_t *sc);
--static int mc9328mxl_enet_ioctl(struct ifnet *ifp, int command, caddr_t data);
-+static int mc9328mxl_enet_ioctl(struct ifnet *ifp,
-+ unsigned long command, caddr_t data);
-
-
- int rtems_mc9328mxl_enet_attach (
-@@ -631,7 +632,7 @@
-
- /* Driver ioctl handler */
- static int
--mc9328mxl_enet_ioctl (struct ifnet *ifp, int command, caddr_t data)
-+mc9328mxl_enet_ioctl (struct ifnet *ifp, unsigned long command, caddr_t data)
- {
- mc9328mxl_enet_softc_t *sc = ifp->if_softc;
- int error = 0;
-@@ -678,7 +679,7 @@
- }
-
- /* interrupt handler */
--rtems_isr enet_isr (rtems_vector_number v)
-+static void enet_isr(rtems_irq_hdl_param unused)
- {
- uint16_t int_reg;
-
-Index: rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/shared/irq/irq_init.c (working copy)
-@@ -30,21 +30,14 @@
- void rtems_irq_mngt_init()
- {
- int i;
-- long *vectorTable;
- rtems_interrupt_level level;
-
-- vectorTable = (long *) VECTOR_TABLE;
--
- _CPU_ISR_Disable(level);
-
- /* First, connect the ISR_Handler for IRQ and FIQ interrupts */
- _CPU_ISR_install_vector(ARM_EXCEPTION_IRQ, _ISR_Handler, NULL);
- _CPU_ISR_install_vector(ARM_EXCEPTION_FIQ, _ISR_Handler, NULL);
-
-- /* Initialize the vector table contents with default handler */
-- for (i=0; i<BSP_MAX_INT; i++)
-- *(vectorTable + i) = (long)(default_int_handler);
--
- /* Initialize the INT at the BSP level */
- BSP_rtems_irq_mngt_init();
- }
-Index: rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/edb7312/irq/bsp_irq_init.c (working copy)
-@@ -22,7 +22,16 @@
- void BSP_rtems_irq_mngt_init()
- {
- long int_stat;
-+ long *vectorTable;
-+ int i;
-
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* mask all interrupts */
- *EP7312_INTMR1 = 0x0;
- *EP7312_INTMR2 = 0x0;
-Index: rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libbsp/arm/gba/irq/bsp_irq_init.c (working copy)
-@@ -29,6 +29,16 @@
- */
- void BSP_rtems_irq_mngt_init(void)
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* clear all interrupt status flags */
- GBA_REG_IF = 0xffff;
- /* disable all interrupts */
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h (working copy)
-@@ -131,6 +131,33 @@
- #define MC9328MXL_UART2_MPR4 (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xcc)))
- #define MC9328MXL_UART2_TS (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xd0)))
-
-+typedef struct {
-+ volatile uint32_t rxd;
-+ volatile uint32_t _res0[15];
-+ volatile uint32_t txd;
-+ volatile uint32_t _res1[15];
-+ volatile uint32_t cr1;
-+ volatile uint32_t cr2;
-+ volatile uint32_t cr3;
-+ volatile uint32_t cr4;
-+ volatile uint32_t fcr;
-+ volatile uint32_t sr1;
-+ volatile uint32_t sr2;
-+ volatile uint32_t esc;
-+ volatile uint32_t tim;
-+ volatile uint32_t bir;
-+ volatile uint32_t bmr;
-+ volatile uint32_t brc;
-+ volatile uint32_t ipr1;
-+ volatile uint32_t ipr2;
-+ volatile uint32_t ipr3;
-+ volatile uint32_t ipr4;
-+ volatile uint32_t mpr1;
-+ volatile uint32_t mpr2;
-+ volatile uint32_t mpr3;
-+ volatile uint32_t mpr4;
-+ volatile uint32_t ts;
-+} mc9328mxl_uart_regs_t;
-
- #define MC9328MXL_UART_RXD_CHARRDY (bit(15))
- #define MC9328MXL_UART_RXD_ERR (bit(14))
-@@ -205,6 +232,17 @@
- #define MC9328MXL_UART_CR4_OREN (bit(1))
- #define MC9328MXL_UART_CR4_DREN (bit(0))
-
-+#define MC9328MXL_UART_FCR_TXTL(x) (((x) & 0x3f) << 10)
-+#define MC9328MXL_UART_FCR_RFDIV_1 (5 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_2 (4 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_3 (3 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_4 (2 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_5 (1 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_6 (0 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_7 (6 << 7)
-+#define MC9328MXL_UART_FCR_RFDIV_MASK (7 << 7)
-+#define MC9328MXL_UART_FCR_RXTL(x) (((x) & 0x3f) << 0)
-+
- #define MC9328MXL_UART_SR1_PARERR (bit(15))
- #define MC9328MXL_UART_SR1_RTSS (bit(14))
- #define MC9328MXL_UART_SR1_TRDY (bit(13))
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c (working copy)
-@@ -28,13 +28,14 @@
- static int clock_isr_is_on(const rtems_irq_connect_data *irq);
-
- /* Replace the first value with the clock's interrupt name. */
--rtems_irq_connect_data clock_isr_data = {BSP_INT_TIMER1,
-- (rtems_irq_hdl)Clock_isr,
-- clock_isr_on,
-- clock_isr_off,
-- clock_isr_is_on,
-- 3, /* unused for ARM cpus */
-- 0 }; /* unused for ARM cpus */
-+rtems_irq_connect_data clock_isr_data = {
-+ .name = BSP_INT_TIMER1,
-+ .hdl = (rtems_irq_hdl)Clock_isr,
-+ .handle = (void *)BSP_INT_TIMER1,
-+ .on = clock_isr_on,
-+ .off = clock_isr_off,
-+ .isOn = clock_isr_is_on,
-+};
-
- /* If you follow the code, this is never used, so any value
- * should work
-@@ -82,7 +83,7 @@
- int cnt; \
- freq = get_perclk1_freq(); \
- printk("perclk1 freq is %d\n", freq); \
-- cnt = ((freq / 1000) * BSP_Configuration.microseconds_per_tick) / 1000;\
-+ cnt = ((long long)freq * BSP_Configuration.microseconds_per_tick + 500000) / 1000000;\
- printk("cnt freq is %d\n", cnt); \
- MC9328MXL_TMR1_TCMP = cnt; \
- /* use PERCLK1 as input, enable timer */ \
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S (working copy)
-@@ -31,13 +31,15 @@
-
- /* find the ISR's address based on the vector */
- ldr r0, =bsp_vector_table
-- ldr r0, [r0, r1, LSL #2] /* Read the address */
-+ mov r1, r1, LSL #3 /* Shift vector to get offset into table */
-+ add r1, r0, r1 /* r1 has address of vector entry */
-+ ldr r0, [r1, #4] /* Get the data pointer */
-+ ldr r1, [r1] /* Get the vector */
-
--
- stmdb sp!,{lr}
- ldr lr, =IRQ_return /* prepare the return from handler */
-
-- mov pc, r0 /* EXECUTE INT HANDLER */
-+ mov pc, r1 /* EXECUTE INT HANDLER */
-
- IRQ_return:
- ldmia sp!,{lr}
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h (working copy)
-@@ -15,6 +15,8 @@
- #ifndef __IRQ_H__
- #define __IRQ_H__
-
-+#include <rtems/irq.h>
-+
- #ifdef __cplusplus
- extern "C" {
- #endif
-@@ -34,7 +36,7 @@
- * Constants
- **********************************************************************/
-
--/* possible interrupt sources on the AT91RM9200 */
-+/* possible interrupt sources on the MC9328MXL */
- #define BSP_INT_UART3_PFERR 0
- #define BSP_INT_UART3_RTS 1
- #define BSP_INT_UART3_DTR 2
-@@ -101,64 +103,21 @@
- #define BSP_INT_WDT 63
- #define BSP_MAX_INT 64
-
--typedef unsigned char rtems_irq_level;
--typedef unsigned char rtems_irq_trigger;
-+typedef struct {
-+ rtems_irq_hdl vector;
-+ rtems_irq_hdl_param data;
-+} mc9328mxl_irq_info_t;
-
--typedef unsigned int rtems_irq_number;
--struct __rtems_irq_connect_data__; /* forward declaratiuon */
-
--typedef void (*rtems_irq_hdl) (void);
--typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*);
--typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*);
--typedef int (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
-
--extern rtems_irq_hdl bsp_vector_table[BSP_MAX_INT];
--#define VECTOR_TABLE bsp_vector_table
--
--typedef struct __rtems_irq_connect_data__ {
-- /* IRQ line */
-- rtems_irq_number name;
-+extern mc9328mxl_irq_info_t bsp_vector_table[BSP_MAX_INT];
-
-- /* Handler */
-- rtems_irq_hdl hdl;
--
-- /* function for enabling interrupts at device level. */
-- rtems_irq_enable on;
--
-- /* function for disabling interrupts at device level. */
-- rtems_irq_disable off;
--
-- /* Function to test if interrupt is enabled */
-- rtems_irq_is_enabled isOn;
--
-- /* priority level of interrupt */
-- rtems_irq_level irqLevel;
--
-- /* Trigger method (rising/falling edge or high/low level) */
-- rtems_irq_trigger irqTrigger;
--} rtems_irq_connect_data;
--
- /*
- * function to initialize the interrupt for a specific BSP
- */
- void BSP_rtems_irq_mngt_init();
-
-
--/*
-- * function to connect a particular irq handler.
-- */
--int BSP_install_rtems_irq_handler (const rtems_irq_connect_data*);
--
--/*
-- * function to get the current RTEMS irq handler for ptr->name.
-- */
--int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* ptr);
--
--/*
-- * function to disconnect the RTEMS irq handler for ptr->name.
-- */
--int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data*);
--
- #endif /* __asm__ */
-
- #ifdef __cplusplus
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c (working copy)
-@@ -23,10 +23,11 @@
- */
- void BSP_rtems_irq_mngt_init()
- {
--#if 0
-- /* disable all interrupts */
-- AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
--#endif
-+ int i;
-
-+ for (i = 0; i < BSP_MAX_INT; i++) {
-+ bsp_vector_table[i].vector = default_int_handler;
-+ bsp_vector_table[i].data = NULL;
-+ }
- }
-
-Index: rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c (working copy)
-@@ -16,6 +16,8 @@
- #include <rtems/score/apiext.h>
- #include <mc9328mxl.h>
-
-+mc9328mxl_irq_info_t bsp_vector_table[BSP_MAX_INT];
-+
- /*
- * This function check that the value given for the irq line
- * is valid.
-@@ -36,9 +38,6 @@
- int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
- {
- rtems_interrupt_level level;
-- rtems_irq_hdl *bsp_tbl;
--
-- bsp_tbl = (rtems_irq_hdl *)&bsp_vector_table;
-
- if (!isValidInterrupt(irq->name)) {
- return 0;
-@@ -47,8 +46,8 @@
- /*
- * Check if default handler is actually connected. If not issue an error.
- */
-- if (bsp_tbl[irq->name] != default_int_handler) {
-- return 0;
-+ if (bsp_vector_table[irq->name].vector != default_int_handler) {
-+ return 0;
- }
-
- _CPU_ISR_Disable(level);
-@@ -56,7 +55,8 @@
- /*
- * store the new handler
- */
-- bsp_tbl[irq->name] = irq->hdl;
-+ bsp_vector_table[irq->name].vector = irq->hdl;
-+ bsp_vector_table[irq->name].data = irq->handle;
-
- /*
- * Enable interrupt on device
-@@ -80,18 +80,15 @@
- int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
- {
- rtems_interrupt_level level;
-- rtems_irq_hdl *bsp_tbl;
-
-- bsp_tbl = (rtems_irq_hdl *)&bsp_vector_table;
--
- if (!isValidInterrupt(irq->name)) {
- return 0;
- }
- /*
- * Check if the handler is actually connected. If not issue an error.
- */
-- if (bsp_tbl[irq->name] != irq->hdl) {
-- return 0;
-+ if (bsp_vector_table[irq->name].vector != irq->hdl) {
-+ return 0;
- }
-
- _CPU_ISR_Disable(level);
-@@ -106,8 +103,8 @@
- /*
- * restore the default irq value
- */
-- bsp_tbl[irq->name] = default_int_handler;
--
-+ bsp_vector_table[irq->name].vector = default_int_handler;
-+ bsp_vector_table[irq->name].data = NULL;
-
- _CPU_ISR_Enable(level);
-
-Index: rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/shared/arm920/mmu.c (working copy)
-@@ -151,7 +151,7 @@
- static inline uint32_t mmu_get_ctrl(void)
- {
- uint32_t val;
-- asm volatile ("msr 15, 0, %0, cr1, cr0\n" : "=r" (val));
-+ asm volatile ("mrc 15, 0, %0, cr1, cr0\n" : "=r" (val));
- return val;
- }
-
-@@ -240,3 +240,13 @@
- base[i] = MMU_SET_LVL1_INVAL;
- }
- }
-+
-+
-+void mmu_set_cpu_async_mode(void)
-+{
-+ uint32_t reg;
-+ reg = mmu_get_ctrl();
-+ reg |= 0xc0000000;
-+ mmu_set_ctrl(reg);
-+}
-+
-Index: rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/at91rm9200/irq/bsp_irq_init.c (working copy)
-@@ -23,6 +23,16 @@
- */
- void BSP_rtems_irq_mngt_init()
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /* disable all interrupts */
- AIC_CTL_REG(AIC_IDCR) = 0xffffffff;
- }
-Index: rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c
-===================================================================
---- rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c (revision 42)
-+++ rtems/c/src/lib/libcpu/arm/s3c2400/irq/bsp_irq_init.c (working copy)
-@@ -20,6 +20,16 @@
-
- void BSP_rtems_irq_mngt_init()
- {
-+ long *vectorTable;
-+ int i;
-+
-+ vectorTable = (long *) VECTOR_TABLE;
-+
-+ /* Initialize the vector table contents with default handler */
-+ for (i=0; i<BSP_MAX_INT; i++) {
-+ *(vectorTable + i) = (long)(default_int_handler);
-+ }
-+
- /*
- * Here is the code to initialize the INT for
- * the specified BSP
-Index: rtems/make/custom/csb336.cfg
-===================================================================
---- rtems/make/custom/csb336.cfg (revision 42)
-+++ rtems/make/custom/csb336.cfg (working copy)
-@@ -22,12 +22,12 @@
- # -O4 is ok for RTEMS
- # NOTE2: some level of -O may be actually required by inline assembler (at least
- # -O2 so far.
--CFLAGS_OPTIMIZE_V=-O3
-+CFLAGS_OPTIMIZE_V=-O3 -g
- #CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
-
- # debug flags: typically none, but at least -O1 is required due to this
- # BSP using inlined code
--CFLAGS_DEBUG_V = -O1
-+CFLAGS_DEBUG_V = -O1 -g
- #CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
-
-
+++ /dev/null
----
- c/src/lib/libbsp/powerpc/acinclude.m4 | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/acinclude.m4
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/acinclude.m4 2008-09-08 18:16:09.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/acinclude.m4 2009-11-29 01:44:17.840570005 +0100
-@@ -2,6 +2,8 @@
- AC_DEFUN([RTEMS_CHECK_BSPDIR],
- [
- case "$1" in
-+ ec555 )
-+ AC_CONFIG_SUBDIRS([ec555]);;
- ep1a )
- AC_CONFIG_SUBDIRS([ep1a]);;
- gen5200 )
+++ /dev/null
----
- c/src/lib/libbsp/m68k/mcf5235/start/start.S | 1
- c/src/lib/libbsp/m68k/mcf5235/startup/init5235.c | 75 ++++++++++++-----------
- 2 files changed, 42 insertions(+), 34 deletions(-)
-
-Index: rtems-4.6.99.3/c/src/lib/libbsp/m68k/mcf5235/start/start.S
-===================================================================
---- rtems-4.6.99.3.orig/c/src/lib/libbsp/m68k/mcf5235/start/start.S 2006-12-07 16:00:00.000000000 +0100
-+++ rtems-4.6.99.3/c/src/lib/libbsp/m68k/mcf5235/start/start.S 2006-12-07 16:09:00.000000000 +0100
-@@ -315,6 +315,7 @@
- move.l #0x01000000,d0 | Set system frequency to 150 MHz
- move.l d0, (0x40120000)
- move.w #0x2700,sr | Disable interrupts
-+ move.l #INITIAL_STACK,sp
-
- move.l #__SRAMBASE+1,d0 | Enable the MCF5235 internal SRAM
- movec d0,%rambar | ...so we have a stack
-Index: rtems-4.6.99.3/c/src/lib/libbsp/m68k/mcf5235/startup/init5235.c
-===================================================================
---- rtems-4.6.99.3.orig/c/src/lib/libbsp/m68k/mcf5235/startup/init5235.c 2006-12-07 16:03:50.000000000 +0100
-+++ rtems-4.6.99.3/c/src/lib/libbsp/m68k/mcf5235/startup/init5235.c 2006-12-07 16:21:37.000000000 +0100
-@@ -24,41 +24,48 @@
- MCF5235_GPIO_UART=0x3FFF;
- MCF5235_GPIO_PAR_AD=0xE1;
-
-- //Setup the Chip Selects so CS0 is flash
-- MCF5235_CS_CSAR0 =(0xFFE00000 & 0xffff0000)>>16;
-- MCF5235_CS_CSMR0 = 0x001f0001;
-- MCF5235_CS_CSCR0 = 0x1980;
--
-- //Setup the SDRAM
-- for(x=0; x<20000; x++)
-- {
-- temp +=1;
-- }
-- MCF5235_SDRAMC_DCR = 0x042E;
-- MCF5235_SDRAMC_DACR0 = 0x00001300;
-- MCF5235_SDRAMC_DMR0 = (0x00FC0000) | (0x00000001);
-- for(x=0; x<20000; x++)
-- {
-- temp +=1;
-- }
-- // set ip ( bit 3 ) in dacr
-- MCF5235_SDRAMC_DACR0 |= (0x00000008) ;
-- // init precharge
-- *((unsigned long *)MM_SDRAM_BASE) = 0xDEADBEEF;
-- // set RE in dacr
-- MCF5235_SDRAMC_DACR0 |= (0x00008000);
-- // wait
-- for(x=0; x<20000; x++)
-- {
-- temp +=1;
-- }
-- // issue IMRS
-- MCF5235_SDRAMC_DACR0 |= (0x00000040);
-- *((short *)MM_SDRAM_BASE) = 0;
-- for(x=0; x<60000; x++)
-- {
-- temp +=1;
-+ /* Find actual execution address */
-+ asm ("\tlea.l @pc,%0\n\t" : "=r" (temp) );
-+
-+ /* Initialization of SDRAM leads to disaster if code runs from it */
-+ if ((temp ^ MM_SDRAM_BASE) & ~0x000fffff) {
-+ //Setup the Chip Selects so CS0 is flash
-+ MCF5235_CS_CSAR0 =(0xFFE00000 & 0xffff0000)>>16;
-+ MCF5235_CS_CSMR0 = 0x001f0001;
-+ MCF5235_CS_CSCR0 = 0x1980;
-+
-+ //Setup the SDRAM
-+ for(x=0; x<20000; x++)
-+ {
-+ temp +=1;
-+ }
-+ MCF5235_SDRAMC_DCR = 0x042E;
-+ MCF5235_SDRAMC_DACR0 = 0x00001300;
-+ MCF5235_SDRAMC_DMR0 = (0x00FC0000) | (0x00000001);
-+ for(x=0; x<20000; x++)
-+ {
-+ temp +=1;
-+ }
-+ // set ip ( bit 3 ) in dacr
-+ MCF5235_SDRAMC_DACR0 |= (0x00000008) ;
-+ // init precharge
-+ *((unsigned long *)MM_SDRAM_BASE) = 0xDEADBEEF;
-+ // set RE in dacr
-+ MCF5235_SDRAMC_DACR0 |= (0x00008000);
-+ // wait
-+ for(x=0; x<20000; x++)
-+ {
-+ temp +=1;
-+ }
-+ // issue IMRS
-+ MCF5235_SDRAMC_DACR0 |= (0x00000040);
-+ *((short *)MM_SDRAM_BASE) = 0;
-+ for(x=0; x<60000; x++)
-+ {
-+ temp +=1;
-+ }
- }
-+
- *((unsigned long*)MM_SDRAM_BASE)=0x12345678;
-
- /* Copy the interrupt vector table to address 0x0 in SDRAM */
+++ /dev/null
----
- c/src/lib/libbsp/arm/csb336/console/uart.c | 2 +-
- cpukit/libcsupport/src/termios.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/console/uart.c
-===================================================================
---- rtems.orig/c/src/lib/libbsp/arm/csb336/console/uart.c 2009-11-29 01:10:27.148556296 +0100
-+++ rtems/c/src/lib/libbsp/arm/csb336/console/uart.c 2009-11-29 01:11:05.632590072 +0100
-@@ -238,7 +238,7 @@
- MC9328MXL_UART_FCR_RFDIV_1 |
- MC9328MXL_UART_FCR_RXTL(1));
-
-- imx_uart_set_baud(minor, 38400);
-+ imx_uart_set_baud(minor, 19200);
-
- }
-
-Index: rtems/cpukit/libcsupport/src/termios.c
-===================================================================
---- rtems.orig/cpukit/libcsupport/src/termios.c 2009-11-29 01:10:27.116591056 +0100
-+++ rtems/cpukit/libcsupport/src/termios.c 2009-11-29 01:11:05.632590072 +0100
-@@ -271,7 +271,7 @@
- */
- tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
- tty->termios.c_oflag = OPOST | ONLCR | XTABS;
-- tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
-+ tty->termios.c_cflag = B19200 | CS8 | CREAD | CLOCAL;
- tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
-
- tty->termios.c_cc[VINTR] = '\003';
+++ /dev/null
----
- c/src/lib/libbsp/arm/csb336/startup/memmap.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/memmap.c
-===================================================================
---- rtems.orig/c/src/lib/libbsp/arm/csb336/startup/memmap.c 2009-11-29 01:10:27.268556195 +0100
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/memmap.c 2009-11-29 01:10:29.860557175 +0100
-@@ -21,8 +21,12 @@
- /* <phys addr> <virt addr> <size> <flags> */
- {0x08200000, 0x00000000, 1, MMU_CACHE_NONE}, /* Mirror of SDRAM */
- {0x00100000, 0x00100000, 1, MMU_CACHE_NONE}, /* Bootstrap ROM */
-- {0x00200000, 0x00200000, 1, MMU_CACHE_NONE}, /* Internal Regs */
-+ {0x00200000, 0x00200000, 2, MMU_CACHE_NONE}, /* Internal Regs + eSRAM */
-+ #if 1
-+ {0x08000000, 0x08000000, 32, MMU_CACHE_WBACK}, /* SDRAM */
-+ #else
- {0x08000000, 0x08000000, 32, MMU_CACHE_WTHROUGH}, /* SDRAM */
-+ #endif
- {0x10000000, 0x10000000, 8, MMU_CACHE_NONE}, /* CS0 - Flash */
- {0x12000000, 0x12000000, 1, MMU_CACHE_NONE}, /* CS1 - enet */
- {0x13000000, 0x13000000, 1, MMU_CACHE_NONE}, /* CS2 - */
+++ /dev/null
----
- c/src/lib/libbsp/arm/csb336/startup/bspstart.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c
-===================================================================
---- rtems.orig/c/src/lib/libbsp/arm/csb336/startup/bspstart.c 2009-11-29 01:10:27.024557077 +0100
-+++ rtems/c/src/lib/libbsp/arm/csb336/startup/bspstart.c 2009-11-29 01:11:06.963557071 +0100
-@@ -76,6 +76,7 @@
- void mmu_set_cpu_async_mode(void);
- void bsp_start_default( void )
- {
-+#ifdef CONFIG_MC9328MX_ASYNCMCLK
- int i;
-
- /* Set the MCU prescaler to divide by 1 */
-@@ -91,6 +92,7 @@
-
- /* Set the CPU to asynchrous clock mode, so it uses its fastest clock */
- mmu_set_cpu_async_mode();
-+#endif /*CONFIG_MC9328MX_ASYNCMCLK*/
-
- /* disable interrupts */
- MC9328MXL_AITC_INTENABLEL = 0;
+++ /dev/null
----
- c/src/lib/libbsp/arm/csb336/console/uart.c | 42 +++++++++++++++++++++
- c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h | 41 ++++++++++++++++++++
- 2 files changed, 83 insertions(+)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/arm/csb336/console/uart.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/arm/csb336/console/uart.c 2009-11-29 01:11:05.632590072 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/arm/csb336/console/uart.c 2009-11-29 01:55:20.304585047 +0100
-@@ -24,6 +24,13 @@
- /* Define this to use interrupt driver UART driver */
- #define USE_INTERRUPTS 1
-
-+/* Define this to use interrupt driver UART driver */
-+#define WITH_IRDA_UART1TO3 1
-+
-+#ifdef WITH_IRDA_UART1TO3
-+int bsp_uart1_switched_to_3 = 0;
-+#endif /*WITH_IRDA_UART1TO3*/
-+
- /* How many serial ports? */
- #define NUM_DEVS 2
- #define poll_write(c) imx_uart_poll_write_char(0, c)
-@@ -185,6 +192,41 @@
- imx_uart_data[minor].len = 0;
- imx_uart_data[minor].idx = 0;
-
-+#ifdef WITH_IRDA_UART1TO3
-+ if (minor == 0) {
-+ if((MC9328MXL_GPIOC_SSR & (1<<9))==0)
-+ bsp_uart1_switched_to_3 = 1;
-+ }
-+
-+ if ((minor == 0) && bsp_uart1_switched_to_3) {
-+ /* GPIO port C */
-+ rtems_interrupt_level flags;
-+ unsigned long mask;
-+ unsigned long iconfa2_clr;
-+ unsigned long ocr2_set;
-+ unsigned long ocr2_clr;
-+ unsigned long ddir_set;
-+ mask = (1<<31) | (1<<30); /* RxD and TxD */
-+ ddir_set = (1<<30);
-+ iconfa2_clr = (1<<31) | (1<<30);
-+ ocr2_set = (1<<28);
-+ ocr2_clr =(1<<29);
-+ rtems_interrupt_disable(flags);
-+ MC9328MXL_GPIOC_ICONFA2 &=~ iconfa2_clr;
-+ MC9328MXL_GPIOC_OCR2 |= ocr2_set;
-+ MC9328MXL_GPIOC_OCR2 &=~ ocr2_clr;
-+ MC9328MXL_GPIOC_GIUS |= mask ; /* GIUS_C */
-+ MC9328MXL_GPIOC_DDIR |= ddir_set;
-+ MC9328MXL_PLL_GCCR |= MC9328MXL_PLL_GCCR_UART3_CLK_EN;
-+ rtems_interrupt_enable(flags);
-+#if defined(USE_INTERRUPTS)
-+ imx_uart_tx_isr_data[minor].name = BSP_INT_UART3_TX;
-+ imx_uart_rx_isr_data[minor].name = BSP_INT_UART3_RX;
-+#endif
-+ imx_uart_data[minor].regs =
-+ (mc9328mxl_uart_regs_t *) MC9328MXL_UART3_BASE;
-+ } else
-+#endif /*WITH_IRDA_UART1TO3*/
- if (minor == 0) {
- #if defined(USE_INTERRUPTS)
- imx_uart_tx_isr_data[minor].name = BSP_INT_UART1_TX;
-Index: rtems-4.9.3/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h 2007-03-12 12:17:07.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h 2009-11-29 01:55:20.324565870 +0100
-@@ -31,6 +31,7 @@
- #define MC9328MXL_LCDC_BASE 0x00205000
- #define MC9328MXL_UART1_BASE 0x00206000
- #define MC9328MXL_UART2_BASE 0x00207000
-+#define MC9328MXL_UART3_BASE 0x0020A000
- #define MC9328MXL_PWM_BASE 0x00208000
- #define MC9328MXL_DMAC_BASE 0x00209000
- #define MC9328MXL_USBD_BASE 0x00212000
-@@ -131,6 +132,30 @@
- #define MC9328MXL_UART2_MPR4 (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xcc)))
- #define MC9328MXL_UART2_TS (*((volatile uint32_t *)((MC9328MXL_UART2_BASE) + 0xd0)))
-
-+#define MC9328MXL_UART3_RXD (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x00)))
-+#define MC9328MXL_UART3_TXD (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x40)))
-+#define MC9328MXL_UART3_CR1 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x80)))
-+#define MC9328MXL_UART3_CR2 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x84)))
-+#define MC9328MXL_UART3_CR3 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x88)))
-+#define MC9328MXL_UART3_CR4 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x8c)))
-+#define MC9328MXL_UART3_FCR (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x90)))
-+#define MC9328MXL_UART3_SR1 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x94)))
-+#define MC9328MXL_UART3_SR2 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x98)))
-+#define MC9328MXL_UART3_ESC (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0x9c)))
-+#define MC9328MXL_UART3_TIM (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xa0)))
-+#define MC9328MXL_UART3_BIR (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xa4)))
-+#define MC9328MXL_UART3_BMR (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xa8)))
-+#define MC9328MXL_UART3_BRC (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xac)))
-+#define MC9328MXL_UART3_IPR1 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xb0)))
-+#define MC9328MXL_UART3_IPR2 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xb4)))
-+#define MC9328MXL_UART3_IPR3 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xb8)))
-+#define MC9328MXL_UART3_IPR4 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xbc)))
-+#define MC9328MXL_UART3_MPR1 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xc0)))
-+#define MC9328MXL_UART3_MPR2 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xc4)))
-+#define MC9328MXL_UART3_MPR3 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xc8)))
-+#define MC9328MXL_UART3_MPR4 (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xcc)))
-+#define MC9328MXL_UART3_TS (*((volatile uint32_t *)((MC9328MXL_UART3_BASE) + 0xd0)))
-+
- typedef struct {
- volatile uint32_t rxd;
- volatile uint32_t _res0[15];
-@@ -274,6 +299,12 @@
- #define MC9328MXL_PLL_SPCTL1 (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x10)))
- #define MC9328MXL_PLL_PCDR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x20)))
-
-+#define MC9328MXL_PLL_RSR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x800)))
-+#define MC9328MXL_PLL_SIDR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x804)))
-+#define MC9328MXL_PLL_FMCR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x808)))
-+#define MC9328MXL_PLL_GPCR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x80C)))
-+#define MC9328MXL_PLL_GCCR (*((volatile uint32_t *)((MC9328MXL_PLL_BASE) + 0x810)))
-+
- #define MC9328MXL_PLL_CSCR_CLKOSEL_PERCLK1 (0 << 29)
- #define MC9328MXL_PLL_CSCR_CLKOSEL_HCLK (1 << 29)
- #define MC9328MXL_PLL_CSCR_CLKOSEL_CLK48M (2 << 29)
-@@ -304,6 +335,16 @@
- #define MC9328MXL_PLL_PCDR_PCLK3_MASK (0x007f0000)
- #define MC9328MXL_PLL_PCDR_PCLK3_SHIFT (16)
-
-+#define MC9328MXL_PLL_RSR_WDR (bit(1))
-+#define MC9328MXL_PLL_RSR_EXR (bit(0))
-+
-+#define MC9328MXL_PLL_GCCR_UART3_CLK_EN (bit(6))
-+#define MC9328MXL_PLL_GCCR_SSI2_CLK_EN (bit(5))
-+#define MC9328MXL_PLL_GCCR_BROM_CLK_EN (bit(4))
-+#define MC9328MXL_PLL_GCCR_DMA_CLK_EN (bit(3))
-+#define MC9328MXL_PLL_GCCR_CSI_CLK_EN (bit(2))
-+#define MC9328MXL_PLL_GCCR_MMA_CLK_EN (bit(1))
-+#define MC9328MXL_PLL_GCCR_USBD_CLK_EN (bit(0))
-
- #define MC9328MXL_PLL_SPCTL_PD_MASK (0x3c000000)
- #define MC9328MXL_PLL_SPCTL_PD_SHIFT (26)
+++ /dev/null
----
- c/src/lib/libbsp/m68k/acinclude.m4 | 2 ++
- 1 file changed, 2 insertions(+)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/acinclude.m4
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/acinclude.m4 2008-08-30 22:29:11.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/acinclude.m4 2009-11-29 01:35:52.795572383 +0100
-@@ -24,6 +24,8 @@
- AC_CONFIG_SUBDIRS([mcf5235]);;
- mcf5329 )
- AC_CONFIG_SUBDIRS([mcf5329]);;
-+ mo376 )
-+ AC_CONFIG_SUBDIRS([mo376]);;
- mrm332 )
- AC_CONFIG_SUBDIRS([mrm332]);;
- mvme136 )
+++ /dev/null
----
- c/src/lib/libbsp/m68k/mo376/clock/ckinit.c | 2
- c/src/lib/libbsp/m68k/mo376/include/bsp.h | 26 +
- c/src/lib/libbsp/m68k/mo376/include/mo376.h | 27 -
- c/src/lib/libbsp/m68k/mo376/misc/gdbinit68 | 395 ++++++++++++++++++++++-
- c/src/lib/libbsp/m68k/mo376/spurious/spinit.c | 10
- c/src/lib/libbsp/m68k/mo376/startup/linkcmds | 10
- c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM | 17
- c/src/lib/libbsp/m68k/mo376/startup/start_c.c | 6
- make/custom/mo376.cfg | 10
- 9 files changed, 455 insertions(+), 48 deletions(-)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/bsp.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/include/bsp.h 2009-11-29 01:23:46.804588750 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/bsp.h 2009-11-29 01:36:40.412590325 +0100
-@@ -1,6 +1,6 @@
- /* bsp.h
- *
-- * This include file contains all mrm board IO definitions.
-+ * This include file contains all mo376 board IO definitions.
- *
- * COPYRIGHT (c) 1989-1999.
- * On-Line Applications Research Corporation (OAR).
-@@ -40,6 +40,30 @@
- /* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
-
- /*
-+ * Network driver configuration
-+ */
-+struct rtems_bsdnet_ifconfig;
-+extern int cs8900_driver_attach (struct rtems_bsdnet_ifconfig *config, int attaching);
-+#define RTEMS_BSP_NETWORK_DRIVER_NAME "cs8900"
-+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH cs8900_driver_attach
-+
-+/* CS8900 ethernet interface definitions */
-+
-+#define CS8900_DEVICES (1)
-+#define CS8900_IO_BASE (0x0300)
-+#define CS8900_MEMORY_BASE (0x1000)
-+#define CS8900_DATA_BUS_SWAPPED
-+#define CS8900_IO_MODE
-+#define CS8900_RX_QUEUE_SIZE (50)
-+
-+#define ETHERNET_BASE (0xf8a000)
-+#define ETHERNET_IRQ_LEVEL (2)
-+#define ETHERNET_IRQ_PRIORITY (2)
-+#define ETHERNET_IRQ_VECTOR (26)
-+/* #define ETHERNET_IRQ_VECTOR (AUTOVEC_VECTOR + ETHERNET_IRQ_LEVEL) */
-+#define ETHERNET_MAC_ADDRESS {0x00,0x00,0xc0,0x2c,0x54,0xa4}
-+
-+/*
- * Simple spin delay in microsecond units for device drivers.
- * This is very dependent on the clock speed of the target.
- */
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c 2009-11-29 01:23:46.808556503 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c 2009-11-29 01:36:40.412590325 +0100
-@@ -60,7 +60,7 @@
- Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
-
- /* enable 1mS interrupts */
-- *PITR = (unsigned short int)( SAM(0x09,0,PITM) );/* load counter */
-+ *PITR = (unsigned short int)( SAM(0x08,0,PITM) );/* load counter */
- *PICR = (unsigned short int) /* enable interrupt */
- ( SAM(ISRL_PIT,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68 2009-11-29 01:11:56.471556761 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68 2009-11-29 01:36:40.412590325 +0100
-@@ -1,16 +1,399 @@
- #
- # $Id: gdbinit68,v 1.1 2001/05/25 16:28:46 joel Exp $
- #
--echo Setting up the environment for mrm debuging.\n
-+echo Setting up the environment for mo376 debuging.\n
-
--target bdm /dev/bdmcpu320
--bdm_setdelay 1000
-+# invoke by "source run376.gdb"
-+
-+echo Setting bdm\n
-+
-+#set prompt (gdb68)
-+
-+#file tst
-+#file flash
-+
-+# Linux
-+target bdm /dev/bdm
-+#target bdm /dev/m683xx-bdm/icd0
-+#target bdm /dev/icd_bdm0
-+#target bdm /dev/pd_bdm0
-+
-+# Windows
-+#target bdm bdm-cpu32-icd1
-+
-+# Serial targets
-+#target remote COM2
-+#target remote /dev/ttyS1
-+
-+# automatic resed of board before "run" command execution
-+# depends on correct "cpu32init" file in current ditectory
- bdm_autoreset on
-+
-+# confirmation of dangerous operations (kill, run, ..)
-+set confirm on
-+
-+#===========================================================
-+# sets chipselects and configuration
-+define bdm_hw_init
-+echo bdm_hw_init ...\n
-+
- set remotecache off
- bdm_timetocomeup 0
--bdm_init
-+bdm_autoreset off
-+bdm_setdelay 100
- bdm_reset
-+bdm_setdelay 0
- set $sfc=5
- set $dfc=5
--r
--q
-+
-+# system configuration
-+
-+# 0xFFFA00 - SIMCR - SIM Configuration Register
-+# 15 14 13 12 11 10 9 8 7 6 5 4 3 0
-+# EXOFF FRZSW FRZBM 0 SLVEN 0 SHEN SUPV MM 0 0 IARB
-+# 0 0 0 0 DATA11 0 0 0 1 1 0 0 1 1 1 1
-+# set *(short *)0xfffa00=0x42cf
-+set *(short *)0xfffa00=0x40cf
-+
-+# 0xFFFA21 - SYPCR - System Protection Control Register
-+# 7 6 5 4 3 2 1 0
-+# SWE SWP SWT HME BME BMT
-+# 1 MODCLK 0 0 0 0 0 0
-+set *(char *)0xfffa21=0x06
-+
-+# 0xYFFA27 - SWSR - Software Service Register
-+# write 0x55 0xAA for watchdog
-+
-+# 0xFFFA04 - SYNCR Clock Synthesizer Control Register
-+# 15 14 13 8 7 6 5 4 3 2 1 0
-+# W X Y EDIV 0 0 SLIMP SLOCK RSTEN STSIM STEXT
-+# 0 0 1 1 1 1 1 1 0 0 0 U U 0 0 0
-+#set *(short *)0xfffa04=0xd408
-+# set 21 MHz system clock for ref 4 MHz
-+
-+# $YFFA17 - PEPAR - Port E Pin Assignment Register
-+# 7 6 5 4 3 2 1 0
-+# PEPA7 PEPA6 PEPA5 PEPA4 PEPA3 PEPA2 PEPA1 PEPA0
-+# SIZ1 SIZ0 AS DS RMC AVEC DSACK1 DSACK0
-+# 1 .. control signal, 0 .. port F
-+# after reset determined by DATA8
-+set *(char*)0xfffa17=0xf4
-+
-+# 0xFFFA1F - PFPAR - Port F Pin Assignment Register
-+# 7 6 5 4 3 2 1 0
-+# PFPA7 PFPA6 PFPA5 PFPA4 PFPA3 PFPA2 PFPA1 PFPA0
-+# INT7 INT6 INT5 INT4 INT3 INT2 INT1 MODCLK
-+# 1 .. control signal, 0 .. port F
-+# after reset determined by DATA9
-+set *(char*)0xfffa1f=0
-+
-+# Setup internal RAM
-+
-+# setup STANBY RAM at 0x8000
-+# RAMMCR ... STOP
-+set *(short *)0xFFFB40=0x8000
-+# RAMBAH RAMBAL
-+set *(int *)0xFFFB44=0xFFD000
-+# RAMMCR ... ENABLE
-+set *(short *)0xFFFB40=0
-+
-+# setup TPU RAM at 0x8000
-+# TRAMMCR
-+set *(short *)0xFFFB00=0x8000
-+# TRAMBAR
-+set *(short *)0xFFFB04=0xFFE000>>8
-+# TRAMMCR
-+set *(short *)0xFFFB00=0
-+
-+# 0xYFFA44 - CSPAR0 - Chip Select Pin Assignment Register 0
-+# 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-+# 0 0 CSPA0[6] CSPA0[5] CSPA0[4] CSPA0[3] CSPA0[2] CSPA0[1] CSBOOT
-+# 0 0 DATA2 1 DATA2 1 DATA2 1 DATA1 1 DATA1 1 DATA1 1 1 DATA0
-+# CS5 CS4 CS3 CS2 CS1 CS0 CSBOOT
-+# FC2 PC2 FC1 PC1 FC0 PC0 BGACK BG BR
-+#
-+# 00 Discrete Output
-+# 01 Alternate Function
-+# 10 Chip Select (8-Bit Port)
-+# 11 Chip Select (16-Bit Port)
-+#
-+set *(short *)0xfffa44=0x3bff
-+# CS4 8-bit rest 16-bit
-+
-+
-+# 0xFFFA46 - CSPAR1 - Chip Select Pin Assignment Register 1
-+# 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
-+# 0 0 0 0 0 0 CSPA1[4] CSPA1[3] CSPA1[2] CSPA1[1] CSPA1[0]
-+# 0 0 0 0 0 0 DATA7 1 DATA76 1 DATA75 1 DATA74 1 DATA73 1
-+# CS10 CS9 CS8 CS7 CS6
-+# A23 ECLK A22 PC6 A21 PC5 A20 PC4 A19 PC3
-+#
-+set *(short *)0xfffa46=0x03a9
-+# CS7,CS8,CS9 8-bit CS10 16-bit and A19
-+
-+#
-+# Chip selects configuration
-+#
-+# 0xFFFA48 - CSBARBT - Chip-Select Base Address Register Boot ROM
-+# 0xFFFA4C..0xFFFA74 - CSBAR[10:0] - Chip-Select Base Address Registers
-+# 15 14 13 12 11 10 9 8 7 6 5 4 3 2 0
-+# A23 A22 A21 A20 A19 A18 A17 A16 A15 A14 A13 A12 A11 BLKSZ
-+# reset 0x0003 for CSBARBT and 0x0000 for CSBAR[10:0]
-+#
-+# BLKSZ Size Address Lines Compared
-+# 000 2k ADDR[23:11]
-+# 001 8k ADDR[23:13]
-+# 010 16k ADDR[23:14]
-+# 011 64k ADDR[23:16]
-+# 100 128k ADDR[23:17]
-+# 101 256k ADDR[23:18]
-+# 110 512k ADDR[23:19]
-+# 111 1M ADDR[23:20]
-+#
-+#
-+# 0xFFFA4A - CSORBT - Chip-Select Option Register Boot ROM
-+# 0xFFFA4E..0xFFFA76 - CSOR[10:0] - Chip-Select Option Registers
-+# 15 14 13 12 11 10 9 6 5 4 3 1 0
-+# MODE BYTE R/W STRB DSACK SPACE IPL AVEC
-+# 0 1 1 1 1 0 1 1 0 1 1 1 0 0 0 0 - for CSORBT
-+#
-+# BYTE 00 Disable, 01 Lower Byte, 10 Upper Byte, 11 Both Bytes
-+# R/W 00 Reserved,01 Read Only, 10 Write Only, 11 Read/Write
-+# SPACE 00 CPU, 01 User, 10 Supervisor, 11 Supervisor/User
-+#
-+set *(short *)0xfffa48=(0x800000>>8)&0xfff8 | 7
-+set *(short *)0xfffa4a=(0<<15)|(3<<13)|(3<<11)|(0<<10)|(0<<6)|(3<<4)
-+# BOOT ROM 0x800000 1MB RW UL
-+
-+set *(short *)0xfffa4c=(0x900000>>8)&0xfff8 | 7
-+set *(short *)0xfffa4e=(0<<15)|(3<<13)|(3<<11)|(0<<10)|(0<<6)|(3<<4)
-+# CS0 ROM 0x900000 1MB RW UL
-+
-+#set *(long *)0xfffa50=0x0003303e
-+# CS1 RAM 0x000000 64k WR L
-+
-+set *(short *)0xfffa54=(0x000000>>8)&0xfff8 | 7
-+set *(short *)0xfffa56=(0<<15)|(3<<13)|(3<<11)|(0<<10)|(0<<6)|(3<<4)
-+# CS2 RAM 0x000000 1MB RW UL - Main RAM first 1MB
-+
-+#set *(short *)0xfffa58=(0x100000>>8)&0xfff8 | 7
-+#set *(short *)0xfffa5A=(0<<15)|(3<<13)|(3<<11)|(0<<10)|(0<<6)|(3<<4)
-+# CS3 RAM 0x100000 1MB RW UL - Main RAM second 1MB
-+
-+set *(short *)0xfffa5c=(0xf00000>>8)&0xfff8 | 6
-+set *(short *)0xfffa5e=(0<<15)|(3<<13)|(3<<11)|(1<<10)|(2<<6)|(3<<4)
-+# CS4 PER 0xf00000 512kB RW UL - CMOS RAM, RTC, other devices
-+
-+#set *(long *)0xfffa60=0xffe8783f
-+# CS5
-+
-+#set *(long *)0xfffa64=0x100438f0
-+# CS6 R/R 0x100000 128k RW L
-+
-+set *(short *)0xfffa68=(0xf87000>>8)&0xfff8 | 0
-+set *(short *)0xfffa6a=(0<<15)|(3<<13)|(3<<11)|(1<<10)|(1<<6)|(3<<4)
-+# CS7 PER 0xf87000 2k RW UL - MO_PWR
-+
-+set *(short *)0xfffa6c=(0xf88000>>8)&0xfff8 | 0
-+set *(short *)0xfffa6e=(0<<15)|(3<<13)|(3<<11)|(1<<10)|(1<<6)|(3<<4)
-+# CS8 PER 0xf88000 2k RO UL - IRC
-+
-+set *(short *)0xfffa70=(0xf89000>>8)&0xfff8 | 0
-+set *(short *)0xfffa72=(0<<15)|(3<<13)|(3<<11)|(1<<10)|(3<<6)|(3<<4)
-+# CS9 PER 0xf89000 2k WR UL - KBD
-+
-+#set *(long *)0xfffa74=0x01035030
-+# CS10 RAM 0x010000 64k WR U
-+
-+#
-+# My change
-+#
-+#set *(long *)0xfffa58=0x02036870
-+# CS3 RAM 0x020000 64k RO UL
-+
-+#set *(long *)0xfffa64=0x02033030
-+# CS6 RAM 0x020000 64k WR L
-+
-+#set *(long *)0xfffa68=0x02035030
-+# CS7 RAM 0x020000 64k WR U
-+
-+
-+# CPU registers
-+
-+# SR=PS Status Register
-+# 15 14 13 12 11 10 8 7 6 5 4 3 2 1 0
-+# T1 T0 S 0 0 IP___ 0 0 0 X N Z V C
-+# 0 0 1 0 0 1 1 1 0 0 0 U U U U U
-+
-+bdm_status
-+
-+end
-+#===========================================================
-+
-+# sets well defined values into VBR
-+define vbr_set_all
-+ set $vec_num=0
-+ set $vbr_val=(unsigned)$vbr
-+ while $vec_num<256
-+ set *(unsigned*)($vbr_val+$vec_num*4)=($vec_num*16)+0xf0000
-+ set $vec_num++
-+ end
-+end
-+
-+# Test writability of RAM location
-+define bdm_test_ram_acc
-+ echo testing ...
-+ p /x $arg0
-+ set $ram_addr=(unsigned int)$arg0
-+ set $old_ram_val0=*(int*)$ram_addr
-+ set $old_ram_val1=*(int*)($ram_addr+4)
-+ set *(int*)($ram_addr+3)=0xff234567
-+ set *(int*)$ram_addr=0x12345678
-+ if *(int*)$ram_addr!=0x12345678
-+ printf "Error1 %08X\n",*(int*)$ram_addr
-+ end
-+ set *(char*)$ram_addr=0xab
-+ if *(int*)$ram_addr!=0xab345678
-+ printf "Error2 %08X\n",*(int*)$ram_addr
-+ end
-+ set *(char*)($ram_addr+1)=0xcd
-+ if *(int*)$ram_addr!=0xabcd5678
-+ printf "Error3 %08X\n",*(int*)$ram_addr
-+ end
-+ set *(char*)($ram_addr+3)=0x01
-+ if *(int*)$ram_addr!=0xabcd5601
-+ printf "Error4 %08X\n",*(int*)$ram_addr
-+ end
-+ set *(char*)($ram_addr+2)=0xef
-+ if *(int*)$ram_addr!=0xabcdef01
-+ printf "Error5 %08X\n",*(int*)$ram_addr
-+ end
-+ if *(int*)$ram_addr!=0xabcdef01
-+ printf "Error5 %08X\n",*(int*)$ram_addr
-+ end
-+ if *(int*)($ram_addr+1)!=0xcdef0123
-+ printf "Error6 %08X\n",*(int*)$ram_addr
-+ end
-+ if *(int*)($ram_addr+2)!=0xef012345
-+ printf "Error7 %08X\n",*(int*)$ram_addr
-+ end
-+ if *(int*)($ram_addr+2)!=0xef012345
-+ printf "Error8 %08X\n",*(int*)$ram_addr
-+ end
-+ if *(int*)($ram_addr+3)!=0x01234567
-+ printf "Error9 %08X\n",*(int*)$ram_addr
-+ end
-+ set *(int*)$ram_addr=$old_ram_val0
-+ set *(int*)($ram_addr+4)=$old_ram_val1
-+end
-+
-+# Read flash identification
-+define bdm_read_flash_id
-+ set $flash_base=(int)$arg0&~0xffff
-+ output /x $flash_base
-+ echo \n
-+ set *(char*)($flash_base+0x555*2+1)=0xf0
-+ set *(char*)($flash_base+0x555*2+1)=0xaa
-+ set *(char*)($flash_base+0x2aa*2+1)=0x55
-+ set *(char*)($flash_base+0x555*2+1)=0x90
-+ p /x *(char*)($flash_base+0x00*2+1)
-+ set *(char*)($flash_base+0x555*2+1)=0xf0
-+ set *(char*)($flash_base+0x555*2+1)=0xaa
-+ set *(char*)($flash_base+0x2aa*2+1)=0x55
-+ set *(char*)($flash_base+0x555*2+1)=0x90
-+ p /x *(char*)($flash_base+0x01*2+1)
-+end
-+
-+define bdm_read_flash1_id
-+ bdm_read_flash_id 0x800000
-+end
-+
-+define bdm_read_flash2_id
-+ bdm_read_flash_id 0x900000
-+end
-+
-+define bdm_test_flash_write
-+ set $flash_base=(int)$arg0 & ~0xffff
-+ output /x $flash_base
-+ echo \n
-+ set *(char*)($flash_base+0x555*2+1)=0xf0
-+ set *(char*)($flash_base+0x555*2+1)=0xaa
-+ set *(char*)($flash_base+0x2aa*2+1)=0x55
-+ set *(char*)($flash_base+0x555*2+1)=0xA0
-+ set *(char*)($arg0)=$arg1
-+end
-+
-+define bdm_test_pwm0
-+
-+ #BIUMCR - BIU Module Configuration Register $YFF400
-+ set *(short*)0xfff400=*(short*)0xfff400&~0x8000
-+ #CPCR - CPSM Control Register $YFF408
-+ set *(short*)0xfff408=*(short*)0xfff408|8
-+ #PWM5SIC - PWM5 Status/Interrupt/Control Register $YFF428
-+ set *(short*)0xfff428=0x18
-+ #PWM5A1 - PWM5 Period Register $YFF42A
-+ set *(short*)0xfff42a=512
-+ #PWM5B1 - PWM5 Pulse Width Register $YFF42C
-+ set *(short*)0xfff42c=0
-+
-+ if $arg0==0
-+ set *(short*)0xf87000=0
-+ set $pwm_val=0
-+ else
-+ if $arg0>0
-+ set *(char*)0xf87000=1
-+ set $pwm_val=$arg0
-+ else
-+ set *(char*)0xf87000=2
-+ set $pwm_val=-($arg0)
-+ end
-+ end
-+ #DDRQA
-+ set *(short*)0xfff208=0x8000
-+ #PORTQA
-+ set *(short*)0xfff206=~0x8000
-+
-+ #PWM5B1 - PWM5 Pulse Width Register $YFF42C
-+ set *(short*)0xfff42c=$pwm_val
-+
-+end
-+
-+define bdm_test_usd_irc
-+ set $usd_irc_d=0xf88000
-+ set $usd_irc_c=0xf88001
-+ if $arg0!=0
-+ # Load Gate
-+ set *(unsigned char*)0xf88020=0
-+ # CMR
-+ set *(unsigned char*)$usd_irc_c=0x38
-+ # IOR
-+ set *(unsigned char*)$usd_irc_c=0x49
-+ # IDR
-+ set *(unsigned char*)$usd_irc_c=0x61
-+ # RLD - Reset BP, BT CT CPT S
-+ set *(unsigned char*)$usd_irc_c=0x05
-+ # DATA - PSC
-+ set *(unsigned char*)$usd_irc_d=0x02
-+ # RLD - Reset BP, PR0 -> PSC
-+ set *(unsigned char*)$usd_irc_c=0x1B
-+ end
-+ # RLD - Reset BP, CNTR -> OL
-+ set *(unsigned char*)$usd_irc_c=0x11
-+
-+ set $usd_irc_val=((int)(*(unsigned char*)$usd_irc_d))
-+ set $usd_irc_val+=((int)(*(unsigned char*)$usd_irc_d))<<8
-+ set $usd_irc_val+=((int)(*(unsigned char*)$usd_irc_d))<<16
-+ print /x $usd_irc_val
-+
-+end
-+
-+define six
-+ si
-+ x /10i $pc
-+end
-+
-+bdm_hw_init
-+
-+#b main
-+
-+run
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/mo376.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/include/mo376.h 2009-11-29 01:23:46.816556473 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/mo376.h 2009-11-29 01:36:40.416589786 +0100
-@@ -26,31 +26,22 @@
- #define EFI_INT1 25 /* CTS interrupt */
- #define ISRL_SCI 6
-
--/* System Clock definitions */
--#define XTAL 32768.0 /* crystal frequency in Hz */
-+#define SIM_PFPAR (SIM_CRB + 0x1f)
-
--#if 0
--/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
--#define MRM_W 0 /* system clock parameters */
--#define MRM_X 0
--#define MRM_Y 0x3f
--#endif
-+/* System Clock definitions */
-+#define XTAL 4000000.0 /* crystal frequency in Hz */
-
- #if 1
--/* 16.77722 MHz: */
--#define MRM_W 1 /* system clock parameters */
--#define MRM_X 1
--#define MRM_Y 0x0f
--#endif
--
--#if 0
--/* 25.16582 MHz: */
-+/* Default MO376 clock rate (21.000 MHz) set by CPU32: */
- #define MRM_W 1 /* system clock parameters */
- #define MRM_X 1
--#define MRM_Y 0x17
-+#define MRM_Y 20
- #endif
-
--#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
-+/*68332*/
-+/*#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))*/
-+/*68376*/
-+#define SYS_CLOCK (XTAL/32.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
- #define SCI_BAUD 19200 /* RS232 Baud Rate */
-
- /* macros/functions */
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM 2008-03-04 00:06:30.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM 2009-11-29 01:36:40.416589786 +0100
-@@ -4,7 +4,8 @@
- */
-
- OUTPUT_ARCH(m68k)
--STARTUP(except_vect_332_ROM.o)
-+/* Not needed, mo376 uses initialization by mo_flashbb */
-+/* STARTUP(except_vect_332_ROM.o) */
- __DYNAMIC = 0;
-
- /*
-@@ -39,18 +40,18 @@
-
- MEMORY
- {
-- rom : ORIGIN = 0x90000, LENGTH = 0x70000
-- ram : ORIGIN = 0x03000, LENGTH = 0x7d000
-+ ram : ORIGIN = 0x001000, LENGTH = 0x0ff000
-+ rom : ORIGIN = 0x808000, LENGTH = 0x0f8000
- }
-
--_RamBase = DEFINED(_RamBase) ? _RamBase : 0x003000;
--_RamSize = DEFINED(_RamSize) ? _RamSize : 0x7d000;
-+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x001000;
-+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x0ff000;
- _RamEnd = _RamBase + _RamSize;
-
--__end_of_ram = 0x080000;
-+__end_of_ram = 0x100000;
- _copy_data_from_rom = 1;
--_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
--_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
-+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x40000;
-+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
-
- /*
- *
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c 2009-11-29 01:11:56.479557220 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c 2009-11-29 01:36:40.416589786 +0100
-@@ -33,8 +33,8 @@
- rtems_vector_number vector
- )
- {
-- /*int sp = 0; */
--#if 0
-+ int sp = 0;
-+#if 1
- const char * const VectDescrip[] = {
- _Spurious_Error_[0], _Spurious_Error_[0], _Spurious_Error_[1],
- _Spurious_Error_[2], _Spurious_Error_[3], _Spurious_Error_[4],
-@@ -60,11 +60,11 @@
- _Spurious_Error_[27], _Spurious_Error_[28]};
- #endif
-
-- /*asm volatile ( "movea.l %%sp,%0 " : "=a" (sp) : "0" (sp) ); */
-+ asm volatile ( "movea.l %%sp,%0 " : "=a" (sp) : "0" (sp) );
-
- _CPU_ISR_Set_level( 7 );
- /*_UART_flush(); */
--#if 0
-+#if 1
- RAW_PUTS("\n\rRTEMS: Spurious interrupt: ");
- RAW_PUTS((char *)VectDescrip[( (vector>64) ? 64 : vector )]);
- RAW_PUTS("\n\rRTEMS: Vector: ");
-@@ -89,6 +89,7 @@
- {
- switch (vector)
- {
-+#if 0
- case 4:
- case 9:
- case 31:
-@@ -96,6 +97,7 @@
- case 66:
- /* These vectors used by CPU32bug - don't overwrite them. */
- break;
-+#endif
-
- default:
- (void) set_vector( Spurious_Isr, vector, 1 );
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/linkcmds
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/startup/linkcmds 2008-03-04 00:06:30.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/linkcmds 2009-11-29 01:36:40.416589786 +0100
-@@ -33,15 +33,15 @@
- /*
- * Declare some sizes.
- */
--_RamBase = DEFINED(_RamBase) ? _RamBase : 0x10000;
--_RamSize = DEFINED(_RamSize) ? _RamSize : 0x70000;
-+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x001000;
-+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x0ff000;
- _RamEnd = _RamBase + _RamSize;
--_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
--_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
-+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x40000;
-+_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
-
- MEMORY
- {
-- ram : ORIGIN = 0x10000, LENGTH = 0x70000
-+ ram : ORIGIN = 0x001000, LENGTH = 0x0ff000
- }
-
- _copy_data_from_rom = 0;
-Index: rtems-4.9.3/make/custom/mo376.cfg
-===================================================================
---- rtems-4.9.3.orig/make/custom/mo376.cfg 2009-11-29 01:25:58.227563597 +0100
-+++ rtems-4.9.3/make/custom/mo376.cfg 2009-11-29 01:36:40.416589786 +0100
-@@ -16,8 +16,14 @@
- # and (hopefully) optimize for it.
- CPU_CFLAGS = -mcpu=cpu32
-
--# optimize flag: typically -O2
--CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
-+# Debugging flags: If we debug with optimization on, single-stepping
-+# sometimes looks a little odd, but there won't be any surprises later.
-+CFLAGS_DEBUG_V += -O2 -ggdb
-+CXXFLAGS_DEBUG_V += -O2 -ggdb
-+
-+# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
-+CFLAGS_OPTIMIZE_V=-O2 -fomit-frame-pointer -ggdb
-+CXXFLAGS_OPTIMIZE_V=-O2 -ggdb
-
- ifeq ($(MRM_IN_ROM),yes)
- # Build a rommable image - move the .data section after the .text section
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2009-11-29 01:23:46.812556872 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2009-11-29 01:36:40.432570032 +0100
-@@ -60,12 +60,12 @@
-
- /* Port E and F Data Direction Register */
- /* see section 9 of the SIM Reference Manual */
-- *DDRE = (unsigned char) 0xff;
-- *DDRF = (unsigned char) 0xfd;
-+ *DDRE = (unsigned char) 0x01;
-+ *DDRF = (unsigned char) 0x00;
-
- /* Port E and F Pin Assignment Register */
- /* see section 9 of the SIM Reference Manual */
-- *PEPAR = (unsigned char) 0;
-+ *PEPAR = (unsigned char) 0xf4;
- *PFPAR = (unsigned char) 0;
-
- /* end of SIM initalization code */
+++ /dev/null
----
- c/src/lib/libbsp/m68k/mo376/ChangeLog | 5 +
- c/src/lib/libbsp/m68k/mo376/Makefile.am | 2
- c/src/lib/libbsp/m68k/mo376/README | 25 ++++-----
- c/src/lib/libbsp/m68k/mo376/clock/ckinit.c | 2
- c/src/lib/libbsp/m68k/mo376/configure.ac | 2
- c/src/lib/libbsp/m68k/mo376/console/sci.c | 4 -
- c/src/lib/libbsp/m68k/mo376/include/bsp.h | 2
- c/src/lib/libbsp/m68k/mo376/include/mo376.h | 70 ++++++++++++++++++++++++++
- c/src/lib/libbsp/m68k/mo376/include/mrm332.h | 70 --------------------------
- c/src/lib/libbsp/m68k/mo376/preinstall.am | 6 +-
- c/src/lib/libbsp/m68k/mo376/start/start.S | 2
- c/src/lib/libbsp/m68k/mo376/startup/start_c.c | 2
- c/src/lib/libbsp/m68k/mo376/times | 6 +-
- make/custom/mo376.cfg | 8 +-
- 14 files changed, 106 insertions(+), 100 deletions(-)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/start/start.S
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/start/start.S 2009-11-29 01:11:56.463558538 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/start/start.S 2009-11-29 01:23:46.804588750 +0100
-@@ -2,7 +2,7 @@
- * $Id
- */
-
--#include "mrm332.h"
-+#include "mo376.h"
- #include <rtems/asm.h>
- #include <rtems/m68k/sim.h>
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/bsp.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/include/bsp.h 2007-12-11 16:49:20.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/bsp.h 2009-11-29 01:23:46.804588750 +0100
-@@ -26,7 +26,7 @@
- #include <rtems/clockdrv.h>
- #include <rtems/console.h>
- #include <rtems/iosupp.h>
--#include <mrm332.h>
-+#include <mo376.h>
- #include <rtems/m68k/sim.h>
- #include <rtems/m68k/qsm.h>
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/ChangeLog
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/ChangeLog 2008-12-08 06:15:06.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/ChangeLog 2009-11-29 01:28:09.931559632 +0100
-@@ -1,3 +1,8 @@
-+2009-11-27 Pavel Pisa <pisa@cmp.felk.cvut.cz>
-+
-+ * MO376 BSP for PiKRON's MO_CPU1/MO_CPU2 board started
-+ as clone of MRM332 BSP.
-+
- 2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * bsp_specs: Backport from CVS-HEAD.
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c 2008-09-06 00:05:15.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c 2009-11-29 01:23:46.808556503 +0100
-@@ -20,7 +20,7 @@
- #include <stdlib.h>
- #include <bsp.h>
- #include <rtems/libio.h>
--#include <mrm332.h>
-+#include <mo376.h>
-
- #define CLOCK_VECTOR MRM_PIV
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/configure.ac
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/configure.ac 2006-12-02 06:55:13.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/configure.ac 2009-11-29 01:23:46.808556503 +0100
-@@ -3,7 +3,7 @@
- ## $Id: configure.ac,v 1.16 2006/12/02 05:55:13 ralf Exp $
-
- AC_PREREQ(2.60)
--AC_INIT([rtems-c-src-lib-libbsp-m68k-mrm332],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
-+AC_INIT([rtems-c-src-lib-libbsp-m68k-mo376],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
- AC_CONFIG_SRCDIR([bsp_specs])
- RTEMS_TOP(../../../../../..)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/README
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/README 2009-11-29 01:11:56.471556761 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/README 2009-11-29 01:23:46.808556503 +0100
-@@ -2,23 +2,24 @@
- # $Id: README,v 1.1 2001/05/25 16:28:46 joel Exp $
- #
-
--Description: mrm332
-+Description: mo376
- ============
--CPU: MC68332 @16 or 25MHz
--RAM: 32k or 512k
--ROM: 512k flash
-+CPU: MC68376 @21MHz
-+RAM: 1MiB or 2MiB
-+ROM: 1MiB or 2MiB flash
-
-- The Mini RoboMind is a small board based on the 68332 microcontroller
--designed and build by Mark Castelluccio. For details, see:
-+ The mo376 BSP supports MO_CPU1/MO_CPU2 boards developed by PiKRON company.
-+The design documentation conforms open-source mind of board authors
-+and can be found on the company pages
-
-- http://www.robominds.com
-+ http://www.pikron.com/en/main_frame_mo_cpu1.html
-
-- This BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
--the efi332 BSP was written by John S Gwynne.
-+ This BSP has been cloned from Mini RoboMind BSP written for small board based
-+on the 68332 microcontroller designed and build by Mark Castelluccio
-+
-+ The mrm332 BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
-+the efi332 was written by John S Gwynne.
-
- TODO:
- =====
--- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
-- the interrupt priority and (2) to prevent it from blocking.
--- add a timer driver for the tmtest set.
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/Makefile.am
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/Makefile.am 2008-09-29 03:47:41.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/Makefile.am 2009-11-29 01:23:46.812556872 +0100
-@@ -15,7 +15,7 @@
- nodist_include_HEADERS = include/bspopts.h
- DISTCLEANFILES = include/bspopts.h
-
--include_HEADERS += include/mrm332.h
-+include_HEADERS += include/mo376.h
- nodist_include_HEADERS += ../../shared/include/coverhd.h
-
- EXTRA_DIST = times
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/console/sci.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/console/sci.c 2008-08-19 12:23:15.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/console/sci.c 2009-11-29 01:23:46.812556872 +0100
-@@ -105,7 +105,7 @@
-
- /* system clock definitions, i dont have documentation on this... */
-
--#if 0 /* Not needed, this is provided in mrm332.h */
-+#if 0 /* Not needed, this is provided in mo376.h */
- #define XTAL 32768.0 /* crystal frequency in Hz */
- #define NUMB_W 0 /* system clock parameters */
- #define NUMB_X 1
-@@ -1215,7 +1215,7 @@
-
- /* calculate the register value as a float and convert to an int */
- /* set baud rate - you must define the system clock constant */
-- /* see mrm332.h for an example */
-+ /* see mo376.h for an example */
-
- value = ( (uint16_t) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff );
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2008-08-19 12:23:15.000000000 +0200
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2009-11-29 01:23:46.812556872 +0100
-@@ -2,7 +2,7 @@
- * $Id
- */
-
--#include <mrm332.h>
-+#include <mo376.h>
- #include <rtems/m68k/sim.h>
- #define __START_C__
- #include "bsp.h"
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/times
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/times 2009-11-29 01:11:56.479557220 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/times 2009-11-29 01:23:46.816556473 +0100
-@@ -1,5 +1,5 @@
- #
--# Timing Test Suite Results for the MRM332 BSP
-+# Timing Test Suite Results for the MO376 BSP
- #
- # $Id: times,v 1.2 2004/01/07 21:13:50 joel Exp $
- #
-@@ -8,9 +8,9 @@
-
- TBD: MATT - update this with real times!
-
--Board: MRM332
-+Board: MO376
- CPU: 68332
--Clock Speed: 20 Mhz
-+Clock Speed: 21 Mhz
- Memory Configuration: SRAM, DRAM, cache, etc
- Wait States:
-
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/mo376.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/mo376.h 2009-11-29 01:23:46.816556473 +0100
-@@ -0,0 +1,70 @@
-+/* mo376.h
-+ *
-+ * $Id: mo376.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
-+ */
-+
-+#ifndef _MO376_H_
-+#define _MO376_H_
-+
-+/* SIM_MM (SIM Module Mapping) determines the location of the control
-+ register block. When MM=0, register addresses range fom 0x7ff000 to
-+ 0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
-+ 0xffffff. */
-+#define SIM_MM 1
-+
-+/* Interrupt related definitions */
-+#define SIM_IARB 15
-+#define QSM_IARB 10
-+
-+#define MRM_PIV 64
-+#define ISRL_PIT 4 /* zero disables PIT */
-+
-+#define EFI_QIVR 66 /* 66=>SCI and 67=>QSPI interrupt */
-+#define ISRL_QSPI 0
-+
-+#define EFI_SPINT 24 /* spurious interrupt */
-+#define EFI_INT1 25 /* CTS interrupt */
-+#define ISRL_SCI 6
-+
-+/* System Clock definitions */
-+#define XTAL 32768.0 /* crystal frequency in Hz */
-+
-+#if 0
-+/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
-+#define MRM_W 0 /* system clock parameters */
-+#define MRM_X 0
-+#define MRM_Y 0x3f
-+#endif
-+
-+#if 1
-+/* 16.77722 MHz: */
-+#define MRM_W 1 /* system clock parameters */
-+#define MRM_X 1
-+#define MRM_Y 0x0f
-+#endif
-+
-+#if 0
-+/* 25.16582 MHz: */
-+#define MRM_W 1 /* system clock parameters */
-+#define MRM_X 1
-+#define MRM_Y 0x17
-+#endif
-+
-+#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
-+#define SCI_BAUD 19200 /* RS232 Baud Rate */
-+
-+/* macros/functions */
-+
-+#ifndef ASM
-+
-+/*
-+ * This prototype really should have the noreturn attribute but
-+ * that causes a warning. Not sure how to fix that.
-+ */
-+/* static void reboot(void) __attribute__ ((noreturn)); */
-+static void reboot(void);
-+__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
-+
-+#endif /* ASM */
-+
-+#endif /* _MRM_H_ */
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/include/mrm332.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/include/mrm332.h 2009-11-29 01:11:56.479557220 +0100
-+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
-@@ -1,70 +0,0 @@
--/* mrm332.h
-- *
-- * $Id: mrm332.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
-- */
--
--#ifndef _MRM332_H_
--#define _MRM332_H_
--
--/* SIM_MM (SIM Module Mapping) determines the location of the control
-- register block. When MM=0, register addresses range fom 0x7ff000 to
-- 0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
-- 0xffffff. */
--#define SIM_MM 1
--
--/* Interrupt related definitions */
--#define SIM_IARB 15
--#define QSM_IARB 10
--
--#define MRM_PIV 64
--#define ISRL_PIT 4 /* zero disables PIT */
--
--#define EFI_QIVR 66 /* 66=>SCI and 67=>QSPI interrupt */
--#define ISRL_QSPI 0
--
--#define EFI_SPINT 24 /* spurious interrupt */
--#define EFI_INT1 25 /* CTS interrupt */
--#define ISRL_SCI 6
--
--/* System Clock definitions */
--#define XTAL 32768.0 /* crystal frequency in Hz */
--
--#if 0
--/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
--#define MRM_W 0 /* system clock parameters */
--#define MRM_X 0
--#define MRM_Y 0x3f
--#endif
--
--#if 1
--/* 16.77722 MHz: */
--#define MRM_W 1 /* system clock parameters */
--#define MRM_X 1
--#define MRM_Y 0x0f
--#endif
--
--#if 0
--/* 25.16582 MHz: */
--#define MRM_W 1 /* system clock parameters */
--#define MRM_X 1
--#define MRM_Y 0x17
--#endif
--
--#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
--#define SCI_BAUD 19200 /* RS232 Baud Rate */
--
--/* macros/functions */
--
--#ifndef ASM
--
--/*
-- * This prototype really should have the noreturn attribute but
-- * that causes a warning. Not sure how to fix that.
-- */
--/* static void reboot(void) __attribute__ ((noreturn)); */
--static void reboot(void);
--__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
--
--#endif /* ASM */
--
--#endif /* _MRM_H_ */
-Index: rtems-4.9.3/make/custom/mo376.cfg
-===================================================================
---- rtems-4.9.3.orig/make/custom/mo376.cfg 2009-11-29 01:21:43.173939736 +0100
-+++ rtems-4.9.3/make/custom/mo376.cfg 2009-11-29 01:25:58.227563597 +0100
-@@ -1,7 +1,7 @@
- #
--# Config file for the mrm332 BSP
-+# Config file for the mo376 BSP
- #
--# $Id: mrm332.cfg,v 1.18 2008/06/11 08:17:27 ccj Exp $
-+# $Id: mo376.cfg,v 1.18 2008/06/11 08:17:27 ccj Exp $
- #
-
- include $(RTEMS_ROOT)/make/custom/default.cfg
-@@ -10,7 +10,7 @@
- RTEMS_CPU_MODEL=m68332
-
- # This is the actual bsp directory used during the build process.
--RTEMS_BSP_FAMILY=mrm332
-+RTEMS_BSP_FAMILY=mo376
-
- # This contains the compiler options necessary to select the CPU model
- # and (hopefully) optimize for it.
-@@ -22,7 +22,7 @@
- ifeq ($(MRM_IN_ROM),yes)
- # Build a rommable image - move the .data section after the .text section
- # in the image.
--CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
-+CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mo376/lib/linkcmds_ROM
- endif
-
- ifeq ($(MRM_IN_ROM),yes)
-Index: rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/preinstall.am
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/m68k/mo376/preinstall.am 2009-11-29 01:11:56.483556820 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/m68k/mo376/preinstall.am 2009-11-29 01:23:46.816556473 +0100
-@@ -44,9 +44,9 @@
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
- PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
-
--$(PROJECT_INCLUDE)/mrm332.h: include/mrm332.h $(PROJECT_INCLUDE)/$(dirstamp)
-- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mrm332.h
--PREINSTALL_FILES += $(PROJECT_INCLUDE)/mrm332.h
-+$(PROJECT_INCLUDE)/mo376.h: include/mo376.h $(PROJECT_INCLUDE)/$(dirstamp)
-+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mo376.h
-+PREINSTALL_FILES += $(PROJECT_INCLUDE)/mo376.h
-
- $(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
+++ /dev/null
----
- c/src/lib/libbsp/powerpc/ec555/include/bsp.h | 31 ------------------------
- c/src/lib/libbsp/powerpc/ec555/startup/iss555.c | 5 +++
- c/src/lib/libbsp/powerpc/ec555/startup/linkcmds | 8 ------
- 3 files changed, 5 insertions(+), 39 deletions(-)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/include/bsp.h 2007-12-11 16:46:51.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/include/bsp.h 2009-11-29 01:52:21.559557050 +0100
-@@ -44,37 +44,6 @@
- #define BSP_CRYSTAL_HZ 4000000 /* crystal frequency, Hz */
- #define BSP_CLOCK_HZ 40000000 /* CPU clock frequency, Hz
-
--/*
-- * I/O definitions
-- *
-- * The SS555 board includes a CPLD to control on-board features and
-- * off-board devices.
-- */
--typedef struct cpld_ {
-- uint8_t cs3a[32]; /* Chip select 3A */
-- uint8_t pad0[0x200000 - 0x000020];
--
-- uint8_t cs3b[32]; /* Chip select 3B */
-- uint8_t pad2[0x400000 - 0x200020];
--
-- uint8_t cs3c[32]; /* Chip select 3C */
-- uint8_t pad4[0x600000 - 0x400020];
--
-- uint8_t cs3d[32]; /* Chip select 3D */
-- uint8_t pad6[0x800000 - 0x600020];
--
-- uint8_t serial_ints; /* Enable/disable serial interrupts */
-- uint8_t serial_resets; /* Enable/disable serial resets */
-- uint8_t serial_ack; /* Acknowledge serial transfers */
-- uint8_t pad8[0xA00000 - 0x800003];
--
-- uint8_t iflash_writess; /* Enable/disable internal-flash writes */
-- uint8_t nflash_writess; /* Enable/disable NAND-flash writes */
-- uint8_t padA[0xC00000 - 0xA00002];
--} cpld_t;
--
--extern volatile cpld_t cpld; /* defined in linkcmds */
--
- /* miscellaneous stuff assumed to exist */
-
- /*
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c 2009-11-29 01:38:37.616586852 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c 2009-11-29 01:52:21.559557050 +0100
-@@ -96,6 +96,8 @@
- */
- extern char int_ram_top[]; /* top of internal ram */
-
-+#if 0
-+
- usiu.memc[0]._or =
- USIU_MEMC_OR_512K /* bank size */
- | USIU_MEMC_OR_SCY(0) /* wait states in first beat of burst */
-@@ -127,6 +129,9 @@
- | USIU_MEMC_BR_BI /* inhibit bursting */
- | USIU_MEMC_BR_V; /* base register valid */
-
-+
-+#endif
-+
- /*
- * Disable show cycles and serialization so that burst accesses will work
- * properly. A different value, such as 0x0, may be more appropriate for
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds 2008-03-04 00:07:19.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds 2009-11-29 01:52:21.559557050 +0100
-@@ -268,14 +268,6 @@
- sram = .;
- }
-
-- /*
-- * SS555 external devices managed by on-board CPLD
-- */
-- .cpld 0xFF000000: /* SS555 external CPLD devices */
-- {
-- cpld = .;
-- }
--
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
+++ /dev/null
----
- c/src/lib/libbsp/powerpc/ec555/ChangeLog | 5 +++++
- c/src/lib/libbsp/powerpc/ec555/README | 18 +++++++++---------
- c/src/lib/libbsp/powerpc/ec555/configure.ac | 2 +-
- make/custom/ec555.cfg | 6 +++---
- 4 files changed, 18 insertions(+), 13 deletions(-)
-
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/ChangeLog 2008-12-08 06:15:50.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/ChangeLog 2009-11-29 01:49:00.499560796 +0100
-@@ -1,3 +1,8 @@
-+2009-11-27 Pavel Pisa <pisa@cmp.felk.cvut.cz>
-+
-+ * EC555 BSP for Wuerz-elektronik EC555 board started
-+ as clone of SS555 BSP.
-+
- 2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * bsp_specs: Backport from CVS-HEAD.
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/README 2009-11-29 01:38:37.608590025 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/README 2009-11-29 01:47:01.416556469 +0100
-@@ -2,9 +2,9 @@
- # $Id: README,v 1.1 2004/04/12 21:52:13 joel Exp $
- #
-
--This is a README file for the Intec SS555 of RTEMS 4.6.0
-+This is a README file for the Wuerz-elektronik EC555 of RTEMS 4.6.0
-
--The SS555 port was sponsored by Defence Research and Development
-+The EC555 port was sponsored by Defence Research and Development
- Canada - Suffield, and is Copyright (C) 2004, Real-Time Systems Inc.
-
- Please send any comments, improvements, or bug reports to:
-@@ -16,8 +16,8 @@
- Summary
- -------
-
--BSP NAME: ss555
--BOARD: Intec Automation Inc. SS555
-+BSP NAME: EC555
-+BOARD: Wuerz-elektronik EC555
- BUS: None
- CPU FAMILY: PowerPC
- CPU: PowerPC MPC555
-@@ -88,7 +88,7 @@
- Installation
- ------------
-
--The ss555 port uses the Intec SS555's external RAM in two different ways,
-+The EC555 port uses the Wuerz-elektronik EC555's external RAM in two different ways,
- depending on whether or not it is built for debugging by giving the
- VARIANT=DEBUG switch to make:
-
-@@ -112,7 +112,7 @@
-
- This BSP includes an termios-capable asynchronous serial line driver that
- supports SCI1 and SCI2. The RTEMS console is selected at configuration time
--with the CONSOLE_MINOR variable (see .../ss555/configure.ac). We default to
-+with the CONSOLE_MINOR variable (see .../ec555/configure.ac). We default to
- SCI2 for the console, since SCI1 has some extra features which may be
- desired for application use.
-
-@@ -123,7 +123,7 @@
- 3. interrupt-driven I/O with termios support.
-
- The mode of operation of the serial driver is determined at configure time in
--part by the value of the UARTS_IO_MODE variable (see .../ss555/configure.ac).
-+part by the value of the UARTS_IO_MODE variable (see .../ec555/configure.ac).
-
- 0 - polled I/O.
- 1 - interrupt-driven I/O.
-@@ -208,7 +208,7 @@
- Test Configuration
- ------------------
-
--Board: Intec SS555 v1.1
-+Board: Wuerz-elektronik EC555 v1.1
- CPU: Motorola MPC555LFMZP40, mask 1K83H
- Clock Speed: Crystal 4.0 MHz, CPU 40.0 MHz
- RAM: 512K bytes of 2-1-1-1 Burst SRAM
-@@ -244,7 +244,7 @@
- OPERATION_COUNT=20 at configuration time.
-
- To run tm27 (the interrupt latency timer test), short CN5-48 to CN5-50 on
-- the SS555 board.
-+ the EC555 board.
-
- All tests run cleanly, except for tm26, which gives a "PANIC 12" after it
- exits. This doesn't seem to cause a problem otherwise.
-Index: rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac
-===================================================================
---- rtems-4.9.3.orig/c/src/lib/libbsp/powerpc/ec555/configure.ac 2006-12-02 06:59:47.000000000 +0100
-+++ rtems-4.9.3/c/src/lib/libbsp/powerpc/ec555/configure.ac 2009-11-29 01:47:01.416556469 +0100
-@@ -3,7 +3,7 @@
- ## $Id: configure.ac,v 1.9 2006/12/02 05:59:47 ralf Exp $
-
- AC_PREREQ(2.60)
--AC_INIT([rtems-c-src-lib-libbsp-powerpc-mbx5xx],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
-+AC_INIT([rtems-c-src-lib-libbsp-powerpc-ec5xx],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
- AC_CONFIG_SRCDIR([bsp_specs])
- RTEMS_TOP(../../../../../..)
-
-Index: rtems-4.9.3/make/custom/ec555.cfg
-===================================================================
---- rtems-4.9.3.orig/make/custom/ec555.cfg 2009-11-29 01:43:49.127556601 +0100
-+++ rtems-4.9.3/make/custom/ec555.cfg 2009-11-29 01:51:19.435599101 +0100
-@@ -1,5 +1,5 @@
- #
--# Config file for an Intec Automation SS555 MPC555-based card
-+# Config file for an Wuerz-elektronik EC555 MPC555-based card
- #
- # This file is derived from:
- #
-@@ -7,7 +7,7 @@
- # Config file for a PowerPC 403 based helas403 card
- # Config file for MPC860 based Ethernet Comm Board
- #
--# $Id: ss555.cfg,v 1.11 2008/03/11 20:50:58 joel Exp $
-+# $Id: ec555.cfg,v 1.11 2008/03/11 20:50:58 joel Exp $
- #
-
- include $(RTEMS_ROOT)/make/custom/default.cfg
-@@ -17,7 +17,7 @@
- RTEMS_CPU_MODEL=mpc555
-
- # This is the actual bsp directory used during the build process.
--RTEMS_BSP_FAMILY=ss555
-+RTEMS_BSP_FAMILY=ec555
-
- # This contains the compiler options necessary to select the CPU model
- # and (hopefully) optimize for it.
+++ /dev/null
-rtems-m9328-pimx1-mapping-change.patch
-rtems-m9328-pimx1-baud-19200.patch
-rtems-m9328-pimx1-syncmclk.patch
-rtems-clone-mrm332-to-mo376.patch
-rtems-update-mrm332-to-mo376.patch
-rtems-mo376-add-to-configs.patch
-rtems-mo376-m68376-updates.patch
-rtems-clone-ss555-to-ec555.patch
-rtems-ec555-add-to-configs.patch
-rtems-update-ss555-to-ec555.patch
-rtems-update-ss555-to-ec555-cpld-remove.patch
-rtems-m9328-pimx1-uart1to3.patch
-#rtems-m5235bcc-changes.patch