linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jens Wiklander <jens.wiklander@linaro.org>
To: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	op-tee@lists.trustedfirmware.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	Marc Bonnici <marc.bonnici@arm.com>,
	Jerome Forissier <jerome@forissier.org>,
	Jens Wiklander <jens.wiklander@linaro.org>
Subject: [PATCH 0/6] Add FF-A support in OP-TEE driver
Date: Thu, 25 Mar 2021 16:44:20 +0100	[thread overview]
Message-ID: <20210325154426.3520148-1-jens.wiklander@linaro.org> (raw)

Hi all,

This adds supports for the OP-TEE driver to communicate with secure world
using FF-A [1] as transport.

These patches are based on the FF-A v4 patch set by Sudeep Holla [2] [3].

There is one change to the TEE subsystem with "tee: add sec_world_id to
struct tee_shm" to add support for holding globally unique handle assigned
by the FF-A. This is a field that I believe could useful for the AMDTEE
driver too.

For communication the OP-TEE message protocol is still used, but with a new
type of memory reference, struct optee_msg_param_fmem, to carry the
information needed by FF-A. The OP-TEE driver is refactored internally with
to sets of callbacks, one for the old SMC based communication and another
set with FF-A as transport.

There is also a difference in how the drivers are instantiated. With the
SMC based transport we have a platform driver, module_platform_driver(),
today which we're keeping as is for this configuration. In a FF-A system we
have a FF-A driver, module_ffa_driver(), instead.

The OP-TEE driver can be compiled for both targets at the same time and
it's up to runtime configuration (device tree or ACPI) to decide how it's
initialized.

Thanks,
Jens

[1] https://developer.arm.com/documentation/den0077/latest
[2] https://lore.kernel.org/linux-arm-kernel/20210212154614.38604-1-sudeep.holla@arm.com/
[3] git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git v5.11/ffa

Jens Wiklander (6):
  tee: add sec_world_id to struct tee_shm
  optee: simplify optee_release()
  optee: sync optee_msg.h and optee_rpc_cmd.h
  optee: refactor driver with internal callbacks
  optee: add a FF-A memory pool
  optee: add FF-A support

 drivers/tee/optee/call.c          | 327 +++++++++++---
 drivers/tee/optee/core.c          | 698 +++++++++++++++++++++++++-----
 drivers/tee/optee/optee_ffa.h     | 153 +++++++
 drivers/tee/optee/optee_msg.h     | 168 ++-----
 drivers/tee/optee/optee_private.h |  88 +++-
 drivers/tee/optee/optee_rpc_cmd.h | 333 ++++++++++++++
 drivers/tee/optee/rpc.c           | 169 +++++++-
 drivers/tee/optee/shm_pool.c      |  65 ++-
 drivers/tee/optee/shm_pool.h      |   1 +
 include/linux/tee_drv.h           |   7 +-
 10 files changed, 1685 insertions(+), 324 deletions(-)
 create mode 100644 drivers/tee/optee/optee_ffa.h
 create mode 100644 drivers/tee/optee/optee_rpc_cmd.h


base-commit: 31ef391700953fb59ea8755ea38c6085bdec380e
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-03-25 15:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 15:44 Jens Wiklander [this message]
2021-03-25 15:44 ` [PATCH 1/6] tee: add sec_world_id to struct tee_shm Jens Wiklander
2021-03-25 15:44 ` [PATCH 2/6] optee: simplify optee_release() Jens Wiklander
2021-03-25 15:44 ` [PATCH 3/6] optee: sync optee_msg.h and optee_rpc_cmd.h Jens Wiklander
2021-03-25 15:44 ` [PATCH 4/6] optee: refactor driver with internal callbacks Jens Wiklander
2021-03-25 15:44 ` [PATCH 5/6] optee: add a FF-A memory pool Jens Wiklander
2021-03-25 15:44 ` [PATCH 6/6] optee: add FF-A support Jens Wiklander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210325154426.3520148-1-jens.wiklander@linaro.org \
    --to=jens.wiklander@linaro.org \
    --cc=jerome@forissier.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.bonnici@arm.com \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).