mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] mailbox: tmelite-qmp: Introduce QCOM TMEL QMP mailbox driver
@ 2024-12-05  8:06 Sricharan R
  2024-12-05  8:06 ` [PATCH RFC 1/2] dt-bindings: mailbox: qcom: Document qcom,tmelite-qmp Sricharan R
  2024-12-05  8:06 ` [PATCH RFC 2/2] mailbox: tmelite-qmp: Introduce QCOM TMEL QMP mailbox driver Sricharan R
  0 siblings, 2 replies; 11+ messages in thread
From: Sricharan R @ 2024-12-05  8:06 UTC (permalink / raw)
  To: jassisinghbrar, robh, krzk+dt, conor+dt, linux-arm-msm,
	linux-kernel, devicetree, quic_srichara

From: Sricharan Ramabadhran <quic_srichara@quicinc.com>

The QMP mailbox is the primary means of communication between TME-L SS
and other subsystem on the SoC. A dedicated pair of inbound and outbound
mailboxes is implemented for each subsystem/external execution environment
which needs to communicate with TME-L for security services. The inbound
mailboxes are used to send IPC requests to TME-L, which are then processed
by TME-L firmware and accordingly the responses are sent to the requestor
via outbound mailboxes.

It is an IPC transport protocol which is light weight and supports
a subset of API's. It handles link initialization, negotiation,
establishment and communication across client(APPSS/BTSS/AUDIOSS)
and server(TME-L SS).

   -----------------------------------------------       ---------------------------------------------------
  |                                              |       |                                                 |
  |                 SOC  CLIENT                  | SOC   |                TME-L  SS                        |
  |                                              | AHB   |                                                 |
  |     ----------    ---------   ---------      |       | ------    -------     --------    ------------  |
  |     |        |    |       |   |       |      | WO    | |     | R |     |     |      |    |SERVICES   | |
  |     | APPS   |<-->| TMEL  |<->|       |------------->| | IN  |-->|     |     | TMEL |    |--------   | |
  |     |        |    | COM   |   | QMP   |      | RO    | |     | W | QMP |<--->| COM  |<-->| a) ATTEST | |
  |     |        |    |       |   |       |<-------------| | OUT |<--|     |     |      |    | b) CRYPTO | |
  |     |        |    |       |   |       |      |       | |     |   |     |     |      |    | .. more   | |
  |     ---------     ---------   ---------      |       | ------    -------     -------     ------------  |
  |                                              |       |                                                 |
   -----------------------------------------------       --------------------------------------------------

TME-L SS provides different kinds of services like secureboot, remote image authentication,
key management, crypto, OEM provisioning etc. This patch adds support for remote image
authentication. Support for rest of the services can be added.

Remote proc driver subscribes to this mailbox and uses the mbox_send_message to use
TME-L to securely authenticate/teardown the images.

The intention of posting this is to get the design reviewed/corrected since there are also
other possible ways of having this SS support like:

a) Make TMEL QMP as a 'rpmsg' driver and clients can connect using rmpsg_send

b) Keep TMEL APIs seperately in drivers/firmware which would export APIs
   and QMP mailbox seperately.
   Clients can then call the exported APIS.

c) Combine both TMEL and QMP as mailbox (this is the approach used here)

Since clients like same rproc driver use SCM/TMEL across socs, the goal here was to abstract the
TMEL-QMP SS functionality, so that clients should be able to connect and send messages with
a common API.

Based on the feedback can explore any other options as well.

Sricharan Ramabadhran (2):
  dt-bindings: mailbox: Document qcom,tmelite-qmp
  mailbox: tmelite-qmp: Introduce TMEL QMP mailbox driver

 .../bindings/mailbox/qcom,tmelite-qmp.yaml    |  70 ++
 drivers/mailbox/Kconfig                       |   7 +
 drivers/mailbox/Makefile                      |   2 +
 drivers/mailbox/qcom-tmelite-qmp.c            | 949 ++++++++++++++++++
 include/linux/mailbox/tmelcom-qmp.h           | 157 +++
 5 files changed, 1185 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mailbox/qcom,tmelite-qmp.yaml
 create mode 100644 drivers/mailbox/qcom-tmelite-qmp.c
 create mode 100644 include/linux/mailbox/tmelcom-qmp.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-12-06  5:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-05  8:06 [PATCH RFC 0/2] mailbox: tmelite-qmp: Introduce QCOM TMEL QMP mailbox driver Sricharan R
2024-12-05  8:06 ` [PATCH RFC 1/2] dt-bindings: mailbox: qcom: Document qcom,tmelite-qmp Sricharan R
2024-12-05  8:12   ` Krzysztof Kozlowski
2024-12-05  9:17     ` Sricharan Ramabadhran
2024-12-05 11:43       ` Krzysztof Kozlowski
2024-12-06  5:27         ` Sricharan Ramabadhran
2024-12-05 12:24   ` Dmitry Baryshkov
2024-12-06  5:30     ` Sricharan Ramabadhran
2024-12-05  8:06 ` [PATCH RFC 2/2] mailbox: tmelite-qmp: Introduce QCOM TMEL QMP mailbox driver Sricharan R
2024-12-05  8:14   ` Krzysztof Kozlowski
2024-12-05  9:07     ` Sricharan Ramabadhran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®