include/linux/habanalabs/hl_boot_if.h
Source file repositories/reference/linux-study-clean/include/linux/habanalabs/hl_boot_if.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/habanalabs/hl_boot_if.h- Extension
.h- Size
- 27737 bytes
- Lines
- 808
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct cpu_dyn_regsstruct lkd_fw_binning_infostruct comms_desc_headerstruct comms_msg_headerstruct lkd_fw_ascii_msgstruct lkd_fw_comms_descstruct lkd_fw_comms_msgstruct comms_commandstruct comms_statusstruct hl_module_datastruct hl_component_versionsenum cpu_boot_errenum cpu_boot_dev_stsenum cpu_boot_statusenum kmd_msgenum cpu_msg_statusenum comms_msg_typeenum lkd_fw_ascii_msg_lvlsenum comms_reset_causeenum comms_cmdenum comms_stsenum comms_ram_types
Annotated Snippet
struct cpu_dyn_regs {
__le32 cpu_pq_base_addr_low;
__le32 cpu_pq_base_addr_high;
__le32 cpu_pq_length;
__le32 cpu_pq_init_status;
__le32 cpu_eq_base_addr_low;
__le32 cpu_eq_base_addr_high;
__le32 cpu_eq_length;
__le32 cpu_eq_ci;
__le32 cpu_cq_base_addr_low;
__le32 cpu_cq_base_addr_high;
__le32 cpu_cq_length;
__le32 cpu_pf_pq_pi;
__le32 cpu_boot_dev_sts0;
__le32 cpu_boot_dev_sts1;
__le32 cpu_boot_err0;
__le32 cpu_boot_err1;
__le32 cpu_boot_status;
__le32 fw_upd_sts;
__le32 fw_upd_cmd;
__le32 fw_upd_pending_sts;
__le32 fuse_ver_offset;
__le32 preboot_ver_offset;
__le32 uboot_ver_offset;
__le32 hw_state;
__le32 kmd_msg_to_cpu;
__le32 cpu_cmd_status_to_host;
__le32 gic_host_pi_upd_irq;
__le32 gic_tpc_qm_irq_ctrl;
__le32 gic_mme_qm_irq_ctrl;
__le32 gic_dma_qm_irq_ctrl;
__le32 gic_nic_qm_irq_ctrl;
__le32 gic_dma_core_irq_ctrl;
__le32 gic_host_halt_irq;
__le32 gic_host_ints_irq;
__le32 reserved0;
__le32 gic_rot_qm_irq_ctrl;
__le32 reserved1;
__le32 eng_arc_irq_ctrl;
__le32 reserved2[20]; /* reserve for future use */
};
/* TODO: remove the desc magic after the code is updated to use message */
/* HCDM - Habana Communications Descriptor Magic */
#define HL_COMMS_DESC_MAGIC 0x4843444D
#define HL_COMMS_DESC_VER 3
/* HCMv - Habana Communications Message + header version */
#define HL_COMMS_MSG_MAGIC_VALUE 0x48434D00
#define HL_COMMS_MSG_MAGIC_MASK 0xFFFFFF00
#define HL_COMMS_MSG_MAGIC_VER_MASK 0xFF
#define HL_COMMS_MSG_MAGIC_VER(ver) (HL_COMMS_MSG_MAGIC_VALUE | \
((ver) & HL_COMMS_MSG_MAGIC_VER_MASK))
#define HL_COMMS_MSG_MAGIC_V0 HL_COMMS_DESC_MAGIC
#define HL_COMMS_MSG_MAGIC_V1 HL_COMMS_MSG_MAGIC_VER(1)
#define HL_COMMS_MSG_MAGIC_V2 HL_COMMS_MSG_MAGIC_VER(2)
#define HL_COMMS_MSG_MAGIC_V3 HL_COMMS_MSG_MAGIC_VER(3)
#define HL_COMMS_MSG_MAGIC HL_COMMS_MSG_MAGIC_V3
#define HL_COMMS_MSG_MAGIC_VALIDATE_MAGIC(magic) \
(((magic) & HL_COMMS_MSG_MAGIC_MASK) == \
HL_COMMS_MSG_MAGIC_VALUE)
#define HL_COMMS_MSG_MAGIC_VALIDATE_VERSION(magic, ver) \
(((magic) & HL_COMMS_MSG_MAGIC_VER_MASK) >= \
((ver) & HL_COMMS_MSG_MAGIC_VER_MASK))
#define HL_COMMS_MSG_MAGIC_VALIDATE(magic, ver) \
(HL_COMMS_MSG_MAGIC_VALIDATE_MAGIC((magic)) && \
HL_COMMS_MSG_MAGIC_VALIDATE_VERSION((magic), (ver)))
enum comms_msg_type {
HL_COMMS_DESC_TYPE = 0,
HL_COMMS_RESET_CAUSE_TYPE = 1,
HL_COMMS_FW_CFG_SKIP_TYPE = 2,
HL_COMMS_BINNING_CONF_TYPE = 3,
};
/*
* Binning information shared between LKD and FW
* @tpc_mask_l - TPC binning information lower 64 bit
* @dec_mask - Decoder binning information
* @dram_mask - DRAM binning information
* @edma_mask - EDMA binning information
* @mme_mask_l - MME binning information lower 32
* @mme_mask_h - MME binning information upper 32
* @rot_mask - Rotator binning information
* @xbar_mask - xBAR binning information
Annotation
- Detected declarations: `struct cpu_dyn_regs`, `struct lkd_fw_binning_info`, `struct comms_desc_header`, `struct comms_msg_header`, `struct lkd_fw_ascii_msg`, `struct lkd_fw_comms_desc`, `struct lkd_fw_comms_msg`, `struct comms_command`, `struct comms_status`, `struct hl_module_data`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.