using SSE2 in kernel C code (improving AES-NI module)

John-Mark Gurney jmg at funkthat.com
Sun Oct 21 02:47:33 UTC 2012


Peter Wemm wrote this message on Sat, Oct 20, 2012 at 11:10 -0700:
> Or, another option.. do something like genassym or the many other
> kernel build tools.  aicasm builds and runs a userland tool to
> generate something to build into the kernel.  With sufficient
> cross-contamination safeguards I wonder if something similar might be
> able to be done here.

Well, looks like I may this working...  Turns out I can't name the file
.s otherwise config puts it in SFILES which causes all sorts of problems..
So, I went w/ .nos, does any one else have any suggestions?

how does this look to people:
aesni_wrap2.nos                 optional aesni                             \
        dependency      "$S/crypto/aesni/aesni_wrap2.c"                    \
        compile-with    "${CC} -O3 -fPIC -S -o aesni_wrap2.nos $S/crypto/aesni/aesni_wrap2.c" \   
        no-obj no-implicit-rule before-depend                              \
        clean           "aesni_wrap2.nos"
aesni_wrap2.o                   optional aesni                             \
        dependency      "aesni_wrap2.nos"                                  \
        compile-with    "${NORMAL_S} aesni_wrap2.nos"                      \
        no-implicit-rule                                                   \
        clean           "aesni_wrap2.o"

We'll have to do something similar in the module Makefile, but that is
easier...

Also, I thought we had a better way to note that some devices depend
upon others than just throwing a depend error...  If you include aesni
w/o crypto, you get error about missing cryptodev_if.h...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-arch mailing list