From faed5fa955f9f6b44fc305866bc3181769d495ee Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Mon, 22 Nov 2004 22:15:47 +0000 Subject: 2004-11-22 Jennifer Averett PR 581/bsps * mpc6xx/exceptions/raw_exception.c, shared/include/cpuIdent.h: Converting PSIM to new exception model required adding PSIM as PowerPC CPU model. --- c/src/lib/libcpu/powerpc/ChangeLog | 7 +++++ .../powerpc/mpc6xx/exceptions/raw_exception.c | 36 ++++++++++++++++++++++ c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 1 + 3 files changed, 44 insertions(+) diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 91d52efb9b..0f4815928b 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,10 @@ +2004-11-22 Jennifer Averett + + PR 581/bsps + * mpc6xx/exceptions/raw_exception.c, shared/include/cpuIdent.h: + Converting PSIM to new exception model required adding PSIM as + PowerPC CPU model. + 2004-11-20 Ralf Corsepius * powerpc/shared/include/cpuIdent.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 911031de44..282297878e 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) { @@ -152,6 +183,11 @@ 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 a0a7fd89ae..e26e609fce 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h @@ -38,6 +38,7 @@ typedef enum PPC_8240 = PPC_8260, PPC_8245 = 0x8081, PPC_603le = 0x8082, /* 603le core, in MGT5100 and MPC5200 */ + PPC_PSIM = 0xfffe, /* GDB PowerPC simulator -- fake version */ PPC_UNKNOWN = 0xffff } ppc_cpu_id_t; -- cgit v1.2.3