Lines Matching refs:handle
124 static void qat_uclo_wr_sram_by_words(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_sram_by_words() argument
133 SRAM_WRITE(handle, addr, outval); in qat_uclo_wr_sram_by_words()
140 static void qat_uclo_wr_umem_by_words(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_umem_by_words() argument
152 qat_hal_wr_umem(handle, ae, addr++, 1, &outval); in qat_uclo_wr_umem_by_words()
158 static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle, in qat_uclo_batch_wr_umem() argument
175 qat_uclo_wr_umem_by_words(handle, ae, addr, value, size); in qat_uclo_batch_wr_umem()
181 qat_uclo_cleanup_batch_init_list(struct icp_qat_fw_loader_handle *handle, in qat_uclo_cleanup_batch_init_list() argument
217 static int qat_uclo_fetch_initmem_ae(struct icp_qat_fw_loader_handle *handle, in qat_uclo_fetch_initmem_ae() argument
221 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_fetch_initmem_ae()
249 *handle, struct icp_qat_uof_initmem in qat_uclo_create_batch_init_list()
307 static int qat_uclo_init_lmem_seg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_lmem_seg() argument
310 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_lmem_seg()
313 if (qat_uclo_fetch_initmem_ae(handle, init_mem, in qat_uclo_init_lmem_seg()
314 handle->chip_info->lm_size, &ae)) in qat_uclo_init_lmem_seg()
316 if (qat_uclo_create_batch_init_list(handle, init_mem, ae, in qat_uclo_init_lmem_seg()
322 static int qat_uclo_init_umem_seg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_umem_seg() argument
325 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_umem_seg()
330 if (qat_uclo_fetch_initmem_ae(handle, init_mem, ustore_size, &ae)) in qat_uclo_init_umem_seg()
332 if (qat_uclo_create_batch_init_list(handle, init_mem, ae, in qat_uclo_init_umem_seg()
345 static int qat_uclo_init_ae_memory(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_ae_memory() argument
350 if (qat_uclo_init_lmem_seg(handle, init_mem)) in qat_uclo_init_ae_memory()
354 if (qat_uclo_init_umem_seg(handle, init_mem)) in qat_uclo_init_ae_memory()
365 static int qat_uclo_init_ustore(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_ustore() argument
374 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_ustore()
375 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_ustore()
376 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_init_ustore()
389 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_ustore()
401 qat_hal_wr_uwords(handle, (unsigned char)ae, 0, in qat_uclo_init_ustore()
403 qat_hal_wr_uwords(handle, (unsigned char)ae, patt_pos, in qat_uclo_init_ustore()
411 static int qat_uclo_init_memory(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_memory() argument
414 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_memory()
416 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_memory()
420 if (qat_uclo_init_ae_memory(handle, initmem)) in qat_uclo_init_memory()
430 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_memory()
431 if (qat_hal_batch_wr_lm(handle, ae, in qat_uclo_init_memory()
436 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
438 qat_uclo_batch_wr_umem(handle, ae, in qat_uclo_init_memory()
440 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
656 static int qat_uclo_map_ae(struct icp_qat_fw_loader_handle *handle, int max_ae) in qat_uclo_map_ae() argument
660 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_map_ae()
661 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_map_ae()
662 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_map_ae()
724 qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) in qat_uclo_get_dev_type() argument
726 switch (handle->pci_dev->device) { in qat_uclo_get_dev_type()
738 handle->pci_dev->device); in qat_uclo_get_dev_type()
762 static int qat_uclo_init_reg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg() argument
774 return qat_hal_init_gpr(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
786 return qat_hal_init_rd_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
794 return qat_hal_init_wr_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
797 return qat_hal_init_nn(handle, ae, ctx_mask, reg_addr, value); in qat_uclo_init_reg()
805 static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg_sym() argument
826 qat_uclo_init_reg(handle, ae, ctx_mask, in qat_uclo_init_reg_sym()
839 qat_uclo_init_reg(handle, ae, in qat_uclo_init_reg_sym()
860 static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_globals() argument
862 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals()
863 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_globals()
870 if (qat_uclo_init_memory(handle)) { in qat_uclo_init_globals()
876 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_globals()
881 if (qat_uclo_init_reg_sym(handle, ae, aed->ae_slices[s].encap_image)) in qat_uclo_init_globals()
889 static int qat_hal_set_modes(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_modes() argument
898 ret = qat_hal_set_ae_ctx_mode(handle, ae, mode); in qat_hal_set_modes()
903 if (handle->chip_info->nn) { in qat_hal_set_modes()
905 ret = qat_hal_set_ae_nn_mode(handle, ae, mode); in qat_hal_set_modes()
912 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, mode); in qat_hal_set_modes()
918 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, mode); in qat_hal_set_modes()
923 if (handle->chip_info->lm2lm3) { in qat_hal_set_modes()
925 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM2, mode); in qat_hal_set_modes()
931 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM3, mode); in qat_hal_set_modes()
937 qat_hal_set_ae_tindex_mode(handle, ae, mode); in qat_hal_set_modes()
942 static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) in qat_uclo_set_ae_mode() argument
946 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode()
947 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_set_ae_mode()
948 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_set_ae_mode()
952 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_set_ae_mode()
962 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
971 static void qat_uclo_init_uword_num(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_uword_num() argument
973 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num()
984 static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_parse_uof_obj() argument
986 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj()
993 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
995 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_parse_uof_obj()
1016 if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { in qat_uclo_parse_uof_obj()
1020 qat_uclo_init_uword_num(handle); in qat_uclo_parse_uof_obj()
1023 if (qat_uclo_set_ae_mode(handle)) in qat_uclo_parse_uof_obj()
1034 static int qat_uclo_map_suof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_file_hdr() argument
1040 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof_file_hdr()
1060 static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_simg() argument
1064 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_simg()
1079 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_simg()
1080 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle); in qat_uclo_map_simg()
1082 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_simg()
1106 static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_simg_compat() argument
1112 prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_check_simg_compat()
1115 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_check_simg_compat()
1130 static void qat_uclo_del_suof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_suof() argument
1132 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_del_suof()
1136 kfree(handle->sobj_handle); in qat_uclo_del_suof()
1137 handle->sobj_handle = NULL; in qat_uclo_del_suof()
1155 static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof() argument
1159 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof()
1172 ret = qat_uclo_map_suof_file_hdr(handle, suof_ptr, suof_size); in qat_uclo_map_suof()
1190 qat_uclo_map_simg(handle, &suof_img_hdr[i], in qat_uclo_map_suof()
1192 ret = qat_uclo_check_simg_compat(handle, in qat_uclo_map_suof()
1196 suof_img_hdr[i].ae_mask &= handle->cfg_ae_mask; in qat_uclo_map_suof()
1201 if (!handle->chip_info->tgroup_share_ustore) { in qat_uclo_map_suof()
1212 static int qat_uclo_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_auth_fw() argument
1223 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_auth_fw()
1224 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_auth_fw()
1225 fcu_dram_hi_csr = handle->chip_info->fcu_dram_addr_hi; in qat_uclo_auth_fw()
1226 fcu_dram_lo_csr = handle->chip_info->fcu_dram_addr_lo; in qat_uclo_auth_fw()
1228 SET_CAP_CSR(handle, fcu_dram_hi_csr, (bus_addr >> BITS_IN_DWORD)); in qat_uclo_auth_fw()
1229 SET_CAP_CSR(handle, fcu_dram_lo_csr, bus_addr); in qat_uclo_auth_fw()
1230 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_AUTH); in qat_uclo_auth_fw()
1234 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_auth_fw()
1247 static bool qat_uclo_is_broadcast(struct icp_qat_fw_loader_handle *handle, in qat_uclo_is_broadcast() argument
1252 if (!handle->chip_info->tgroup_share_ustore) in qat_uclo_is_broadcast()
1255 sobj_handle = (struct icp_qat_suof_handle *)handle->sobj_handle; in qat_uclo_is_broadcast()
1256 if (handle->hal_handle->admin_ae_mask & in qat_uclo_is_broadcast()
1263 static int qat_uclo_broadcast_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_broadcast_load_fw() argument
1266 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_broadcast_load_fw()
1273 if (handle->chip_info->tgroup_share_ustore) { in qat_uclo_broadcast_load_fw()
1274 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_broadcast_load_fw()
1275 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_broadcast_load_fw()
1276 fcu_loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_broadcast_load_fw()
1279 handle->pci_dev->device); in qat_uclo_broadcast_load_fw()
1283 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_broadcast_load_fw()
1284 if (qat_hal_check_ae_active(handle, (unsigned char)ae)) { in qat_uclo_broadcast_load_fw()
1294 SET_CAP_CSR(handle, FCU_ME_BROADCAST_MASK_TYPE, in qat_uclo_broadcast_load_fw()
1297 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_LOAD); in qat_uclo_broadcast_load_fw()
1301 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_broadcast_load_fw()
1308 ae_loaded = GET_CAP_CSR(handle, fcu_loaded_csr); in qat_uclo_broadcast_load_fw()
1309 ae_loaded >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_broadcast_load_fw()
1324 static int qat_uclo_simg_alloc(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_alloc() argument
1331 vptr = dma_alloc_coherent(&handle->pci_dev->dev, in qat_uclo_simg_alloc()
1341 static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_free() argument
1344 if (handle && dram_desc && dram_desc->dram_base_addr_v) { in qat_uclo_simg_free()
1345 dma_free_coherent(&handle->pci_dev->dev, in qat_uclo_simg_free()
1355 static void qat_uclo_ummap_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_ummap_auth_fw() argument
1366 qat_uclo_simg_free(handle, &dram_desc); in qat_uclo_ummap_auth_fw()
1370 static int qat_uclo_check_image(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_image() argument
1377 if (handle->chip_info->fw_auth) { in qat_uclo_check_image()
1379 unsigned int header_len = ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_check_image()
1412 static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_auth_fw() argument
1424 if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN)) { in qat_uclo_map_auth_fw()
1429 ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset : in qat_uclo_map_auth_fw()
1430 size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset; in qat_uclo_map_auth_fw()
1431 if (qat_uclo_simg_alloc(handle, &img_desc, length)) { in qat_uclo_map_auth_fw()
1457 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)); in qat_uclo_map_auth_fw()
1459 memset((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1460 0, ICP_QAT_CSS_FWSK_PAD_LEN(handle)); in qat_uclo_map_auth_fw()
1463 memcpy((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1464 ICP_QAT_CSS_FWSK_PAD_LEN(handle)), in qat_uclo_map_auth_fw()
1466 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1472 ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1473 virt_addr = virt_addr + ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1479 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1480 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle)), in qat_uclo_map_auth_fw()
1481 ICP_QAT_CSS_SIGNATURE_LEN(handle)); in qat_uclo_map_auth_fw()
1485 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1486 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1490 auth_desc->img_len = size - ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_auth_fw()
1492 (void *)(image + ICP_QAT_AE_IMG_OFFSET(handle)), in qat_uclo_map_auth_fw()
1512 virt_addr += ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1513 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1515 auth_desc->ae_mask = simg_ae_mode->ae_mask & handle->cfg_ae_mask; in qat_uclo_map_auth_fw()
1524 static int qat_uclo_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_load_fw() argument
1527 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_load_fw()
1533 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_load_fw()
1534 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_load_fw()
1535 loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_load_fw()
1537 for_each_set_bit(i, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_load_fw()
1542 if (qat_hal_check_ae_active(handle, i)) { in qat_uclo_load_fw()
1546 SET_CAP_CSR(handle, fcu_ctl_csr, in qat_uclo_load_fw()
1553 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_load_fw()
1556 loaded_aes = GET_CAP_CSR(handle, loaded_csr); in qat_uclo_load_fw()
1557 loaded_aes >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_load_fw()
1570 static int qat_uclo_map_suof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_obj() argument
1578 handle->sobj_handle = suof_handle; in qat_uclo_map_suof_obj()
1579 if (qat_uclo_map_suof(handle, addr_ptr, mem_size)) { in qat_uclo_map_suof_obj()
1580 qat_uclo_del_suof(handle); in qat_uclo_map_suof_obj()
1587 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_mimage() argument
1594 ret = qat_uclo_check_image(handle, addr_ptr, mem_size, CSS_MMP_FIRMWARE); in qat_uclo_wr_mimage()
1598 if (handle->chip_info->fw_auth) { in qat_uclo_wr_mimage()
1599 status = qat_uclo_map_auth_fw(handle, addr_ptr, mem_size, &desc); in qat_uclo_wr_mimage()
1601 status = qat_uclo_auth_fw(handle, desc); in qat_uclo_wr_mimage()
1602 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_mimage()
1604 if (handle->chip_info->mmp_sram_size < mem_size) { in qat_uclo_wr_mimage()
1608 qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size); in qat_uclo_wr_mimage()
1613 static int qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_uof_obj() argument
1634 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1635 if (qat_uclo_parse_uof_obj(handle)) in qat_uclo_map_uof_obj()
1640 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1649 static int qat_uclo_map_mof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_file_hdr() argument
1653 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_map_mof_file_hdr()
1676 static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_mof() argument
1678 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_del_mof()
1682 kfree(handle->mobj_handle); in qat_uclo_del_mof()
1683 handle->mobj_handle = NULL; in qat_uclo_del_mof()
1837 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_obj() argument
1863 handle->mobj_handle = mobj_handle; in qat_uclo_map_mof_obj()
1864 ret = qat_uclo_map_mof_file_hdr(handle, mof_ptr, mof_size); in qat_uclo_map_mof_obj()
1889 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_obj() argument
1897 (sizeof(handle->hal_handle->ae_mask) * 8)); in qat_uclo_map_obj()
1899 if (!handle || !addr_ptr || mem_size < 24) in qat_uclo_map_obj()
1903 ret = qat_uclo_map_mof_obj(handle, addr_ptr, mem_size, obj_name, in qat_uclo_map_obj()
1912 return (handle->chip_info->fw_auth) ? in qat_uclo_map_obj()
1913 qat_uclo_map_suof_obj(handle, obj_addr, obj_size) : in qat_uclo_map_obj()
1914 qat_uclo_map_uof_obj(handle, obj_addr, obj_size); in qat_uclo_map_obj()
1917 void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_obj() argument
1919 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj()
1922 if (handle->mobj_handle) in qat_uclo_del_obj()
1923 qat_uclo_del_mof(handle); in qat_uclo_del_obj()
1924 if (handle->sobj_handle) in qat_uclo_del_obj()
1925 qat_uclo_del_suof(handle); in qat_uclo_del_obj()
1933 for (a = 0; a < handle->hal_handle->ae_max_num; a++) in qat_uclo_del_obj()
1939 handle->obj_handle = NULL; in qat_uclo_del_obj()
1972 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_raw_page() argument
1977 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page()
2001 qat_hal_wr_uwords(handle, (unsigned char)ae, in qat_uclo_wr_uimage_raw_page()
2011 static void qat_uclo_wr_uimage_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_page() argument
2014 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page()
2015 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_wr_uimage_page()
2016 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_wr_uimage_page()
2030 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_wr_uimage_page()
2049 qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); in qat_uclo_wr_uimage_page()
2055 qat_hal_set_live_ctx(handle, (unsigned char)ae, in qat_uclo_wr_uimage_page()
2057 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, in qat_uclo_wr_uimage_page()
2062 static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_suof_img() argument
2066 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_wr_suof_img()
2071 ret = qat_uclo_check_image(handle, simg_hdr[i].simg_buf, in qat_uclo_wr_suof_img()
2077 if (qat_uclo_map_auth_fw(handle, in qat_uclo_wr_suof_img()
2083 if (qat_uclo_auth_fw(handle, desc)) in qat_uclo_wr_suof_img()
2085 if (qat_uclo_is_broadcast(handle, i)) { in qat_uclo_wr_suof_img()
2086 if (qat_uclo_broadcast_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2089 if (qat_uclo_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2092 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2096 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2100 static int qat_uclo_wr_uof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_uof_img() argument
2102 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img()
2105 if (qat_uclo_init_globals(handle)) in qat_uclo_wr_uof_img()
2110 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2112 qat_uclo_wr_uimage_page(handle, in qat_uclo_wr_uof_img()
2118 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_all_uimage() argument
2120 return (handle->chip_info->fw_auth) ? qat_uclo_wr_suof_img(handle) : in qat_uclo_wr_all_uimage()
2121 qat_uclo_wr_uof_img(handle); in qat_uclo_wr_all_uimage()
2124 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle, in qat_uclo_set_cfg_ae_mask() argument
2130 handle->cfg_ae_mask = cfg_ae_mask; in qat_uclo_set_cfg_ae_mask()