]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ppc/sha256 - assembler
authorMarkus Stockhausen <stockhausen@collogia.de>
Fri, 30 Jan 2015 14:39:23 +0000 (15:39 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 27 Feb 2015 09:48:45 +0000 (22:48 +1300)
commit7172e2e80d2999f7b6e1a3339659e64fbc3e8a5c
tree69027561ee3ac5cb77b9bd7624c6f8ad06237105
parent9cbe621030a9cce16d27329dac74fd4b1c1d9412
crypto: ppc/sha256 - assembler

This is the assembler code for SHA256 implementation with
the SIMD SPE instruction set. Although being only a 32 bit
architecture GPRs are extended to 64 bit presenting two
32 bit values. With the enhanced instruction set we can
operate on them in parallel. That helps reducing the time
to calculate W16-W64. For increasing performance even more
the assembler function can compute hashes for more than
one 64 byte input block. That saves a lot of register
saving/restoring

The state of the used SPE registers is preserved via the
stack so we can run from interrupt context. There might
be the case that we interrupt ourselves and push sensitive
data from another context onto our stack. Clear this area
in the stack afterwards to avoid information leakage.

The code is endian independant.

Signed-off-by: Markus Stockhausen <stockhausen@collogia.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/powerpc/crypto/sha256-spe-asm.S [new file with mode: 0644]