hl_init_pb_with_mask(9)
π hl_init_pb_with_mask β kernel API manual, but make it a vibe π
okay so bestie, welcome to hl_init_pb_with_mask(9) β¨ this is the habanalabs kernel API manual, and this one function is literally the "set selected pb instances with mask in HW according to given configuration" girlie. she's giving very specific, very hardware, and honestly? iconic π₯
πΈ NAME πΈ
hl_init_pb_with_mask β sets the selected pb instances using a mask in HW, all according to the configuration you hand it. no cap, that's the whole job π
β¨ SYNOPSIS β¨
int hl_init_pb_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 u32 *user_regs_array , u32
user_regs_array_size , u64 mask );
like, look at her. ten arguments. she's high-maintenance and she knows it ππ
π¦ ARGUMENTS π¦
hdevβ pointer to thehl_devicestructure. your main character, fr.num_dcoresβ the number of decores you're applying the configuration to. π«Ά pro tip from the page: set it toHL_PB_SHAREDif you only need to apply it once.dcore_offsetβ the offset between decores.num_instancesβ how many instances you're applying the configuration to.instance_offsetβ the offset between instances.pb_blocksβ the blocks array.blocks_array_sizeβ the size of the blocks array.user_regs_arrayβ the unsecured register array.user_regs_array_sizeβ the size of the unsecured register array.maskβ the enabled instances mask, and the vibes are binary bestie:1means enabled,0means disabled. periodt. π
π SEE ALSO π
the kernel file itself lives at:
./drivers/accel/habanalabs/common/security.c
and the whole friend group shows up too π«Ά:
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(9)hl_init_pb_ranges_with_mask(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)
that's the whole page, bestie, no notes ππ
so this one came out of ./drivers/accel/habanalabs/common, dated October 2026 β go read the source if you want the deep lore, and remember: mask 1 is on, mask 0 is off, and that's on periodt πβ¨π₯
π¦ 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