All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] crypto: cmh - add Rambus CryptoManager Hub core driver and AES
@ 2026-10-13 17:48 Alex Ousherovitch
  2026-10-13 17:48 ` [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub Alex Ousherovitch
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Alex Ousherovitch @ 2026-10-13 17:48 UTC (permalink / raw)
  To: Alex Ousherovitch, Conor Dooley, David S. Miller, Herbert Xu,
	Jonathan Corbet, Krzysztof Kozlowski, Rob Herring,
	Saravanakrishnan Krishnamoorthy
  Cc: devicetree, Joel Wittenauer, linux-crypto, linux-doc,
	linux-kernel, Shuah Khan, Thi Nguyen

This is the first of a short, incremental set of submissions adding
support for the Rambus CryptoManager Hub (CMH), a hardware cryptographic
accelerator accessed through a mailbox-based VCQ (Virtual Command Queue)
interface.  To keep each posting small and independently reviewable, the
driver is submitted in self-contained parts; this first series adds the
core platform driver, the shared key/datastore layer and the AES
transforms (plus the device-tree binding and the MAINTAINERS entry).  AES
is the first and least-problematic algorithm family, so the core has a
user and the VCQ/DMA/completion data path is reviewable end to end.
Later series add the remaining symmetric ciphers (SM4, ChaCha20-Poly1305)
and the hwrng, the hashes and MACs, and finally the asymmetric and
post-quantum algorithms together with the /dev/cmh_mgmt management
interface.

The core driver binds the device, parses its device-tree description,
sets up DMA, the mailbox queue interface and the transaction manager,
and exposes sysfs/debugfs instrumentation.  The key/datastore patch adds
the key provisioning and system-object layer that the AES driver in this
series, and the algorithm drivers in the following series, build on.

The transaction manager runs as a kthread that packs VCQ entries, maps
DMA, and submits to the least-loaded mailbox; completion is handled by
per-mailbox threaded IRQs.  The data path is asynchronous: requests
return -EINPROGRESS and the driver honors CRYPTO_TFM_REQ_MAY_BACKLOG for
queue-full backpressure.  The CMH eSW is loaded independently by the
hardware before probe; the driver loads no firmware.

The CMH is a platform device matched via device tree (compatible
"rambus,cmh-v1030").  Following the inside-secure,eip93 binding model
and the DT maintainer's guidance, the schema requires a SoC-specific
compatible ahead of the IP fallback and therefore carries no example.

Public hardware documentation:
  Product brief: https://go.rambus.com/ch-7xx-and-cc-7xx-product-brief
  No public datasheets are currently available.  The driver was
  developed against the Rambus CryptoManager Hub Hardware Reference
  Manual (Rambus Inc. confidential).  Detailed hardware reference is
  available under NDA from Rambus Inc.; contact the maintainers listed
  in MAINTAINERS for access during review.

Developed against Herbert Xu's cryptodev tree.  checkpatch.pl --strict,
sparse (C=2) and a W=1 -Werror build are clean, and dtschema's
dt-doc-validate accepts the binding.  Exercised on riscv64 and arm64 --
QEMU with the CMH hardware model and a Xilinx VMK180 FPGA with the CMH
IP -- under lockdep/PROVE_LOCKING, DEBUG_OBJECTS,
KASAN/UBSAN/KMEMLEAK/KFENCE and (arm64) KCSAN with no findings;
worst-case stack stays under 1 KB.

Alex Ousherovitch (5):
  dt-bindings: crypto: add Rambus CryptoManager Hub
  crypto: cmh - add core platform driver
  crypto: cmh - add key/datastore infrastructure
  crypto: cmh - add AES skcipher/aead/cmac
  MAINTAINERS: add Rambus CryptoManager Hub (CMH)

 Documentation/ABI/testing/debugfs-driver-cmh  |  171 ++
 Documentation/ABI/testing/sysfs-driver-cmh    |   67 +
 Documentation/crypto/device_drivers/cmh.rst   |  340 +++
 Documentation/crypto/device_drivers/index.rst |    1 +
 .../bindings/crypto/rambus,cmh-v1030.yaml     |  144 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 MAINTAINERS                                   |   13 +
 drivers/crypto/Kconfig                        |    1 +
 drivers/crypto/Makefile                       |    1 +
 drivers/crypto/cmh/Kconfig                    |   62 +
 drivers/crypto/cmh/Makefile                   |   30 +
 drivers/crypto/cmh/cmh_aes.c                  |  755 ++++++
 drivers/crypto/cmh/cmh_aes_aead.c             | 1013 ++++++++
 drivers/crypto/cmh/cmh_aes_cmac.c             |  476 ++++
 drivers/crypto/cmh/cmh_config.c               |  619 +++++
 drivers/crypto/cmh/cmh_debugfs.c              |  307 +++
 drivers/crypto/cmh/cmh_dma.c                  |  482 ++++
 drivers/crypto/cmh/cmh_key.c                  |  119 +
 drivers/crypto/cmh/cmh_main.c                 |  394 +++
 drivers/crypto/cmh/cmh_mqi.c                  |  344 +++
 drivers/crypto/cmh/cmh_rh.c                   | 1211 +++++++++
 drivers/crypto/cmh/cmh_sys.c                  |  376 +++
 drivers/crypto/cmh/cmh_sysfs.c                |  108 +
 drivers/crypto/cmh/cmh_txn.c                  | 2235 +++++++++++++++++
 drivers/crypto/cmh/include/cmh.h              |   24 +
 drivers/crypto/cmh/include/cmh_aes.h          |   24 +
 drivers/crypto/cmh/include/cmh_aes_abi.h      |   98 +
 drivers/crypto/cmh/include/cmh_ccp_abi.h      |  108 +
 drivers/crypto/cmh/include/cmh_config.h       |  105 +
 drivers/crypto/cmh/include/cmh_debugfs.h      |   93 +
 drivers/crypto/cmh/include/cmh_dma.h          |  249 ++
 drivers/crypto/cmh/include/cmh_drbg_abi.h     |   67 +
 drivers/crypto/cmh/include/cmh_eac_abi.h      |   44 +
 drivers/crypto/cmh/include/cmh_hc_abi.h       |  162 ++
 drivers/crypto/cmh/include/cmh_hcq_abi.h      |  222 ++
 drivers/crypto/cmh/include/cmh_key.h          |   73 +
 drivers/crypto/cmh/include/cmh_kic_abi.h      |   77 +
 drivers/crypto/cmh/include/cmh_mqi.h          |   35 +
 drivers/crypto/cmh/include/cmh_pke_abi.h      |  272 ++
 drivers/crypto/cmh/include/cmh_qse_abi.h      |  201 ++
 drivers/crypto/cmh/include/cmh_registers.h    |  161 ++
 drivers/crypto/cmh/include/cmh_rh.h           |   93 +
 drivers/crypto/cmh/include/cmh_sm3_abi.h      |   79 +
 drivers/crypto/cmh/include/cmh_sm4_abi.h      |  101 +
 drivers/crypto/cmh/include/cmh_sys.h          |  111 +
 drivers/crypto/cmh/include/cmh_sys_abi.h      |  148 ++
 drivers/crypto/cmh/include/cmh_sysfs.h        |   14 +
 drivers/crypto/cmh/include/cmh_txn.h          |  493 ++++
 drivers/crypto/cmh/include/cmh_vcq.h          |  288 +++
 49 files changed, 12613 insertions(+)
 create mode 100644 Documentation/ABI/testing/debugfs-driver-cmh
 create mode 100644 Documentation/ABI/testing/sysfs-driver-cmh
 create mode 100644 Documentation/crypto/device_drivers/cmh.rst
 create mode 100644 Documentation/devicetree/bindings/crypto/rambus,cmh-v1030.yaml
 create mode 100644 drivers/crypto/cmh/Kconfig
 create mode 100644 drivers/crypto/cmh/Makefile
 create mode 100644 drivers/crypto/cmh/cmh_aes.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_aead.c
 create mode 100644 drivers/crypto/cmh/cmh_aes_cmac.c
 create mode 100644 drivers/crypto/cmh/cmh_config.c
 create mode 100644 drivers/crypto/cmh/cmh_debugfs.c
 create mode 100644 drivers/crypto/cmh/cmh_dma.c
 create mode 100644 drivers/crypto/cmh/cmh_key.c
 create mode 100644 drivers/crypto/cmh/cmh_main.c
 create mode 100644 drivers/crypto/cmh/cmh_mqi.c
 create mode 100644 drivers/crypto/cmh/cmh_rh.c
 create mode 100644 drivers/crypto/cmh/cmh_sys.c
 create mode 100644 drivers/crypto/cmh/cmh_sysfs.c
 create mode 100644 drivers/crypto/cmh/cmh_txn.c
 create mode 100644 drivers/crypto/cmh/include/cmh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes.h
 create mode 100644 drivers/crypto/cmh/include/cmh_aes_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_ccp_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_config.h
 create mode 100644 drivers/crypto/cmh/include/cmh_debugfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_dma.h
 create mode 100644 drivers/crypto/cmh/include/cmh_drbg_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_eac_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hc_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_hcq_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_key.h
 create mode 100644 drivers/crypto/cmh/include/cmh_kic_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_mqi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_pke_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_qse_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_registers.h
 create mode 100644 drivers/crypto/cmh/include/cmh_rh.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm3_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sm4_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sys_abi.h
 create mode 100644 drivers/crypto/cmh/include/cmh_sysfs.h
 create mode 100644 drivers/crypto/cmh/include/cmh_txn.h
 create mode 100644 drivers/crypto/cmh/include/cmh_vcq.h


---

The CMH driver was first posted as a single series; it is now
split into smaller, independently reviewable series per maintainer
feedback.  Earlier single-series postings:
  v1: https://lore.kernel.org/linux-crypto/20260625173328.1140487-1-skrishnamoorthy@rambus.com/
  v2: https://lore.kernel.org/linux-crypto/20260709203037.1884436-1-skrishnamoorthy@rambus.com/
  v3: https://lore.kernel.org/linux-crypto/20260806195519.2703224-1-skrishnamoorthy@rambus.com/
  v4: https://lore.kernel.org/linux-crypto/20260825221539.255951-1-aousherovitch@rambus.com/
  v5: https://lore.kernel.org/linux-crypto/20260917225929.2494111-1-aousherovitch@rambus.com/
base-commit: 9695df3b1db4ac4534274d38ee16e3b9b0bf910e

-- 
2.43.7


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

end of thread, other threads:[~2026-10-13 18:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 17:48 [PATCH 0/5] crypto: cmh - add Rambus CryptoManager Hub core driver and AES Alex Ousherovitch
2026-10-13 17:48 ` [PATCH 1/5] dt-bindings: crypto: add Rambus CryptoManager Hub Alex Ousherovitch
2026-10-13 17:57   ` sashiko-bot
2026-10-13 17:48 ` [PATCH 2/5] crypto: cmh - add core platform driver Alex Ousherovitch
2026-10-13 18:13   ` sashiko-bot
2026-10-13 17:48 ` [PATCH 3/5] crypto: cmh - add key/datastore infrastructure Alex Ousherovitch
2026-10-13 17:58   ` sashiko-bot
2026-10-13 17:48 ` [PATCH 4/5] crypto: cmh - add AES skcipher/aead/cmac Alex Ousherovitch
2026-10-13 18:02   ` sashiko-bot
2026-10-13 17:48 ` [PATCH 5/5] MAINTAINERS: add Rambus CryptoManager Hub (CMH) Alex Ousherovitch
2026-10-13 17:57 ` [PATCH 0/5] crypto: cmh - add Rambus CryptoManager Hub core driver and AES Conor Dooley
2026-10-13 18:35   ` Ousherovitch, Alex

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.