I simply want to write a program (could be doing anything) to hog 100% of the I-cache throughout the duration the program is running (could be in user space or kernel space) using Poky (Yocto) as the distribution, and ARM Cortex A-15 as the hardware. What is the best/easiest way to write this program and make sure it is prioritized accordingly to swap everything in I-cache out and replace it with itself?Could be a program written in assembly that does something as mundane as adding numbers, and then fills the rest of the space up with noops to make sure I-cache is fully saturated.Could be a kernel driver that does something similar in C.I understand there are various kernel and user space resources that share the I-cache and I am well aware of the performance hit I'll receive to the overall system by doing this. Seeing that I have completely disabled the I-cache in the past and everything still remained to work properly (just very slow) it seems possible that having an over-privileged program completely use up I-cache would be possible too without having a fatal error to the system causing it to crash.Please spare me of any berating you may have of me doing this. I understand its out of the norm and seems to have no applicable use, but I have my reasons.
How to fill the I-cache In Embedded Linux?
embedded;c;arm;cache;assembly