diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-06-18 08:40:04 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-06-18 08:40:04 +0000 |
commit | ea36f8946c4db133ea7c9bc992a25906ad4a11b2 (patch) | |
tree | cd63d70ff4bd946a77e8ea3e66357d712a3180a5 /os/nil/ports/e200/compilers | |
parent | ea7bb840b15d2826e21158685b29e87390bafd49 (diff) | |
download | ChibiOS-ea36f8946c4db133ea7c9bc992a25906ad4a11b2.tar.gz ChibiOS-ea36f8946c4db133ea7c9bc992a25906ad4a11b2.tar.bz2 ChibiOS-ea36f8946c4db133ea7c9bc992a25906ad4a11b2.zip |
Fixed bug #607.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8044 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil/ports/e200/compilers')
-rw-r--r-- | os/nil/ports/e200/compilers/GCC/ivor.s | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/os/nil/ports/e200/compilers/GCC/ivor.s b/os/nil/ports/e200/compilers/GCC/ivor.s index 28d54962a..8bd687c0a 100644 --- a/os/nil/ports/e200/compilers/GCC/ivor.s +++ b/os/nil/ports/e200/compilers/GCC/ivor.s @@ -93,10 +93,13 @@ _IVOR10: lis %r3, 0x0800 /* DIS bit mask. */
mtspr 336, %r3 /* TSR register. */
-#if PPC_USE_IRQ_PREEMPTION
- /* Allows preemption while executing the software handler.*/
- wrteei 1
+ /* Restoring pre-IRQ MSR register value.*/
+ mfSRR1 %r0
+#if !PPC_USE_IRQ_PREEMPTION
+ /* No preemption, keeping EE disabled.*/
+ se_bclri %r0, 16 /* EE = bit 16. */
#endif
+ mtMSR %r0
/* System tick handler invocation.*/
bl chSysTimerHandlerI
@@ -161,10 +164,13 @@ _IVOR4: lwz %r3, 0(%r3)
mtCTR %r3 /* Software handler address. */
-#if PPC_USE_IRQ_PREEMPTION
- /* Allows preemption while executing the software handler.*/
- wrteei 1
+ /* Restoring pre-IRQ MSR register value.*/
+ mfSRR1 %r0
+#if !PPC_USE_IRQ_PREEMPTION
+ /* No preemption, keeping EE disabled.*/
+ se_bclri %r0, 16 /* EE = bit 16. */
#endif
+ mtMSR %r0
/* Exectes the software handler.*/
bctrl
|