hl_init_pb(9)
π hl_init_pb(9) β like, the Kernel API Manual page, but make it make sense π
okay so. bestie. gather round. this is hl_init_pb from the Kernel API Manual, and it is literally the function that sets up pb in the HW according to whatever configuration you hand it. that's the whole vibe. no cap. π
β¨ NAME β¨
hl_init_pb β set pb in HW according to given configuration π«Ά
πΈ SYNOPSIS πΈ
int hl_init_pb (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 );
it's giving "lots of arguments" energy and honestly? iconic of it. π
π¦ ARGUMENTS π¦
hdevβ pointer tohl_devicestructure. that's your device, your main character, the whole reason we're here πnum_dcoresβ number of decores to apply configuration to. and listen β set this toHL_PB_SHAREDif you need it applied only once. lowkey important, don't skip that part β¨dcore_offsetβ offset between dcores. yes bestie, the spacing between them πnum_instancesβ number of instances to apply configuration to πΈinstance_offsetβ offset between instances. again with the spacing, it's a theme πpb_blocksβ blocks array πblocks_array_sizeβ blocks array size. it's the size. of the blocks array. fr fr π«Άuser_regs_arrayβ unsecured register array πuser_regs_array_sizeβ unsecured register array size. matching size for the matching array, we love consistency π
π§ SEE ALSO π§
kernel file ./drivers/accel/habanalabs/common/security.c β go read the source, iykyk π
and the whole friend group, all linked up:
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_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)
like, that's the entire squad. go say hi. π
okay that's the page!! this was brought to you by ./drivers/accel/habanalabs/common, dated October 2026. mwah. slay. 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