aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/PPC/chcore.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-17 09:24:13 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-09-17 09:24:13 +0000
commitf3d472965ed481a88382fe698cdab337359d553c (patch)
treee66048cab3005783832e80df40074a68bfe65ff7 /os/ports/GCC/PPC/chcore.c
parent4e36eab1f1affd6375c58135907d0b0e714dde52 (diff)
downloadChibiOS-f3d472965ed481a88382fe698cdab337359d553c.tar.gz
ChibiOS-f3d472965ed481a88382fe698cdab337359d553c.tar.bz2
ChibiOS-f3d472965ed481a88382fe698cdab337359d553c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4686 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC/PPC/chcore.c')
-rw-r--r--os/ports/GCC/PPC/chcore.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/os/ports/GCC/PPC/chcore.c b/os/ports/GCC/PPC/chcore.c
index 87404e4c5..5fd97a14b 100644
--- a/os/ports/GCC/PPC/chcore.c
+++ b/os/ports/GCC/PPC/chcore.c
@@ -29,6 +29,21 @@
#include "ch.h"
/**
+ * @brief Kernel port layer initialization.
+ * @details IVOR4 and IVOR10 initialization.
+ */
+void port_init(void) {
+#if PPC_SUPPORTS_IVORS
+ /* The CPU support IVOR registers, the kernel requires IVOR4 and IVOR10
+ and the initialization is performed here.*/
+ asm volatile ("li %r3, IVOR4@l \t\n"
+ "mtIVOR4 %r3 \t\n"
+ "li %r3, IVOR10@l \t\n"
+ "mtIVOR10 %r3");
+#endif
+}
+
+/**
* @brief Halts the system.
* @details This function is invoked by the operating system when an
* unrecoverable error is detected (for example because a programming