aboutsummaryrefslogtreecommitdiff
path: root/machine
diff options
context:
space:
mode:
authorZong Li <zongbox@gmail.com>2018-04-10 11:37:14 +0800
committerAndrew Waterman <aswaterman@gmail.com>2018-04-09 20:37:14 -0700
commit8ff2222893d7a3d822131a5191e0b483bf56c610 (patch)
tree254aab4899ae73aefb6627665ca0aec2aa0013b9 /machine
parentdcd6ee0893f784320db857cb66f8424a1d154d8d (diff)
downloadriscv-pk-8ff2222893d7a3d822131a5191e0b483bf56c610.zip
riscv-pk-8ff2222893d7a3d822131a5191e0b483bf56c610.tar.gz
riscv-pk-8ff2222893d7a3d822131a5191e0b483bf56c610.tar.bz2
Fix the wrong access of ipi pending address (#99)
The MENTRY_IPI_PENDING_OFFSET offset is based on stack pointer
Diffstat (limited to 'machine')
-rw-r--r--machine/mentry.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/machine/mentry.S b/machine/mentry.S
index 3dcf2b6..6746f98 100644
--- a/machine/mentry.S
+++ b/machine/mentry.S
@@ -76,8 +76,8 @@ trap_vector:
addi a0, sp, MENTRY_IPI_PENDING_OFFSET
amoswap.w a0, x0, (a0)
#else
- lw a0, MENTRY_IPI_PENDING_OFFSET(a0)
- sw x0, MENTRY_IPI_PENDING_OFFSET(a0)
+ lw a0, MENTRY_IPI_PENDING_OFFSET(sp)
+ sw x0, MENTRY_IPI_PENDING_OFFSET(sp)
#endif
and a1, a0, IPI_SOFT
beqz a1, 1f