Skip to content

RFC Hisilicon SEC accelerator driver

Jonathan Cameron linux-crypto linux-devicetree 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 of 3 patches 4 repliesIn review

2 of 3 patches are in this archive. The cover letter announces 3.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt+71 -01 reply
2/3crypto: hisilicon hacv1 driverdrivers/crypto/Kconfig drivers/crypto/Makefile drivers/crypto/hisilicon/Kconfig +5 more+2806 -03 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Hisilicon SEC accelerator driver

From: Jonathan Cameron <[email protected]>

This an RFC for a couple of reasons:
1) There is some ongoing discussion on how to handle IVs in the AF_ALG interface when doing async IO. There are a few corners of handling in here that are performance enhancements based on Stephan's recent set.
2) The handling of iommu presence is ugly. I need to discuss this with iommu maintainer and interested parties.
3) The hardware is limited to 32MB per queued job. We need to handle splitting this up into multiple jobs and related IV chaining.

This driver provides in kernel support for the Hisilicon SEC accelerators found on the hip06 and hip07 SoCs. There are 4 such units on the D05 board for which DT bindings are provided. ACPI configuration also works with an appropriate UEFI build.

The hardware does not update the IV in chaining or counting modes. This is done in the driver on completion of the cipher operation.

If we are relying on IV chaining with current AF_ALG it is necessary to ensure we do not stream the elements directly into the hardware queues. For modes where this necessary we use a front end software queue.

The driver currently supports AES, DES and 3DES block ciphers. Hash support and AAED support to follow.

Jonathan Cameron (3):
dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.
crypto: hisilicon hacv1 driver
arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC

 .../bindings/crypto/hisilicon,hip07-sec.txt        |   71 +
 arch/arm64/boot/dts/hisilicon/hip07.dtsi           |  293 ++++
 drivers/crypto/Kconfig                             |    2 +
 drivers/crypto/Makefile                            |    1 +
 drivers/crypto/hisilicon/Kconfig                   |   16 +
 drivers/crypto/hisilicon/Makefile                  |    2 +
 drivers/crypto/hisilicon/sec/Makefile              |    3 +
 drivers/crypto/hisilicon/sec/sec_algs.c            | 1082 +++++++++++++++
 drivers/crypto/hisilicon/sec/sec_drv.c             | 1418 ++++++++++++++++++++
 drivers/crypto/hisilicon/sec/sec_drv.h             |  282 ++++
 10 files changed, 3170 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt
 create mode 100644 drivers/crypto/hisilicon/Kconfig
 create mode 100644 drivers/crypto/hisilicon/Makefile
 create mode 100644 drivers/crypto/hisilicon/sec/Makefile
 create mode 100644 drivers/crypto/hisilicon/sec/sec_algs.c
 create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.c
 create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.h
Signature · 1 line
2.11.0