summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/shared
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/libbsp/powerpc/shared
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/libbsp/powerpc/shared')
-rw-r--r--c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c b/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
new file mode 100644
index 0000000000..f9fe0e2470
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
@@ -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 */