xref: /openbmc/linux/arch/arm64/crypto/Makefile (revision b7171ce9)
12c98833aSArd Biesheuvel#
22c98833aSArd Biesheuvel# linux/arch/arm64/crypto/Makefile
32c98833aSArd Biesheuvel#
42c98833aSArd Biesheuvel# Copyright (C) 2014 Linaro Ltd <ard.biesheuvel@linaro.org>
52c98833aSArd Biesheuvel#
62c98833aSArd Biesheuvel# This program is free software; you can redistribute it and/or modify
72c98833aSArd Biesheuvel# it under the terms of the GNU General Public License version 2 as
82c98833aSArd Biesheuvel# published by the Free Software Foundation.
92c98833aSArd Biesheuvel#
102c98833aSArd Biesheuvel
112c98833aSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA1_ARM64_CE) += sha1-ce.o
122c98833aSArd Biesheuvelsha1-ce-y := sha1-ce-glue.o sha1-ce-core.o
136ba6c74dSArd Biesheuvel
146ba6c74dSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA2_ARM64_CE) += sha2-ce.o
156ba6c74dSArd Biesheuvelsha2-ce-y := sha2-ce-glue.o sha2-ce-core.o
16fdd23894SArd Biesheuvel
17fdd23894SArd Biesheuvelobj-$(CONFIG_CRYPTO_GHASH_ARM64_CE) += ghash-ce.o
18fdd23894SArd Biesheuvelghash-ce-y := ghash-ce-glue.o ghash-ce-core.o
19317f2f75SArd Biesheuvel
206ef5737fSArd Biesheuvelobj-$(CONFIG_CRYPTO_CRCT10DIF_ARM64_CE) += crct10dif-ce.o
216ef5737fSArd Biesheuvelcrct10dif-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o
226ef5737fSArd Biesheuvel
238fefde90SArd Biesheuvelobj-$(CONFIG_CRYPTO_CRC32_ARM64_CE) += crc32-ce.o
248fefde90SArd Biesheuvelcrc32-ce-y:= crc32-ce-core.o crc32-ce-glue.o
258fefde90SArd Biesheuvel
26317f2f75SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o
27317f2f75SArd BiesheuvelCFLAGS_aes-ce-cipher.o += -march=armv8-a+crypto
28a3fd8210SArd Biesheuvel
29a3fd8210SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_CCM) += aes-ce-ccm.o
30a3fd8210SArd Biesheuvelaes-ce-ccm-y := aes-ce-ccm-glue.o aes-ce-ccm-core.o
3149788fe2SArd Biesheuvel
3249788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_CE_BLK) += aes-ce-blk.o
3349788fe2SArd Biesheuvelaes-ce-blk-y := aes-glue-ce.o aes-ce.o
3449788fe2SArd Biesheuvel
3549788fe2SArd Biesheuvelobj-$(CONFIG_CRYPTO_AES_ARM64_NEON_BLK) += aes-neon-blk.o
3649788fe2SArd Biesheuvelaes-neon-blk-y := aes-glue-neon.o aes-neon.o
3749788fe2SArd Biesheuvel
387918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA256_ARM64) += sha256-arm64.o
397918ecefSArd Biesheuvelsha256-arm64-y := sha256-glue.o sha256-core.o
407918ecefSArd Biesheuvel
417918ecefSArd Biesheuvelobj-$(CONFIG_CRYPTO_SHA512_ARM64) += sha512-arm64.o
427918ecefSArd Biesheuvelsha512-arm64-y := sha512-glue.o sha512-core.o
437918ecefSArd Biesheuvel
44b7171ce9SArd Biesheuvelobj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha20-neon.o
45b7171ce9SArd Biesheuvelchacha20-neon-y := chacha20-neon-core.o chacha20-neon-glue.o
46b7171ce9SArd Biesheuvel
470eee0fbdSArd BiesheuvelAFLAGS_aes-ce.o		:= -DINTERLEAVE=4
4849788fe2SArd BiesheuvelAFLAGS_aes-neon.o	:= -DINTERLEAVE=4
4949788fe2SArd Biesheuvel
5049788fe2SArd BiesheuvelCFLAGS_aes-glue-ce.o	:= -DUSE_V8_CRYPTO_EXTENSIONS
5149788fe2SArd Biesheuvel
52f6f203faSYazen Ghannamobj-$(CONFIG_CRYPTO_CRC32_ARM64) += crc32-arm64.o
53f6f203faSYazen Ghannam
54f6f203faSYazen GhannamCFLAGS_crc32-arm64.o	:= -mcpu=generic+crc
55f6f203faSYazen Ghannam
5649788fe2SArd Biesheuvel$(obj)/aes-glue-%.o: $(src)/aes-glue.c FORCE
577c2105fbSAndreas Schwab	$(call if_changed_rule,cc_o_c)
587918ecefSArd Biesheuvel
597918ecefSArd Biesheuvelquiet_cmd_perlasm = PERLASM $@
607918ecefSArd Biesheuvel      cmd_perlasm = $(PERL) $(<) void $(@)
617918ecefSArd Biesheuvel
627918ecefSArd Biesheuvel$(src)/sha256-core.S_shipped: $(src)/sha512-armv8.pl
637918ecefSArd Biesheuvel	$(call cmd,perlasm)
647918ecefSArd Biesheuvel
657918ecefSArd Biesheuvel$(src)/sha512-core.S_shipped: $(src)/sha512-armv8.pl
667918ecefSArd Biesheuvel	$(call cmd,perlasm)
677918ecefSArd Biesheuvel
687918ecefSArd Biesheuvel.PRECIOUS: $(obj)/sha256-core.S $(obj)/sha512-core.S
69