aboutsummaryrefslogtreecommitdiff
path: root/debug_rom
diff options
context:
space:
mode:
Diffstat (limited to 'debug_rom')
-rwxr-xr-xdebug_rom/debug_rom.S4
-rw-r--r--debug_rom/debug_rom.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/debug_rom/debug_rom.S b/debug_rom/debug_rom.S
index 457104f..9e83098 100755
--- a/debug_rom/debug_rom.S
+++ b/debug_rom/debug_rom.S
@@ -72,9 +72,9 @@ _entry:
# Check why we're here
csrr s0, CSR_DCSR
- # cause is in bits 2:0 of dcsr
+ # cause is in bits 8:6 of dcsr
andi s0, s0, DCSR_CAUSE
- addi s0, s0, -DCSR_CAUSE_DEBUGINT
+ addi s0, s0, -(DCSR_CAUSE_DEBUGINT<<6)
bnez s0, spontaneous_halt
jdebugram:
diff --git a/debug_rom/debug_rom.h b/debug_rom/debug_rom.h
index bbd7f23..a929a27 100644
--- a/debug_rom/debug_rom.h
+++ b/debug_rom/debug_rom.h
@@ -8,7 +8,7 @@ static const unsigned char debug_rom_raw[] = {
0x73, 0x24, 0x00, 0x7b, 0x13, 0x74, 0x84, 0x00, 0x63, 0x04, 0x04, 0x00,
0x6f, 0x00, 0x80, 0x05, 0x73, 0x24, 0x20, 0x7b, 0x73, 0x00, 0x20, 0x7b,
0x73, 0x10, 0x24, 0x7b, 0x73, 0x24, 0x00, 0x7b, 0x13, 0x74, 0x04, 0x1c,
- 0x13, 0x04, 0xd4, 0xff, 0x63, 0x18, 0x04, 0x02, 0x0f, 0x10, 0x00, 0x00,
+ 0x13, 0x04, 0x04, 0xf4, 0x63, 0x18, 0x04, 0x02, 0x0f, 0x10, 0x00, 0x00,
0x73, 0x24, 0x00, 0xf1, 0x63, 0x46, 0x04, 0x00, 0x23, 0x2e, 0x90, 0x42,
0x67, 0x00, 0x00, 0x40, 0x13, 0x14, 0x14, 0x00, 0x63, 0x46, 0x04, 0x00,
0x23, 0x3c, 0x90, 0x42, 0x67, 0x00, 0x00, 0x40, 0x13, 0x00, 0x00, 0x00,