How to Writeback/Invalidate Cache on DragonBoard820c?


#1

Hi. Is there a way to send some command or function to call in my ARM program to writeback/invalidate cache? I’m more familiar with TI sysbios and there were functions to do this on that platform. Is there something similar for the snapdragon820?

Thanks,
Kim


#2

Could you clarify what you’re running, userspace application on Linux? bare-metal?


#3

Hi Loic,
I am running a user space application. It is an application that was once run on a TI product. So there were dma and cache invalidate/writeback calls in the application. I commented those out so they do nothing. But I am curious if cache functions are available on the snapdragon.

Thanks,
Kim


#4

To clarify, the application is an ARM application, not a DSP application.
Thanks,
Kim


#5

So there is no easy way to do this in userspace, usually, this is up to the kernel to perform cache maintenance if necessary (e.g. enqueueing/dequeuing dma video buffer). Some drivers also propose an interface to user-space via specific ioctls.

It’s also possible to access a restricted set of cache maintenance ops from userspace (EL0) with ARM64(aarch64). When UCI bit of the system control register is set, it enables EL0 access in AArch64 for DC CVAU , DC CIVAC , DC CVAC , and IC IVAU instructions [1]. It allows you, for example, to perform a ‘clean & invalidate’ of a data cache line: dc civac, addr

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/BABFCAGE.html