Skip to content

Commit

Permalink
hw: Add ebreak to boot ROM on return
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsc96 committed Oct 23, 2024
1 parent 2928adb commit ef6dea6
Show file tree
Hide file tree
Showing 2 changed files with 1,505 additions and 1,504 deletions.
3 changes: 2 additions & 1 deletion hw/bootrom/cheshire_bootrom.S
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ _boot:
// If main returns, we end up here
.global _exit
_exit:
// Save the return value to scratch register 2 and wait forever
// Save the return value to scratch register 2, try `ebreak`, then wait forever
slli a0, a0, 1
ori a0, a0, 1
la t0, __base_regs
sw a0, 8(t0) // regs.SCRATCH[2]
ebreak
1: wfi
j 1b
Loading

0 comments on commit ef6dea6

Please sign in to comment.