aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/ports/e200/chcore.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-11-18 09:39:41 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-11-18 09:39:41 +0000
commitda4c0dbaa0a453af6b1903554ccff1df7b98825c (patch)
tree97e3d0d8ffec0947fc1195b353da4557ec30b6ee /os/rt/ports/e200/chcore.c
parent5f2b47e17bbddd663b5237f3d235375f69f88d4f (diff)
downloadChibiOS-da4c0dbaa0a453af6b1903554ccff1df7b98825c.tar.gz
ChibiOS-da4c0dbaa0a453af6b1903554ccff1df7b98825c.tar.bz2
ChibiOS-da4c0dbaa0a453af6b1903554ccff1df7b98825c.zip
Improvements to the e200 RT port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8507 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/ports/e200/chcore.c')
-rw-r--r--os/rt/ports/e200/chcore.c57
1 files changed, 2 insertions, 55 deletions
diff --git a/os/rt/ports/e200/chcore.c b/os/rt/ports/e200/chcore.c
index 28fb8926b..5f410b88f 100644
--- a/os/rt/ports/e200/chcore.c
+++ b/os/rt/ports/e200/chcore.c
@@ -18,8 +18,8 @@
*/
/**
- * @file PPC/chcore.c
- * @brief PowerPC architecture port code.
+ * @file e200/chcore.c
+ * @brief Power e200 port code.
*
* @addtogroup PPC_CORE
* @{
@@ -51,57 +51,4 @@
/* Module exported functions. */
/*===========================================================================*/
-/**
- * @brief Performs a context switch between two threads.
- * @details This is the most critical code in any port, this function
- * is responsible for the context switch between 2 threads.
- * @note The implementation of this code affects <b>directly</b> the context
- * switch performance so optimize here as much as you can.
- */
-#if !defined(__DOXYGEN__)
-__attribute__((naked))
-#endif
-void port_dummy1(void) {
-
- asm (".global _port_switch");
- asm ("_port_switch:");
- asm ("subi %sp, %sp, 80"); /* Size of the intctx structure. */
- asm ("mflr %r0");
- asm ("stw %r0, 84(%sp)"); /* LR into the caller frame. */
- asm ("mfcr %r0");
- asm ("stw %r0, 0(%sp)"); /* CR. */
- asm ("stmw %r14, 4(%sp)"); /* GPR14...GPR31. */
-
- asm ("stw %sp, 12(%r4)"); /* Store swapped-out stack. */
- asm ("lwz %sp, 12(%r3)"); /* Load swapped-in stack. */
-
- asm ("lmw %r14, 4(%sp)"); /* GPR14...GPR31. */
- asm ("lwz %r0, 0(%sp)"); /* CR. */
- asm ("mtcr %r0");
- asm ("lwz %r0, 84(%sp)"); /* LR from the caller frame. */
- asm ("mtlr %r0");
- asm ("addi %sp, %sp, 80"); /* Size of the intctx structure. */
- asm ("blr");
-}
-
-/**
- * @brief Start a thread by invoking its work function.
- * @details If the work function returns @p chThdExit() is automatically
- * invoked.
- */
-#if !defined(__DOXYGEN__)
-__attribute__((naked))
-#endif
-void port_dummy2(void) {
-
- asm (".global _port_thread_start");
- asm ("_port_thread_start:");
- chSysUnlock();
- asm ("mr %r3, %r31"); /* Thread parameter. */
- asm ("mtctr %r30");
- asm ("bctrl"); /* Invoke thread function. */
- asm ("li %r0, 0"); /* MSG_OK. */
- asm ("bl chThdExit"); /* Thread termination on exit. */
-}
-
/** @} */