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()
739 handle->pci_dev->device); in qat_uclo_get_dev_type()
763 static int qat_uclo_init_reg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg() argument
775 return qat_hal_init_gpr(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
787 return qat_hal_init_rd_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
795 return qat_hal_init_wr_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
798 return qat_hal_init_nn(handle, ae, ctx_mask, reg_addr, value); in qat_uclo_init_reg()
806 static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg_sym() argument
827 qat_uclo_init_reg(handle, ae, ctx_mask, in qat_uclo_init_reg_sym()
840 qat_uclo_init_reg(handle, ae, in qat_uclo_init_reg_sym()
861 static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_globals() argument
863 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals()
864 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_globals()
871 if (qat_uclo_init_memory(handle)) { in qat_uclo_init_globals()
877 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_globals()
882 if (qat_uclo_init_reg_sym(handle, ae, aed->ae_slices[s].encap_image)) in qat_uclo_init_globals()
890 static int qat_hal_set_modes(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_modes() argument
899 ret = qat_hal_set_ae_ctx_mode(handle, ae, mode); in qat_hal_set_modes()
904 if (handle->chip_info->nn) { in qat_hal_set_modes()
906 ret = qat_hal_set_ae_nn_mode(handle, ae, mode); in qat_hal_set_modes()
913 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, mode); in qat_hal_set_modes()
919 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, mode); in qat_hal_set_modes()
924 if (handle->chip_info->lm2lm3) { in qat_hal_set_modes()
926 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM2, mode); in qat_hal_set_modes()
932 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM3, mode); in qat_hal_set_modes()
938 qat_hal_set_ae_tindex_mode(handle, ae, mode); in qat_hal_set_modes()
943 static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) in qat_uclo_set_ae_mode() argument
947 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode()
948 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_set_ae_mode()
949 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_set_ae_mode()
953 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_set_ae_mode()
963 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
972 static void qat_uclo_init_uword_num(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_uword_num() argument
974 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num()
985 static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_parse_uof_obj() argument
987 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj()
994 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
996 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_parse_uof_obj()
1017 if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { in qat_uclo_parse_uof_obj()
1021 qat_uclo_init_uword_num(handle); in qat_uclo_parse_uof_obj()
1024 if (qat_uclo_set_ae_mode(handle)) in qat_uclo_parse_uof_obj()
1035 static int qat_uclo_map_suof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_file_hdr() argument
1041 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof_file_hdr()
1061 static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_simg() argument
1065 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_simg()
1080 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_simg()
1081 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle); in qat_uclo_map_simg()
1083 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_simg()
1107 static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_simg_compat() argument
1113 prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_check_simg_compat()
1116 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_check_simg_compat()
1131 static void qat_uclo_del_suof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_suof() argument
1133 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_del_suof()
1137 kfree(handle->sobj_handle); in qat_uclo_del_suof()
1138 handle->sobj_handle = NULL; in qat_uclo_del_suof()
1156 static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof() argument
1160 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof()
1173 ret = qat_uclo_map_suof_file_hdr(handle, suof_ptr, suof_size); in qat_uclo_map_suof()
1191 qat_uclo_map_simg(handle, &suof_img_hdr[i], in qat_uclo_map_suof()
1193 ret = qat_uclo_check_simg_compat(handle, in qat_uclo_map_suof()
1197 suof_img_hdr[i].ae_mask &= handle->cfg_ae_mask; in qat_uclo_map_suof()
1202 if (!handle->chip_info->tgroup_share_ustore) { in qat_uclo_map_suof()
1213 static int qat_uclo_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_auth_fw() argument
1224 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_auth_fw()
1225 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_auth_fw()
1226 fcu_dram_hi_csr = handle->chip_info->fcu_dram_addr_hi; in qat_uclo_auth_fw()
1227 fcu_dram_lo_csr = handle->chip_info->fcu_dram_addr_lo; in qat_uclo_auth_fw()
1229 SET_CAP_CSR(handle, fcu_dram_hi_csr, (bus_addr >> BITS_IN_DWORD)); in qat_uclo_auth_fw()
1230 SET_CAP_CSR(handle, fcu_dram_lo_csr, bus_addr); in qat_uclo_auth_fw()
1231 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_AUTH); in qat_uclo_auth_fw()
1235 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_auth_fw()
1248 static bool qat_uclo_is_broadcast(struct icp_qat_fw_loader_handle *handle, in qat_uclo_is_broadcast() argument
1253 if (!handle->chip_info->tgroup_share_ustore) in qat_uclo_is_broadcast()
1256 sobj_handle = (struct icp_qat_suof_handle *)handle->sobj_handle; in qat_uclo_is_broadcast()
1257 if (handle->hal_handle->admin_ae_mask & in qat_uclo_is_broadcast()
1264 static int qat_uclo_broadcast_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_broadcast_load_fw() argument
1267 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_broadcast_load_fw()
1274 if (handle->chip_info->tgroup_share_ustore) { in qat_uclo_broadcast_load_fw()
1275 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_broadcast_load_fw()
1276 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_broadcast_load_fw()
1277 fcu_loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_broadcast_load_fw()
1280 handle->pci_dev->device); in qat_uclo_broadcast_load_fw()
1284 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_broadcast_load_fw()
1285 if (qat_hal_check_ae_active(handle, (unsigned char)ae)) { in qat_uclo_broadcast_load_fw()
1295 SET_CAP_CSR(handle, FCU_ME_BROADCAST_MASK_TYPE, in qat_uclo_broadcast_load_fw()
1298 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_LOAD); in qat_uclo_broadcast_load_fw()
1302 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_broadcast_load_fw()
1309 ae_loaded = GET_CAP_CSR(handle, fcu_loaded_csr); in qat_uclo_broadcast_load_fw()
1310 ae_loaded >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_broadcast_load_fw()
1325 static int qat_uclo_simg_alloc(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_alloc() argument
1332 vptr = dma_alloc_coherent(&handle->pci_dev->dev, in qat_uclo_simg_alloc()
1342 static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_free() argument
1345 if (handle && dram_desc && dram_desc->dram_base_addr_v) { in qat_uclo_simg_free()
1346 dma_free_coherent(&handle->pci_dev->dev, in qat_uclo_simg_free()
1356 static void qat_uclo_ummap_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_ummap_auth_fw() argument
1367 qat_uclo_simg_free(handle, &dram_desc); in qat_uclo_ummap_auth_fw()
1371 static int qat_uclo_check_image(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_image() argument
1378 if (handle->chip_info->fw_auth) { in qat_uclo_check_image()
1380 unsigned int header_len = ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_check_image()
1413 static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_auth_fw() argument
1425 if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN)) { in qat_uclo_map_auth_fw()
1430 ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset : in qat_uclo_map_auth_fw()
1431 size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset; in qat_uclo_map_auth_fw()
1432 if (qat_uclo_simg_alloc(handle, &img_desc, length)) { in qat_uclo_map_auth_fw()
1458 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)); in qat_uclo_map_auth_fw()
1460 memset((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1461 0, ICP_QAT_CSS_FWSK_PAD_LEN(handle)); in qat_uclo_map_auth_fw()
1464 memcpy((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1465 ICP_QAT_CSS_FWSK_PAD_LEN(handle)), in qat_uclo_map_auth_fw()
1467 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1473 ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1474 virt_addr = virt_addr + ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1480 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1481 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle)), in qat_uclo_map_auth_fw()
1482 ICP_QAT_CSS_SIGNATURE_LEN(handle)); in qat_uclo_map_auth_fw()
1486 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1487 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1491 auth_desc->img_len = size - ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_auth_fw()
1493 (void *)(image + ICP_QAT_AE_IMG_OFFSET(handle)), in qat_uclo_map_auth_fw()
1513 virt_addr += ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1514 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1516 auth_desc->ae_mask = simg_ae_mode->ae_mask & handle->cfg_ae_mask; in qat_uclo_map_auth_fw()
1525 static int qat_uclo_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_load_fw() argument
1528 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_load_fw()
1534 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_load_fw()
1535 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_load_fw()
1536 loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_load_fw()
1538 for_each_set_bit(i, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_load_fw()
1543 if (qat_hal_check_ae_active(handle, i)) { in qat_uclo_load_fw()
1547 SET_CAP_CSR(handle, fcu_ctl_csr, in qat_uclo_load_fw()
1554 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_load_fw()
1557 loaded_aes = GET_CAP_CSR(handle, loaded_csr); in qat_uclo_load_fw()
1558 loaded_aes >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_load_fw()
1571 static int qat_uclo_map_suof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_obj() argument
1579 handle->sobj_handle = suof_handle; in qat_uclo_map_suof_obj()
1580 if (qat_uclo_map_suof(handle, addr_ptr, mem_size)) { in qat_uclo_map_suof_obj()
1581 qat_uclo_del_suof(handle); in qat_uclo_map_suof_obj()
1588 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_mimage() argument
1595 ret = qat_uclo_check_image(handle, addr_ptr, mem_size, CSS_MMP_FIRMWARE); in qat_uclo_wr_mimage()
1599 if (handle->chip_info->fw_auth) { in qat_uclo_wr_mimage()
1600 status = qat_uclo_map_auth_fw(handle, addr_ptr, mem_size, &desc); in qat_uclo_wr_mimage()
1602 status = qat_uclo_auth_fw(handle, desc); in qat_uclo_wr_mimage()
1603 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_mimage()
1605 if (handle->chip_info->mmp_sram_size < mem_size) { in qat_uclo_wr_mimage()
1609 qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size); in qat_uclo_wr_mimage()
1614 static int qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_uof_obj() argument
1635 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1636 if (qat_uclo_parse_uof_obj(handle)) in qat_uclo_map_uof_obj()
1641 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1650 static int qat_uclo_map_mof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_file_hdr() argument
1654 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_map_mof_file_hdr()
1677 static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_mof() argument
1679 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_del_mof()
1683 kfree(handle->mobj_handle); in qat_uclo_del_mof()
1684 handle->mobj_handle = NULL; in qat_uclo_del_mof()
1838 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_obj() argument
1864 handle->mobj_handle = mobj_handle; in qat_uclo_map_mof_obj()
1865 ret = qat_uclo_map_mof_file_hdr(handle, mof_ptr, mof_size); in qat_uclo_map_mof_obj()
1890 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_obj() argument
1898 (sizeof(handle->hal_handle->ae_mask) * 8)); in qat_uclo_map_obj()
1900 if (!handle || !addr_ptr || mem_size < 24) in qat_uclo_map_obj()
1904 ret = qat_uclo_map_mof_obj(handle, addr_ptr, mem_size, obj_name, in qat_uclo_map_obj()
1913 return (handle->chip_info->fw_auth) ? in qat_uclo_map_obj()
1914 qat_uclo_map_suof_obj(handle, obj_addr, obj_size) : in qat_uclo_map_obj()
1915 qat_uclo_map_uof_obj(handle, obj_addr, obj_size); in qat_uclo_map_obj()
1918 void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_obj() argument
1920 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj()
1923 if (handle->mobj_handle) in qat_uclo_del_obj()
1924 qat_uclo_del_mof(handle); in qat_uclo_del_obj()
1925 if (handle->sobj_handle) in qat_uclo_del_obj()
1926 qat_uclo_del_suof(handle); in qat_uclo_del_obj()
1934 for (a = 0; a < handle->hal_handle->ae_max_num; a++) in qat_uclo_del_obj()
1940 handle->obj_handle = NULL; in qat_uclo_del_obj()
1973 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_raw_page() argument
1978 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page()
1999 qat_hal_wr_uwords(handle, (unsigned char)ae, in qat_uclo_wr_uimage_raw_page()
2009 static void qat_uclo_wr_uimage_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_page() argument
2012 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page()
2013 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_wr_uimage_page()
2014 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_wr_uimage_page()
2028 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_wr_uimage_page()
2047 qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); in qat_uclo_wr_uimage_page()
2053 qat_hal_set_live_ctx(handle, (unsigned char)ae, in qat_uclo_wr_uimage_page()
2055 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, in qat_uclo_wr_uimage_page()
2060 static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_suof_img() argument
2064 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_wr_suof_img()
2069 ret = qat_uclo_check_image(handle, simg_hdr[i].simg_buf, in qat_uclo_wr_suof_img()
2075 if (qat_uclo_map_auth_fw(handle, in qat_uclo_wr_suof_img()
2081 if (qat_uclo_auth_fw(handle, desc)) in qat_uclo_wr_suof_img()
2083 if (qat_uclo_is_broadcast(handle, i)) { in qat_uclo_wr_suof_img()
2084 if (qat_uclo_broadcast_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2087 if (qat_uclo_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2090 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2094 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2098 static int qat_uclo_wr_uof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_uof_img() argument
2100 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img()
2103 if (qat_uclo_init_globals(handle)) in qat_uclo_wr_uof_img()
2108 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2110 qat_uclo_wr_uimage_page(handle, in qat_uclo_wr_uof_img()
2116 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_all_uimage() argument
2118 return (handle->chip_info->fw_auth) ? qat_uclo_wr_suof_img(handle) : in qat_uclo_wr_all_uimage()
2119 qat_uclo_wr_uof_img(handle); in qat_uclo_wr_all_uimage()
2122 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle, in qat_uclo_set_cfg_ae_mask() argument
2128 handle->cfg_ae_mask = cfg_ae_mask; in qat_uclo_set_cfg_ae_mask()