Flushing the data cache in arm-trusted-firmware

Dear experts,

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?

Thanks,

Hamed