mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
xous: asm: add aes calls for vexriscv
VexRiscv has accelerated AES instructions. This adds ASM hooks for these instructions so they can be called from Rust. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
8ee3b2cc1b
commit
b22ec0369e
7 changed files with 80 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -18,3 +18,83 @@ _xous_syscall:
|
|||
sw a6, 6*REGBYTES(t0)
|
||||
sw a7, 7*REGBYTES(t0)
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_0
|
||||
vex_aes_enc_id_0:
|
||||
.word 0x00b5050b // vex_aes_enc_id a0, a1, a0, #0
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_1
|
||||
vex_aes_enc_id_1:
|
||||
.word 0x10b5050b // vex_aes_enc_id a0, a1, a0, #1
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_2
|
||||
vex_aes_enc_id_2:
|
||||
.word 0x20b5050b // vex_aes_enc_id a0, a1, a0, #2
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_3
|
||||
vex_aes_enc_id_3:
|
||||
.word 0x30b5050b // vex_aes_enc_id a0, a1, a0, #3
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_last_0
|
||||
vex_aes_enc_id_last_0:
|
||||
.word 0x04b5050b // vex_aes_enc_id_last a0, a1, a0, #0
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_last_1
|
||||
vex_aes_enc_id_last_1:
|
||||
.word 0x14b5050b // vex_aes_enc_id_last a0, a1, a0, #1
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_last_2
|
||||
vex_aes_enc_id_last_2:
|
||||
.word 0x24b5050b // vex_aes_enc_id_last a0, a1, a0, #2
|
||||
ret
|
||||
|
||||
.global vex_aes_enc_id_last_3
|
||||
vex_aes_enc_id_last_3:
|
||||
.word 0x34b5050b // vex_aes_enc_id_last a0, a1, a0, #3
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_0
|
||||
vex_aes_dec_id_0:
|
||||
.word 0x02b5050b // vex_aes_dec_id a0, a1, a0, #0
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_1
|
||||
vex_aes_dec_id_1:
|
||||
.word 0x12b5050b // vex_aes_dec_id a0, a1, a0, #1
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_2
|
||||
vex_aes_dec_id_2:
|
||||
.word 0x22b5050b // vex_aes_dec_id a0, a1, a0, #2
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_3
|
||||
vex_aes_dec_id_3:
|
||||
.word 0x32b5050b // vex_aes_dec_id a0, a1, a0, #3
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_last_0
|
||||
vex_aes_dec_id_last_0:
|
||||
.word 0x06b5050b // vex_aes_dec_id_last a0, a1, a0, #0
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_last_1
|
||||
vex_aes_dec_id_last_1:
|
||||
.word 0x16b5050b // vex_aes_dec_id_last a0, a1, a0, #1
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_last_2
|
||||
vex_aes_dec_id_last_2:
|
||||
.word 0x26b5050b // vex_aes_dec_id_last a0, a1, a0, #2
|
||||
ret
|
||||
|
||||
.global vex_aes_dec_id_last_3
|
||||
vex_aes_dec_id_last_3:
|
||||
.word 0x36b5050b // vex_aes_dec_id_last a0, a1, a0, #3
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in a new issue