summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2007-12-06 21:10:25 +0000
committerTill Straumann <strauman@slac.stanford.edu>2007-12-06 21:10:25 +0000
commitf6a6970668c74059d5c063224de1b9e49658d7fe (patch)
tree702c80ad671ad7588e80d78f01bf812628494617
parent2007-12-06 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-f6a6970668c74059d5c063224de1b9e49658d7fe.tar.bz2
2007-12-06 Till Straumann <strauman@slac.stanford.edu>
* shared/vectors/vectors_init.c: replaced switch ( current_ppc_cpu ) { } check by feature check.
-rw-r--r--c/src/lib/libbsp/powerpc/ChangeLog5
-rw-r--r--c/src/lib/libbsp/powerpc/shared/vectors/vectors_init.c14
2 files changed, 6 insertions, 13 deletions
diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog
index 1cd3be2690..39b22ce426 100644
--- a/c/src/lib/libbsp/powerpc/ChangeLog
+++ b/c/src/lib/libbsp/powerpc/ChangeLog
@@ -1,5 +1,10 @@
2007-12-06 Till Straumann <strauman@slac.stanford.edu>
+ * shared/vectors/vectors_init.c: replaced
+ switch ( current_ppc_cpu ) { } check by feature check.
+
+2007-12-06 Till Straumann <strauman@slac.stanford.edu>
+
* shared/irq/irq_asm.S, shared/vectors/vectors.S:
Replaced use of hardcoded PPC_EXC_MSR_BITS by a
run-time method to determine these bits (use settings
diff --git a/c/src/lib/libbsp/powerpc/shared/vectors/vectors_init.c b/c/src/lib/libbsp/powerpc/shared/vectors/vectors_init.c
index b87c3d00be..6a5c5fa5f7 100644
--- a/c/src/lib/libbsp/powerpc/shared/vectors/vectors_init.c
+++ b/c/src/lib/libbsp/powerpc/shared/vectors/vectors_init.c
@@ -150,7 +150,6 @@ int exception_always_enabled(const rtems_raw_except_connect_data* ptr)
void initialize_exceptions()
{
int i;
- int has_shadowed_gprs = 0;
/*
* Initialize pointer used by low level execption handling
@@ -171,24 +170,13 @@ void initialize_exceptions()
*/
exception_config.defaultRawEntry.hdl.raw_hdl_size = (unsigned) default_exception_vector_code_prolog_size;
- switch ( get_ppc_cpu_type() ) {
- case PPC_603e:
- case PPC_603ev:
- case PPC_603le:
- case PPC_e300c1:
- case PPC_e300c2:
- case PPC_e300c3:
- case PPC_8240:
- has_shadowed_gprs = 1;
- default: break;
- }
for (i=0; i <= exception_config.exceptSize; i++) {
if (!ppc_vector_is_valid (i)) {
continue;
}
exception_table[i].exceptIndex = i;
#if defined(PPC_HAS_60X_VECTORS)
- if ( has_shadowed_gprs
+ if ( ppc_cpu.has_shadowed_gprs()
&& ( ASM_60X_IMISS_VECTOR == i
|| ASM_60X_DLMISS_VECTOR == i
|| ASM_60X_DSMISS_VECTOR == i ) ) {