From 6c59fb8df4a511b05f23d9be9e1854205a401206 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 20 Jun 2018 14:52:38 -0700 Subject: [PATCH] Explain why reg_cache_values isn't per-hart. Change-Id: Ie67e43bf89fdc68b4b2c12f37fa8a3ec3e6088ef --- src/target/riscv/riscv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/target/riscv/riscv.h b/src/target/riscv/riscv.h index 4fb0f776a..a5b324dc1 100644 --- a/src/target/riscv/riscv.h +++ b/src/target/riscv/riscv.h @@ -58,7 +58,9 @@ typedef struct { uint64_t saved_registers[RISCV_MAX_HARTS][RISCV_MAX_REGISTERS]; bool valid_saved_registers[RISCV_MAX_HARTS][RISCV_MAX_REGISTERS]; - /* The register cache points into here. */ + /* OpenOCD's register cache points into here. This is not per-hart because + * we just invalidate the entire cache when we change which hart is + * selected. */ uint64_t reg_cache_values[RISCV_MAX_REGISTERS]; /* Single buffer that contains all register names, instead of calling