[PATCH] drivers: tee: i2c trampoline driver

Igor Opaniuk
2021-01-06T13:32:31Z

Hi Simon,

On Tue, Dec 29, 2020 at 5:34 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Jorge,
>
> On Mon, 21 Dec 2020 at 11:15, Jorge Ramirez-Ortiz <jorge@foundries.io> wrote:
> >
> > This commit gives the secure world access to the I2C bus so it can
> > communicate with I2C slaves (tipically those would be secure elements
>
> typically
>
> > like the NXP SE050).
> >
> > Tested on imx8mmevk.
>
> We don't seem to have any optee tests in U-Boot at present. I vaguely
> recall they were coming at some point. I think we need:
>
> - a sandbox fake drive for optee, that understands and responds to the
> 6 uclass calls at a basic level
It already exists here drivers/tee/sandbox.c. Basically what can be
additionally done is extending
existing optee sandbox driver to support RPCs (check
drivers/tee/optee/core.c, do_call_with_arg() for details)
for triggering tee supplicant. Presumably that wasn't initially done
as frankly it didn't make any sense because
of the absence of RPMB emulation in sandbox.

There are also AVB tests, that under the hood use OP-TEE API and
sandbox driver for
persistent storage read/write tests in test/py/tests/test_android/test_avb.py

> - an update to get_invoke_func() that provides a sandbox function too
>
> Then we should be able to run optee tests in CI.
>
> It is not a lot of work, but I don't think we should add to optee
> until this is resolved.
>
> Regards,
> Simon
> [.]

--
Best regards - Freundliche Gr?sse - Meilleures salutations

Igor Opaniuk
Embedded Software Engineer
T: +380 938364067
E: igor.opaniuk at foundries.io
W: www.foundries.io