From 4be2812f5bed647ebdf98d99203ed6783825a012 Mon Sep 17 00:00:00 2001 From: Till Straumann Date: Sat, 8 Dec 2007 22:46:59 +0000 Subject: [PATCH] 2007-12-08 Till Straumann * new-exceptions/e500_raw_exc_init.c, new-exceptions/raw_exception.c, shared/include/cpuIdent.c, shared/include/cpuIdent.h: Added different kinds of 'bookE' to the ppc_cpu_is_bookE feature check; unfortunately... --- c/src/lib/libcpu/powerpc/ChangeLog | 7 +++++++ .../lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c | 3 ++- c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c | 7 ++++--- c/src/lib/libcpu/powerpc/shared/include/cpuIdent.c | 4 +++- c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 5 ++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 448534d31a..6353711fa3 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,10 @@ +2007-12-08 Till Straumann + + * new-exceptions/e500_raw_exc_init.c, new-exceptions/raw_exception.c, + shared/include/cpuIdent.c, shared/include/cpuIdent.h: + Added different kinds of 'bookE' to the ppc_cpu_is_bookE feature + check; unfortunately... + 2007-12-07 Till Straumann * Makefile.am: must not add e500_raw_exc_init.c to diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c b/c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c index 4a33006680..1ec5a9c653 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c +++ b/c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c @@ -7,7 +7,8 @@ void e500_setup_raw_exceptions() { - if ( !ppc_cpu_is_bookE() ) +unsigned c; + if ( ! (c = ppc_cpu_is_bookE()) || PPC_BOOKE_405 == c ) return; asm volatile("mtivpr %0"::"r"(0)); /* setup vectors to be compatible with classic PPC */ diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c b/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c index 926fe41670..01dec9d342 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c +++ b/c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c @@ -443,7 +443,8 @@ int ppc_delete_exception (const rtems_raw_except_connect_data* except) int ppc_init_exceptions (rtems_raw_except_global_settings* config) { rtems_interrupt_level k; - int i; + int i; + unsigned c; /* * store various accelerators @@ -454,7 +455,7 @@ int ppc_init_exceptions (rtems_raw_except_global_settings* config) rtems_interrupt_disable(k); - if ( ppc_cpu_is_bookE() ) { + if ( (c = ppc_cpu_is_bookE()) && PPC_BOOKE_405 != c ) { e500_setup_raw_exceptions(); } @@ -463,7 +464,7 @@ int ppc_init_exceptions (rtems_raw_except_global_settings* config) * We also rely on LAST_VALID_EXC < 32 */ for ( i=0; i <= LAST_VALID_EXC; i++ ) { - if ( PPC_EXC_405_CRITICAL == ppc_vector_is_valid( i ) ) + if ( PPC_EXC_405_CRITICAL == (ppc_vector_is_valid( i ) & ~PPC_EXC_ASYNC) ) bsp_raw_vector_is_405_critical |= (1<