This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-A15 Cache Maintenance DCIMVAC vs DCCIMVAC

I am trying to understand the difference between the DCIMVAC and DCCIMVAC cache maintenance operations in the Cortex-A15 architecture. I have run some tests on a TI AM5718 SOC that features a single-core Cortex-A15 MPCore (revision r2p2), and it appears that the DCIMVAC operation cleans the cache line (if it is dirty) out to main memory prior to invalidating it. I am trying to understand if this expected behavior or I have something configured incorrectly. Does the Cortex-A15 have a cache maintenance instruction that is guaranteed to only invalidate without cleaning?

From the ARM Cortex-A15 MPCore Processor Technical Reference Manual:

Then looking at the ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition:

Both of these documents seem to suggest that DCIMVAC will only invalidate, and DCCIMVAC will clean and invalidate, however, in my experiments, DCIMVAC seems to clean the cache line, if dirty, as well as invalidate it. I was able to find one document that made me think this could be expected behavior. In the Cortex-A15 MPCore - NEON Software Developers Errata Notice errata item 794724 includes the following statement: "The DCISW invalidate by set/way instruction is treated by A15 as a DCCISW clean/invalidate by set/way instruction." This statement isn't part of the errata description, but rather stated as a given in the workaround explanation. This is curious, because the behavior of DCISW being treated as DCCISW, seems similar to what I am experiencing with DCIMVAC being treated as DCCIMVAC, and neither behavior seems to be documented in the ARM Cortex-A15 MPCore Processor Technical Reference Manual.

Excerpt from errata 794724:

Interestingly, I see that the ARM Cortex-A53 MPCore Processor Technical Reference Manual does include verbiage about this behavior. It states "DCIMVAC operations in AArch32 and DCIVAC instructions in AArch64 perform an invalidate of the target address. If the data is dirty in the executing core then a clean is performed before the invalidate.


Given that this behavior seemed worth documenting specifically in the A53 manual, I am surprised to see it missing from the A15 manual. The behavior of DCIMVAC acting like DCCIMVAC isn't problematic, I'm just concerned that I am misunderstanding something, since the experimental behavior didn't seem to be what I expected from reading the documentation. Can it be verified that DCIMVAC will always clean on Cortex-A15, or is this a behavior that could be specific to the TI chip I am working with?