Index: c/src/lib/libbsp/powerpc/ep1a/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/ep1a/ChangeLog	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -1,2 +1,6 @@
+2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* irq/irq_init.c: adapted to shared exception code
+
 2007-07-06	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/ep1a/irq/irq_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -316,5 +316,5 @@
     vectorDesc.off		=	nop_func;
     vectorDesc.isOn		=	connected;
-    if (!mpc60x_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
     }
@@ -323,5 +323,5 @@
     vectorDesc.hdl.raw_hdl	=	external_exception_vector_prolog_code;
     vectorDesc.hdl.raw_hdl_size	=	(unsigned) external_exception_vector_prolog_code_size;
-    if (!mpc60x_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS external raw exception\n");
     }
Index: c/src/lib/libbsp/powerpc/gen5200/vectors/vectors_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/gen5200/vectors/vectors_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/gen5200/vectors/vectors_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -77,5 +77,4 @@
 #include <rtems/bspIo.h>
 
-extern int mpc60x_vector_is_valid(rtems_vector);
 static rtems_raw_except_global_settings exception_config;
 static rtems_raw_except_connect_data    exception_table[LAST_VALID_EXC + 1];
Index: c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -1,2 +1,7 @@
+2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* vectors/vectors_init.c, irq/irq_init.c: 
+	adapted to shared exception code
+
 2007-04-12	Ralf CorsÃ©pius <ralf.corsepius@rtems.org>
 
Index: c/src/lib/libbsp/powerpc/mbx8xx/irq/irq_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/mbx8xx/irq/irq_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mbx8xx/irq/irq_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -148,5 +148,5 @@
     vectorDesc.off		=	nop_func2;
     vectorDesc.isOn		=	connected;
-    if (!mpc8xx_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
     }
@@ -155,5 +155,5 @@
     vectorDesc.hdl.raw_hdl	=	external_exception_vector_prolog_code;
     vectorDesc.hdl.raw_hdl_size	=	(unsigned) &external_exception_vector_prolog_code_size;
-    if (!mpc8xx_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS external raw exception\n");
     }
