Home
last modified time | relevance | path

Searched +full:- +full:t0 (Results 1 – 25 of 28) sorted by relevance

12

/optee_os/core/arch/riscv/kernel/
H A Dentry.S1 /* SPDX-License-Identifier: BSD-2-Clause */
4 * Copyright 2022-2023 NXP
8 #include <generated/asm-defines.h>
32 * stack_tmp + (hart_index + 1) * stack_tmp_stride - STACK_TMP_GUARD
37 csrr t0, CSR_XSCRATCH /* t0: hart_index */
38 bge t0, t1, unhandled_cpu
39 addi t0, t0, 1
41 mul t1, t0, t1
43 lw t0, 0(t2)
44 add t0, t0, t2
[all …]
H A Dthread_rv.S1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright 2022-2023 NXP
8 #include <generated/asm-defines.h>
29 addi \tmp0, \tmp0, -1
86 csrr t0, CSR_XIE
91 csrr t0, CSR_XSTATUS
94 csrr t0, CSR_XEPC
132 /* Update 32-bit core local flags */
145 /* Update 32-bit core local flags */
151 get_thread_ctx sp, t0
[all …]
H A Darch_scall_rv.S1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright 2022-2023 NXP
8 #include <generated/asm-defines.h>
20 addi sp, sp, -16
22 /* Save scall regs to t0 */
23 mv t0, a0
50 mv a3, t0 /* pointer to struct thread_scall_regs */
61 mv a3, t0 /* pointer to struct thread_scall_regs */
H A Dspinlock.S1 // SPDX-License-Identifier: BSD-2-Clause
12 addi sp, sp, -(RISCV_XLEN_BYTES * 2)
37 li t0, SPINLOCK_LOCK
38 amoswap.w a0, t0, 0(a0)
H A Dasm-defines.c1 // SPDX-License-Identifier: BSD-2-Clause
3 * Copyright 2022-2023 NXP
8 #include <gen-asm-defines.h>
51 DEFINE(THREAD_CTX_REG_T0, offsetof(struct thread_ctx_regs, t0));
74 DEFINE(THREAD_ABT_REG_T0, offsetof(struct thread_abort_regs, t0));
92 DEFINE(THREAD_SCALL_REG_T0, offsetof(struct thread_scall_regs, t0));
H A Dabort.c1 // SPDX-License-Identifier: BSD-2-Clause
3 * Copyright 2022-2023 NXP
4 * Copyright (c) 2015-2022, Linaro Limited
34 .fp = ai->regs->s0, in __print_stack_unwind()
35 .pc = ai->regs->epc, in __print_stack_unwind()
86 core_pos = thread_get_tsd()->abort_core; in __print_abort_info()
91 EMSG_RAW("%s %s-abort at address 0x%" PRIxVA "%s", in __print_abort_info()
92 ctx, abort_type_to_str(ai->abort_type), ai->va, in __print_abort_info()
93 fault_to_str(ai->abort_type, ai->fault_descr)); in __print_abort_info()
96 ai->regs->cause, ai->regs->epc); in __print_abort_info()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/
H A Daes.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
8 ---
9 * rijndael-alg-fst.c
18 ---
110 if (num_rounds != 0 && num_rounds != (10 + ((keylen/8)-2)*2)) { in SETUP()
114 skey->rijndael.Nr = 10 + ((keylen/8)-2)*2; in SETUP()
115 K = LTC_ALIGN_BUF(skey->rijndael.K, 16); in SETUP()
116 skey->rijndael.eK = K; in SETUP()
118 skey->rijndael.dK = K; in SETUP()
[all …]
/optee_os/core/arch/arm/crypto/
H A Dsha1_armv8a_ce_a64.S1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright (c) 2014-2020, Linaro Limited
7 /* SHA-1 secure hash using ARMv8 Crypto Extensions */
11 .arch armv8-a+crypto
18 t0 .req v4
38 sha1\op dg0q, \dg1, t0.4s
40 sha1\op dg0q, dg1s, t0.4s
44 add t0.4s, v\s0\().4s, \rc\().4s
73 0: ld1 {v8.16b-v11.16b}, [x1], #64
81 1: add t0.4s, v8.4s, k0.4s
H A Dsha256_armv8a_ce_a64.S1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright (c) 2015-2020, Linaro Limited
7 /* Core SHA-224/SHA-256 transform using v8 Crypto Extensions */
11 .arch armv8-a+crypto
18 t0 .req v22
32 sha256h dg0q, dg1q, t0.4s
33 sha256h2 dg1q, dg2q, t0.4s
36 add t0.4s, v\s0\().4s, \rc\().4s
57 ld1 { v0.4s- v3.4s}, [x8], #64
58 ld1 { v4.4s- v7.4s}, [x8], #64
[all …]
H A Dsm3_armv8a_ce_a64.S1 /* SPDX-License-Identifier: BSD-2-Clause */
44 .macro round, ab, s0, t0, t1, i
45 sm3ss1 v5.4s, v8.4s, \t0\().4s, v9.4s
46 shl \t1\().4s, \t0\().4s, #1
47 sri \t1\().4s, \t0\().4s, #31
78 ld1 {v8.4s-v9.4s}, [x0]
88 0: ld1 {v0.16b-v3.16b}, [x1], #64
132 st1 {v8.4s-v9.4s}, [x0]
H A Daes_modes_armv8a_ce_a64.S1 /* SPDX-License-Identifier: BSD-2-Clause */
6 * - AES cipher for ARMv8 with Crypto Extensions
7 * - Chaining mode wrappers for AES
12 .arch armv8-a+crypto
19 ld1 {v17.16b-v18.16b}, [\rk], #32
20 1111: ld1 {v19.16b-v20.16b}, [\rk], #32
21 2222: ld1 {v21.16b-v24.16b}, [\rk], #64
22 ld1 {v25.16b-v28.16b}, [\rk], #64
23 ld1 {v29.16b-v31.16b}, [\rk]
100 .macro encrypt_block, in, rounds, t0, t1, t2
[all …]
H A Dghash-ce-core_a32.S1 /* SPDX-License-Identifier: BSD-2-Clause */
5 * Copyright (C) 2014 - 2017 Linaro Ltd. <ard.biesheuvel@linaro.org>
66 .fpu crypto-neon-fp-armv8
73 * This implementation of 64x64 -> 128 bit polynomial multiplication
74 * using vmull.p8 instructions (8x8 -> 16) is taken from the paper
77 * Ricardo Dahab (https://hal.inria.fr/hal-01506572)
79 * It has been slightly tweaked for in-order performance, and to allow
101 veor t0l, t0l, t0h @ t0 = (L) (P0 + P1) << 8
131 // PMULL (64x64->128) based reduction for CPUs that can do
147 // 64x64->128 PMULL instruction
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Didea.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
4 /* Based on idea.cpp - originally written and placed in the public domain by Wei Dai
7 Patents should be expired. On 2017-10-16 wikipedia says:
43 p = LOW16(p) - HIGH16(p); \
44 a = (ushort16)p - (ushort16)HIGH16(p); \
47 a = 1 - a - b; \
66 return LOW16(0 - x); in s_add_inv()
72 ushort16 *e_key = skey->idea.ek; in s_setup_key()
73 ushort16 *d_key = skey->idea.dk; in s_setup_key()
[all …]
H A Danubis.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
30 * Though Anubis is endianness-neutral, the encryption tables are listed
31 * in BIG-ENDIAN format, which is adopted throughout this implementation
32 * (but little-endian notation would be equally suitable if consistently
37 static const ulong32 T0[256] = { variable
455 static const ulong32 T0[256] = { variable
896 skey->anubis.keyBits = keylen*8; in s_anubis_setup()
902 N = skey->anubis.keyBits >> 5; in s_anubis_setup()
907 skey->anubis.R = R = 8 + N; in s_anubis_setup()
[all …]
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/
H A Dsha512.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
84 /* compress 1024-bits */
91 ulong64 S[8], W[80], t0, t1; in ss_sha512_compress() local
96 S[i] = md->sha512.state[i]; in ss_sha512_compress()
99 /* copy the state into 1024-bits into W[0..15] */ in ss_sha512_compress()
106 W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; in ss_sha512_compress()
112 t0 = S[7] + Sigma1(S[4]) + Ch(S[4], S[5], S[6]) + K[i] + W[i]; in ss_sha512_compress()
117 S[4] = S[3] + t0; in ss_sha512_compress()
121 S[0] = t0 + t1; in ss_sha512_compress()
[all …]
H A Dsha256.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
59 /* compress 512-bits */
66 ulong32 S[8], W[64], t0, t1; in ss_sha256_compress() local
74 S[i] = md->sha256.state[i]; in ss_sha256_compress()
77 /* copy the state into 512-bits into W[0..15] */ in ss_sha256_compress()
84 W[i] = Gamma1(W[i - 2]) + W[i - 7] + Gamma0(W[i - 15]) + W[i - 16]; in ss_sha256_compress()
90 t0 = h + Sigma1(e) + Ch(e, f, g) + K[i] + W[i]; \ in ss_sha256_compress()
92 d += t0; \ in ss_sha256_compress()
93 h = t0 + t1; in ss_sha256_compress()
[all …]
/optee_os/core/lib/libtomcrypt/src/mac/pelican/
H A Dpelican.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
37 if ((err = aes_setup(key, keylen, 0, &pelmac->K)) != CRYPT_OK) { in pelican_init()
41 zeromem(pelmac->state, 16); in pelican_init()
42 aes_ecb_encrypt(pelmac->state, pelmac->state, &pelmac->K); in pelican_init()
43 pelmac->buflen = 0; in pelican_init()
50 ulong32 s0, s1, s2, s3, t0, t1, t2, t3; in s_four_rounds() local
53 LOAD32H(s0, pelmac->state ); in s_four_rounds()
54 LOAD32H(s1, pelmac->state + 4); in s_four_rounds()
55 LOAD32H(s2, pelmac->state + 8); in s_four_rounds()
[all …]
/optee_os/core/arch/riscv/include/kernel/
H A Dthread_arch.h1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright 2022-2023 NXP
18 * Each RISC-V platform must define their own values.
19 * See core/arch/riscv/plat-virt/platform_config.h for example.
72 unsigned long t0; member
111 unsigned long t0; member
136 unsigned long t0; member
H A Darch_scall.h1 /* SPDX-License-Identifier: BSD-2-Clause */
3 * Copyright 2022-2023 NXP
16 *scn = regs->t0; in scall_get_max_args()
17 *max_args = regs->t1; in scall_get_max_args()
23 regs->a0 = ret_val; in scall_set_retval()
29 regs->a1 = panic; in scall_set_sys_return_regs()
30 regs->a2 = panic_code; in scall_set_sys_return_regs()
/optee_os/core/lib/libtomcrypt/src/hashes/chc/
H A Dchc.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
13 #define UNDEFED_HASH -17
43 kl = cipher_descriptor[cipher]->block_length; in chc_register()
51 if ((err = cipher_descriptor[cipher]->keysize(&kl)) != CRYPT_OK) { in chc_register()
55 if (kl != cipher_descriptor[cipher]->block_length) { in chc_register()
65 hash_descriptor[idx]->hashsize = in chc_register()
66 hash_descriptor[idx]->blocksize = cipher_descriptor[cipher]->block_length; in chc_register()
70 cipher_blocksize = cipher_descriptor[cipher]->block_length; in chc_register()
92 if (cipher_blocksize != cipher_descriptor[cipher_idx]->block_length) { in chc_init()
[all …]
/optee_os/ldelf/
H A Dsyscalls_rv.S1 /* SPDX-License-Identifier: BSD-2-Clause */
19 li t0, \scn
/optee_os/lib/libutee/arch/riscv/
H A Dutee_syscalls_rv.S1 /* SPDX-License-Identifier: BSD-2-Clause */
18 li t0, \scn
26 /* The stack pointer is always kept 16-byte aligned */
27 add sp, sp, -16
/optee_os/core/drivers/
H A Dversal_trng.c1 // SPDX-License-Identifier: MIT
8 * The Xilinx True Random Number Generator(TRNG) module in Versal - PMC TRNG
17 * NIST SP-800-90A practically requires the true random generators based on
35 * However, the below guideline from section 10.2.1 of NIST SP-800-90A implies
316 max_blk -= 1; in checksum()
329 unsigned char t0 = 0; in setup_key() local
335 t0 = schedule[i - 4]; in setup_key()
336 t1 = schedule[i - 3]; in setup_key()
337 t2 = schedule[i - 2]; in setup_key()
338 t3 = schedule[i - 1]; in setup_key()
[all …]
/optee_os/.github/workflows/
H A Dci.yml6 group: ci-${{ github.ref }} # unique per branch
7 cancel-in-progress: true # cancel previous runs on the same branch
11 runs-on: ubuntu-latest
14 - name: Checkout
17 fetch-depth: 0 # full history so checkpatch can check commit IDs in commit messages
18 - name: Update Git config
19 run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
20 - name: Run checkpatch
24 set -e
26 mkdir -p /tmp/linux/scripts
[all …]
/optee_os/lib/libutee/include/
H A Dtee_api_defines.h1 /* SPDX-License-Identifier: BSD-2-Clause */
24 * is to set __OPTEE_CORE_API_COMPAT_1_1, but that's an OP-TEE extension.
29 * extensions. With this, in OP-TEE, extensions and new API that doesn't
60 * For backwards compatibility with v1.1 as provided by up to OP-TEE
77 * platforms where size_t is a 64-bit unsigned integer.
310 * These are used in the OP-TEE ABI, due to an inconsistency in the v1.1
314 * "Table 6-12: Structure of Algorithm Identifier"
317 * "Table 6-11: List of Algorithm Identifiers" defines
321 * to conform to table 6-12.
458 * mistake the wrong values for these two. OP-TEE recognizes these two as
[all …]

12