xen/arm: optee: add support for RPC commands
authorVolodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Tue, 11 Jun 2019 18:46:42 +0000 (18:46 +0000)
committerJulien Grall <julien.grall@arm.com>
Wed, 19 Jun 2019 11:05:05 +0000 (12:05 +0100)
commit1c9460595c60c432244083a4401f36f9f374a1c0
tree3a4946b70d1593c3e261cd1750f72806ae01222b
parent551d3cea0fc9e683fd2fd72c0a0855cd50132ba7
xen/arm: optee: add support for RPC commands

OP-TEE can issue multiple RPC requests. We are interested mostly in
request that asks NW to allocate/free shared memory for OP-TEE
needs, because mediator needs to do address translation in the same
way as it was done for shared buffers registered by NW.

OP-TEE can ask NW to allocate multiple buffers during the call.  We
know that if OP-TEE asks for another buffer, we can free pglist for
the previous one.

As mediator now accesses shared command buffer, we need to shadow
it in the same way, as we shadow request buffers for STD calls.
Earlier, we just passed address of this buffer to OP-TEE, but
now we need to read and write to it, so it should be shadowed.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/tee/optee.c