#include "gaudiP.h"
#include "../include/gaudi/gaudi_coresight.h"
#include "../include/gaudi/asic_reg/gaudi_regs.h"
#include "../include/gaudi/gaudi_masks.h"
#include "../include/gaudi/gaudi_reg_map.h"
#include <uapi/drm/habanalabs_accel.h>
#define SPMU_SECTION_SIZE …
#define SPMU_EVENT_TYPES_OFFSET …
#define SPMU_MAX_COUNTERS …
static u64 debug_stm_regs[GAUDI_STM_LAST + 1] = …;
static u64 debug_etf_regs[GAUDI_ETF_LAST + 1] = …;
static u64 debug_funnel_regs[GAUDI_FUNNEL_LAST + 1] = …;
static u64 debug_bmon_regs[GAUDI_BMON_LAST + 1] = …;
static u64 debug_spmu_regs[GAUDI_SPMU_LAST + 1] = …;
static int gaudi_coresight_timeout(struct hl_device *hdev, u64 addr,
int position, bool up)
{ … }
static int gaudi_config_stm(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
static int gaudi_config_etf(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
static bool gaudi_etr_validate_address(struct hl_device *hdev, u64 addr,
u64 size, bool *is_host)
{ … }
static int gaudi_config_etr(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
static int gaudi_config_funnel(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
static int gaudi_config_bmon(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
static int gaudi_config_spmu(struct hl_device *hdev,
struct hl_debug_params *params)
{ … }
int gaudi_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data)
{ … }
void gaudi_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx)
{ … }