18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# Arch-specific CryptoAPI modules. 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_AES_ARM) += aes-arm.o 78c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_AES_ARM_BS) += aes-arm-bs.o 88c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA1_ARM) += sha1-arm.o 98c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA1_ARM_NEON) += sha1-arm-neon.o 108c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA256_ARM) += sha256-arm.o 118c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA512_ARM) += sha512-arm.o 128c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_CHACHA20_NEON) += chacha-neon.o 138c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_POLY1305_ARM) += poly1305-arm.o 148c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_NHPOLY1305_NEON) += nhpoly1305-neon.o 158c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_CURVE25519_NEON) += curve25519-neon.o 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_AES_ARM_CE) += aes-arm-ce.o 188c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA1_ARM_CE) += sha1-arm-ce.o 198c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_SHA2_ARM_CE) += sha2-arm-ce.o 208c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_GHASH_ARM_CE) += ghash-arm-ce.o 218c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_CRCT10DIF_ARM_CE) += crct10dif-arm-ce.o 228c2ecf20Sopenharmony_ciobj-$(CONFIG_CRYPTO_CRC32_ARM_CE) += crc32-arm-ce.o 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciaes-arm-y := aes-cipher-core.o aes-cipher-glue.o 258c2ecf20Sopenharmony_ciaes-arm-bs-y := aes-neonbs-core.o aes-neonbs-glue.o 268c2ecf20Sopenharmony_cisha1-arm-y := sha1-armv4-large.o sha1_glue.o 278c2ecf20Sopenharmony_cisha1-arm-neon-y := sha1-armv7-neon.o sha1_neon_glue.o 288c2ecf20Sopenharmony_cisha256-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha256_neon_glue.o 298c2ecf20Sopenharmony_cisha256-arm-y := sha256-core.o sha256_glue.o $(sha256-arm-neon-y) 308c2ecf20Sopenharmony_cisha512-arm-neon-$(CONFIG_KERNEL_MODE_NEON) := sha512-neon-glue.o 318c2ecf20Sopenharmony_cisha512-arm-y := sha512-core.o sha512-glue.o $(sha512-arm-neon-y) 328c2ecf20Sopenharmony_cisha1-arm-ce-y := sha1-ce-core.o sha1-ce-glue.o 338c2ecf20Sopenharmony_cisha2-arm-ce-y := sha2-ce-core.o sha2-ce-glue.o 348c2ecf20Sopenharmony_ciaes-arm-ce-y := aes-ce-core.o aes-ce-glue.o 358c2ecf20Sopenharmony_cighash-arm-ce-y := ghash-ce-core.o ghash-ce-glue.o 368c2ecf20Sopenharmony_cicrct10dif-arm-ce-y := crct10dif-ce-core.o crct10dif-ce-glue.o 378c2ecf20Sopenharmony_cicrc32-arm-ce-y:= crc32-ce-core.o crc32-ce-glue.o 388c2ecf20Sopenharmony_cichacha-neon-y := chacha-scalar-core.o chacha-glue.o 398c2ecf20Sopenharmony_cichacha-neon-$(CONFIG_KERNEL_MODE_NEON) += chacha-neon-core.o 408c2ecf20Sopenharmony_cipoly1305-arm-y := poly1305-core.o poly1305-glue.o 418c2ecf20Sopenharmony_cinhpoly1305-neon-y := nh-neon-core.o nhpoly1305-neon-glue.o 428c2ecf20Sopenharmony_cicurve25519-neon-y := curve25519-core.o curve25519-glue.o 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciifdef REGENERATE_ARM_CRYPTO 458c2ecf20Sopenharmony_ciquiet_cmd_perl = PERL $@ 468c2ecf20Sopenharmony_ci cmd_perl = $(PERL) $(<) > $(@) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci$(src)/poly1305-core.S_shipped: $(src)/poly1305-armv4.pl 498c2ecf20Sopenharmony_ci $(call cmd,perl) 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci$(src)/sha256-core.S_shipped: $(src)/sha256-armv4.pl 528c2ecf20Sopenharmony_ci $(call cmd,perl) 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci$(src)/sha512-core.S_shipped: $(src)/sha512-armv4.pl 558c2ecf20Sopenharmony_ci $(call cmd,perl) 568c2ecf20Sopenharmony_ciendif 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ciclean-files += poly1305-core.S sha256-core.S sha512-core.S 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci# massage the perlasm code a bit so we only get the NEON routine if we need it 618c2ecf20Sopenharmony_cipoly1305-aflags-$(CONFIG_CPU_V7) := -U__LINUX_ARM_ARCH__ -D__LINUX_ARM_ARCH__=5 628c2ecf20Sopenharmony_cipoly1305-aflags-$(CONFIG_KERNEL_MODE_NEON) := -U__LINUX_ARM_ARCH__ -D__LINUX_ARM_ARCH__=7 638c2ecf20Sopenharmony_ciAFLAGS_poly1305-core.o += $(poly1305-aflags-y) 64