blob: b578a1820ab17c3c2e291145f998830892e57e6f [file] [log] [blame]
David McCulloughf0be44f2012-09-07 04:17:02 +08001#
2# Arch-specific CryptoAPI modules.
3#
4
5obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o
Ard Biesheuvele4e7f102013-09-16 18:31:38 +02006obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o
David McCulloughf0be44f2012-09-07 04:17:02 +08007obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o
Jussi Kivilinna60468252014-07-29 17:14:14 +01008obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o
Sami Tolvanenf2f770d2015-04-03 18:03:40 +08009obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o
Ard Biesheuvelc80ae7c2015-05-08 10:46:21 +020010obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o
Ard Biesheuvel3abafaf22015-04-11 15:32:34 +020011
12ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o
13ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o
14ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o
15ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o
Ard Biesheuvel1d481f12016-12-05 18:42:26 +000016ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o
Ard Biesheuveld0a34312016-12-05 18:42:28 +000017ce-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o
Ard Biesheuvel3abafaf22015-04-11 15:32:34 +020018
19ifneq ($(ce-obj-y)$(ce-obj-m),)
20ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y)
21obj-y += $(ce-obj-y)
22obj-m += $(ce-obj-m)
23else
24$(warning These ARMv8 Crypto Extensions modules need binutils 2.23 or higher)
25$(warning $(ce-obj-y) $(ce-obj-m))
26endif
27endif
David McCulloughf0be44f2012-09-07 04:17:02 +080028
Ard Biesheuvele4e7f102013-09-16 18:31:38 +020029aes-arm-y := aes-armv4.o aes_glue.o
30aes-arm-bs-y := aesbs-core.o aesbs-glue.o
31sha1-arm-y := sha1-armv4-large.o sha1_glue.o
Jussi Kivilinna60468252014-07-29 17:14:14 +010032sha1-arm-neon-y := sha1-armv7-neon.o sha1_neon_glue.o
Sami Tolvanenf2f770d2015-04-03 18:03:40 +080033sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o
34sha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y)
Ard Biesheuvelc80ae7c2015-05-08 10:46:21 +020035sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o
36sha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y)
Ard Biesheuvel864cbee2015-03-10 09:47:45 +010037sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o
Ard Biesheuvel006d0622015-03-10 09:47:46 +010038sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o
Ard Biesheuvel86464852015-03-10 09:47:47 +010039aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o
Ard Biesheuvelf1e866b2015-03-10 09:47:48 +010040ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o
Ard Biesheuvel1d481f12016-12-05 18:42:26 +000041crct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o
Ard Biesheuveld0a34312016-12-05 18:42:28 +000042crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o
Ard Biesheuvele4e7f102013-09-16 18:31:38 +020043
44quiet_cmd_perl = PERL $@
45 cmd_perl = $(PERL) $(<) > $(@)
46
47$(src)/aesbs-core.S_shipped: $(src)/bsaes-armv7.pl
48 $(call cmd,perl)
49
Sami Tolvanenf2f770d2015-04-03 18:03:40 +080050$(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl
51 $(call cmd,perl)
52
Ard Biesheuvelc80ae7c2015-05-08 10:46:21 +020053$(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl
54 $(call cmd,perl)
55
56.PRECIOUS: $(obj)/aesbs-core.S $(obj)/sha256-core.S $(obj)/sha512-core.S