mirror of
https://github.com/apache/nuttx.git
synced 2026-05-19 20:06:24 +08:00
589c0e13b8
Build Documentation / build-html (push) Has been cancelled
When the MMU is disabled (CONFIG_ARCH_USE_MMU=n) the data passed back and forth with the TEE needs to be synced from/to the cache, otherwise we get random data in either world. Fix this by cleaning before a call and invalidating after. This has to be done both on the optee msg arg, and the shm buffers therein. Cleaning and invalidating the page list used to describe non-contiguous shm buffers did not seem mandatory in my tests, but common sense says that it should be, so we do that too. This fix does not apply to the optee msg arg of the socket transport (optee_socket.c), as that one _should_ be handled by the socket send/recv methods. It does apply to all shm buffers though, regardless of transport. Signed-off-by: George Poulios <gpoulios@census-labs.com>