Lines Matching +full:in +full:- +full:between

1 // SPDX-License-Identifier: GPL-2.0
11 "Error due to un-priv read",
12 "Error due to un-secure read",
14 "Error due to un-priv write",
15 "Error due to un-secure write",
28 "External I/F write to un-mapped reg",
40 * hl_get_pb_block - return the relevant block within the block array
43 * @mm_reg_addr: register address in the desired block
62 dev_err(hdev->dev, "No protection domain was found for 0x%x\n", in hl_get_pb_block()
64 return -EDOM; in hl_get_pb_block()
68 * hl_unset_pb_in_block - clear a specific protection bit in a block
71 * @reg_offset: register offset will be converted to bit offset in pb block
79 dev_err(hdev->dev, in hl_unset_pb_in_block()
82 return -EINVAL; in hl_unset_pb_in_block()
85 UNSET_GLBL_SEC_BIT(sgs_entry->sec_array, in hl_unset_pb_in_block()
86 (reg_offset & (HL_BLOCK_SIZE - 1)) >> 2); in hl_unset_pb_in_block()
92 * hl_unsecure_register - locate the relevant block for this register and
115 reg_offset = (mm_reg_addr + offset) - pb_blocks[block_num]; in hl_unsecure_register()
121 * hl_unsecure_register_range - locate the relevant block for this register
147 reg_offset = (i + offset) - pb_blocks[block_num]; in hl_unsecure_register_range()
156 * hl_unsecure_registers - locate the relevant block for all registers and
186 * hl_unsecure_registers_range - locate the relevant block for all register
217 * hl_ack_pb_security_violations - Ack security violation
236 hdev->asic_funcs->pb_print_security_errors(hdev, in hl_ack_pb_security_violations()
244 * hl_config_glbl_sec - set pb in HW according to given pb array
260 if (hdev->pldm) in hl_config_glbl_sec()
274 * hl_secure_block - locally memsets a block to 0
292 * hl_init_pb_with_mask - set selected pb instances with mask in HW according
298 * @dcore_offset: offset between dcores
300 * @instance_offset: offset between instances
305 * @mask: enabled instances mask: 1- enabled, 0- disabled
319 return -ENOMEM; in hl_init_pb_with_mask()
345 * hl_init_pb - set pb in HW according to given configuration
350 * @dcore_offset: offset between dcores
352 * @instance_offset: offset between instances
371 * hl_init_pb_ranges_with_mask - set pb instances using mask in HW according to
378 * @dcore_offset: offset between dcores
380 * @instance_offset: offset between instances
385 * @mask: enabled instances mask: 1- enabled, 0- disabled
400 return -ENOMEM; in hl_init_pb_ranges_with_mask()
430 * hl_init_pb_ranges - set pb in HW according to given configuration unsecurring
436 * @dcore_offset: offset between dcores
438 * @instance_offset: offset between instances
458 * hl_init_pb_single_dcore - set pb for a single docre in HW
464 * @instance_offset: offset between instances
483 return -ENOMEM; in hl_init_pb_single_dcore()
504 * hl_init_pb_ranges_single_dcore - set pb for a single docre in HW according
512 * @instance_offset: offset between instances
531 return -ENOMEM; in hl_init_pb_ranges_single_dcore()
550 * hl_ack_pb_with_mask - ack pb with mask in HW according to given configuration
555 * @dcore_offset: offset between dcores
557 * @instance_offset: offset between instances
560 * @mask: enabled instances mask: 1- enabled, 0- disabled
585 * hl_ack_pb - ack pb in HW according to given configuration
590 * @dcore_offset: offset between dcores
592 * @instance_offset: offset between instances
607 * hl_ack_pb_single_dcore - ack pb for single docre in HW
613 * @instance_offset: offset between instances
636 u32 fw_block_base_address = block_info->base_addr + in hl_automated_get_block_base_addr()
637 major * block_info->major_offset + in hl_automated_get_block_base_addr()
638 minor * block_info->minor_offset + in hl_automated_get_block_base_addr()
639 sub_minor * block_info->sub_minor_offset; in hl_automated_get_block_base_addr()
640 struct asic_fixed_properties *prop = &hdev->asic_prop; in hl_automated_get_block_base_addr()
645 return (fw_block_base_address - lower_32_bits(prop->cfg_base_address)); in hl_automated_get_block_base_addr()
653 /* Check if block type is listed in the exclusion list of block types */ in hl_check_block_type_exclusion()
654 for (i = 0 ; i < skip_blocks_cfg->block_types_len ; i++) in hl_check_block_type_exclusion()
655 if (block_type == skip_blocks_cfg->block_types[i]) in hl_check_block_type_exclusion()
672 for (i = 0 ; i < skip_blocks_cfg->block_ranges_len ; i++) { in hl_check_block_range_exclusion()
673 blocks_in_range = (skip_blocks_cfg->block_ranges[i].end - in hl_check_block_range_exclusion()
674 skip_blocks_cfg->block_ranges[i].start) / in hl_check_block_range_exclusion()
677 block_base_addr_in_range = skip_blocks_cfg->block_ranges[i].start + in hl_check_block_range_exclusion()
690 struct asic_fixed_properties *prop = &hdev->asic_prop; in hl_read_glbl_errors()
691 struct hl_special_block_info *special_blocks = prop->special_blocks; in hl_read_glbl_errors()
694 base = current_block->base_addr - lower_32_bits(prop->cfg_base_address); in hl_read_glbl_errors()
697 block_base = base + major * current_block->major_offset + in hl_read_glbl_errors()
698 minor * current_block->minor_offset + in hl_read_glbl_errors()
699 sub_minor * current_block->sub_minor_offset; in hl_read_glbl_errors()
709 for (i = 0 ; i <= prop->glbl_err_max_cause_num ; i++) { in hl_read_glbl_errors()
711 dev_err_ratelimited(hdev->dev, in hl_read_glbl_errors()
714 prop->cfg_base_address + block_base + in hl_read_glbl_errors()
725 struct asic_fixed_properties *prop = &hdev->asic_prop; in hl_check_for_glbl_errors()
731 special_blocks_cfg.skip_blocks_cfg = &prop->skip_special_blocks_cfg; in hl_check_for_glbl_errors()
738 dev_err_ratelimited(hdev->dev, in hl_check_for_glbl_errors()
745 (struct hl_special_blocks_cfg *)ctx->data; in hl_iterate_special_blocks()
747 special_blocks_cfg->skip_blocks_cfg; in hl_iterate_special_blocks()
752 block_info_arr = hdev->asic_prop.special_blocks; in hl_iterate_special_blocks()
754 return -EINVAL; in hl_iterate_special_blocks()
756 num_blocks = hdev->asic_prop.num_of_special_blocks; in hl_iterate_special_blocks()
759 if (hl_check_block_type_exclusion(skip_blocks_cfg, block_info_arr->block_type)) in hl_iterate_special_blocks()
762 for (major = 0 ; major < block_info_arr->major ; major++) { in hl_iterate_special_blocks()
770 (skip_blocks_cfg->skip_block_hook && in hl_iterate_special_blocks()
771 skip_blocks_cfg->skip_block_hook(hdev, in hl_iterate_special_blocks()
778 rc = ctx->fn(hdev, blk_idx, major, minor, in hl_iterate_special_blocks()
779 sub_minor, ctx->data); in hl_iterate_special_blocks()
784 } while (sub_minor < block_info_arr->sub_minor); in hl_iterate_special_blocks()
787 } while (minor < block_info_arr->minor); in hl_iterate_special_blocks()