Lines Matching full:handle

125 static void qat_uclo_wr_sram_by_words(struct icp_qat_fw_loader_handle *handle,  in qat_uclo_wr_sram_by_words()  argument
134 SRAM_WRITE(handle, addr, outval); in qat_uclo_wr_sram_by_words()
141 static void qat_uclo_wr_umem_by_words(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_umem_by_words() argument
153 qat_hal_wr_umem(handle, ae, addr++, 1, &outval); in qat_uclo_wr_umem_by_words()
159 static void qat_uclo_batch_wr_umem(struct icp_qat_fw_loader_handle *handle, in qat_uclo_batch_wr_umem() argument
176 qat_uclo_wr_umem_by_words(handle, ae, addr, value, size); in qat_uclo_batch_wr_umem()
182 qat_uclo_cleanup_batch_init_list(struct icp_qat_fw_loader_handle *handle, in qat_uclo_cleanup_batch_init_list() argument
218 static int qat_uclo_fetch_initmem_ae(struct icp_qat_fw_loader_handle *handle, in qat_uclo_fetch_initmem_ae() argument
222 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_fetch_initmem_ae()
250 *handle, struct icp_qat_uof_initmem in qat_uclo_create_batch_init_list()
308 static int qat_uclo_init_lmem_seg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_lmem_seg() argument
311 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_lmem_seg()
314 if (qat_uclo_fetch_initmem_ae(handle, init_mem, in qat_uclo_init_lmem_seg()
315 handle->chip_info->lm_size, &ae)) in qat_uclo_init_lmem_seg()
317 if (qat_uclo_create_batch_init_list(handle, init_mem, ae, in qat_uclo_init_lmem_seg()
323 static int qat_uclo_init_umem_seg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_umem_seg() argument
326 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_umem_seg()
331 if (qat_uclo_fetch_initmem_ae(handle, init_mem, ustore_size, &ae)) in qat_uclo_init_umem_seg()
333 if (qat_uclo_create_batch_init_list(handle, init_mem, ae, in qat_uclo_init_umem_seg()
346 static int qat_uclo_init_ae_memory(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_ae_memory() argument
351 if (qat_uclo_init_lmem_seg(handle, init_mem)) in qat_uclo_init_ae_memory()
355 if (qat_uclo_init_umem_seg(handle, init_mem)) in qat_uclo_init_ae_memory()
366 static int qat_uclo_init_ustore(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_ustore() argument
375 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_ustore()
376 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_ustore()
377 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_init_ustore()
390 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_ustore()
402 qat_hal_wr_uwords(handle, (unsigned char)ae, 0, in qat_uclo_init_ustore()
404 qat_hal_wr_uwords(handle, (unsigned char)ae, patt_pos, in qat_uclo_init_ustore()
412 static int qat_uclo_init_memory(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_memory() argument
415 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_memory()
417 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_memory()
421 if (qat_uclo_init_ae_memory(handle, initmem)) in qat_uclo_init_memory()
431 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_memory()
432 if (qat_hal_batch_wr_lm(handle, ae, in qat_uclo_init_memory()
437 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
439 qat_uclo_batch_wr_umem(handle, ae, in qat_uclo_init_memory()
441 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
657 static int qat_uclo_map_ae(struct icp_qat_fw_loader_handle *handle, int max_ae) in qat_uclo_map_ae() argument
661 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_map_ae()
662 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_map_ae()
663 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_map_ae()
725 qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) in qat_uclo_get_dev_type() argument
727 switch (handle->pci_dev->device) { in qat_uclo_get_dev_type()
741 handle->pci_dev->device); in qat_uclo_get_dev_type()
765 static int qat_uclo_init_reg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg() argument
777 return qat_hal_init_gpr(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
789 return qat_hal_init_rd_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
797 return qat_hal_init_wr_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
800 return qat_hal_init_nn(handle, ae, ctx_mask, reg_addr, value); in qat_uclo_init_reg()
808 static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg_sym() argument
829 qat_uclo_init_reg(handle, ae, ctx_mask, in qat_uclo_init_reg_sym()
842 qat_uclo_init_reg(handle, ae, in qat_uclo_init_reg_sym()
863 static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_globals() argument
865 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals()
866 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_globals()
873 if (qat_uclo_init_memory(handle)) { in qat_uclo_init_globals()
879 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_globals()
884 if (qat_uclo_init_reg_sym(handle, ae, aed->ae_slices[s].encap_image)) in qat_uclo_init_globals()
892 static int qat_hal_set_modes(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_modes() argument
901 ret = qat_hal_set_ae_ctx_mode(handle, ae, mode); in qat_hal_set_modes()
906 if (handle->chip_info->nn) { in qat_hal_set_modes()
908 ret = qat_hal_set_ae_nn_mode(handle, ae, mode); in qat_hal_set_modes()
915 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, mode); in qat_hal_set_modes()
921 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, mode); in qat_hal_set_modes()
926 if (handle->chip_info->lm2lm3) { in qat_hal_set_modes()
928 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM2, mode); in qat_hal_set_modes()
934 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM3, mode); in qat_hal_set_modes()
940 qat_hal_set_ae_tindex_mode(handle, ae, mode); in qat_hal_set_modes()
945 static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) in qat_uclo_set_ae_mode() argument
949 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode()
950 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_set_ae_mode()
951 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_set_ae_mode()
955 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_set_ae_mode()
965 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
974 static void qat_uclo_init_uword_num(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_uword_num() argument
976 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num()
987 static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_parse_uof_obj() argument
989 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj()
996 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
998 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_parse_uof_obj()
1019 if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { in qat_uclo_parse_uof_obj()
1023 qat_uclo_init_uword_num(handle); in qat_uclo_parse_uof_obj()
1026 if (qat_uclo_set_ae_mode(handle)) in qat_uclo_parse_uof_obj()
1037 static int qat_uclo_map_suof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_file_hdr() argument
1043 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof_file_hdr()
1063 static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_simg() argument
1067 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_simg()
1068 unsigned int offset = ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_simg()
1104 static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_simg_compat() argument
1110 prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_check_simg_compat()
1113 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_check_simg_compat()
1128 static void qat_uclo_del_suof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_suof() argument
1130 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_del_suof()
1134 kfree(handle->sobj_handle); in qat_uclo_del_suof()
1135 handle->sobj_handle = NULL; in qat_uclo_del_suof()
1153 static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof() argument
1157 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof()
1170 ret = qat_uclo_map_suof_file_hdr(handle, suof_ptr, suof_size); in qat_uclo_map_suof()
1188 qat_uclo_map_simg(handle, &suof_img_hdr[i], in qat_uclo_map_suof()
1190 ret = qat_uclo_check_simg_compat(handle, in qat_uclo_map_suof()
1194 suof_img_hdr[i].ae_mask &= handle->cfg_ae_mask; in qat_uclo_map_suof()
1199 if (!handle->chip_info->tgroup_share_ustore) { in qat_uclo_map_suof()
1210 static int qat_uclo_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_auth_fw() argument
1221 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_auth_fw()
1222 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_auth_fw()
1223 fcu_dram_hi_csr = handle->chip_info->fcu_dram_addr_hi; in qat_uclo_auth_fw()
1224 fcu_dram_lo_csr = handle->chip_info->fcu_dram_addr_lo; in qat_uclo_auth_fw()
1226 SET_CAP_CSR(handle, fcu_dram_hi_csr, (bus_addr >> BITS_IN_DWORD)); in qat_uclo_auth_fw()
1227 SET_CAP_CSR(handle, fcu_dram_lo_csr, bus_addr); in qat_uclo_auth_fw()
1228 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_AUTH); in qat_uclo_auth_fw()
1232 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_auth_fw()
1245 static bool qat_uclo_is_broadcast(struct icp_qat_fw_loader_handle *handle, in qat_uclo_is_broadcast() argument
1250 if (!handle->chip_info->tgroup_share_ustore) in qat_uclo_is_broadcast()
1253 sobj_handle = (struct icp_qat_suof_handle *)handle->sobj_handle; in qat_uclo_is_broadcast()
1254 if (handle->hal_handle->admin_ae_mask & in qat_uclo_is_broadcast()
1261 static int qat_uclo_broadcast_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_broadcast_load_fw() argument
1264 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_broadcast_load_fw()
1271 if (handle->chip_info->tgroup_share_ustore) { in qat_uclo_broadcast_load_fw()
1272 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_broadcast_load_fw()
1273 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_broadcast_load_fw()
1274 fcu_loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_broadcast_load_fw()
1277 handle->pci_dev->device); in qat_uclo_broadcast_load_fw()
1281 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_broadcast_load_fw()
1282 if (qat_hal_check_ae_active(handle, (unsigned char)ae)) { in qat_uclo_broadcast_load_fw()
1292 SET_CAP_CSR(handle, FCU_ME_BROADCAST_MASK_TYPE, in qat_uclo_broadcast_load_fw()
1295 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_LOAD); in qat_uclo_broadcast_load_fw()
1299 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_broadcast_load_fw()
1306 ae_loaded = GET_CAP_CSR(handle, fcu_loaded_csr); in qat_uclo_broadcast_load_fw()
1307 ae_loaded >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_broadcast_load_fw()
1322 static int qat_uclo_simg_alloc(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_alloc() argument
1329 vptr = dma_alloc_coherent(&handle->pci_dev->dev, in qat_uclo_simg_alloc()
1339 static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_free() argument
1342 if (handle && dram_desc && dram_desc->dram_base_addr_v) { in qat_uclo_simg_free()
1343 dma_free_coherent(&handle->pci_dev->dev, in qat_uclo_simg_free()
1353 static void qat_uclo_ummap_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_ummap_auth_fw() argument
1364 qat_uclo_simg_free(handle, &dram_desc); in qat_uclo_ummap_auth_fw()
1368 static int qat_uclo_check_image(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_image() argument
1375 if (handle->chip_info->fw_auth) { in qat_uclo_check_image()
1377 unsigned int header_len = ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_check_image()
1410 static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_auth_fw() argument
1423 ret = qat_uclo_simg_alloc(handle, &img_desc, ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN); in qat_uclo_map_auth_fw()
1431 qat_uclo_simg_free(handle, &img_desc); in qat_uclo_map_auth_fw()
1456 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)); in qat_uclo_map_auth_fw()
1458 memset((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1459 0, ICP_QAT_CSS_FWSK_PAD_LEN(handle)); in qat_uclo_map_auth_fw()
1462 memcpy((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1463 ICP_QAT_CSS_FWSK_PAD_LEN(handle)), in qat_uclo_map_auth_fw()
1465 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1471 ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1472 virt_addr = virt_addr + ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1478 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1479 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle)), in qat_uclo_map_auth_fw()
1480 ICP_QAT_CSS_SIGNATURE_LEN(handle)); in qat_uclo_map_auth_fw()
1484 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1485 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1489 auth_desc->img_len = size - ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_auth_fw()
1493 qat_uclo_simg_free(handle, &img_desc); in qat_uclo_map_auth_fw()
1498 (void *)(image + ICP_QAT_AE_IMG_OFFSET(handle)), in qat_uclo_map_auth_fw()
1518 virt_addr += ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1519 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1521 auth_desc->ae_mask = simg_ae_mode->ae_mask & handle->cfg_ae_mask; in qat_uclo_map_auth_fw()
1530 static int qat_uclo_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_load_fw() argument
1533 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_load_fw()
1539 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_load_fw()
1540 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_load_fw()
1541 loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_load_fw()
1543 for_each_set_bit(i, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_load_fw()
1548 if (qat_hal_check_ae_active(handle, i)) { in qat_uclo_load_fw()
1552 SET_CAP_CSR(handle, fcu_ctl_csr, in qat_uclo_load_fw()
1559 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_load_fw()
1562 loaded_aes = GET_CAP_CSR(handle, loaded_csr); in qat_uclo_load_fw()
1563 loaded_aes >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_load_fw()
1576 static int qat_uclo_map_suof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_obj() argument
1584 handle->sobj_handle = suof_handle; in qat_uclo_map_suof_obj()
1585 if (qat_uclo_map_suof(handle, addr_ptr, mem_size)) { in qat_uclo_map_suof_obj()
1586 qat_uclo_del_suof(handle); in qat_uclo_map_suof_obj()
1593 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_mimage() argument
1600 ret = qat_uclo_check_image(handle, addr_ptr, mem_size, CSS_MMP_FIRMWARE); in qat_uclo_wr_mimage()
1604 if (handle->chip_info->fw_auth) { in qat_uclo_wr_mimage()
1605 status = qat_uclo_map_auth_fw(handle, addr_ptr, mem_size, &desc); in qat_uclo_wr_mimage()
1607 status = qat_uclo_auth_fw(handle, desc); in qat_uclo_wr_mimage()
1608 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_mimage()
1610 if (handle->chip_info->mmp_sram_size < mem_size) { in qat_uclo_wr_mimage()
1614 qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size); in qat_uclo_wr_mimage()
1619 static int qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_uof_obj() argument
1640 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1641 if (qat_uclo_parse_uof_obj(handle)) in qat_uclo_map_uof_obj()
1646 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1655 static int qat_uclo_map_mof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_file_hdr() argument
1659 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_map_mof_file_hdr()
1682 static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_mof() argument
1684 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_del_mof()
1688 kfree(handle->mobj_handle); in qat_uclo_del_mof()
1689 handle->mobj_handle = NULL; in qat_uclo_del_mof()
1843 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_obj() argument
1869 handle->mobj_handle = mobj_handle; in qat_uclo_map_mof_obj()
1870 ret = qat_uclo_map_mof_file_hdr(handle, mof_ptr, mof_size); in qat_uclo_map_mof_obj()
1895 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_obj() argument
1903 (sizeof(handle->hal_handle->ae_mask) * 8)); in qat_uclo_map_obj()
1905 if (!handle || !addr_ptr || mem_size < 24) in qat_uclo_map_obj()
1909 ret = qat_uclo_map_mof_obj(handle, addr_ptr, mem_size, obj_name, in qat_uclo_map_obj()
1918 return (handle->chip_info->fw_auth) ? in qat_uclo_map_obj()
1919 qat_uclo_map_suof_obj(handle, obj_addr, obj_size) : in qat_uclo_map_obj()
1920 qat_uclo_map_uof_obj(handle, obj_addr, obj_size); in qat_uclo_map_obj()
1923 void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_obj() argument
1925 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj()
1928 if (handle->mobj_handle) in qat_uclo_del_obj()
1929 qat_uclo_del_mof(handle); in qat_uclo_del_obj()
1930 if (handle->sobj_handle) in qat_uclo_del_obj()
1931 qat_uclo_del_suof(handle); in qat_uclo_del_obj()
1939 for (a = 0; a < handle->hal_handle->ae_max_num; a++) in qat_uclo_del_obj()
1945 handle->obj_handle = NULL; in qat_uclo_del_obj()
1978 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_raw_page() argument
1983 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page()
2004 qat_hal_wr_uwords(handle, (unsigned char)ae, in qat_uclo_wr_uimage_raw_page()
2014 static void qat_uclo_wr_uimage_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_page() argument
2017 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page()
2018 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_wr_uimage_page()
2019 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_wr_uimage_page()
2033 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_wr_uimage_page()
2052 qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); in qat_uclo_wr_uimage_page()
2058 qat_hal_set_live_ctx(handle, (unsigned char)ae, in qat_uclo_wr_uimage_page()
2060 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, in qat_uclo_wr_uimage_page()
2065 static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_suof_img() argument
2069 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_wr_suof_img()
2074 ret = qat_uclo_check_image(handle, simg_hdr[i].simg_buf, in qat_uclo_wr_suof_img()
2080 if (qat_uclo_map_auth_fw(handle, in qat_uclo_wr_suof_img()
2086 if (qat_uclo_auth_fw(handle, desc)) in qat_uclo_wr_suof_img()
2088 if (qat_uclo_is_broadcast(handle, i)) { in qat_uclo_wr_suof_img()
2089 if (qat_uclo_broadcast_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2092 if (qat_uclo_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2095 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2099 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2103 static int qat_uclo_wr_uof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_uof_img() argument
2105 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img()
2108 if (qat_uclo_init_globals(handle)) in qat_uclo_wr_uof_img()
2113 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2115 qat_uclo_wr_uimage_page(handle, in qat_uclo_wr_uof_img()
2121 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_all_uimage() argument
2123 return (handle->chip_info->fw_auth) ? qat_uclo_wr_suof_img(handle) : in qat_uclo_wr_all_uimage()
2124 qat_uclo_wr_uof_img(handle); in qat_uclo_wr_all_uimage()
2127 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle, in qat_uclo_set_cfg_ae_mask() argument
2133 handle->cfg_ae_mask = cfg_ae_mask; in qat_uclo_set_cfg_ae_mask()