Skip to content

Commit

Permalink
crypto: Add support for Zhaoxin AES algorithm
Browse files Browse the repository at this point in the history
zhaoxin inclusion
category: feature

-------------------

Some Zhaoxin processors come with an integrated crypto engine (so called
Zhaoxin ACE, Advanced Cryptography Engine) that provides instructions for
very fast cryptographic operations with supported AES algorithms.

Signed-off-by: leoliu-oc <[email protected]>
  • Loading branch information
leoliu-oc committed Jun 12, 2024
1 parent 5086b5c commit 81076e2
Show file tree
Hide file tree
Showing 4 changed files with 552 additions and 1 deletion.
27 changes: 27 additions & 0 deletions drivers/crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,33 @@ config CRYPTO_DEV_PADLOCK_SHA
If unsure say M. The compiled module will be
called padlock-sha.

config CRYPTO_DEV_ZHAOXIN
tristate "Support for Zhaoxin ACE"
depends on X86 && !UML
default m
help
Some Zhaoxin processors come with an integrated crypto engine
(so called Zhaoxin ACE, Advanced Cryptography Engine)
that provides instructions for very fast cryptographic
operations with supported algorithms.

The instructions are used only when the CPU supports them.
Otherwise software encryption is used.

config CRYPTO_DEV_ZHAOXIN_AES
tristate "Zhaoxin ACE driver for AES algorithm"
depends on CRYPTO_DEV_ZHAOXIN
default CRYPTO_DEV_ZHAOXIN
select CRYPTO_BLKCIPHER
select CRYPTO_AES
help
Use Zhaoxin ACE for AES algorithm.

Available in Zhaoxin CPUs.

If unsure say M. The compiled module will be
called zhaoxin-aes.

config CRYPTO_DEV_GEODE
tristate "Support for the Geode LX AES engine"
depends on X86_32 && PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ obj-$(CONFIG_CRYPTO_DEV_OMAP_DES) += omap-des.o
obj-$(CONFIG_CRYPTO_DEV_OMAP_SHAM) += omap-sham.o
obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
obj-$(CONFIG_CRYPTO_DEV_ZHAOXIN_AES) += zhaoxin-aes.o
obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
obj-$(CONFIG_CRYPTO_DEV_QCE) += qce/
obj-$(CONFIG_CRYPTO_DEV_QCOM_RNG) += qcom-rng.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/padlock-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static struct skcipher_alg cbc_aes_alg = {
};

static const struct x86_cpu_id padlock_cpu_id[] = {
X86_MATCH_FEATURE(X86_FEATURE_XCRYPT, NULL),
{ X86_VENDOR_CENTAUR, 6, X86_MODEL_ANY, X86_FEATURE_XCRYPT },
{}
};
MODULE_DEVICE_TABLE(x86cpu, padlock_cpu_id);
Expand Down
Loading

0 comments on commit 81076e2

Please sign in to comment.