I am doing an experiment with ARM trusted firmware (ATF) and a minimal barebone OS booted by ATF. The board that I am using is a Hikey 620 board and I cloned ATF from here: github.com/.../arm-trusted-firmware -b v2.5.
As a part of my experiment I have implemented a SMC from the OS into ATF to flush data caches. However, flushing does not work and I cannot remove entries from the dcache. I have tried "flush_dcache_range" and "dcsw_op_all(DCCISW)" and I also wrote my own code to flush the cache but none of them seem to have any effect. I wonder if you can help me with this and let me know if I am missing something or I need to do something specific before invoking the cache flushing procedures?
I do this:
// Invalidate for NS EL2 and EL1
msr SCR_EL3, x1
Maybe it helps.