hl_init_pb_ranges_with_mask(9)
π hl_init_pb_ranges_with_mask(9) β the Linux Kernel API tea π«Ά
okay so bestie, welcome to the Kernel API Manual entry for hl_init_pb_ranges_with_mask β¨ this one lives in the kernel, section 9, and honestly? it's giving "security guard but make it register ranges" π
πΈ NAME πΈ
hl_init_pb_ranges_with_mask β set pb instances using mask in HW according to given configuration, unsecurring ranges of registers instead of specific registers π
like, literally the whole vibe: you got a mask, you got a config, and instead of poking individual registers you're unsecuring whole ranges. slay π₯
β¨ SYNOPSIS β¨
int hl_init_pb_ranges_with_mask (struct hl_device *hdev , u32 num_dcores
, u32 dcore_offset , u32 num_instances , u32 instance_offset , const u32
pb_blocks[] , u32 blocks_array_size , const struct range
*user_regs_range_array , u32 user_regs_range_array_size , u64 mask );
it returns an int, bestie β keep that in mind π
π¦ ARGUMENTS π¦
hdevβ pointer tohl_devicestructure. it's the device handle, the main character of this whole function tbh πnum_dcoresβ number of decores to apply configuration to. set it toHL_PB_SHAREDif you only need to apply it once, iykyk πdcore_offsetβ offset between dcores β¨num_instancesβ number of instances to apply configuration to πΈinstance_offsetβ offset between instances πpb_blocksβ blocks array πblocks_array_sizeβ blocks array size, fr fr it's just the size of that array π«Άuser_regs_range_arrayβ unsecured register range array. yes, range array, that's the whole point of this function πuser_regs_range_array_sizeβ unsecured register range array size πmaskβ enabled instances mask:1= enabled,0= disabled. simple as that, periodt β
π SEE ALSO π
- Kernel file
./drivers/accel/habanalabs/common/security.cβ go read it, it ate π hl_get_pb_block(9)hl_unset_pb_in_block(9)hl_unsecure_register(9)hl_unsecure_register_range(9)hl_unsecure_registers(9)hl_unsecure_registers_range(9)hl_ack_pb_security_violations(9)hl_config_glbl_sec(9)hl_secure_block(9)hl_init_pb_with_mask(9)hl_init_pb(9)hl_init_pb_ranges(9)hl_init_pb_single_dcore(9)hl_init_pb_ranges_single_dcore(9)hl_ack_pb_with_mask(9)hl_ack_pb(9)hl_ack_pb_single_dcore(9)
like, the whole habanalabs security friend group came out for this one ππ«Ά
ngl this page is from./drivers/accel/habanalabs/common, dated October 2026, and it's thehl_init_pb_ranges_with_mask(9)manual entry β so if you cite it, cite it right bestie π β¨ bye π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms