| /optee_os/core/arch/arm/mm/ |
| H A D | mobj_ffa.c | 81 uint64_t cookie; member 212 struct mobj_ffa *mobj_ffa_sel1_spmc_new(uint64_t cookie, in mobj_ffa_sel1_spmc_new() argument 221 if (cookie != OPTEE_MSG_FMEM_INVALID_GLOBAL_ID) { in mobj_ffa_sel1_spmc_new() 222 if (!(cookie & FFA_MEMORY_HANDLE_HYPERVISOR_BIT)) in mobj_ffa_sel1_spmc_new() 224 if (virt_add_cookie_to_current_guest(cookie)) in mobj_ffa_sel1_spmc_new() 240 if (cookie != OPTEE_MSG_FMEM_INVALID_GLOBAL_ID) in mobj_ffa_sel1_spmc_new() 241 virt_remove_cookie(cookie); in mobj_ffa_sel1_spmc_new() 245 if (cookie != OPTEE_MSG_FMEM_INVALID_GLOBAL_ID) { in mobj_ffa_sel1_spmc_new() 246 m->cookie = cookie; in mobj_ffa_sel1_spmc_new() 255 m->cookie = i; in mobj_ffa_sel1_spmc_new() [all …]
|
| /optee_os/core/include/mm/ |
| H A D | mobj.h | 238 struct mobj *mobj_ffa_get_by_cookie(uint64_t cookie, 241 TEE_Result mobj_ffa_unregister_by_cookie(uint64_t cookie); 245 struct mobj_ffa *mobj_ffa_sel1_spmc_new(uint64_t cookie, 249 TEE_Result mobj_ffa_sel1_spmc_reclaim(uint64_t cookie); 251 struct mobj_ffa *mobj_ffa_spmc_new(uint64_t cookie, unsigned int num_pages, 262 TEE_Result mobj_ffa_assign_protmem(uint64_t cookie, 270 paddr_t page_offset, uint64_t cookie); 282 struct mobj *mobj_reg_shm_get_by_cookie(uint64_t cookie); 284 TEE_Result mobj_reg_shm_release_by_cookie(uint64_t cookie); 302 paddr_t page_offset, uint64_t cookie); [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | virtualization.h | 239 TEE_Result virt_add_cookie_to_current_guest(uint64_t cookie); 240 void virt_remove_cookie(uint64_t cookie); 241 uint16_t virt_find_guest_by_cookie(uint64_t cookie); 245 uint64_t cookie); 248 virt_add_cookie_to_current_guest(uint64_t cookie __unused) in virt_add_cookie_to_current_guest() 250 static inline void virt_remove_cookie(uint64_t cookie __unused) { } in virt_remove_cookie() 251 static inline uint16_t virt_find_guest_by_cookie(uint64_t cookie __unused) in virt_find_guest_by_cookie() 256 uint64_t cookie __unused) in virt_reclaim_cookie_from_destroyed_guest()
|
| /optee_os/core/mm/ |
| H A D | mobj_dyn_shm.c | 35 uint64_t cookie; member 51 uint64_t cookie; member 275 return to_mobj_reg_shm(mobj)->cookie; in mobj_reg_shm_get_cookie() 346 paddr_t page_offset, uint64_t cookie) in mobj_reg_shm_alloc() argument 368 mobj_reg_shm->cookie = cookie; in mobj_reg_shm_alloc() 407 static struct mobj_reg_shm *reg_shm_find_unlocked(uint64_t cookie) in reg_shm_find_unlocked() argument 412 if (mobj_reg_shm->cookie == cookie) in reg_shm_find_unlocked() 418 static struct mobj_protmem *protmem_find_unlocked(uint64_t cookie) in protmem_find_unlocked() argument 423 if (m->cookie == cookie) in protmem_find_unlocked() 429 struct mobj *mobj_reg_shm_get_by_cookie(uint64_t cookie) in mobj_reg_shm_get_by_cookie() argument [all …]
|
| H A D | mobj.c | 241 uint64_t cookie; member 311 return to_mobj_shm(mobj)->cookie; in mobj_shm_get_cookie() 335 struct mobj *mobj_shm_alloc(paddr_t pa, size_t size, uint64_t cookie) in mobj_shm_alloc() argument 351 m->cookie = cookie; in mobj_shm_alloc()
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | thread_optee_abi.c | 88 static void thread_rpc_free_arg(uint64_t cookie) in thread_rpc_free_arg() argument 90 if (cookie) { in thread_rpc_free_arg() 95 reg_pair_from_64(cookie, rpc_args + 1, rpc_args + 2); in thread_rpc_free_arg() 239 static uint32_t std_entry_with_regd_arg(uint64_t cookie, size_t offset) in std_entry_with_regd_arg() argument 247 mobj = mobj_reg_shm_get_by_cookie(cookie); in std_entry_with_regd_arg() 249 EMSG("Bad arg cookie 0x%"PRIx64, cookie); in std_entry_with_regd_arg() 305 bool thread_disable_prealloc_rpc_cache(uint64_t *cookie) in thread_disable_prealloc_rpc_cache() argument 325 *cookie = mobj_get_cookie(threads[n].rpc_mobj); in thread_disable_prealloc_rpc_cache() 334 *cookie = 0; in thread_disable_prealloc_rpc_cache() 369 static struct mobj *rpc_shm_mobj_alloc(paddr_t pa, size_t sz, uint64_t cookie) in rpc_shm_mobj_alloc() argument [all …]
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | thread_optee_smc.c | 87 static void thread_rpc_free_arg(uint64_t cookie) in thread_rpc_free_arg() argument 89 if (cookie) { in thread_rpc_free_arg() 94 reg_pair_from_64(cookie, rpc_args + 1, rpc_args + 2); in thread_rpc_free_arg() 238 static uint32_t std_entry_with_regd_arg(uint64_t cookie, size_t offset) in std_entry_with_regd_arg() argument 246 mobj = mobj_reg_shm_get_by_cookie(cookie); in std_entry_with_regd_arg() 248 EMSG("Bad arg cookie 0x%"PRIx64, cookie); in std_entry_with_regd_arg() 304 bool thread_disable_prealloc_rpc_cache(uint64_t *cookie) in thread_disable_prealloc_rpc_cache() argument 324 *cookie = mobj_get_cookie(threads[n].rpc_mobj); in thread_disable_prealloc_rpc_cache() 333 *cookie = 0; in thread_disable_prealloc_rpc_cache() 368 static struct mobj *rpc_shm_mobj_alloc(paddr_t pa, size_t sz, uint64_t cookie) in rpc_shm_mobj_alloc() argument [all …]
|
| H A D | virtualization.c | 574 static int find_cookie(struct guest_partition *prtn, uint64_t cookie) in find_cookie() argument 579 if (prtn->cookies[i] == cookie) in find_cookie() 584 static struct guest_partition *find_prtn_cookie(uint64_t cookie, int *idx) in find_prtn_cookie() argument 590 i = find_cookie(prtn, cookie); in find_prtn_cookie() 601 TEE_Result virt_add_cookie_to_current_guest(uint64_t cookie) in virt_add_cookie_to_current_guest() argument 608 if (find_prtn_cookie(cookie, NULL)) in virt_add_cookie_to_current_guest() 613 prtn->cookies[prtn->cookie_count] = cookie; in virt_add_cookie_to_current_guest() 623 void virt_remove_cookie(uint64_t cookie) in virt_remove_cookie() argument 630 prtn = find_prtn_cookie(cookie, &i); in virt_remove_cookie() 639 uint16_t virt_find_guest_by_cookie(uint64_t cookie) in virt_find_guest_by_cookie() argument [all …]
|
| H A D | thread_spmc.c | 777 uint64_t cookie = reg_pair_to_64(a5, a4); in handle_unregister_shm() local 780 res = mobj_ffa_unregister_by_cookie(cookie); in handle_unregister_shm() 1175 uint64_t cookie = OPTEE_MSG_FMEM_INVALID_GLOBAL_ID; in add_mem_op() local 1193 cookie = mem_trans->global_handle; in add_mem_op() 1196 op.mf = mobj_ffa_sel1_spmc_new(cookie, op.page_count, use_case); in add_mem_op() 1512 uint64_t cookie = 0; in handle_mem_reclaim() local 1517 cookie = reg_pair_to_64(args->a2, args->a1); in handle_mem_reclaim() 1521 if (cookie & FFA_MEMORY_HANDLE_HYPERVISOR_BIT) { in handle_mem_reclaim() 1522 guest_id = virt_find_guest_by_cookie(cookie); in handle_mem_reclaim() 1524 guest_id = (cookie >> FFA_MEMORY_HANDLE_PRTN_SHIFT) & in handle_mem_reclaim() [all …]
|
| /optee_os/core/arch/riscv/tee/ |
| H A D | entry_fast.c | 93 uint64_t cookie; in tee_entry_disable_shm_cache() local 95 if (!thread_disable_prealloc_rpc_cache(&cookie)) { in tee_entry_disable_shm_cache() 100 if (!cookie) { in tee_entry_disable_shm_cache() 106 args->a1 = cookie >> 32; in tee_entry_disable_shm_cache() 107 args->a2 = cookie; in tee_entry_disable_shm_cache()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | ssl_cookie.c | 279 const unsigned char *cookie, size_t cookie_len, in mbedtls_ssl_cookie_check() argument 309 status = psa_mac_update(&operation, cookie, 4); in mbedtls_ssl_cookie_check() 322 status = psa_mac_verify_finish(&operation, cookie + 4, in mbedtls_ssl_cookie_check() 337 if (ssl_cookie_hmac(&ctx->hmac_ctx, cookie, in mbedtls_ssl_cookie_check() 354 if (mbedtls_ct_memcmp(cookie + 4, ref_hmac, sizeof(ref_hmac)) != 0) { in mbedtls_ssl_cookie_check() 366 cookie_time = (unsigned long) MBEDTLS_GET_UINT32_BE(cookie, 0); in mbedtls_ssl_cookie_check()
|
| H A D | ssl_client.c | 528 if (handshake->cookie != NULL) { in ssl_write_client_hello_body() 530 handshake->cookie, in ssl_write_client_hello_body() 538 memcpy(p, handshake->cookie, cookie_len); in ssl_write_client_hello_body() 793 (ssl->handshake->cookie == NULL)) in ssl_prepare_client_hello()
|
| H A D | ssl_tls13_client.c | 546 mbedtls_free(handshake->cookie); in ssl_tls13_parse_cookie_ext() 548 handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_tls13_parse_cookie_ext() 549 if (handshake->cookie == NULL) { in ssl_tls13_parse_cookie_ext() 556 memcpy(handshake->cookie, p, cookie_len); in ssl_tls13_parse_cookie_ext() 572 if (handshake->cookie == NULL) { in ssl_tls13_write_cookie_ext() 578 handshake->cookie, in ssl_tls13_write_cookie_ext() 591 memcpy(p, handshake->cookie, handshake->cookie_len); in ssl_tls13_write_cookie_ext()
|
| H A D | ssl_tls12_client.c | 1154 mbedtls_free(ssl->handshake->cookie); in ssl_parse_hello_verify_request() 1156 ssl->handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_parse_hello_verify_request() 1157 if (ssl->handshake->cookie == NULL) { in ssl_parse_hello_verify_request() 1162 memcpy(ssl->handshake->cookie, p, cookie_len); in ssl_parse_hello_verify_request() 1241 mbedtls_free(ssl->handshake->cookie); in ssl_parse_server_hello() 1242 ssl->handshake->cookie = NULL; in ssl_parse_server_hello()
|
| /optee_os/core/tee/ |
| H A D | entry_std.c | 517 uint64_t cookie = arg->params[0].u.rmem.shm_ref; in unregister_shm() local 518 TEE_Result res = mobj_reg_shm_release_by_cookie(cookie); in unregister_shm() 538 uint64_t cookie = 0; in lend_protmem() local 549 cookie = READ_ONCE(tmem->shm_ref); in lend_protmem() 560 mobj = mobj_protmem_alloc(pa, sz, cookie, use_case); in lend_protmem() 572 uint64_t cookie = 0; in assign_protmem() local 578 cookie = READ_ONCE(arg->params[0].u.value.a); in assign_protmem() 580 res = mobj_ffa_assign_protmem(cookie, use_case); in assign_protmem() 590 uint64_t cookie = READ_ONCE(arg->params[0].u.rmem.shm_ref); in reclaim_protmem() local 591 TEE_Result res = mobj_protmem_release_by_cookie(cookie); in reclaim_protmem() [all …]
|
| /optee_os/core/arch/arm/tee/ |
| H A D | entry_fast.c | 154 uint64_t cookie; in tee_entry_disable_shm_cache() local 156 if (!thread_disable_prealloc_rpc_cache(&cookie)) { in tee_entry_disable_shm_cache() 161 if (!cookie) { in tee_entry_disable_shm_cache() 167 args->a1 = cookie >> 32; in tee_entry_disable_shm_cache() 168 args->a2 = cookie; in tee_entry_disable_shm_cache()
|
| /optee_os/lib/libutee/arch/arm/gprof/ |
| H A D | gmon_out.h | 92 char cookie[4]; member
|
| H A D | gprof.c | 224 memcpy(&ghdr.cookie[0], GMON_MAGIC, sizeof(ghdr.cookie)); in _gprof_write_header()
|
| /optee_os/core/drivers/pm/imx/ |
| H A D | psci.c | 134 uint32_t cookie __unused) in psci_system_reset2()
|
| /optee_os/core/arch/arm/include/kernel/ |
| H A D | thread_spmc.h | 79 struct mobj_ffa *thread_spmc_populate_mobj_from_rx(uint64_t cookie,
|
| H A D | thread_arch.h | 497 bool thread_disable_prealloc_rpc_cache(uint64_t *cookie);
|
| /optee_os/core/arch/arm/include/sm/ |
| H A D | psci.h | 78 int psci_system_reset2(uint32_t reset_type, uint32_t cookie);
|
| /optee_os/core/arch/riscv/include/kernel/ |
| H A D | thread_arch.h | 221 bool thread_disable_prealloc_rpc_cache(uint64_t *cookie);
|
| /optee_os/core/arch/arm/sm/ |
| H A D | psci.c | 110 uint32_t cookie __unused) in psci_system_reset2()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | ssl.h | 3092 const unsigned char *cookie, size_t clen,
|