From f7f2623753d4bbe776087d4e6f5190a0a92305c5 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 28 Apr 2016 13:15:46 -0700 Subject: [PATCH] Fix race using fence. --- debug_rom/debug_rom.S | 6 +----- debug_rom/debug_rom.h | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/debug_rom/debug_rom.S b/debug_rom/debug_rom.S index 9825d48..a3339b4 100755 --- a/debug_rom/debug_rom.S +++ b/debug_rom/debug_rom.S @@ -32,11 +32,7 @@ resume: clear_debint: csrr s1, CSR_MHARTID sw s1, CLEARDEBINT(zero) - # TODO: race: what if the debugger sets debug int at this point? -clear_debint_loop: - csrr s1, DCSR - andi s1, s1, (1<