linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] crypto: nintendo-aes - add a new AES driver
@ 2021-09-21 21:39 Emmanuel Gil Peyrot
  2021-09-21 21:39 ` [PATCH 1/4] " Emmanuel Gil Peyrot
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Emmanuel Gil Peyrot @ 2021-09-21 21:39 UTC (permalink / raw)
  To: linux-crypto
  Cc: devicetree, Herbert Xu, Emmanuel Gil Peyrot, linux-kernel,
	Rob Herring, Paul Mackerras, Ash Logan, linuxppc-dev,
	David S. Miller, Jonathan Neuschäfer

This engine implements AES in CBC mode, using 128-bit keys only.  It is
present on both the Wii and the Wii U, and is apparently identical in
both consoles.

The hardware is capable of firing an interrupt when the operation is
done, but this driver currently uses a busy loop, I’m not too sure
whether it would be preferable to switch, nor how to achieve that.

It also supports a mode where no operation is done, and thus could be
used as a DMA copy engine, but I don’t know how to expose that to the
kernel or whether it would even be useful.

In my testing, on a Wii U, this driver reaches 80.7 MiB/s, while the
aes-generic driver only reaches 30.9 MiB/s, so it is a quite welcome
speedup.

This driver was written based on reversed documentation, see:
https://wiibrew.org/wiki/Hardware/AES

Emmanuel Gil Peyrot (4):
  crypto: nintendo-aes - add a new AES driver
  dt-bindings: nintendo-aes: Document the Wii and Wii U AES support
  powerpc: wii.dts: Expose the AES engine on this platform
  powerpc: wii_defconfig: Enable AES by default

 .../bindings/crypto/nintendo-aes.yaml         |  34 +++
 arch/powerpc/boot/dts/wii.dts                 |   7 +
 arch/powerpc/configs/wii_defconfig            |   4 +-
 drivers/crypto/Kconfig                        |  11 +
 drivers/crypto/Makefile                       |   1 +
 drivers/crypto/nintendo-aes.c                 | 273 ++++++++++++++++++
 6 files changed, 329 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/crypto/nintendo-aes.yaml
 create mode 100644 drivers/crypto/nintendo-aes.c

-- 
2.33.0


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

end of thread, other threads:[~2021-09-28  9:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 21:39 [PATCH 0/4] crypto: nintendo-aes - add a new AES driver Emmanuel Gil Peyrot
2021-09-21 21:39 ` [PATCH 1/4] " Emmanuel Gil Peyrot
2021-09-22  2:02   ` Joel Stanley
2021-09-28  9:00     ` Geert Uytterhoeven
2021-09-22  6:04   ` Corentin Labbe
2021-09-22 10:10   ` Ard Biesheuvel
2021-09-22 10:43     ` Emmanuel Gil Peyrot
2021-09-22 10:55       ` Ard Biesheuvel
2021-09-21 21:39 ` [PATCH 2/4] dt-bindings: nintendo-aes: Document the Wii and Wii U AES support Emmanuel Gil Peyrot
2021-09-27 18:01   ` Rob Herring
2021-09-21 21:39 ` [PATCH 3/4] powerpc: wii.dts: Expose the AES engine on this platform Emmanuel Gil Peyrot
2021-09-21 21:39 ` [PATCH 4/4] powerpc: wii_defconfig: Enable AES by default Emmanuel Gil Peyrot
2021-09-21 21:59 ` [PATCH 0/4] crypto: nintendo-aes - add a new AES driver Eric Biggers
2021-09-21 22:37   ` Emmanuel Gil Peyrot

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).