From 968408423f8d45deaa12a5c0cf9fc729f2efe38a Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Mon, 23 May 2016 16:17:28 -0700 Subject: [PATCH] Change DCSR bits to match spec. Cleaned up debug ROM code a little. --- debug_rom/debug_rom.S | 30 +++++++++++------------------- debug_rom/debug_rom.h | 6 +++--- riscv/encoding.h | 28 ++++++++++++++-------------- 3 files changed, 28 insertions(+), 36 deletions(-) diff --git a/debug_rom/debug_rom.S b/debug_rom/debug_rom.S index c164eeb..0d97270 100755 --- a/debug_rom/debug_rom.S +++ b/debug_rom/debug_rom.S @@ -5,13 +5,6 @@ # TODO: Update these constants once they're finalized in the doc. -#define DCSR 0x790 -#define DCSR_CAUSE_DEBINT 3 -#define DCSR_HALT_OFFSET 3 -#define DCSR_DEBUGINT_OFFSET 10 - -#define DSCRATCH 0x792 - #define DEBUG_RAM 0x400 #define DEBUG_RAM_SIZE 64 @@ -63,26 +56,25 @@ restore_128: sw s0, (DEBUG_RAM + DEBUG_RAM_SIZE - 4)(zero) check_halt: - csrr s0, DCSR - andi s0, s0, (1<