From 9e6da34c72274578be6f86ba7b7aa7849a624315 Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 19 May 2021 16:27:41 +0200 Subject: tee: optee: sync cache on pre-reloc OP-TEE invocation This change ensures both U-Boot and OP-TEE see the same content from shared memory when OP-TEE is invoked prior U-Boot relocation. This change is required since U-Boot may execute with data cache off while OP-TEE always enables cache on memory shared with U-Boot. Signed-off-by: Etienne Carriere Reviewed-by: Jens Wiklander Acked-by: Ilias Apalodimas --- include/tee.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/tee.h') diff --git a/include/tee.h b/include/tee.h index 99367b2..2ef29bf 100644 --- a/include/tee.h +++ b/include/tee.h @@ -377,4 +377,10 @@ void tee_optee_ta_uuid_from_octets(struct tee_optee_ta_uuid *d, void tee_optee_ta_uuid_to_octets(u8 d[TEE_UUID_LEN], const struct tee_optee_ta_uuid *s); +/** + * tee_flush_all_shm_dcache() - Flush data cache for all shared memories + * @dev: The TEE device + */ +void tee_flush_all_shm_dcache(struct udevice *dev); + #endif /* __TEE_H */ -- cgit v1.1