• Home
  • Raw
  • Download

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()
399 qat_hal_wr_uwords(handle, (unsigned char)ae, 0, in qat_uclo_init_ustore()
401 qat_hal_wr_uwords(handle, (unsigned char)ae, patt_pos, in qat_uclo_init_ustore()
409 static int qat_uclo_init_memory(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_memory() argument
412 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_memory()
414 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_memory()
418 if (qat_uclo_init_ae_memory(handle, initmem)) in qat_uclo_init_memory()
428 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_memory()
429 if (qat_hal_batch_wr_lm(handle, ae, in qat_uclo_init_memory()
434 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
436 qat_uclo_batch_wr_umem(handle, ae, in qat_uclo_init_memory()
438 qat_uclo_cleanup_batch_init_list(handle, in qat_uclo_init_memory()
654 static int qat_uclo_map_ae(struct icp_qat_fw_loader_handle *handle, int max_ae) in qat_uclo_map_ae() argument
658 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_map_ae()
659 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_map_ae()
660 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_map_ae()
721 qat_uclo_get_dev_type(struct icp_qat_fw_loader_handle *handle) in qat_uclo_get_dev_type() argument
723 switch (handle->pci_dev->device) { in qat_uclo_get_dev_type()
734 handle->pci_dev->device); in qat_uclo_get_dev_type()
758 static int qat_uclo_init_reg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg() argument
770 return qat_hal_init_gpr(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
782 return qat_hal_init_rd_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
790 return qat_hal_init_wr_xfer(handle, ae, ctx_mask, reg_type, in qat_uclo_init_reg()
793 return qat_hal_init_nn(handle, ae, ctx_mask, reg_addr, value); in qat_uclo_init_reg()
801 static int qat_uclo_init_reg_sym(struct icp_qat_fw_loader_handle *handle, in qat_uclo_init_reg_sym() argument
822 qat_uclo_init_reg(handle, ae, ctx_mask, in qat_uclo_init_reg_sym()
835 qat_uclo_init_reg(handle, ae, in qat_uclo_init_reg_sym()
856 static int qat_uclo_init_globals(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_globals() argument
858 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_globals()
859 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_init_globals()
866 if (qat_uclo_init_memory(handle)) { in qat_uclo_init_globals()
872 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_init_globals()
877 if (qat_uclo_init_reg_sym(handle, ae, aed->ae_slices[s].encap_image)) in qat_uclo_init_globals()
885 static int qat_hal_set_modes(struct icp_qat_fw_loader_handle *handle, in qat_hal_set_modes() argument
894 ret = qat_hal_set_ae_ctx_mode(handle, ae, mode); in qat_hal_set_modes()
899 if (handle->chip_info->nn) { in qat_hal_set_modes()
901 ret = qat_hal_set_ae_nn_mode(handle, ae, mode); in qat_hal_set_modes()
908 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM0, mode); in qat_hal_set_modes()
914 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM1, mode); in qat_hal_set_modes()
919 if (handle->chip_info->lm2lm3) { in qat_hal_set_modes()
921 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM2, mode); in qat_hal_set_modes()
927 ret = qat_hal_set_ae_lm_mode(handle, ae, ICP_LMEM3, mode); in qat_hal_set_modes()
933 qat_hal_set_ae_tindex_mode(handle, ae, mode); in qat_hal_set_modes()
938 static int qat_uclo_set_ae_mode(struct icp_qat_fw_loader_handle *handle) in qat_uclo_set_ae_mode() argument
942 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_set_ae_mode()
943 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_set_ae_mode()
944 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_set_ae_mode()
948 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_set_ae_mode()
958 error = qat_hal_set_modes(handle, obj_handle, ae, in qat_uclo_set_ae_mode()
967 static void qat_uclo_init_uword_num(struct icp_qat_fw_loader_handle *handle) in qat_uclo_init_uword_num() argument
969 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_init_uword_num()
980 static int qat_uclo_parse_uof_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_parse_uof_obj() argument
982 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_parse_uof_obj()
989 obj_handle->prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_parse_uof_obj()
991 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_parse_uof_obj()
1012 if (qat_uclo_map_ae(handle, handle->hal_handle->ae_max_num)) { in qat_uclo_parse_uof_obj()
1016 qat_uclo_init_uword_num(handle); in qat_uclo_parse_uof_obj()
1019 if (qat_uclo_set_ae_mode(handle)) in qat_uclo_parse_uof_obj()
1030 static int qat_uclo_map_suof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_file_hdr() argument
1036 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof_file_hdr()
1056 static void qat_uclo_map_simg(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_simg() argument
1060 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_simg()
1075 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_simg()
1076 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle); in qat_uclo_map_simg()
1078 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_simg()
1102 static int qat_uclo_check_simg_compat(struct icp_qat_fw_loader_handle *handle, in qat_uclo_check_simg_compat() argument
1108 prod_type = qat_uclo_get_dev_type(handle); in qat_uclo_check_simg_compat()
1111 (PID_MINOR_REV & handle->hal_handle->revision_id); in qat_uclo_check_simg_compat()
1126 static void qat_uclo_del_suof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_suof() argument
1128 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_del_suof()
1132 kfree(handle->sobj_handle); in qat_uclo_del_suof()
1133 handle->sobj_handle = NULL; in qat_uclo_del_suof()
1151 static int qat_uclo_map_suof(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof() argument
1155 struct icp_qat_suof_handle *suof_handle = handle->sobj_handle; in qat_uclo_map_suof()
1168 ret = qat_uclo_map_suof_file_hdr(handle, suof_ptr, suof_size); in qat_uclo_map_suof()
1186 qat_uclo_map_simg(handle, &suof_img_hdr[i], in qat_uclo_map_suof()
1188 ret = qat_uclo_check_simg_compat(handle, in qat_uclo_map_suof()
1192 suof_img_hdr[i].ae_mask &= handle->cfg_ae_mask; in qat_uclo_map_suof()
1197 if (!handle->chip_info->tgroup_share_ustore) { in qat_uclo_map_suof()
1208 static int qat_uclo_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_auth_fw() argument
1219 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_auth_fw()
1220 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_auth_fw()
1221 fcu_dram_hi_csr = handle->chip_info->fcu_dram_addr_hi; in qat_uclo_auth_fw()
1222 fcu_dram_lo_csr = handle->chip_info->fcu_dram_addr_lo; in qat_uclo_auth_fw()
1224 SET_CAP_CSR(handle, fcu_dram_hi_csr, (bus_addr >> BITS_IN_DWORD)); in qat_uclo_auth_fw()
1225 SET_CAP_CSR(handle, fcu_dram_lo_csr, bus_addr); in qat_uclo_auth_fw()
1226 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_AUTH); in qat_uclo_auth_fw()
1230 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_auth_fw()
1243 static bool qat_uclo_is_broadcast(struct icp_qat_fw_loader_handle *handle, in qat_uclo_is_broadcast() argument
1248 if (!handle->chip_info->tgroup_share_ustore) in qat_uclo_is_broadcast()
1251 sobj_handle = (struct icp_qat_suof_handle *)handle->sobj_handle; in qat_uclo_is_broadcast()
1252 if (handle->hal_handle->admin_ae_mask & in qat_uclo_is_broadcast()
1259 static int qat_uclo_broadcast_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_broadcast_load_fw() argument
1262 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_broadcast_load_fw()
1269 if (handle->chip_info->tgroup_share_ustore) { in qat_uclo_broadcast_load_fw()
1270 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_broadcast_load_fw()
1271 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_broadcast_load_fw()
1272 fcu_loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_broadcast_load_fw()
1275 handle->pci_dev->device); in qat_uclo_broadcast_load_fw()
1279 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_broadcast_load_fw()
1280 if (qat_hal_check_ae_active(handle, (unsigned char)ae)) { in qat_uclo_broadcast_load_fw()
1290 SET_CAP_CSR(handle, FCU_ME_BROADCAST_MASK_TYPE, in qat_uclo_broadcast_load_fw()
1293 SET_CAP_CSR(handle, fcu_ctl_csr, FCU_CTRL_CMD_LOAD); in qat_uclo_broadcast_load_fw()
1297 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_broadcast_load_fw()
1304 ae_loaded = GET_CAP_CSR(handle, fcu_loaded_csr); in qat_uclo_broadcast_load_fw()
1305 ae_loaded >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_broadcast_load_fw()
1320 static int qat_uclo_simg_alloc(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_alloc() argument
1327 vptr = dma_alloc_coherent(&handle->pci_dev->dev, in qat_uclo_simg_alloc()
1337 static void qat_uclo_simg_free(struct icp_qat_fw_loader_handle *handle, in qat_uclo_simg_free() argument
1340 if (handle && dram_desc && dram_desc->dram_base_addr_v) { in qat_uclo_simg_free()
1341 dma_free_coherent(&handle->pci_dev->dev, in qat_uclo_simg_free()
1351 static void qat_uclo_ummap_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_ummap_auth_fw() argument
1362 qat_uclo_simg_free(handle, &dram_desc); in qat_uclo_ummap_auth_fw()
1366 static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_auth_fw() argument
1378 if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_MAX_IMAGE_LEN)) { in qat_uclo_map_auth_fw()
1383 ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset : in qat_uclo_map_auth_fw()
1384 size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset; in qat_uclo_map_auth_fw()
1385 if (qat_uclo_simg_alloc(handle, &img_desc, length)) { in qat_uclo_map_auth_fw()
1411 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)); in qat_uclo_map_auth_fw()
1413 memset((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1414 0, ICP_QAT_CSS_FWSK_PAD_LEN(handle)); in qat_uclo_map_auth_fw()
1417 memcpy((void *)(uintptr_t)(virt_addr + ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1418 ICP_QAT_CSS_FWSK_PAD_LEN(handle)), in qat_uclo_map_auth_fw()
1420 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle)), in qat_uclo_map_auth_fw()
1426 ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1427 virt_addr = virt_addr + ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1433 ICP_QAT_CSS_FWSK_MODULUS_LEN(handle) + in qat_uclo_map_auth_fw()
1434 ICP_QAT_CSS_FWSK_EXPONENT_LEN(handle)), in qat_uclo_map_auth_fw()
1435 ICP_QAT_CSS_SIGNATURE_LEN(handle)); in qat_uclo_map_auth_fw()
1439 ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1440 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1444 auth_desc->img_len = size - ICP_QAT_AE_IMG_OFFSET(handle); in qat_uclo_map_auth_fw()
1446 (void *)(image + ICP_QAT_AE_IMG_OFFSET(handle)), in qat_uclo_map_auth_fw()
1466 virt_addr += ICP_QAT_CSS_FWSK_PUB_LEN(handle); in qat_uclo_map_auth_fw()
1467 virt_addr += ICP_QAT_CSS_SIGNATURE_LEN(handle); in qat_uclo_map_auth_fw()
1469 auth_desc->ae_mask = simg_ae_mode->ae_mask & handle->cfg_ae_mask; in qat_uclo_map_auth_fw()
1478 static int qat_uclo_load_fw(struct icp_qat_fw_loader_handle *handle, in qat_uclo_load_fw() argument
1481 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_load_fw()
1487 fcu_ctl_csr = handle->chip_info->fcu_ctl_csr; in qat_uclo_load_fw()
1488 fcu_sts_csr = handle->chip_info->fcu_sts_csr; in qat_uclo_load_fw()
1489 loaded_csr = handle->chip_info->fcu_loaded_ae_csr; in qat_uclo_load_fw()
1491 for_each_set_bit(i, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_load_fw()
1496 if (qat_hal_check_ae_active(handle, i)) { in qat_uclo_load_fw()
1500 SET_CAP_CSR(handle, fcu_ctl_csr, in qat_uclo_load_fw()
1507 fcu_sts = GET_CAP_CSR(handle, fcu_sts_csr); in qat_uclo_load_fw()
1510 loaded_aes = GET_CAP_CSR(handle, loaded_csr); in qat_uclo_load_fw()
1511 loaded_aes >>= handle->chip_info->fcu_loaded_ae_pos; in qat_uclo_load_fw()
1524 static int qat_uclo_map_suof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_suof_obj() argument
1532 handle->sobj_handle = suof_handle; in qat_uclo_map_suof_obj()
1533 if (qat_uclo_map_suof(handle, addr_ptr, mem_size)) { in qat_uclo_map_suof_obj()
1534 qat_uclo_del_suof(handle); in qat_uclo_map_suof_obj()
1541 int qat_uclo_wr_mimage(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_mimage() argument
1547 if (handle->chip_info->fw_auth) { in qat_uclo_wr_mimage()
1548 status = qat_uclo_map_auth_fw(handle, addr_ptr, mem_size, &desc); in qat_uclo_wr_mimage()
1550 status = qat_uclo_auth_fw(handle, desc); in qat_uclo_wr_mimage()
1551 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_mimage()
1553 if (handle->chip_info->mmp_sram_size < mem_size) { in qat_uclo_wr_mimage()
1557 qat_uclo_wr_sram_by_words(handle, 0, addr_ptr, mem_size); in qat_uclo_wr_mimage()
1562 static int qat_uclo_map_uof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_uof_obj() argument
1583 handle->obj_handle = objhdl; in qat_uclo_map_uof_obj()
1584 if (qat_uclo_parse_uof_obj(handle)) in qat_uclo_map_uof_obj()
1589 handle->obj_handle = NULL; in qat_uclo_map_uof_obj()
1598 static int qat_uclo_map_mof_file_hdr(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_file_hdr() argument
1602 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_map_mof_file_hdr()
1625 static void qat_uclo_del_mof(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_mof() argument
1627 struct icp_qat_mof_handle *mobj_handle = handle->mobj_handle; in qat_uclo_del_mof()
1631 kfree(handle->mobj_handle); in qat_uclo_del_mof()
1632 handle->mobj_handle = NULL; in qat_uclo_del_mof()
1786 static int qat_uclo_map_mof_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_mof_obj() argument
1812 handle->mobj_handle = mobj_handle; in qat_uclo_map_mof_obj()
1813 ret = qat_uclo_map_mof_file_hdr(handle, mof_ptr, mof_size); in qat_uclo_map_mof_obj()
1838 int qat_uclo_map_obj(struct icp_qat_fw_loader_handle *handle, in qat_uclo_map_obj() argument
1846 (sizeof(handle->hal_handle->ae_mask) * 8)); in qat_uclo_map_obj()
1848 if (!handle || !addr_ptr || mem_size < 24) in qat_uclo_map_obj()
1852 ret = qat_uclo_map_mof_obj(handle, addr_ptr, mem_size, obj_name, in qat_uclo_map_obj()
1861 return (handle->chip_info->fw_auth) ? in qat_uclo_map_obj()
1862 qat_uclo_map_suof_obj(handle, obj_addr, obj_size) : in qat_uclo_map_obj()
1863 qat_uclo_map_uof_obj(handle, obj_addr, obj_size); in qat_uclo_map_obj()
1866 void qat_uclo_del_obj(struct icp_qat_fw_loader_handle *handle) in qat_uclo_del_obj() argument
1868 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_del_obj()
1871 if (handle->mobj_handle) in qat_uclo_del_obj()
1872 qat_uclo_del_mof(handle); in qat_uclo_del_obj()
1873 if (handle->sobj_handle) in qat_uclo_del_obj()
1874 qat_uclo_del_suof(handle); in qat_uclo_del_obj()
1882 for (a = 0; a < handle->hal_handle->ae_max_num; a++) in qat_uclo_del_obj()
1888 handle->obj_handle = NULL; in qat_uclo_del_obj()
1921 static void qat_uclo_wr_uimage_raw_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_raw_page() argument
1926 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_raw_page()
1950 qat_hal_wr_uwords(handle, (unsigned char)ae, in qat_uclo_wr_uimage_raw_page()
1960 static void qat_uclo_wr_uimage_page(struct icp_qat_fw_loader_handle *handle, in qat_uclo_wr_uimage_page() argument
1963 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uimage_page()
1964 unsigned long ae_mask = handle->hal_handle->ae_mask; in qat_uclo_wr_uimage_page()
1965 unsigned long cfg_ae_mask = handle->cfg_ae_mask; in qat_uclo_wr_uimage_page()
1979 for_each_set_bit(ae, &ae_mask, handle->hal_handle->ae_max_num) { in qat_uclo_wr_uimage_page()
1998 qat_uclo_wr_uimage_raw_page(handle, page->encap_page, ae); in qat_uclo_wr_uimage_page()
2004 qat_hal_set_live_ctx(handle, (unsigned char)ae, in qat_uclo_wr_uimage_page()
2006 qat_hal_set_pc(handle, (unsigned char)ae, image->ctx_assigned, in qat_uclo_wr_uimage_page()
2011 static int qat_uclo_wr_suof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_suof_img() argument
2015 struct icp_qat_suof_handle *sobj_handle = handle->sobj_handle; in qat_uclo_wr_suof_img()
2019 if (qat_uclo_map_auth_fw(handle, in qat_uclo_wr_suof_img()
2025 if (qat_uclo_auth_fw(handle, desc)) in qat_uclo_wr_suof_img()
2027 if (qat_uclo_is_broadcast(handle, i)) { in qat_uclo_wr_suof_img()
2028 if (qat_uclo_broadcast_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2031 if (qat_uclo_load_fw(handle, desc)) in qat_uclo_wr_suof_img()
2034 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2038 qat_uclo_ummap_auth_fw(handle, &desc); in qat_uclo_wr_suof_img()
2042 static int qat_uclo_wr_uof_img(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_uof_img() argument
2044 struct icp_qat_uclo_objhandle *obj_handle = handle->obj_handle; in qat_uclo_wr_uof_img()
2047 if (qat_uclo_init_globals(handle)) in qat_uclo_wr_uof_img()
2052 if (qat_uclo_init_ustore(handle, &obj_handle->ae_uimage[i])) in qat_uclo_wr_uof_img()
2054 qat_uclo_wr_uimage_page(handle, in qat_uclo_wr_uof_img()
2060 int qat_uclo_wr_all_uimage(struct icp_qat_fw_loader_handle *handle) in qat_uclo_wr_all_uimage() argument
2062 return (handle->chip_info->fw_auth) ? qat_uclo_wr_suof_img(handle) : in qat_uclo_wr_all_uimage()
2063 qat_uclo_wr_uof_img(handle); in qat_uclo_wr_all_uimage()
2066 int qat_uclo_set_cfg_ae_mask(struct icp_qat_fw_loader_handle *handle, in qat_uclo_set_cfg_ae_mask() argument
2072 handle->cfg_ae_mask = cfg_ae_mask; in qat_uclo_set_cfg_ae_mask()