drivers/accel/habanalabs/gaudi2/gaudi2_security.c
Source file repositories/reference/linux-study-clean/drivers/accel/habanalabs/gaudi2/gaudi2_security.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/habanalabs/gaudi2/gaudi2_security.c- Extension
.c- Size
- 142084 bytes
- Lines
- 3874
- Domain
- Driver Families
- Bucket
- drivers/accel
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
gaudi2P.h../include/gaudi2/asic_reg/gaudi2_regs.h
Detected Declarations
struct rr_configstruct gaudi2_atypical_bp_blocksstruct gaudi2_tpc_pb_datastruct gaudi2_tpc_arc_pb_datastruct gaudi2_ack_pb_tpc_datafunction gaudi2_config_tpcs_glbl_secfunction gaudi2_init_pb_tpcfunction gaudi2_config_tpcs_pb_rangesfunction gaudi2_init_pb_tpc_arcfunction gaudi2_init_pb_sm_objsfunction gaudi2_write_lbw_range_registerfunction gaudi2_write_rr_to_all_lbw_rtrsfunction gaudi2_init_lbw_range_registers_securefunction gaudi2_init_lbw_range_registersfunction gaudi2_write_hbw_range_registerfunction gaudi2_write_hbw_rr_to_all_mstr_iffunction gaudi2_init_hbw_range_registersfunction gaudi2_write_mmu_range_registerfunction gaudi2_init_mmu_range_registersfunction gaudi2_init_range_registersfunction gaudi2_init_protection_bitsfunction gaudi2_init_securityfunction gaudi2_ack_pb_tpc_configfunction gaudi2_ack_pb_tpcfunction gaudi2_ack_protection_bits_errorsfunction gaudi2_pb_print_security_errors
Annotated Snippet
struct rr_config {
u64 min;
u64 max;
u32 index;
u8 type;
};
struct gaudi2_atypical_bp_blocks {
u32 mm_block_base_addr;
u32 block_size;
u32 glbl_sec_offset;
u32 glbl_sec_length;
};
static const struct gaudi2_atypical_bp_blocks gaudi2_pb_dcr0_sm_objs = {
mmDCORE0_SYNC_MNGR_OBJS_BASE,
128 * 1024,
SM_OBJS_PROT_BITS_OFFS,
640
};
static const u32 gaudi2_pb_sft0[] = {
mmSFT0_HBW_RTR_IF0_RTR_CTRL_BASE,
mmSFT0_HBW_RTR_IF0_RTR_H3_BASE,
mmSFT0_HBW_RTR_IF0_MSTR_IF_RR_SHRD_HBW_BASE,
mmSFT0_HBW_RTR_IF0_ADDR_DEC_HBW_BASE,
mmSFT0_HBW_RTR_IF1_RTR_CTRL_BASE,
mmSFT0_HBW_RTR_IF1_RTR_H3_BASE,
mmSFT0_HBW_RTR_IF1_MSTR_IF_RR_SHRD_HBW_BASE,
mmSFT0_HBW_RTR_IF1_ADDR_DEC_HBW_BASE,
mmSFT0_LBW_RTR_IF_RTR_CTRL_BASE,
mmSFT0_LBW_RTR_IF_RTR_H3_BASE,
mmSFT0_LBW_RTR_IF_MSTR_IF_RR_SHRD_HBW_BASE,
mmSFT0_LBW_RTR_IF_ADDR_DEC_HBW_BASE,
mmSFT0_BASE,
};
static const u32 gaudi2_pb_dcr0_hif[] = {
mmDCORE0_HIF0_BASE,
};
static const u32 gaudi2_pb_dcr0_rtr0[] = {
mmDCORE0_RTR0_CTRL_BASE,
mmDCORE0_RTR0_H3_BASE,
mmDCORE0_RTR0_MSTR_IF_RR_SHRD_HBW_BASE,
mmDCORE0_RTR0_ADD_DEC_HBW_BASE,
mmDCORE0_RTR0_BASE,
mmDCORE0_RTR0_DBG_ADDR_BASE,
};
static const u32 gaudi2_pb_dcr0_hmmu0[] = {
mmDCORE0_HMMU0_MMU_BASE,
mmDCORE0_HMMU0_MSTR_IF_RR_SHRD_HBW_BASE,
mmDCORE0_HMMU0_SCRAMB_OUT_BASE,
mmDCORE0_HMMU0_STLB_BASE,
};
static const u32 gaudi2_pb_cpu_if[] = {
mmCPU_IF_BASE,
};
static const u32 gaudi2_pb_cpu[] = {
mmCPU_CA53_CFG_BASE,
mmCPU_MSTR_IF_RR_SHRD_HBW_BASE,
};
static const u32 gaudi2_pb_kdma[] = {
mmARC_FARM_KDMA_BASE,
mmARC_FARM_KDMA_MSTR_IF_RR_SHRD_HBW_BASE,
};
static const u32 gaudi2_pb_pdma0[] = {
mmPDMA0_CORE_BASE,
mmPDMA0_MSTR_IF_RR_SHRD_HBW_BASE,
mmPDMA0_QM_BASE,
};
static const u32 gaudi2_pb_pdma0_arc[] = {
mmPDMA0_QM_ARC_AUX_BASE,
};
static const struct range gaudi2_pb_pdma0_arc_unsecured_regs[] = {
{mmPDMA0_QM_ARC_AUX_RUN_HALT_REQ, mmPDMA0_QM_ARC_AUX_RUN_HALT_ACK},
{mmPDMA0_QM_ARC_AUX_CLUSTER_NUM, mmPDMA0_QM_ARC_AUX_WAKE_UP_EVENT},
{mmPDMA0_QM_ARC_AUX_ARC_RST_REQ, mmPDMA0_QM_ARC_AUX_CID_OFFSET_7},
{mmPDMA0_QM_ARC_AUX_SCRATCHPAD_0, mmPDMA0_QM_ARC_AUX_INFLIGHT_LBU_RD_CNT},
{mmPDMA0_QM_ARC_AUX_CBU_EARLY_BRESP_EN, mmPDMA0_QM_ARC_AUX_CBU_EARLY_BRESP_EN},
{mmPDMA0_QM_ARC_AUX_LBU_EARLY_BRESP_EN, mmPDMA0_QM_ARC_AUX_LBU_EARLY_BRESP_EN},
{mmPDMA0_QM_ARC_AUX_DCCM_QUEUE_BASE_ADDR_0, mmPDMA0_QM_ARC_AUX_DCCM_QUEUE_ALERT_MSG},
{mmPDMA0_QM_ARC_AUX_DCCM_Q_PUSH_FIFO_CNT, mmPDMA0_QM_ARC_AUX_QMAN_ARC_CQ_SHADOW_CI},
Annotation
- Immediate include surface: `gaudi2P.h`, `../include/gaudi2/asic_reg/gaudi2_regs.h`.
- Detected declarations: `struct rr_config`, `struct gaudi2_atypical_bp_blocks`, `struct gaudi2_tpc_pb_data`, `struct gaudi2_tpc_arc_pb_data`, `struct gaudi2_ack_pb_tpc_data`, `function gaudi2_config_tpcs_glbl_sec`, `function gaudi2_init_pb_tpc`, `function gaudi2_config_tpcs_pb_ranges`, `function gaudi2_init_pb_tpc_arc`, `function gaudi2_init_pb_sm_objs`.
- Atlas domain: Driver Families / drivers/accel.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.