summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-22 13:46:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2001-10-22 13:46:37 +0000
commit48694da292f65d6c67e58e88a5c664c41693d1fc (patch)
tree7e1a3f48f266b03fd4600a626bcc96365c33626a /c
parent2001-10-22 Andy Dachs <a.dachs@sstl.co.uk> (diff)
downloadrtems-48694da292f65d6c67e58e88a5c664c41693d1fc.tar.bz2
2001-10-22 Andy Dachs <a.dachs@sstl.co.uk>
* Makefile.am, README, configure.ac, new_exception_processing/cpu.h, shared/include/cpu.h, shared/include/cpuIdent.c, shared/src/cache.c: Added mpc8260 support.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h8
-rw-r--r--c/src/lib/libcpu/powerpc/ChangeLog6
-rw-r--r--c/src/lib/libcpu/powerpc/Makefile.am3
-rw-r--r--c/src/lib/libcpu/powerpc/README1
-rw-r--r--c/src/lib/libcpu/powerpc/configure.ac15
-rw-r--r--c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h8
-rw-r--r--c/src/lib/libcpu/powerpc/shared/include/cpu.h7
-rw-r--r--c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c4
-rw-r--r--c/src/lib/libcpu/powerpc/shared/src/cache.c4
9 files changed, 50 insertions, 6 deletions
diff --git a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h
index 1c9ca2ce23..3e434573ee 100644
--- a/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h
+++ b/c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.h
@@ -3,6 +3,9 @@
* This include file contains information pertaining to the PowerPC
* processor.
*
+ * Modified for MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited (SSTL), 2001
+ *
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
@@ -256,6 +259,7 @@ extern "C" {
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
+
/*
* Does the stack grow up (toward higher addresses) or down
* (toward lower addresses)?
@@ -439,7 +443,7 @@ typedef struct {
unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
boolean exceptions_in_RAM; /* TRUE if in RAM */
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
+#if (defined(ppc403) || defined(mpc860) || defined(mpc821) || defined(mpc8260))
unsigned32 serial_per_sec; /* Serial clocks per second */
boolean serial_external_clock;
boolean serial_xon_xoff;
@@ -450,7 +454,7 @@ typedef struct {
boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
#endif
-#if (defined(mpc860) || defined(mpc821))
+#if (defined(mpc860) || defined(mpc821) || defined( mpc8260))
unsigned32 clock_speed; /* Speed of CPU in Hz */
#endif
} rtems_cpu_table;
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog
index 4dee3665af..5873ecf6d5 100644
--- a/c/src/lib/libcpu/powerpc/ChangeLog
+++ b/c/src/lib/libcpu/powerpc/ChangeLog
@@ -1,5 +1,11 @@
2001-10-22 Andy Dachs <a.dachs@sstl.co.uk>
+ * Makefile.am, README, configure.ac, new_exception_processing/cpu.h,
+ shared/include/cpu.h, shared/include/cpuIdent.c, shared/src/cache.c:
+ Added mpc8260 support.
+
+2001-10-22 Andy Dachs <a.dachs@sstl.co.uk>
+
* Added mpc8260 directory.
* Modified Makefile.am and configure.in to build the contents
* mpc8260/Makefile.am, mpc8260/README, mpc8260/clock/Makefile.am,
diff --git a/c/src/lib/libcpu/powerpc/Makefile.am b/c/src/lib/libcpu/powerpc/Makefile.am
index fb1f71441f..0f12c3ba67 100644
--- a/c/src/lib/libcpu/powerpc/Makefile.am
+++ b/c/src/lib/libcpu/powerpc/Makefile.am
@@ -28,6 +28,9 @@ endif
if mpc8xx
CPU_SUBDIR = mpc8xx
endif
+if mpc8260
+CPU_SUBDIR = mpc8260
+endif
if ppc403
CPU_SUBDIR = ppc403
endif
diff --git a/c/src/lib/libcpu/powerpc/README b/c/src/lib/libcpu/powerpc/README
index 2e215dd5e0..bd1d41e66a 100644
--- a/c/src/lib/libcpu/powerpc/README
+++ b/c/src/lib/libcpu/powerpc/README
@@ -18,6 +18,7 @@ family members:
+ mpc821
+ mpc860
+ ppc403
+ + mpc8260
Note that because of similarities in various family members,
the mpc823 should be able to use the mpc821 code and the
diff --git a/c/src/lib/libcpu/powerpc/configure.ac b/c/src/lib/libcpu/powerpc/configure.ac
index f34f99993a..08252af1c4 100644
--- a/c/src/lib/libcpu/powerpc/configure.ac
+++ b/c/src/lib/libcpu/powerpc/configure.ac
@@ -33,6 +33,7 @@ AM_CONDITIONAL(shared, test "$RTEMS_CPU_MODEL" = "mpc750" \
|| test "$RTEMS_CPU_MODEL" = "mpc6xx" \
|| test "$RTEMS_CPU_MODEL" = "mpc821" \
|| test "$RTEMS_CPU_MODEL" = "mpc860" \
+|| test "$RTEMS_CPU_MODEL" = "mpc8260" \
|| test "$RTEMS_CPU_MODEL" = "mpc8xx" )
## there are no 601 or 602 BSPs currently. The 505 BSPs are in user land.
@@ -40,7 +41,9 @@ AM_CONDITIONAL(new_exception_processing, \
test "$RTEMS_CPU_MODEL" = "mpc750" || \
test "$RTEMS_CPU_MODEL" = "mpc604" || \
test "$RTEMS_CPU_MODEL" = "mpc8xx" || \
-test "$RTEMS_CPU_MODEL" = "mpc860")
+test "$RTEMS_CPU_MODEL" = "mpc8260" || \
+test "$RTEMS_CPU_MODEL" = "mpc860" \
+)
## The goal is to get rid of the old exception processing code but
## but all BSPs in the distribution must be migrated to the new model
@@ -48,6 +51,7 @@ test "$RTEMS_CPU_MODEL" = "mpc860")
AM_CONDITIONAL(old_exception_processing, \
test "$RTEMS_CPU_MODEL" = "ppc403" || \
test "$RTEMS_CPU_MODEL" = "mpc505" || \
+#test "$RTEMS_CPU_MODEL" = "mpc8260" || \
test "$RTEMS_CPU_MODEL" = "ppc603e" \
)
@@ -59,6 +63,7 @@ AM_CONDITIONAL(mpc6xx, test "$RTEMS_CPU_MODEL" = "mpc6xx" \
AM_CONDITIONAL(mpc8xx, test "$RTEMS_CPU_MODEL" = "mpc8xx" \
|| test "$RTEMS_CPU_MODEL" = "mpc821" \
|| test "$RTEMS_CPU_MODEL" = "mpc860" )
+AM_CONDITIONAL(mpc8260, test "$RTEMS_CPU_MODEL" = "mpc8260")
AM_CONDITIONAL(ppc403, test "$RTEMS_CPU_MODEL" = "ppc403")
# Explicitly list all Makefiles here
@@ -88,6 +93,14 @@ mpc6xx/exceptions/Makefile
mpc6xx/mmu/Makefile
mpc6xx/timer/Makefile
mpc6xx/wrapup/Makefile
+mpc8260/Makefile
+mpc8260/clock/Makefile
+mpc8260/console-generic/Makefile
+mpc8260/include/Makefile
+mpc8260/timer/Makefile
+mpc8260/exceptions/Makefile
+mpc8260/mmu/Makefile
+mpc8260/cpm/Makefile
new_exception_processing/Makefile
old_exception_processing/Makefile
shared/Makefile
diff --git a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h b/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h
index 1c9ca2ce23..3e434573ee 100644
--- a/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h
+++ b/c/src/lib/libcpu/powerpc/new_exception_processing/cpu.h
@@ -3,6 +3,9 @@
* This include file contains information pertaining to the PowerPC
* processor.
*
+ * Modified for MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited (SSTL), 2001
+ *
* Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
@@ -256,6 +259,7 @@ extern "C" {
#define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
+
/*
* Does the stack grow up (toward higher addresses) or down
* (toward lower addresses)?
@@ -439,7 +443,7 @@ typedef struct {
unsigned32 clicks_per_usec; /* Timer clicks per microsecond */
boolean exceptions_in_RAM; /* TRUE if in RAM */
-#if (defined(ppc403) || defined(mpc860) || defined(mpc821))
+#if (defined(ppc403) || defined(mpc860) || defined(mpc821) || defined(mpc8260))
unsigned32 serial_per_sec; /* Serial clocks per second */
boolean serial_external_clock;
boolean serial_xon_xoff;
@@ -450,7 +454,7 @@ typedef struct {
boolean timer_internal_clock; /* TRUE, when timer runs with CPU clk */
#endif
-#if (defined(mpc860) || defined(mpc821))
+#if (defined(mpc860) || defined(mpc821) || defined( mpc8260))
unsigned32 clock_speed; /* Speed of CPU in Hz */
#endif
} rtems_cpu_table;
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpu.h b/c/src/lib/libcpu/powerpc/shared/include/cpu.h
index 342d947f05..03d22e8020 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpu.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpu.h
@@ -8,6 +8,10 @@
* Copyright (C) 1999 Eric Valette (valette@crf.canon.fr)
* Canon Centre Recherche France.
*
+ * Added MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited
+ *
+ *
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
@@ -184,6 +188,7 @@ typedef enum {
PPC_620 = 0x16,
PPC_860 = 0x50,
PPC_821 = PPC_860,
+ PPC_8260 = 0x81,
PPC_UNKNOWN = 0xff
} ppc_cpu_id_t;
@@ -317,6 +322,8 @@ static inline void PPC_Set_timebase_register (unsigned long long tbr)
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
} while (0)
+#define PPC_Get_decrementer( _clicks ) \
+ asm volatile( "mfdec %0" : "=r" (_clicks) )
#ifdef __cplusplus
}
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c
index b4f54fc5f8..a2e01ab963 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c
@@ -3,6 +3,9 @@
*
* Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
*
+ * Added MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited
+ *
* The license and distribution terms for this file may be
* found in found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
@@ -37,6 +40,7 @@ ppc_cpu_id_t get_ppc_cpu_type()
case PPC_604r:
case PPC_620:
case PPC_860:
+ case PPC_8260:
current_ppc_cpu = (ppc_cpu_id_t) pvr;
return current_ppc_cpu;
default:
diff --git a/c/src/lib/libcpu/powerpc/shared/src/cache.c b/c/src/lib/libcpu/powerpc/shared/src/cache.c
index 1c4cb63298..a83e28891b 100644
--- a/c/src/lib/libcpu/powerpc/shared/src/cache.c
+++ b/c/src/lib/libcpu/powerpc/shared/src/cache.c
@@ -1,5 +1,7 @@
/*
* Cache Management Support Routines for the MC68040
+ * Modified for MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
+ * Surrey Satellite Technology Limited (SSTL), 2001
*
* $Id$
*/
@@ -17,7 +19,7 @@
* FIXME: Some functions simply have not been implemented.
*/
-#if defined(ppc603) /* And possibly others */
+#if defined(ppc603) || defined(mpc8260) /* And possibly others */
/* Helpful macros */
#define PPC_Get_HID0( _value ) \