diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-30 14:55:17 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-30 15:03:15 +0200 |
commit | 64d2c8adf9ce52580fe228d4e6566e288ed756a2 (patch) | |
tree | 0cfb6de3dccc7f4ae76e2507ba27e48a929d57f2 /cpukit | |
parent | score/rbtree: Add const qualifier (diff) | |
download | rtems-64d2c8adf9ce52580fe228d4e6566e288ed756a2.tar.bz2 |
NIOS2: Fix outermost interrupt check
This fix is critical. The previous implementation leads to system
corruption.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/score/cpu/nios2/nios2-eic-il-low-level.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S b/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S index 8f8556f825..b7c38f3ad4 100644 --- a/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S +++ b/cpukit/score/cpu/nios2/nios2-eic-il-low-level.S @@ -70,6 +70,9 @@ _Nios2_ISR_Dispatch_with_shadow_non_preemptive: /* Load Nios II specific thread dispatch disabled */ ldw r13, %gprel(_Nios2_Thread_dispatch_disabled)(gp) + /* Read status */ + rdctl r14, status + /* Fix return address */ subi ea, ea, 4 @@ -88,7 +91,7 @@ _Nios2_ISR_Dispatch_with_shadow_non_preemptive: beq r12, zero, no_thread_dispatch /* Is outermost interrupt? */ - andhi r14, sstatus, 0x3f + andhi r14, r14, 0x3f bne r14, zero, no_thread_dispatch /* Is Nios II specific thread dispatch allowed? */ |