st-util: synchronize cache for stm32f7
authorTristan Gingold <gingold@adacore.com>
Mon, 11 Jan 2016 14:44:17 +0000 (15:44 +0100)
committerTristan Gingold <gingold@adacore.com>
Mon, 11 Jan 2016 14:50:28 +0000 (15:50 +0100)
commit54c8d2ca8b99c27761b45f35cd17f79512cb4a23
tree0891551889c1bf0bc76f9661478df302fdd824b5
parentd5fd6eda08b657c2e916bb3b185f36c70f43feba
st-util: synchronize cache for stm32f7

This patch handles the cache on the cortex-m7 stm32f7 cpu.
When gdb inserts a soft breakpoint (which is the default for
code in RAM), it replaces an instruction with a breakpoint
instruction.  But if the caches are enabled, the replacement
may be made only in the D-cache.  To reach the I-cache, the
D-cache must be flushed and the I-cache invalidated.

This implementation is coarse: it cleans the whole D-cache
and invalidate the whole I-cache.  It is possible to
track which cache lines have to be cleaned and invalidated.
gdbserver/gdb-server.c