From 698e37b41c08fd2a3b250ba3d0737c942af14f19 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 15 Aug 2011 08:49:20 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3236 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/PPC/SPC56x/ivor.s | 19 +++++++++++++++++-- os/ports/GCC/PPC/chcore.c | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'os/ports/GCC/PPC') diff --git a/os/ports/GCC/PPC/SPC56x/ivor.s b/os/ports/GCC/PPC/SPC56x/ivor.s index 03bc8b002..f572db1b5 100644 --- a/os/ports/GCC/PPC/SPC56x/ivor.s +++ b/os/ports/GCC/PPC/SPC56x/ivor.s @@ -25,8 +25,13 @@ * @addtogroup PPC_CORE * @{ */ -/** @cond never */ +#include "chconf.h" + +#define FALSE 0 +#define TRUE 1 + +#if !defined(__DOXYGEN__) /* * INTC registers address. */ @@ -72,6 +77,9 @@ IVOR10: mtspr 336, %r3 /* TSR register. */ /* System tick handler invocation.*/ +#if CH_DBG_SYSTEM_STATE_CHECK + bl dbg_check_lock +#endif bl chSysTimerHandlerI bl chSchIsPreemptionRequired cmpli cr0, %r3, 0 @@ -138,6 +146,9 @@ IVOR4: stw %r3, 0(%r3) /* Writing any value should do. */ /* Verifies if a reschedule is required.*/ +#if CH_DBG_SYSTEM_STATE_CHECK + bl dbg_check_lock +#endif bl chSchIsPreemptionRequired cmpli cr0, %r3, 0 beq cr0, .ctxrestore @@ -145,6 +156,9 @@ IVOR4: /* Context restore.*/ .ctxrestore: +#if CH_DBG_SYSTEM_STATE_CHECK + bl dbg_check_unlock +#endif lwz %r3, 36(%sp) /* Restores GPR3...GPR12. */ lwz %r4, 40(%sp) lwz %r5, 44(%sp) @@ -171,5 +185,6 @@ IVOR4: addi %sp, %sp, 80 /* Back to the previous frame. */ rfi -/** @endcond */ +#endif /* !defined(__DOXYGEN__) */ + /** @} */ diff --git a/os/ports/GCC/PPC/chcore.c b/os/ports/GCC/PPC/chcore.c index c68d5e07c..7fb5dd578 100644 --- a/os/ports/GCC/PPC/chcore.c +++ b/os/ports/GCC/PPC/chcore.c @@ -81,7 +81,8 @@ void port_switch(Thread *ntp, Thread *otp) { * invoked. */ void _port_thread_start(void) { - asm ("wrteei 1"); + + chSysUnlock(); asm ("mr %r3, %r31"); /* Thread parameter. */ asm ("mtctr %r30"); asm ("bctrl"); /* Invoke thread function. */ -- cgit v1.2.3