Lines Matching refs:global_data
193 static psa_global_data_t global_data; variable
203 initialized = global_data.key_slots_initialized; in psa_get_key_slots_initialized()
283 psa_key_slot_t *slice = global_data.key_slices[slice_idx]; in get_volatile_key_slot()
292 return &global_data.key_slices[KEY_SLOT_CACHE_SLICE_INDEX][slot_idx]; in get_persistent_key_slot()
297 return &global_data.key_slices[slice_idx][slot_idx]; in get_key_slot()
305 return ARRAY_LENGTH(global_data.key_slots); in key_slice_length()
310 MBEDTLS_STATIC_ASSERT(ARRAY_LENGTH(global_data.key_slots) <= in get_volatile_key_slot()
313 return &global_data.key_slots[key_id - PSA_KEY_ID_VOLATILE_MIN]; in get_volatile_key_slot()
318 return &global_data.key_slots[slot_idx]; in get_persistent_key_slot()
324 return &global_data.key_slots[slot_idx]; in get_key_slot()
433 global_data.key_slices[KEY_SLOT_CACHE_SLICE_INDEX] = in psa_initialize_key_slots()
435 sizeof(*global_data.key_slices[KEY_SLOT_CACHE_SLICE_INDEX])); in psa_initialize_key_slots()
436 if (global_data.key_slices[KEY_SLOT_CACHE_SLICE_INDEX] == NULL) { in psa_initialize_key_slots()
447 global_data.key_slots_initialized = 1; in psa_initialize_key_slots()
455 if (global_data.key_slices[slice_idx] == NULL) { in psa_wipe_all_key_slots()
484 mbedtls_free(global_data.key_slices[slice_idx]); in psa_wipe_all_key_slots()
485 global_data.key_slices[slice_idx] = NULL; in psa_wipe_all_key_slots()
491 global_data.first_free_slot_index[slice_idx] = 0; in psa_wipe_all_key_slots()
496 global_data.key_slots_initialized = 0; in psa_wipe_all_key_slots()
506 if (global_data.first_free_slot_index[slice_idx] != FREE_SLOT_INDEX_NONE) { in psa_allocate_volatile_key_slot()
514 if (global_data.key_slices[slice_idx] == NULL) { in psa_allocate_volatile_key_slot()
515 global_data.key_slices[slice_idx] = in psa_allocate_volatile_key_slot()
518 if (global_data.key_slices[slice_idx] == NULL) { in psa_allocate_volatile_key_slot()
522 psa_key_slot_t *slice = global_data.key_slices[slice_idx]; in psa_allocate_volatile_key_slot()
524 size_t slot_idx = global_data.first_free_slot_index[slice_idx]; in psa_allocate_volatile_key_slot()
532 global_data.first_free_slot_index[slice_idx] = next_free; in psa_allocate_volatile_key_slot()
568 psa_key_slot_t *slice = global_data.key_slices[slice_idx]; in psa_free_key_slot()
581 size_t next_free = global_data.first_free_slot_index[slice_idx]; in psa_free_key_slot()
587 global_data.first_free_slot_index[slice_idx] = slot_idx; in psa_free_key_slot()
665 slot_idx = selected_slot - global_data.key_slots; in psa_reserve_free_key_slot()
1097 if (global_data.key_slices[slice_idx] == NULL) { in mbedtls_psa_get_stats()