jtagonizer

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit bf1c46cd2f23033133e94c100216d616fe370b91
parent b09e4e8c9582bae629676d64a56b7c58e925bf01
Author: Brian Swetland <swetland@frotz.net>
Date:   Mon, 29 Sep 2014 18:19:09 -0700

v7debug: flush icache and other state on restart

Diffstat:
Mv7debug.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/v7debug.c b/v7debug.c @@ -126,6 +126,8 @@ static int dexec(V7DEBUG *debug, u32 instr) { } #define ARM_DSB 0xEE070F9A +#define ARM_ICIALLU 0xEE070F15 +#define ARM_ISB 0xEE070F95 #define ARM_MOV_DCC_Rx(x) (0xEE000E15 | ((x) << 12)) // Rx -> DCC #define ARM_MOV_Rx_DCC(x) (0xEE100E15 | ((x) << 12)) // DCC -> Rx #define ARM_MOV_R0_PC 0xE1A0000F @@ -242,6 +244,9 @@ int debug_detach(V7DEBUG *debug) { dccwr(debug, debug->save_r1); dexec(debug, ARM_MOV_Rx_DCC(1)); + dexec(debug, ARM_ICIALLU); + dexec(debug, ARM_ISB); + dwr(debug, DBGDSCR, 0); dwr(debug, DBGDRCR, DRCR_CLR_EXC); dwr(debug, DBGDRCR, DRCR_START_REQ);