summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-23 09:32:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-03 13:17:08 +0100
commit4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd (patch)
treec0a9eea940eed0257b300add42d6a93216e9992d /c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
parentbsps/powerpc: Declare ppc_exc_handler_table (diff)
downloadrtems-4bd4c9e1f9fad33b2ddf13e246326f16f22ccccd.tar.bz2
bsps/powerpc: Add PPC_EXC_CONFIG_USE_FIXED_HANDLER
In case a BSP enables this option, then fixed high level exception handler will be used. For normal asynchronous exceptions this is bsp_interrupt_dispatch() and for other exceptions this is the handler from the read-only ppc_exc_handler_table. The global handler is C_exception_handler(). This avoids some dependencies on valid read-write data.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h')
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
index ea5a3f9614..d4bbaf4fcc 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h
@@ -3,7 +3,7 @@
*
* 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).
*
@@ -825,6 +825,8 @@ wrap_call_global_handler_\_FLVR:
/* First parameter = exception frame pointer + FRAME_LINK_SPACE */
addi r3, FRAME_REGISTER, FRAME_LINK_SPACE
+#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+
/* Load global handler address */
LW SCRATCH_REGISTER_0, globalExceptHdl
@@ -836,6 +838,13 @@ wrap_call_global_handler_\_FLVR:
mtctr SCRATCH_REGISTER_0
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
.endm