Hello,
In armv8 Spec, CTR_EL0.DIC/IDC is described as follows:
I really don't get the point of the two bits.
Can someone give me a scenario to explain how the two bits affect?
really appreciated.
Thank your for the detailed reply.
So the key point is DCache and ICache coherency. It seems that this kind of coherency is not common.
Except self-modifying code, is there any other DCache-ICache coherency situation we should pay attention to?
I would say moving code from disk to RAM is such a situation.
42Bastian Schick is correct.
The situation also arises in case of dynamic compilation (C#, or emulation/virtualization like QEMU), or in case of debugging (setting a breakpoint usually requires modifying the instruction stream).