Index: c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
===================================================================
--- c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
+++ c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <bsp/vectors.h>
+
+#ifdef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+
+static int ppc_exc_interrupt_dispatch(BSP_Exception_frame *f, unsigned vector)
+{
+  bsp_interrupt_dispatch();
+
+  return 0;
+}
+
+const ppc_exc_handler_t ppc_exc_handler_table [LAST_VALID_EXC + 1] = {
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_interrupt_dispatch,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default,
+  ppc_exc_handler_default
+};
+
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -4,5 +4,5 @@
  * Modified and partially rewritten by Till Straumann, 2007-2008
  *
- * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>, 2008.
+ * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>, 2008-2012.
  *
  * Low-level assembly code for PPC exceptions (macros).
@@ -826,4 +826,6 @@
 	addi	r3, FRAME_REGISTER, FRAME_LINK_SPACE
 
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+
 	/* Load global handler address */
 	LW	SCRATCH_REGISTER_0, globalExceptHdl
@@ -837,4 +839,11 @@
 	bctrl
 
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+
+	/* Call fixed global handler */
+	bl	C_exception_handler
+
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+
 	b	wrap_handler_done_\_FLVR
 
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2011-2012 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
@@ -47,4 +47,8 @@
 #define FRAME_OFFSET(reg) GPR2_OFFSET(reg)
 
+#ifdef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+	.global	bsp_interrupt_dispatch
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+
 	.global	ppc_exc_min_prolog_async_tmpl_normal
 	.global ppc_exc_wrap_async_normal
@@ -53,6 +57,9 @@
 
 	stwu	r1, -PPC_EXC_MINIMAL_FRAME_SIZE(r1)
+
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
 	stw	VECTOR_REGISTER, PPC_EXC_VECTOR_PROLOGUE_OFFSET(r1)
 	li	VECTOR_REGISTER, 0xffff8000
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 	/*
@@ -88,4 +95,5 @@
 	PPC_GPR_STORE	SCRATCH_0_REGISTER, SCRATCH_0_OFFSET(r1)
 
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
 #ifdef __SPE__
 	/*
@@ -96,7 +104,12 @@
 	stw	SCRATCH_0_REGISTER, VECTOR_OFFSET(r1)
 #endif
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+	/* The vector register has no special purpose in this case */
+	PPC_GPR_STORE	VECTOR_REGISTER, VECTOR_OFFSET(r1)
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 	PPC_GPR_STORE	HANDLER_REGISTER, HANDLER_OFFSET(r1)
 
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
 	/*
 	 * Load the handler address.  Get the handler table index from the
@@ -109,4 +122,5 @@
 	ori	HANDLER_REGISTER, HANDLER_REGISTER, ppc_exc_handler_table@l
 	lwzx	HANDLER_REGISTER, HANDLER_REGISTER, SCRATCH_0_REGISTER
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 	PPC_GPR_STORE	SCRATCH_1_REGISTER, SCRATCH_1_OFFSET(r1)
@@ -150,4 +164,5 @@
 	iselgt	r1, r1, SCRATCH_0_REGISTER
 
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
 	/*
 	 * Call high level exception handler.
@@ -160,4 +175,8 @@
 	mtctr	HANDLER_REGISTER
 	bctrl
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+	/* Call fixed high level handler */
+	bl	bsp_interrupt_dispatch
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 	/* Load ISR nest level and thread dispatch disable level */
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_global_handler.c
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_global_handler.c	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_global_handler.c	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -20,6 +20,4 @@
 #include <bsp/vectors.h>
 
-exception_handler_t globalExceptHdl = C_exception_handler;
-
 void C_exception_handler(BSP_Exception_frame *excPtr)
 {
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_hdl.c	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -40,8 +40,12 @@
 uint32_t ppc_exc_msr_bits = MSR_IR | MSR_DR | MSR_RI;
 
-static int ppc_exc_handler_default(BSP_Exception_frame *f, unsigned int vector)
+int ppc_exc_handler_default(BSP_Exception_frame *f, unsigned int vector)
 {
   return -1;
 }
+
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+
+exception_handler_t globalExceptHdl = C_exception_handler;
 
 /* Table of C-handlers */
@@ -49,4 +53,6 @@
   [0 ... LAST_VALID_EXC] = ppc_exc_handler_default
 };
