[PATCH v5 3/4] drivers: tee: sandbox: add rpc test ta emulation

Etienne Carriere etienne.carriere at linaro.org
Fri Jan 22 12:54:53 CET 2021


Hi Igor

> HI Etienne,
>
> On Thu, Jan 21, 2021 at 9:39 AM Etienne Carriere
> <etienne.carriere at linaro.org> wrote:
> >
> > Hi Igor,
> >
> > On Wed, 20 Jan 2021 at 18:56, Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
> > >
> > > From: Igor Opaniuk <igor.opaniuk at foundries.io>
> > >
> > > This adds support for RPC test trusted application emulation, which
> > > permits to test reverse RPC calls to TEE supplicant. Currently it covers
> > > requests to the I2C bus from TEE.
> > >
> > > Signed-off-by: Igor Opaniuk <igor.opaniuk at foundries.io>
> > > Reviewed-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > (no changes since v1)
> > >
> > >  drivers/tee/Makefile            |   2 +
> > >  drivers/tee/optee/Kconfig       |   9 ++
> > >  drivers/tee/sandbox.c           | 143 +++++++++++++++++++++++++++++++-
> > >  include/tee/optee_ta_rpc_test.h |  28 +++++++
> > >  4 files changed, 178 insertions(+), 4 deletions(-)
> > >  create mode 100644 include/tee/optee_ta_rpc_test.h
> > >
> > > diff --git a/drivers/tee/Makefile b/drivers/tee/Makefile
> > > index 5c8ffdbce8..ff844195ae 100644
> > > --- a/drivers/tee/Makefile
> > > +++ b/drivers/tee/Makefile
> > > @@ -2,5 +2,7 @@
> > >
> > >  obj-y += tee-uclass.o
> > >  obj-$(CONFIG_SANDBOX) += sandbox.o
> > > +obj-$(CONFIG_OPTEE_TA_RPC_TEST) += optee/supplicant.o
> > > +obj-$(CONFIG_OPTEE_TA_RPC_TEST) += optee/i2c.o
> >
> > I think this line should move to drivers/tee/optee/Makefile for consistency.
> Well, what we do here is testing TEE supplicant from TEE sandbox driver.
> So this is why I pull that bits and pieces from OP-TEE driver, however
> OP-TEE driver itself
> isn't compiled (CONFIG_OPTEE=n when CONFIG_SANDBOX=y).
> I don't either like this idea, but currently that's the only way to add some
> RPC test coverage that was requested in v1.
>
> CONFIG_OPTEE_TA_RPC_TEST is currently supposed to be used only
> in sandbox setups (for testing RPC call paths with DM tests).

Ok, i catch it. These paths make sense.

br,
etienne

>
>
> >  obj-$(CONFIG_OPTEE) += optee/
> >  obj-y += broadcom/
> > diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig
> > index d489834df9..65622f30b1 100644
> > --- a/drivers/tee/optee/Kconfig
> > +++ b/drivers/tee/optee/Kconfig
> > @@ -22,6 +22,15 @@ config OPTEE_TA_AVB
> >           The TA can support the "avb" subcommands "read_rb", "write"rb"
> >           and "is_unlocked".
> >
> > +config OPTEE_TA_RPC_TEST
> > +       bool "Support RPC TEST TA"
> > +       depends on SANDBOX_TEE
> > +       default y
> > +       help
> > +         Enables support for RPC test trusted application emulation, which
> > +         permits to test reverse RPC calls to TEE supplicant. Should
> > +         be used only in sandbox env.
> > +
> >  endmenu
> >
> >  endif
> > (snip)


More information about the U-Boot mailing list