summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-01-08 18:11:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-01-08 18:11:35 +0000
commitb03f4f2c9de2ff567c9eae5acb7090e26cf5de49 (patch)
tree82b64cb2eab5010174663e7a5af45c3484677ee7
parentec5afe01a54615cced746a3741af86ddee72bdcd (diff)
downloadrtems-b03f4f2c9de2ff567c9eae5acb7090e26cf5de49.tar.bz2
2001-01-08 Joel Sherrill <joel@OARcorp.com>
* Added r46xx directory. * Makefile.am, configure.in: Modified to reflect addition of r46xx. * shared/interrupts/installisrentries.c: Fixed typo. * r46xx/.cvsignore, r46xx/Makefile.am, r46xx/vectorisrs/.cvsignore, r46xx/vectorisrs/Makefile.am, r46xx/vectorisrs/vectorisrs.c: New files.
-rw-r--r--c/src/lib/libcpu/mips/ChangeLog9
-rw-r--r--c/src/lib/libcpu/mips/Makefile.am2
-rw-r--r--c/src/lib/libcpu/mips/configure.in3
-rw-r--r--c/src/lib/libcpu/mips/r46xx/.cvsignore13
-rw-r--r--c/src/lib/libcpu/mips/r46xx/Makefile.am11
-rw-r--r--c/src/lib/libcpu/mips/r46xx/vectorisrs/.cvsignore13
-rw-r--r--c/src/lib/libcpu/mips/r46xx/vectorisrs/Makefile.am30
-rw-r--r--c/src/lib/libcpu/mips/r46xx/vectorisrs/vectorisrs.c46
-rw-r--r--c/src/lib/libcpu/mips/shared/interrupts/installisrentries.c2
9 files changed, 127 insertions, 2 deletions
diff --git a/c/src/lib/libcpu/mips/ChangeLog b/c/src/lib/libcpu/mips/ChangeLog
index c1e87044a4..0a44281d6d 100644
--- a/c/src/lib/libcpu/mips/ChangeLog
+++ b/c/src/lib/libcpu/mips/ChangeLog
@@ -1,3 +1,12 @@
+2001-01-08 Joel Sherrill <joel@OARcorp.com>
+
+ * Added r46xx directory.
+ * Makefile.am, configure.in: Modified to reflect addition of r46xx.
+ * shared/interrupts/installisrentries.c: Fixed typo.
+ * r46xx/.cvsignore, r46xx/Makefile.am,
+ r46xx/vectorisrs/.cvsignore, r46xx/vectorisrs/Makefile.am,
+ r46xx/vectorisrs/vectorisrs.c: New files.
+
2000-12-19 Joel Sherrill <joel@OARcorp.com>
* tx39/vectorisrs/vectorisrs.c: Modified to have default exception
diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am
index c98068980d..ed04a69b14 100644
--- a/c/src/lib/libcpu/mips/Makefile.am
+++ b/c/src/lib/libcpu/mips/Makefile.am
@@ -12,7 +12,7 @@ CPU_SUBDIR = tx39
endif
if r46xx
-CPU_SUBDIR = clock timer
+CPU_SUBDIR = clock timer r46xx
endif
SUBDIRS = $(SHARED_LIB) $(CPU_SUBDIR)
diff --git a/c/src/lib/libcpu/mips/configure.in b/c/src/lib/libcpu/mips/configure.in
index a3f3bcea4d..8f7e9bc3e0 100644
--- a/c/src/lib/libcpu/mips/configure.in
+++ b/c/src/lib/libcpu/mips/configure.in
@@ -38,6 +38,9 @@ clock/Makefile
shared/Makefile
shared/cache/Makefile
shared/interrupts/Makefile
+r46xx/Makefile
+r46xx/vectorisrs/Makefile
+timer/Makefile
tx39/Makefile
tx39/include/Makefile
tx39/vectorisrs/Makefile
diff --git a/c/src/lib/libcpu/mips/r46xx/.cvsignore b/c/src/lib/libcpu/mips/r46xx/.cvsignore
new file mode 100644
index 0000000000..525275c115
--- /dev/null
+++ b/c/src/lib/libcpu/mips/r46xx/.cvsignore
@@ -0,0 +1,13 @@
+Makefile
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+mkinstalldirs
diff --git a/c/src/lib/libcpu/mips/r46xx/Makefile.am b/c/src/lib/libcpu/mips/r46xx/Makefile.am
new file mode 100644
index 0000000000..1c65a83044
--- /dev/null
+++ b/c/src/lib/libcpu/mips/r46xx/Makefile.am
@@ -0,0 +1,11 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+ACLOCAL_AMFLAGS = -I ../../../../../../aclocal
+
+SUBDIRS = vectorisrs
+
+include $(top_srcdir)/../../../../../automake/subdirs.am
+include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/mips/r46xx/vectorisrs/.cvsignore b/c/src/lib/libcpu/mips/r46xx/vectorisrs/.cvsignore
new file mode 100644
index 0000000000..525275c115
--- /dev/null
+++ b/c/src/lib/libcpu/mips/r46xx/vectorisrs/.cvsignore
@@ -0,0 +1,13 @@
+Makefile
+Makefile.in
+aclocal.m4
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+mkinstalldirs
diff --git a/c/src/lib/libcpu/mips/r46xx/vectorisrs/Makefile.am b/c/src/lib/libcpu/mips/r46xx/vectorisrs/Makefile.am
new file mode 100644
index 0000000000..16c4dbef0b
--- /dev/null
+++ b/c/src/lib/libcpu/mips/r46xx/vectorisrs/Makefile.am
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+AUTOMAKE_OPTIONS = foreign 1.4
+
+PGM = $(ARCH)/vectorisrs.rel
+
+C_FILES = vectorisrs.c
+
+vectorisrs_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.o) $(S_FILES:%.S=$(ARCH)/%.o)
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../../../../../automake/compile.am
+include $(top_srcdir)/../../../../../automake/lib.am
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+$(PGM): $(vectorisrs_rel_OBJECTS)
+ $(make-rel)
+
+all-local: $(ARCH) $(vectorisrs_rel_OBJECTS) $(PGM)
+
+.PRECIOUS: $(PGM)
+
+EXTRA_DIST = vectorisrs.c
+
+include $(top_srcdir)/../../../../../automake/local.am
diff --git a/c/src/lib/libcpu/mips/r46xx/vectorisrs/vectorisrs.c b/c/src/lib/libcpu/mips/r46xx/vectorisrs/vectorisrs.c
new file mode 100644
index 0000000000..8f2a2f1c3c
--- /dev/null
+++ b/c/src/lib/libcpu/mips/r46xx/vectorisrs/vectorisrs.c
@@ -0,0 +1,46 @@
+/*
+ * $Id$
+ */
+
+#include <rtems.h>
+#include <stdlib.h>
+
+#define mips_get_cause( _cause ) \
+ do { \
+ asm volatile( "mfc0 %0, $13; nop" : "=g" (_cause) : ); \
+ } while (0)
+
+#define CALL_ISR(_vector) \
+ do { \
+ if ( _ISR_Vector_table[_vector] ) \
+ (_ISR_Vector_table[_vector])(_vector); \
+ else \
+ mips_default_exception(_vector); \
+ } while (0)
+
+void mips_default_exception( int vector )
+{
+ printk( "Unhandled exception %d\n", vector );
+ rtems_fatal_error_occurred(1);
+}
+
+void mips_vector_isr_handlers( void )
+{
+ unsigned int sr;
+ unsigned int cause;
+ unsigned int i;
+ unsigned int mask;
+
+ mips_get_sr( sr );
+ mips_get_cause( cause );
+
+ cause &= (sr & SR_IMASK);
+ cause >>= CAUSE_IPSHIFT;
+
+ /* XXX check this and think about it. */
+
+ for ( i=1, mask=0x80 ; i<=8 ; i++, mask >>= 1 ) {
+ if ( cause & mask )
+ CALL_ISR( 8 - i );
+ }
+}
diff --git a/c/src/lib/libcpu/mips/shared/interrupts/installisrentries.c b/c/src/lib/libcpu/mips/shared/interrupts/installisrentries.c
index 5dd37f82bb..b216e21066 100644
--- a/c/src/lib/libcpu/mips/shared/interrupts/installisrentries.c
+++ b/c/src/lib/libcpu/mips/shared/interrupts/installisrentries.c
@@ -16,7 +16,7 @@ void mips_install_isr_entries( void )
memcpy( (void *)E_VEC, exc_norm_code, 40 ); /* exception vevtor */
#elif __mips == 3
void exc_tlb_code(void);
- void exc_utlb_code(void);
+ void exc_xtlb_code(void);
void exc_cache_code(void);
void exc_norm_code(void);