MA-17226 Invalidate the dcache after DMA operation
authorJi Luo <ji.luo@nxp.com>
Fri, 22 May 2020 02:54:30 +0000 (10:54 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:18 +0000 (09:49 +0800)
commitee720d8d69d4d3e97d2daea9b91f8d076ffb05b0
treed4de451c57346f0ccbbe2f4754ce4d72f1f01c24
parentf7584f25285b94e2ea0f312399d1aef9671673b2
MA-17226 Invalidate the dcache after DMA operation

The main memory contents can spontaneously come to the cache due to
the speculative memory access by the CPU, this may cause coherency
problem if this happens during the DMA operaion is on-going.

Invalidate the dcache range after DMA opeartion but before the main
memory read to avoid coherency problem.

Test: reboot test.

Change-Id: I93824deab9285b5478669e0a311e0b338bf02f8a
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 4cd1d087111dd3b4ddaad33ef4862f7ac1ab1b34)
lib/trusty/ql-tipc/hwcrypto.c