]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/crypto/aes-i586-asm_32.S
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / crypto / aes-i586-asm_32.S
index 1093bede3e0a75378c6dde1bfa9a9f2fafce4cff..b949ec2f9af444e06377492d39b9db9960f3a626 100644 (file)
 #define tlen 1024   // length of each of 4 'xor' arrays (256 32-bit words)
 
 /* offsets to parameters with one register pushed onto stack */
-#define tfm 8
+#define ctx 8
 #define out_blk 12
 #define in_blk 16
 
-/* offsets in crypto_tfm structure */
-#define klen (crypto_tfm_ctx_offset + 0)
-#define ekey (crypto_tfm_ctx_offset + 4)
-#define dkey (crypto_tfm_ctx_offset + 244)
+/* offsets in crypto_aes_ctx structure */
+#define klen (480)
+#define ekey (0)
+#define dkey (240)
 
 // register mapping for encrypt and decrypt subroutines
 
        do_col (table, r5,r0,r1,r4, r2,r3);             /* idx=r5 */
 
 // AES (Rijndael) Encryption Subroutine
-/* void aes_enc_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */
+/* void aes_enc_blk(struct crypto_aes_ctx *ctx, u8 *out_blk, const u8 *in_blk) */
 
 .global  aes_enc_blk
 
 
 aes_enc_blk:
        push    %ebp
-       mov     tfm(%esp),%ebp
+       mov     ctx(%esp),%ebp
 
 // CAUTION: the order and the values used in these assigns 
 // rely on the register mappings
@@ -289,11 +289,10 @@ aes_enc_blk:
        pop     %ebx
        mov     %r0,(%ebp)
        pop     %ebp
-       mov     $1,%eax
        ret
 
 // AES (Rijndael) Decryption Subroutine
-/* void aes_dec_blk(struct crypto_tfm *tfm, u8 *out_blk, const u8 *in_blk) */
+/* void aes_dec_blk(struct crypto_aes_ctx *ctx, u8 *out_blk, const u8 *in_blk) */
 
 .global  aes_dec_blk
 
@@ -304,7 +303,7 @@ aes_enc_blk:
 
 aes_dec_blk:
        push    %ebp
-       mov     tfm(%esp),%ebp
+       mov     ctx(%esp),%ebp
 
 // CAUTION: the order and the values used in these assigns 
 // rely on the register mappings
@@ -365,6 +364,4 @@ aes_dec_blk:
        pop     %ebx
        mov     %r0,(%ebp)
        pop     %ebp
-       mov     $1,%eax
        ret
-