+
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 ppc_exc_handler_t ppc_exc_get_handler(unsigned vector)
@@ -66,7 +72,13 @@
   if (vector <= LAST_VALID_EXC) {
     if (handler == NULL) {
-      ppc_exc_handler_table [vector] = ppc_exc_handler_default;
-    } else {
+      handler = ppc_exc_handler_default;
+    }
+
+    if (ppc_exc_handler_table [vector] != handler) {
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
       ppc_exc_handler_table [vector] = handler;
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+      return RTEMS_RESOURCE_IN_USE;
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
     }
 
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -10,5 +10,5 @@
  * Copyright (C) 2007 Till Straumann <strauman@slac.stanford.edu>
  *
- * Copyright (C) 2009 embedded brains GmbH.
+ * Copyright (C) 2009-2012 embedded brains GmbH.
  *
  * The license and distribution terms for this file may be
@@ -136,6 +136,10 @@
   ) {
     prologue_template = ppc_exc_min_prolog_async_tmpl_normal;
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
     prologue_template_size = (size_t) ppc_exc_min_prolog_size;
     fixup_vector = true;
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+    prologue_template_size = 8;
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
   } else {
     prologue_template = ppc_exc_prologue_templates [category];
Index: c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/vectors.h
===================================================================
--- c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/vectors.h	(revision 4263155e961f434b1e97447aa90b1982e03263c7)
+++ c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/vectors.h	(revision 4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd)
@@ -35,4 +35,6 @@
 #ifndef LIBCPU_VECTORS_H
 #define LIBCPU_VECTORS_H
+
+#include <bspopts.h>
 
 #include <libcpu/powerpc-utility.h>
@@ -263,9 +265,4 @@
 
 /**
- * @brief Global exception handler.
- */
-extern exception_handler_t globalExceptHdl;
-
-/**
  * @brief Default global exception handler.
  */
@@ -400,13 +397,17 @@
  * @brief High-level exception handler type.
  *
- * Exception handlers should return zero if the exception was handled and
- * normal execution may resume.
- *
- * They should return minus one to reject the exception resulting in the
- * globalExcHdl() being called.
- *
- * Other return values are reserved.
+ * @retval 0 The exception was handled and normal execution may resume.
+ * @retval -1 Reject the exception resulting in a call of the global exception
+ * handler.
+ * @retval other Reserved, do not use.
  */
 typedef int (*ppc_exc_handler_t)(BSP_Exception_frame *f, unsigned vector);
+
+/**
+ * @brief Default high-level exception handler.
+ *
+ * @retval -1 Always.
+ */
+int ppc_exc_handler_default(BSP_Exception_frame *f, unsigned int vector);
 
 /**
@@ -437,8 +438,25 @@
 extern uint32_t ppc_exc_cache_wb_check;
 
-/**
- * @brief High-level exception handler table.
- */
-extern ppc_exc_handler_t ppc_exc_handler_table [LAST_VALID_EXC + 1];
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+  /**
+   * @brief High-level exception handler table.
+   */
+  extern ppc_exc_handler_t ppc_exc_handler_table [LAST_VALID_EXC + 1];
+
+  /**
+   * @brief Global exception handler.
+   */
+  extern exception_handler_t globalExceptHdl;
+#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
+  /**
+   * @brief High-level exception handler table.
+   */
+  extern const ppc_exc_handler_t ppc_exc_handler_table [LAST_VALID_EXC + 1];
+
+  /**
+   * @brief Interrupt dispatch routine provided by BSP.
+   */
+  void bsp_interrupt_dispatch(void);
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
 
 /**
@@ -458,4 +476,9 @@
  * It is legal to set a NULL handler. This leads to the globalExcHdl
  * being called if an exception for 'vector' occurs.
+ *
+ * @retval RTEMS_SUCCESSFUL Successful operation.
+ * @retval RTEMS_INVALID_ID Invalid vector number.
+ * @retval RTEMS_RESOURCE_IN_USE Handler table is read-only and handler does
+ * not match.
  */
 rtems_status_code ppc_exc_set_handler(unsigned vector, ppc_exc_handler_t hdl);
