From: Tim Newsome Date: Thu, 29 Sep 2016 18:38:54 +0000 (-0700) Subject: Clear triggers during entry. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad4010d4b7147a6607c2fd30c7885ca6b464abbc;p=riscv-tests.git Clear triggers during entry. If the last test leaves some triggers set they should be cleaned up. --- diff --git a/debug/programs/entry.S b/debug/programs/entry.S index 80904cd..6dc694f 100755 --- a/debug/programs/entry.S +++ b/debug/programs/entry.S @@ -40,6 +40,15 @@ handle_reset: # initialize stack pointer la sp, stack_top + # Clear all hardware triggers + li t0, ~0 +1: + addi t0, t0, 1 + csrw CSR_TSELECT, t0 + csrw CSR_TDATA1, zero + csrr t1, CSR_TSELECT + beq t0, t1, 1b + # perform the rest of initialization in C j _init