1) OpenOCD has the capability to 'force' a register read from the target. This functionality however silently breaks the register cache: During 'get_reg force' or 'reg <name> force', reg->type->get() is called which will silently overwrite dirty items in the register cache, causing a loss of unwritten register values. This patch fixes that by adding a flush callback for registers, and by using it when it is needed. 2) The register write commands did not have the 'force' flag; this was present for register read commands only. This patch adds it. 3) This patch also introduces the flush_reg_cache command. It flushes all registers and can optionally invalidates the register cache after the flush. For targets which implement the register cache should implement the flush() callback in struct reg_arch_type. This functionality is also useful for test purposes. Example: - In RISC-V, some registers are WARL (write any read legal) and this command allows to check this behavior. We plan to implement the corresponding callback in the RISC-V target. Change-Id: I9537a5f05b46330f70aad17f77b2b80dedad068a Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com> Signed-off-by: Jan Matyas <jan.matyas@codasip.com> |
||
---|---|---|
.. | ||
manual | ||
usb_adapters | ||
.gitattributes | ||
Makefile.am | ||
checkpatch.rst | ||
fdl.texi | ||
openocd.1 | ||
openocd.texi |