]> git.baikalelectronics.ru Git - uboot.git/commit
firmware: scmi: optee: use TEE shared memory for SCMI messages
authorEtienne Carriere <etienne.carriere@linaro.org>
Tue, 31 May 2022 16:09:16 +0000 (18:09 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 17:12:55 +0000 (13:12 -0400)
commite4e12d6ed63a7d5e8ea509bb7ed385930e79ef92
treece2c67613d9d7dd3a5f66c7515a1c45c92f1e955
parente7eeeb81184e47c4be550ed09fb8b465c9757988
firmware: scmi: optee: use TEE shared memory for SCMI messages

Changes implementation when using TEE dynamically allocated shared
memory to synchronize with the Linux implementation where the legacy
SMT protocol cannot be used with such memory since it is expected from
device mapped memory whereas OP-TEE shared memory is cached and
hence should not be accessed using memcpy_toio()/memcpy_fromio().

This change implements the MSG shared memory protocol introduced
in Linux [1]. The protocol uses a simplified SMT header of 32bit
named MSG_SMT to carry SCMI protocol information and uses side channel
means to carry exchanged buffer size information, as TEE invocation API
parameters when used in the SCMI OP-TEE transport.

Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f301bba0ca7392d16a6ea4f1d264a91f1fadea1a
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
drivers/firmware/scmi/optee_agent.c
drivers/firmware/scmi/smt.c
drivers/firmware/scmi/smt.h