mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
fix: use sscratch to judge trap source
This commit is contained in:
parent
a2dce7ad48
commit
248a985bab
@ -59,9 +59,8 @@ __trap_from_user:
|
||||
SD_SP t1, 31
|
||||
SD_SP t2, 32
|
||||
|
||||
# find out whether we are from kernel (sstatus.SPP)
|
||||
andi t2, t2, 1 << 8
|
||||
beqz t2, __trap_from_user_next
|
||||
# find out whether we are from kernel (SSCRATCH)
|
||||
beqz t0, __trap_from_user_next
|
||||
|
||||
__trap_from_kernel_next:
|
||||
# goto kernel_trap_handler
|
||||
|
Loading…
Reference in New Issue
Block a user