1.PATH: ${SRCTOP}/sys/crypto/openssl 2.PATH: ${SRCTOP}/sys/crypto/openssl/${MACHINE_CPUARCH} 3 4KMOD= ossl 5OBJS+= ${OBJS.${MACHINE_CPUARCH}} 6SRCS= bus_if.h \ 7 cryptodev_if.h \ 8 device_if.h \ 9 ossl.c \ 10 ossl_aes.c \ 11 ossl_chacha20.c \ 12 ossl_poly1305.c \ 13 ossl_sha1.c \ 14 ossl_sha256.c \ 15 ossl_sha512.c \ 16 ${SRCS.${MACHINE_CPUARCH}} 17 18SRCS.arm= \ 19 aes-armv4.S \ 20 bsaes-armv7.S \ 21 chacha-armv4.S \ 22 ghash-armv4.S \ 23 poly1305-armv4.S \ 24 sha1-armv4-large.S \ 25 sha256-armv4.S \ 26 sha512-armv4.S \ 27 ossl_arm.c \ 28 ossl_aes_gcm.c 29 30SRCS.aarch64= \ 31 chacha-armv8.S \ 32 poly1305-armv8.S \ 33 sha1-armv8.S \ 34 sha256-armv8.S \ 35 sha512-armv8.S \ 36 vpaes-armv8.S \ 37 ossl_aarch64.c 38 39SRCS.amd64= \ 40 aes-gcm-avx512.S \ 41 aesni-x86_64.S \ 42 aesni-gcm-x86_64.S \ 43 chacha-x86_64.S \ 44 ghash-x86_64.S \ 45 poly1305-x86_64.S \ 46 sha1-x86_64.S \ 47 sha256-x86_64.S \ 48 sha512-x86_64.S \ 49 ossl_aes_gcm.c \ 50 ossl_x86.c 51 52SRCS.i386= \ 53 aesni-x86.S \ 54 chacha-x86.S \ 55 poly1305-x86.S \ 56 sha1-586.S \ 57 sha256-586.S \ 58 sha512-586.S \ 59 ossl_x86.c 60 61SRCS.powerpc64le= \ 62 ossl_ppccap.c \ 63 aes-ppc.S \ 64 aesp8-ppc.S \ 65 chacha-ppc.S \ 66 ecp_nistz256-ppc64.S \ 67 ghashp8-ppc.S \ 68 keccak1600-ppc64.S \ 69 poly1305-ppc.S \ 70 poly1305-ppcfp.S \ 71 ppc-mont.S \ 72 ppc.S \ 73 ppccpuid.S \ 74 sha1-ppc.S \ 75 sha256-ppc.S \ 76 sha256p8-ppc.S \ 77 sha512-ppc.S \ 78 sha512p8-ppc.S \ 79 vpaes-ppc.S \ 80 x25519-ppc64.S 81 82SRCS.powerpc64= \ 83 ossl_ppccap.c \ 84 aes-ppc.S \ 85 aesp8-ppc.S \ 86 chacha-ppc.S \ 87 ecp_nistz256-ppc64.S \ 88 ghashp8-ppc.S \ 89 keccak1600-ppc64.S \ 90 poly1305-ppc.S \ 91 poly1305-ppcfp.S \ 92 ppc-mont.S \ 93 ppc.S \ 94 ppccpuid.S \ 95 sha1-ppc.S \ 96 sha256-ppc.S \ 97 sha256p8-ppc.S \ 98 sha512-ppc.S \ 99 sha512p8-ppc.S \ 100 vpaes-ppc.S \ 101 x25519-ppc64.S 102 103CFLAGS.bsaes-armv7.S+= -D__KERNEL__ 104 105CFLAGS+= -I${SRCTOP}/sys/crypto/openssl 106 107# For arm64, we are forced to rewrite the compiler invocation for the assembly 108# files, to remove -mgeneral-regs-only. 109${SRCS.aarch64:M*.S:S/S/o/}: ${.TARGET:R}.S 110 ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC} 111 ${CTFCONVERT_CMD} 112 113# Based on modules/armv8crypto/Makefile. 114# Clang doesn't recognize "aes*" instructions without -march set. 115aesv8-armx.o: aesv8-armx.S 116 ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} \ 117 -march=armv8-a+crypto ${.IMPSRC} 118 ${CTFCONVERT_CMD} 119 120OBJS.aarch64= aesv8-armx.o 121 122.include <bsd.kmod.mk> 123