#include "gaudi2_coresight_regs.h"
#include <uapi/drm/habanalabs_accel.h>
#define GAUDI2_PLDM_CORESIGHT_TIMEOUT_USEC …
#define SPMU_MAX_COUNTERS …
#define COMPONENT_ID_INVALID …
#define MAX_BMONS_PER_UNIT …
enum gaudi2_hif_hmmu_id { … };
enum gaudi2_xbar_edge_id { … };
struct component_config_offsets { … };
static u64 debug_stm_regs[GAUDI2_STM_LAST + 1] = …;
static u64 debug_etf_regs[GAUDI2_ETF_LAST + 1] = …;
static u64 debug_funnel_regs[GAUDI2_FUNNEL_LAST + 1] = …;
static u64 debug_bmon_regs[GAUDI2_BMON_LAST + 1] = …;
static u64 debug_spmu_regs[GAUDI2_SPMU_LAST + 1] = …;
static struct component_config_offsets xbar_edge_binning_cfg_table[XBAR_EDGE_ID_SIZE] = …;
static struct component_config_offsets hmmu_binning_cfg_table[HMMU_ID_SIZE] = …;
static struct component_config_offsets hbm_mc0_binning_cfg_table[HBM_ID_SIZE] = …;
static struct component_config_offsets hbm_mc1_binning_cfg_table[HBM_ID_SIZE] = …;
static struct component_config_offsets decoder_binning_cfg_table[DEC_ID_SIZE] = …;
static struct component_config_offsets edma_binning_cfg_table[EDMA_ID_SIZE] = …;
static struct component_config_offsets tpc_binning_cfg_table[TPC_ID_SIZE] = …;
static int gaudi2_coresight_timeout(struct hl_device *hdev, u64 addr,
int position, bool up)
{ … }
static int gaudi2_unlock_coresight_unit(struct hl_device *hdev,
const u64 base_reg)
{ … }
static int gaudi2_config_stm(struct hl_device *hdev, struct hl_debug_params *params)
{ … }
static int gaudi2_config_etf(struct hl_device *hdev, struct hl_debug_params *params)
{ … }
static int gaudi2_etr_validate_address(struct hl_device *hdev, u64 addr, u64 size)
{ … }
static int gaudi2_config_etr(struct hl_device *hdev, struct hl_ctx *ctx,
struct hl_debug_params *params)
{ … }
static int gaudi2_config_funnel(struct hl_device *hdev, struct hl_debug_params *params)
{ … }
static int gaudi2_config_bmon(struct hl_device *hdev, struct hl_debug_params *params)
{ … }
static int gaudi2_config_spmu(struct hl_device *hdev, struct hl_debug_params *params)
{ … }
int gaudi2_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data)
{ … }
void gaudi2_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx)
{ … }
static int gaudi2_coresight_set_disabled_components(struct hl_device *hdev, u32 unit_count,
u32 enabled_mask,
const struct component_config_offsets *binning_table)
{ … }
int gaudi2_coresight_init(struct hl_device *hdev)
{ … }