summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2004-11-22 22:32:47 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2004-11-22 22:32:47 +0000
commitf778d4c5319a9e5791b4f040603b5b50cda59260 (patch)
treecf4850a5bf65a9f6cdc1fc1a0b1b59cf9b1103aa
parent2004-11-22 Jennifer Averett <jennifer@OARcorp.com> (diff)
downloadrtems-f778d4c5319a9e5791b4f040603b5b50cda59260.tar.bz2
2004-11-22 Jennifer Averett <jennifer@OARcorp.com>
PR 581/bsps * mpc6xx/exceptions/raw_exception.c, shared/include/cpuIdent.h: Converting PSIM to new exception model required addition of PSIM CPU model.
-rw-r--r--c/src/lib/libcpu/powerpc/ChangeLog7
-rw-r--r--c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c37
-rw-r--r--c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h1
3 files changed, 45 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog
index 6633c6f922..7e1d8e8037 100644
--- a/c/src/lib/libcpu/powerpc/ChangeLog
+++ b/c/src/lib/libcpu/powerpc/ChangeLog
@@ -1,3 +1,10 @@
+2004-11-22 Jennifer Averett <jennifer@OARcorp.com>
+
+ PR 581/bsps
+ * mpc6xx/exceptions/raw_exception.c, shared/include/cpuIdent.h:
+ Converting PSIM to new exception model required addition of PSIM CPU
+ model.
+
2004-11-10 Richard Campbell <richard.campbell@oarcorp.com>
* configure.ac, mpc6xx/exceptions/raw_exception.c,
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c
index 1c1e21be65..cb202035b0 100644
--- a/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c
+++ b/c/src/lib/libcpu/powerpc/mpc6xx/exceptions/raw_exception.c
@@ -67,6 +67,37 @@ int mpc750_vector_is_valid(rtems_vector vector)
}
}
+int PSIM_vector_is_valid(rtems_vector vector)
+{
+ switch(vector) {
+ case ASM_RESET_VECTOR: /* fall through */
+ case ASM_MACH_VECTOR:
+ case ASM_PROT_VECTOR:
+ case ASM_ISI_VECTOR:
+ case ASM_EXT_VECTOR:
+ case ASM_ALIGN_VECTOR:
+ case ASM_PROG_VECTOR:
+ case ASM_FLOAT_VECTOR:
+ case ASM_DEC_VECTOR:
+ return 1;
+ case ASM_SYS_VECTOR:
+ return 0;
+ case ASM_TRACE_VECTOR:
+ return 1;
+ case ASM_PERFMON_VECTOR:
+ return 0;
+ case ASM_IMISS_VECTOR: /* fall through */
+ case ASM_DLMISS_VECTOR:
+ case ASM_DSMISS_VECTOR:
+ case ASM_ADDR_VECTOR:
+ case ASM_SYSMGMT_VECTOR:
+ return 1;
+ case ASM_ITM_VECTOR:
+ return 0;
+ }
+ return 0;
+}
+
int mpc603_vector_is_valid(rtems_vector vector)
{
switch(vector) {
@@ -151,6 +182,12 @@ int mpc60x_vector_is_valid(rtems_vector vector)
return 0;
}
break;
+ case PPC_PSIM:
+ if (!PSIM_vector_is_valid(vector)) {
+ return 0;
+ }
+ break;
+
default:
printk("Please complete "
"libcpu/powerpc/mpc6xx/exceptions/raw_exception.c\n"
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
index 53eac1cb2c..bdd13fde4c 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h
@@ -34,6 +34,7 @@ typedef enum
PPC_8260 = 0x81,
PPC_8240 = PPC_8260,
PPC_8245 = 0x8081,
+ PPC_PSIM = 0xfffe, /* GDB PowerPC simulator -- fake version */
PPC_UNKNOWN = 0xffff
} ppc_cpu_id_t;