Lines Matching full: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()
740 handle->pci_dev->device); in qat_uclo_get_dev_type()
764 static int qat_uclo_init_reg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg() argument
776 return qat_hal_init_gpr(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
788 return qat_hal_init_rd_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
796 return qat_hal_init_wr_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
799 return qat_hal_init_nn(handle, ae, ctx_mask, reg_addr, value); in qat_uclo_init_reg()
807 static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg_sym() argument
828 qat_uclo_init_reg(handle, ae, ctx_mask, in qat_uclo_init_reg_sym()
841 qat_uclo_init_reg(handle, ae, in qat_uclo_init_reg_sym()
862 static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_globals() argument
864 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals()
865 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_globals()
872 if (qat_uclo_init_memory(handle)) { in qat_uclo_init_globals()
878 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_globals()
883 if (qat_uclo_init_reg_sym(handle, ae, aed->ae_slices[s].encap_image)) in qat_uclo_init_globals()
891 static int qat_hal_set_modes(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_modes() argument
900 ret = qat_hal_set_ae_ctx_mode(handle, ae, mode); in qat_hal_set_modes()
905 if (handle->chip_info->nn) { in qat_hal_set_modes()
907 ret = qat_hal_set_ae_nn_mode(handle, ae, mode); in qat_hal_set_modes()
914 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, mode); in qat_hal_set_modes()
920 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, mode); in qat_hal_set_modes()
925 if (handle->chip_info->lm2lm3) { in qat_hal_set_modes()
927 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM2, mode); in qat_hal_set_modes()
933 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM3, mode); in qat_hal_set_modes()
939 qat_hal_set_ae_tindex_mode(handle, ae, mode); in qat_hal_set_modes()
944 static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) in qat_uclo_set_ae_mode() argument
948 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode()
949 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_set_ae_mode()
950 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_set_ae_mode()
954 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_set_ae_mode()
964 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
973 static void qat_uclo_init_uword_num(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_uword_num() argument
975 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num()
986 static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_parse_uof_obj() argument
988 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj()
995 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
997 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_parse_uof_obj()
1018 if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { in qat_uclo_parse_uof_obj()
1022 qat_uclo_init_uword_num(handle); in qat_uclo_parse_uof_obj()
1025 if (qat_uclo_set_ae_mode(handle)) in qat_uclo_parse_uof_obj()
1036 static int qat_uclo_map_suof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_file_hdr() argument
1042 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof_file_hdr()
1062 static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_simg() argument
1066 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_simg()
1081 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_simg()
1082 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle); in qat_uclo_map_simg()
1084 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_simg()
1108 static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_simg_compat() argument
1114 prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_check_simg_compat()
1117 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_check_simg_compat()
1132 static void qat_uclo_del_suof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_suof() argument
1134 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_del_suof()
1138 kfree(handle->sobj_handle); in qat_uclo_del_suof()
1139 handle->sobj_handle = NULL; in qat_uclo_del_suof()
1157 static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof() argument
1161 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof()
1174 ret = qat_uclo_map_suof_file_hdr(handle, suof_ptr, suof_size); in qat_uclo_map_suof()
1192 qat_uclo_map_simg(handle, &suof_img_hdr[i], in qat_uclo_map_suof()
1194 ret = qat_uclo_check_simg_compat(handle, in qat_uclo_map_suof()
1198 suof_img_hdr[i].ae_mask &= handle->cfg_ae_mask; in qat_uclo_map_suof()
1203 if (!handle->chip_info->tgroup_share_ustore) { in qat_uclo_map_suof()
1214 static int qat_uclo_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_auth_fw() argument
1225 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_auth_fw()
1226 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_auth_fw()
1227 fcu_dram_hi_csr = handle->chip_info->fcu_dram_addr_hi; in qat_uclo_auth_fw()
1228 fcu_dram_lo_csr = handle->chip_info->fcu_dram_addr_lo; in qat_uclo_auth_fw()
1230 SET_CAP_CSR(handle, fcu_dram_hi_csr, (bus_addr >> BITS_IN_DWORD)); in qat_uclo_auth_fw()
1231 SET_CAP_CSR(handle, fcu_dram_lo_csr, bus_addr); in qat_uclo_auth_fw()
1232 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_AUTH); in qat_uclo_auth_fw()
1236 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_auth_fw()
1249 static bool qat_uclo_is_broadcast(struct icp_qat_fw_loader_handle *handle, in qat_uclo_is_broadcast() argument
1254 if (!handle->chip_info->tgroup_share_ustore) in qat_uclo_is_broadcast()
1257 sobj_handle = (struct icp_qat_suof_handle *)handle->sobj_handle; in qat_uclo_is_broadcast()
1258 if (handle->hal_handle->admin_ae_mask & in qat_uclo_is_broadcast()
1265 static int qat_uclo_broadcast_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_broadcast_load_fw() argument
1268 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_broadcast_load_fw()
1275 if (handle->chip_info->tgroup_share_ustore) { in qat_uclo_broadcast_load_fw()
1276 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_broadcast_load_fw()
1277 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_broadcast_load_fw()
1278 fcu_loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_broadcast_load_fw()
1281 handle->pci_dev->device); in qat_uclo_broadcast_load_fw()
1285 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_broadcast_load_fw()
1286 if (qat_hal_check_ae_active(handle, (unsigned char)ae)) { in qat_uclo_broadcast_load_fw()
1296 SET_CAP_CSR(handle, FCU_ME_BROADCAST_MASK_TYPE, in qat_uclo_broadcast_load_fw()
1299 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_LOAD); in qat_uclo_broadcast_load_fw()
1303 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_broadcast_load_fw()
1310 ae_loaded = GET_CAP_CSR(handle, fcu_loaded_csr); in qat_uclo_broadcast_load_fw()
1311 ae_loaded >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_broadcast_load_fw()
1326 static int qat_uclo_simg_alloc(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_alloc() argument
1333 vptr = dma_alloc_coherent(&handle->pci_dev->dev, in qat_uclo_simg_alloc()
1343 static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_free() argument
1346 if (handle && dram_desc && dram_desc->dram_base_addr_v) { in qat_uclo_simg_free()
1347 dma_free_coherent(&handle->pci_dev->dev, in qat_uclo_simg_free()
1357 static void qat_uclo_ummap_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_ummap_auth_fw() argument
1368 qat_uclo_simg_free(handle, &dram_desc); in qat_uclo_ummap_auth_fw()
1372 static int qat_uclo_check_image(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_image() argument
1379 if (handle->chip_info->fw_auth) { in qat_uclo_check_image()
1381 unsigned int header_len = ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_check_image()
1414 static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_auth_fw() argument
1426 if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN)) { in qat_uclo_map_auth_fw()
1431 ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset : in qat_uclo_map_auth_fw()
1432 size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset; in qat_uclo_map_auth_fw()
1433 if (qat_uclo_simg_alloc(handle, &img_desc, length)) { in qat_uclo_map_auth_fw()
1459 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)); in qat_uclo_map_auth_fw()
1461 memset((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1462 0, ICP_QAT_CSS_FWSK_PAD_LEN(handle)); in qat_uclo_map_auth_fw()
1465 memcpy((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1466 ICP_QAT_CSS_FWSK_PAD_LEN(handle)), in qat_uclo_map_auth_fw()
1468 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1474 ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1475 virt_addr = virt_addr + ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1481 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1482 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle)), in qat_uclo_map_auth_fw()
1483 ICP_QAT_CSS_SIGNATURE_LEN(handle)); in qat_uclo_map_auth_fw()
1487 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1488 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1492 auth_desc->img_len = size - ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_auth_fw()
1494 (void *)(image + ICP_QAT_AE_IMG_OFFSET(handle)), in qat_uclo_map_auth_fw()
1514 virt_addr += ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1515 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1517 auth_desc->ae_mask = simg_ae_mode->ae_mask & handle->cfg_ae_mask; in qat_uclo_map_auth_fw()
1526 static int qat_uclo_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_load_fw() argument
1529 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_load_fw()
1535 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_load_fw()
1536 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_load_fw()
1537 loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_load_fw()
1539 for_each_set_bit(i, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_load_fw()
1544 if (qat_hal_check_ae_active(handle, i)) { in qat_uclo_load_fw()
1548 SET_CAP_CSR(handle, fcu_ctl_csr, in qat_uclo_load_fw()
1555 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_load_fw()
1558 loaded_aes = GET_CAP_CSR(handle, loaded_csr); in qat_uclo_load_fw()
1559 loaded_aes >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_load_fw()
1572 static int qat_uclo_map_suof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_obj() argument
1580 handle->sobj_handle = suof_handle; in qat_uclo_map_suof_obj()
1581 if (qat_uclo_map_suof(handle, addr_ptr, mem_size)) { in qat_uclo_map_suof_obj()
1582 qat_uclo_del_suof(handle); in qat_uclo_map_suof_obj()
1589 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_mimage() argument
1596 ret = qat_uclo_check_image(handle, addr_ptr, mem_size, CSS_MMP_FIRMWARE); in qat_uclo_wr_mimage()
1600 if (handle->chip_info->fw_auth) { in qat_uclo_wr_mimage()
1601 status = qat_uclo_map_auth_fw(handle, addr_ptr, mem_size, &desc); in qat_uclo_wr_mimage()
1603 status = qat_uclo_auth_fw(handle, desc); in qat_uclo_wr_mimage()
1604 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_mimage()
1606 if (handle->chip_info->mmp_sram_size < mem_size) { in qat_uclo_wr_mimage()
1610 qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size); in qat_uclo_wr_mimage()
1615 static int qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_uof_obj() argument
1636 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1637 if (qat_uclo_parse_uof_obj(handle)) in qat_uclo_map_uof_obj()
1642 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1651 static int qat_uclo_map_mof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_file_hdr() argument
1655 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_map_mof_file_hdr()
1678 static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_mof() argument
1680 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_del_mof()
1684 kfree(handle->mobj_handle); in qat_uclo_del_mof()
1685 handle->mobj_handle = NULL; in qat_uclo_del_mof()
1839 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_obj() argument
1865 handle->mobj_handle = mobj_handle; in qat_uclo_map_mof_obj()
1866 ret = qat_uclo_map_mof_file_hdr(handle, mof_ptr, mof_size); in qat_uclo_map_mof_obj()
1891 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_obj() argument
1899 (sizeof(handle->hal_handle->ae_mask) * 8)); in qat_uclo_map_obj()
1901 if (!handle || !addr_ptr || mem_size < 24) in qat_uclo_map_obj()
1905 ret = qat_uclo_map_mof_obj(handle, addr_ptr, mem_size, obj_name, in qat_uclo_map_obj()
1914 return (handle->chip_info->fw_auth) ? in qat_uclo_map_obj()
1915 qat_uclo_map_suof_obj(handle, obj_addr, obj_size) : in qat_uclo_map_obj()
1916 qat_uclo_map_uof_obj(handle, obj_addr, obj_size); in qat_uclo_map_obj()
1919 void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_obj() argument
1921 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj()
1924 if (handle->mobj_handle) in qat_uclo_del_obj()
1925 qat_uclo_del_mof(handle); in qat_uclo_del_obj()
1926 if (handle->sobj_handle) in qat_uclo_del_obj()
1927 qat_uclo_del_suof(handle); in qat_uclo_del_obj()
1935 for (a = 0; a < handle->hal_handle->ae_max_num; a++) in qat_uclo_del_obj()
1941 handle->obj_handle = NULL; in qat_uclo_del_obj()
1974 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_raw_page() argument
1979 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page()
2000 qat_hal_wr_uwords(handle, (unsigned char)ae, in qat_uclo_wr_uimage_raw_page()
2010 static void qat_uclo_wr_uimage_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_page() argument
2013 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page()
2014 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_wr_uimage_page()
2015 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_wr_uimage_page()
2029 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_wr_uimage_page()
2048 qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); in qat_uclo_wr_uimage_page()
2054 qat_hal_set_live_ctx(handle, (unsigned char)ae, in qat_uclo_wr_uimage_page()
2056 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, in qat_uclo_wr_uimage_page()
2061 static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_suof_img() argument
2065 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_wr_suof_img()
2070 ret = qat_uclo_check_image(handle, simg_hdr[i].simg_buf, in qat_uclo_wr_suof_img()
2076 if (qat_uclo_map_auth_fw(handle, in qat_uclo_wr_suof_img()
2082 if (qat_uclo_auth_fw(handle, desc)) in qat_uclo_wr_suof_img()
2084 if (qat_uclo_is_broadcast(handle, i)) { in qat_uclo_wr_suof_img()
2085 if (qat_uclo_broadcast_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2088 if (qat_uclo_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2091 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2095 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2099 static int qat_uclo_wr_uof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_uof_img() argument
2101 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img()
2104 if (qat_uclo_init_globals(handle)) in qat_uclo_wr_uof_img()
2109 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2111 qat_uclo_wr_uimage_page(handle, in qat_uclo_wr_uof_img()
2117 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_all_uimage() argument
2119 return (handle->chip_info->fw_auth) ? qat_uclo_wr_suof_img(handle) : in qat_uclo_wr_all_uimage()
2120 qat_uclo_wr_uof_img(handle); in qat_uclo_wr_all_uimage()
2123 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle, in qat_uclo_set_cfg_ae_mask() argument
2129 handle->cfg_ae_mask = cfg_ae_mask; in qat_uclo_set_cfg_ae_mask()