hl_init_pb_ranges_with_mask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to hl_device structure. it's the device handle, the main character of this whole function tbh πŸ‘‘
  • num_dcores β€” number of decores to apply configuration to. set it to HL_PB_SHARED if 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 🌈

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 the hl_init_pb_ranges_with_mask(9) manual entry β€” so if you cite it, cite it right bestie πŸ’…βœ¨ bye πŸ’œ
πŸ“¦ where this page comes from