David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 1 | # |
| 2 | # Arch-specific CryptoAPI modules. |
| 3 | # |
| 4 | |
| 5 | obj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 6 | obj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o |
David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 7 | obj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o |
Jussi Kivilinna | 6046825 | 2014-07-29 17:14:14 +0100 | [diff] [blame] | 8 | obj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 9 | obj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame] | 10 | obj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o |
Ard Biesheuvel | afaf712 | 2017-01-11 16:41:50 +0000 | [diff] [blame] | 11 | obj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o |
Ard Biesheuvel | 3abafaf | 2015-04-11 15:32:34 +0200 | [diff] [blame] | 12 | |
| 13 | ce-obj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o |
| 14 | ce-obj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o |
| 15 | ce-obj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o |
| 16 | ce-obj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o |
Ard Biesheuvel | 1d481f1 | 2016-12-05 18:42:26 +0000 | [diff] [blame] | 17 | ce-obj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o |
Ard Biesheuvel | efa7ceb | 2017-02-28 14:36:57 +0000 | [diff] [blame] | 18 | crc-obj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o |
| 19 | |
| 20 | ifneq ($(crc-obj-y)$(crc-obj-m),) |
| 21 | ifeq ($(call as-instr,.arch armv8-a\n.arch_extension crc,y,n),y) |
| 22 | ce-obj-y += $(crc-obj-y) |
| 23 | ce-obj-m += $(crc-obj-m) |
| 24 | else |
| 25 | $(warning These CRC Extensions modules need binutils 2.23 or higher) |
| 26 | $(warning $(crc-obj-y) $(crc-obj-m)) |
| 27 | endif |
| 28 | endif |
Ard Biesheuvel | 3abafaf | 2015-04-11 15:32:34 +0200 | [diff] [blame] | 29 | |
| 30 | ifneq ($(ce-obj-y)$(ce-obj-m),) |
| 31 | ifeq ($(call as-instr,.fpu crypto-neon-fp-armv8,y,n),y) |
| 32 | obj-y += $(ce-obj-y) |
| 33 | obj-m += $(ce-obj-m) |
| 34 | else |
| 35 | $(warning These ARMv8 Crypto Extensions modules need binutils 2.23 or higher) |
| 36 | $(warning $(ce-obj-y) $(ce-obj-m)) |
| 37 | endif |
| 38 | endif |
David McCullough | f0be44f | 2012-09-07 04:17:02 +0800 | [diff] [blame] | 39 | |
Ard Biesheuvel | 81edb42 | 2017-01-11 16:41:53 +0000 | [diff] [blame] | 40 | aes-arm-y := aes-cipher-core.o aes-cipher-glue.o |
Ard Biesheuvel | cc477bf | 2017-01-11 16:41:54 +0000 | [diff] [blame] | 41 | aes-arm-bs-y := aes-neonbs-core.o aes-neonbs-glue.o |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 42 | sha1-arm-y := sha1-armv4-large.o sha1_glue.o |
Jussi Kivilinna | 6046825 | 2014-07-29 17:14:14 +0100 | [diff] [blame] | 43 | sha1-arm-neon-y := sha1-armv7-neon.o sha1_neon_glue.o |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 44 | sha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o |
| 45 | sha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y) |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame] | 46 | sha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o |
| 47 | sha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y) |
Ard Biesheuvel | 864cbee | 2015-03-10 09:47:45 +0100 | [diff] [blame] | 48 | sha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o |
Ard Biesheuvel | 006d062 | 2015-03-10 09:47:46 +0100 | [diff] [blame] | 49 | sha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o |
Ard Biesheuvel | 8646485 | 2015-03-10 09:47:47 +0100 | [diff] [blame] | 50 | aes-arm-ce-y := aes-ce-core.o aes-ce-glue.o |
Ard Biesheuvel | f1e866b | 2015-03-10 09:47:48 +0100 | [diff] [blame] | 51 | ghash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o |
Ard Biesheuvel | 1d481f1 | 2016-12-05 18:42:26 +0000 | [diff] [blame] | 52 | crct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o |
Ard Biesheuvel | d0a3431 | 2016-12-05 18:42:28 +0000 | [diff] [blame] | 53 | crc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o |
Ard Biesheuvel | afaf712 | 2017-01-11 16:41:50 +0000 | [diff] [blame] | 54 | chacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o |
Ard Biesheuvel | e4e7f10 | 2013-09-16 18:31:38 +0200 | [diff] [blame] | 55 | |
| 56 | quiet_cmd_perl = PERL $@ |
| 57 | cmd_perl = $(PERL) $(<) > $(@) |
| 58 | |
Sami Tolvanen | f2f770d | 2015-04-03 18:03:40 +0800 | [diff] [blame] | 59 | $(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl |
| 60 | $(call cmd,perl) |
| 61 | |
Ard Biesheuvel | c80ae7c | 2015-05-08 10:46:21 +0200 | [diff] [blame] | 62 | $(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl |
| 63 | $(call cmd,perl) |
| 64 | |
Ard Biesheuvel | cc477bf | 2017-01-11 16:41:54 +0000 | [diff] [blame] | 65 | .PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S |