linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] crypto: Add Allwinner Security System crypto accelerator
@ 2014-10-19 14:16 LABBE Corentin
  2014-10-19 14:16 ` [PATCH v5 1/4] ARM: sun7i: dt: Add Security System to A20 SoC DTS LABBE Corentin
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: LABBE Corentin @ 2014-10-19 14:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hello

This is the driver for the Security System included in Allwinner SoC A20.
The Security System (SS for short) is a hardware cryptographic accelerator that support AES/MD5/SHA1/DES/3DES/PRNG algorithms.
It could be found on others Allwinner SoC: 
- A10s, A33 and A31 diagram speak about it with precisions (AES/DES/3DES/Md5/SHA1/PRNG)
- A10 and A13 manual give the same datasheet for SS than A20
- A23 speak about a security system but without precisions
- A80 datasheet speak about a security system with more functions (SHA224/SHA256/RSA/CRC) but without precisions
But I do not have access on any of those hardware, tests are welcome.

This driver currently supports:
- MD5 and SHA1 hash algorithms
- AES block cipher in CBC mode with 128/196/256bits keys.
- DES and 3DES block cipher in CBC mode
The driver exposes all those algorithms through the kernel cryptographic API.

The driver support only CPU driven (aka poll mode) transfer mode since the DMA engine of the A20 does not have a mainline driver yet.

Changes since v4:
- Rework all mutex path
- Use ahash_request_ctx() in hash functions
- Major rework of hash functions for solving mutex problems
- Split sunxi_req_ctx in two since ciphers now use struct sunxi_tfm_ctx
- Hash functions now test FIFO space register

Changes since v3:
- Remove all algorithms options from Kconfig, so now only one module is used
- Add the sunxi_ss_cipher function to unify mode calculation
- Remove the sunxi_cipher_exit empty function
- Add some missing mutex_unlock()
- Drop PRNG support, I wait for more comment on its results before re-enabling it.

Changes since v2:
- Fix Makefile and Kconfig for static kernel.

Changes since v1:
- annotate ss->base as __iomem
- regroup all mutex in the ss_ctx structure
- splited driver in 7 modules (core md5 sha1 aes des 3des prng) in sunxi-ss directory
- use dev_exit_p() for .remove
- added missing CRYPTO_BLKCIPHER dep in Kconfig
- use ahash instead of shash
- use ablkcipher instead of blkcipher
- use crypto_rng_ctx instead of crypto_tfm_ctx
- set seed as an u32
- drop useless comment decoration
- drop useless debug
- ss_ctx is now a static pointer and whole structure being allocated
- fix the platform_get_resource/devm_ioremap_resource pattern
- invert getting die id and configuring clock
- set clock value as a const unsigned long
- add MODULE_ALIAS
- use define names more consistency (SS_xxx)
- fix PRNG errors
- respell SS to Security System in DT documentation

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

end of thread, other threads:[~2014-11-16 17:13 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 14:16 [PATCH v5] crypto: Add Allwinner Security System crypto accelerator LABBE Corentin
2014-10-19 14:16 ` [PATCH v5 1/4] ARM: sun7i: dt: Add Security System to A20 SoC DTS LABBE Corentin
2014-10-19 14:16 ` [PATCH v5 2/4] ARM: sunxi: dt: Add DT bindings documentation for SUNXI Security System LABBE Corentin
2014-10-20 12:02   ` [linux-sunxi] " Koen Kooi
2014-10-19 14:16 ` [PATCH v5 3/4] MAINTAINERS: Add myself as maintainer of Allwinner " LABBE Corentin
2014-10-19 14:16 ` [PATCH v5 4/4] crypto: Add Allwinner Security System crypto accelerator LABBE Corentin
2014-10-20 23:28   ` Vladimir Zapolskiy
2014-10-20 23:52     ` Joe Perches
2014-10-21 16:39       ` Corentin LABBE
2014-10-21 16:25     ` Corentin LABBE
2014-10-21 17:27       ` Vladimir Zapolskiy
2014-10-21 19:11   ` Maxime Ripard
2014-10-24 18:52     ` Corentin LABBE
2014-10-30 17:19       ` Maxime Ripard
2014-10-31  7:20         ` Herbert Xu
2014-10-31  8:13           ` Maxime Ripard
2014-10-31  8:18             ` Herbert Xu
2014-10-31  9:57               ` Maxime Ripard
2014-10-31 10:05                 ` Herbert Xu
2014-11-03  9:34                   ` Maxime Ripard
2014-11-03 10:35                     ` Herbert Xu
2014-11-06 14:26                       ` Maxime Ripard
2014-11-06 14:32                         ` Herbert Xu
2014-11-16 17:13                           ` Maxime Ripard
2014-10-22  9:00   ` Arnd Bergmann
2014-10-24 18:50     ` [linux-sunxi] " Corentin LABBE
2014-11-06 14:13   ` Herbert Xu

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