Index: c/src/lib/libbsp/powerpc/mbx8xx/vectors/vectors_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/mbx8xx/vectors/vectors_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mbx8xx/vectors/vectors_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -113,5 +113,5 @@
   for (i=0; i <= exception_config.exceptSize; i++) {
     printk("installing exception number %d\n", i);
-    if (!mpc8xx_vector_is_valid (i)) {
+    if (!ppc_vector_is_valid (i)) {
       continue;
     }
@@ -128,5 +128,5 @@
     exception_table[i].isOn		= except_always_enabled;
   }
-  if (!mpc8xx_init_exceptions(&exception_config)) {
+  if (!ppc_init_exceptions(&exception_config)) {
     /*
      * At this stage we may not call BSP_Panic because it uses exceptions!!!
Index: c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/ChangeLog	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -1,2 +1,11 @@
+2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* vectors/vectors_init.c, irq/irq_init.c: 
+	adapted to shared exception code
+
+2007-07-06	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* Makefile.am: adapted to shared exception code
+
 2007-04-12	Ralf CorsÃ©pius <ralf.corsepius@rtems.org>
 
Index: c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/Makefile.am	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -85,5 +85,5 @@
     ../../../libcpu/@RTEMS_CPU@/mpc8260/mmu.rel \
     ../../../libcpu/@RTEMS_CPU@/mpc8260/timer.rel \
-    ../../../libcpu/@RTEMS_CPU@/mpc8260/exceptions.rel
+    ../../../libcpu/@RTEMS_CPU@/@exceptions@/raw_exception.rel
 
 EXTRA_DIST += times
Index: c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -137,5 +137,5 @@
     vectorDesc.off			=	nop_func;
     vectorDesc.isOn			=	connected;
-    if (!mpc8xx_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
     }
@@ -144,5 +144,5 @@
     vectorDesc.hdl.raw_hdl	=	external_exception_vector_prolog_code;
     vectorDesc.hdl.raw_hdl_size	=	(unsigned) &external_exception_vector_prolog_code_size;
-    if (!mpc8xx_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS external raw exception\n");
     }
Index: c/src/lib/libbsp/powerpc/mpc8260ads/vectors/vectors_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/mpc8260ads/vectors/vectors_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mpc8260ads/vectors/vectors_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -121,5 +121,5 @@
     printk("installing exception number %d\n", i);
 */
-    if (!mpc8xx_vector_is_valid (i)) {
+    if (!ppc_vector_is_valid (i)) {
       continue;
     }
@@ -134,5 +134,5 @@
 /*  _BSP_GPLED0_on(); */
 
-  if (!mpc8xx_init_exceptions(&exception_config)) {
+  if (!ppc_init_exceptions(&exception_config)) {
     /*
      * At this stage we may not call BSP_Panic because it uses exceptions!!!
Index: c/src/lib/libbsp/powerpc/mvme5500/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/mvme5500/ChangeLog	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mvme5500/ChangeLog	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -1,2 +1,6 @@
+2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* irq/irq_init.c: adapted to shared exception code
+
 2007-07-06	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -228,5 +228,5 @@
   vectorDesc.off		= nop_func;
   vectorDesc.isOn		= connected;
-  if (!mpc60x_set_exception (&vectorDesc)) {
+  if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
   }
@@ -235,5 +235,5 @@
   vectorDesc.hdl.raw_hdl	= external_exception_vector_prolog_code;
   vectorDesc.hdl.raw_hdl_size	= (unsigned) external_exception_vector_prolog_code_size;
-  if (!mpc60x_set_exception (&vectorDesc)) {
+  if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS external raw exception\n");
     }
Index: c/src/lib/libbsp/powerpc/score603e/ChangeLog
===================================================================
--- c/src/lib/libbsp/powerpc/score603e/ChangeLog	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/score603e/ChangeLog	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -1,2 +1,6 @@
+2007-07-10	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
+
+	* irq/irq_init.c: adapted to shared exception code
+
 2007-07-06	Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
 
Index: c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c
===================================================================
--- c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libbsp/powerpc/score603e/irq/irq_init.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -349,5 +349,5 @@
     vectorDesc.off		=	nop_func;
     vectorDesc.isOn		=	connected;
-    if (!mpc60x_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
     }
@@ -356,5 +356,5 @@
     vectorDesc.hdl.raw_hdl	=	external_exception_vector_prolog_code;
     vectorDesc.hdl.raw_hdl_size	=	(unsigned) external_exception_vector_prolog_code_size;
-    if (!mpc60x_set_exception (&vectorDesc)) {
+    if (!ppc_set_exception (&vectorDesc)) {
       BSP_panic("Unable to initialize RTEMS external raw exception\n");
     }
Index: c/src/lib/libcpu/powerpc/Makefile.am
===================================================================
--- c/src/lib/libcpu/powerpc/Makefile.am	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libcpu/powerpc/Makefile.am	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -35,4 +35,5 @@
 
 
+if !mpc5xx
 include_libcpu_HEADERS += new-exceptions/raw_exception.h
 noinst_PROGRAMS += new-exceptions/raw_exception.rel
@@ -41,4 +42,5 @@
 new_exceptions_raw_exception_rel_CPPFLAGS = $(AM_CPPFLAGS)
 new_exceptions_raw_exception_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
+endif
 
 endif
Index: c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libcpu/powerpc/new-exceptions/raw_exception.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -120,5 +120,5 @@
 #if (defined(mpc555) || defined(mpc505))
 
-int ppc_vector_is_valid(rtems_vector vector)
+int mpc5xx_vector_is_valid(rtems_vector vector)
 {
   switch (current_ppc_cpu) {
@@ -347,4 +347,11 @@
         case PPC_PSIM:
             if (!PSIM_vector_is_valid(vector)) {
+                return 0;
+            }
+            break;
+#endif
+#if ( defined(mpc555) || defined(mpc505) )
+        case PPC_5XX:
+            if (!mpc5xx_vector_is_valid(vector)) {
                 return 0;
             }
Index: c/src/lib/libcpu/powerpc/old-exceptions/cpu.c
===================================================================
--- c/src/lib/libcpu/powerpc/old-exceptions/cpu.c	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libcpu/powerpc/old-exceptions/cpu.c	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -260,5 +260,7 @@
   _CPU_MSR_GET( msr_value );
   the_context->msr |= (msr_value & PPC_MSR_EP);
+#if defined(PPC_MSR_RI)
   the_context->msr |= PPC_MSR_RI;
+#endif
   the_context->msr |= msr_value & (PPC_MSR_DR|PPC_MSR_IR);
 
Index: c/src/lib/libcpu/powerpc/preinstall.am
===================================================================
--- c/src/lib/libcpu/powerpc/preinstall.am	(revision f610e83f5350e09d29a23352b420551d06f15499)
+++ c/src/lib/libcpu/powerpc/preinstall.am	(revision 185da086420ae9cfccf0343bb4d906151c44b8f7)
@@ -52,7 +52,9 @@
 
 else
+if !mpc5xx
 $(PROJECT_INCLUDE)/libcpu/raw_exception.h: new-exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
+endif
 endif
 if shared
