* wrong addresses will be invalidated!
*
* For both ICache and DCache, walk all cache lines in the
- * address range. Cortex-A8 has fixed 64 byte line length.
+ * address range. Cortex-A has fixed 64 byte line length.
*
* REVISIT per ARMv7, these may trigger watchpoints ...
*/
* with MVA to PoU
* MCR p15, 0, r0, c7, c5, 1
*/
- for (uint32_t cacheline = address;
- cacheline < address + size * count;
+ for (uint32_t cacheline = 0;
+ cacheline < size * count;
cacheline += 64) {
retval = dpm->instr_write_data_r0(dpm,
- ARMV4_5_MCR(15, 0, 0, 7, 5, 1),
- cacheline);
+ ARMV8_MSR_GP(SYSTEM_ICIVAU, 0),
+ address + cacheline);
if (retval != ERROR_OK)
return retval;
}
* with MVA to PoC
* MCR p15, 0, r0, c7, c6, 1
*/
- for (uint32_t cacheline = address;
- cacheline < address + size * count;
+ for (uint32_t cacheline = 0;
+ cacheline < size * count;
cacheline += 64) {
retval = dpm->instr_write_data_r0(dpm,
- ARMV4_5_MCR(15, 0, 0, 7, 6, 1),
- cacheline);
+ ARMV8_MSR_GP(SYSTEM_DCCVAU, 0),
+ address + cacheline);
if (retval != ERROR_OK)
return retval;
}
#include <unistd.h>
#include "armv8_opcodes.h"
-#include "arm_opcodes.h"
#include "target.h"
#include "target_type.h"
/* DCCISW */
/* LOG_INFO ("%d %d %x",c_way,c_index,value); */
retval = dpm->instr_write_data_r0(dpm,
- ARMV4_5_MCR(15, 0, 0, 7, 14, 2),
+ ARMV8_MSR_GP(SYSTEM_DCCISW, 0),
value);
if (retval != ERROR_OK)
goto done;