riscv-trap-handling: Add functionality, prevent stack corruption
Trap handling code was bugged in that it loaded in the wrong stack pointer, overwriting the space the processor uses to talk to its host for doing device requests. Fix this issue, as well as add support for handling misaligned loads the same way we handle misaligned stores. Change-Id: I68ba3a114b7167b3212bb0bed181a7595f0b97d8 Signed-off-by: Thaminda Edirisooriya <thaminda@google.com> Reviewed-on: http://review.coreboot.org/11620 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
59598b2e47
commit
d9653e1328
3 changed files with 31 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ static inline void exception_init(void)
|
|||
|
||||
void trap_handler(trapframe* tf);
|
||||
void handle_supervisor_call(trapframe* tf);
|
||||
//void handleMisalignedLoad(trapframe *tf);
|
||||
void handleMisalignedLoad(trapframe *tf);
|
||||
void handle_misaligned_store(trapframe *tf);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue