You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shouldn't the sepc / mepc get loaded with the NEXT instruction PC ? so PC, instead of PC-4 ? After the sret / mret the program would loop back on itself doing the same ecall....
Eg:
0x80000000: ecall, pc is 0x80000004, stvec / mtvec = pc-4 = 0x80000000
... jump to supervisor / machine trap handler
sret / mret from the trap handler
PC = sepc / mepc = 0x80000000 = ecall (again
0x80000000: ecall, pc is 0x80000004, stvec / mtvec = pc-4 = 0x80000000
.... infinite loop...
The text was updated successfully, but these errors were encountered:
At
rvemu-for-book/step05/src/trap.rs
Line 34 in 58991b0
Eg:
0x80000000: ecall, pc is 0x80000004, stvec / mtvec = pc-4 = 0x80000000
... jump to supervisor / machine trap handler
sret / mret from the trap handler
PC = sepc / mepc = 0x80000000 = ecall (again
0x80000000: ecall, pc is 0x80000004, stvec / mtvec = pc-4 = 0x80000000
.... infinite loop...
The text was updated successfully, but these errors were encountered: