#ifndef GAUDI2P_H_
#define GAUDI2P_H_
#include <uapi/drm/habanalabs_accel.h>
#include "../common/habanalabs.h"
#include <linux/habanalabs/hl_boot_if.h>
#include "../include/gaudi2/gaudi2.h"
#include "../include/gaudi2/gaudi2_packets.h"
#include "../include/gaudi2/gaudi2_fw_if.h"
#include "../include/gaudi2/gaudi2_async_events.h"
#define GAUDI2_LINUX_FW_FILE …
#define GAUDI2_BOOT_FIT_FILE …
#define GAUDI2_CPU_TIMEOUT_USEC …
#define NUMBER_OF_PDMA_QUEUES …
#define NUMBER_OF_EDMA_QUEUES …
#define NUMBER_OF_MME_QUEUES …
#define NUMBER_OF_TPC_QUEUES …
#define NUMBER_OF_NIC_QUEUES …
#define NUMBER_OF_ROT_QUEUES …
#define NUMBER_OF_CPU_QUEUES …
#define NUMBER_OF_HW_QUEUES …
#define NUMBER_OF_QUEUES …
#define DCORE_NUM_OF_SOB …
#define DCORE_NUM_OF_MONITORS …
#define NUMBER_OF_DEC …
#define NUM_OF_USER_ACP_BLOCKS …
#define NUM_OF_USER_NIC_UMR_BLOCKS …
#define NUM_OF_EXPOSED_SM_BLOCKS …
#define NUM_USER_MAPPED_BLOCKS …
#define USR_MAPPED_BLK_DEC_START_IDX …
#define USR_MAPPED_BLK_SM_START_IDX …
#define SM_OBJS_BLOCK_SIZE …
#define GAUDI2_MAX_PENDING_CS …
#if !IS_MAX_PENDING_CS_VALID(GAUDI2_MAX_PENDING_CS)
#error "GAUDI2_MAX_PENDING_CS must be power of 2 and greater than 1"
#endif
#define CORESIGHT_TIMEOUT_USEC …
#define GAUDI2_PREBOOT_REQ_TIMEOUT_USEC …
#define GAUDI2_PREBOOT_EXTENDED_REQ_TIMEOUT_USEC …
#define GAUDI2_BOOT_FIT_REQ_TIMEOUT_USEC …
#define GAUDI2_NIC_CLK_FREQ …
#define DC_POWER_DEFAULT …
#define GAUDI2_HBM_NUM …
#define DMA_MAX_TRANSFER_SIZE …
#define GAUDI2_DEFAULT_CARD_NAME …
#define QMAN_STREAMS …
#define NUM_OF_MME_SBTE_PORTS …
#define NUM_OF_MME_WB_PORTS …
#define GAUDI2_ENGINE_ID_DCORE_OFFSET …
#define CPU_FW_IMAGE_SIZE …
#define CPU_FW_IMAGE_ADDR …
#define PMMU_PAGE_TABLES_SIZE …
#define EDMA_PQS_SIZE …
#define EDMA_SCRATCHPAD_SIZE …
#define HMMU_PAGE_TABLES_SIZE …
#define NIC_NUMBER_OF_PORTS …
#define NUMBER_OF_PCIE_DEC …
#define PCIE_DEC_SHIFT …
#define SRAM_USER_BASE_OFFSET …
#define MAX_FAULTY_HBMS …
#define GAUDI2_XBAR_EDGE_FULL_MASK …
#define GAUDI2_EDMA_FULL_MASK …
#define GAUDI2_DRAM_FULL_MASK …
#define VA_HOST_SPACE_PAGE_START …
#define VA_HOST_SPACE_PAGE_END …
#define VA_HOST_SPACE_HPAGE_START …
#define VA_HOST_SPACE_HPAGE_END …
#define VA_HOST_SPACE_PAGE_SIZE …
#define VA_HOST_SPACE_HPAGE_SIZE …
#define VA_HOST_SPACE_SIZE …
#define HOST_SPACE_INTERNAL_CB_SZ …
#define VA_HBM_SPACE_END …
#define HW_CAP_PLL …
#define HW_CAP_DRAM …
#define HW_CAP_PMMU …
#define HW_CAP_CPU …
#define HW_CAP_MSIX …
#define HW_CAP_CPU_Q …
#define HW_CAP_CPU_Q_SHIFT …
#define HW_CAP_CLK_GATE …
#define HW_CAP_KDMA …
#define HW_CAP_SRAM_SCRAMBLER …
#define HW_CAP_DCORE0_DMMU0 …
#define HW_CAP_DCORE0_DMMU1 …
#define HW_CAP_DCORE0_DMMU2 …
#define HW_CAP_DCORE0_DMMU3 …
#define HW_CAP_DCORE1_DMMU0 …
#define HW_CAP_DCORE1_DMMU1 …
#define HW_CAP_DCORE1_DMMU2 …
#define HW_CAP_DCORE1_DMMU3 …
#define HW_CAP_DCORE2_DMMU0 …
#define HW_CAP_DCORE2_DMMU1 …
#define HW_CAP_DCORE2_DMMU2 …
#define HW_CAP_DCORE2_DMMU3 …
#define HW_CAP_DCORE3_DMMU0 …
#define HW_CAP_DCORE3_DMMU1 …
#define HW_CAP_DCORE3_DMMU2 …
#define HW_CAP_DCORE3_DMMU3 …
#define HW_CAP_DMMU_MASK …
#define HW_CAP_DMMU_SHIFT …
#define HW_CAP_PDMA_MASK …
#define HW_CAP_EDMA_MASK …
#define HW_CAP_EDMA_SHIFT …
#define HW_CAP_MME_MASK …
#define HW_CAP_MME_SHIFT …
#define HW_CAP_ROT_MASK …
#define HW_CAP_ROT_SHIFT …
#define HW_CAP_HBM_SCRAMBLER_HW_RESET …
#define HW_CAP_HBM_SCRAMBLER_SW_RESET …
#define HW_CAP_HBM_SCRAMBLER_MASK …
#define HW_CAP_HBM_SCRAMBLER_SHIFT …
#define HW_CAP_RESERVED …
#define HW_CAP_MMU_MASK …
#define RR_TYPE_SHORT …
#define RR_TYPE_LONG …
#define RR_TYPE_SHORT_PRIV …
#define RR_TYPE_LONG_PRIV …
#define NUM_SHORT_LBW_RR …
#define NUM_LONG_LBW_RR …
#define NUM_SHORT_HBW_RR …
#define NUM_LONG_HBW_RR …
#define RAZWI_INITIATOR_X_SHIFT …
#define RAZWI_INITIATOR_X_MASK …
#define RAZWI_INITIATOR_Y_SHIFT …
#define RAZWI_INITIATOR_Y_MASK …
#define RTR_ID_X_Y(x, y) …
#define HW_CAP_DEC_SHIFT …
#define HW_CAP_DEC_MASK …
#define HW_CAP_TPC_SHIFT …
#define HW_CAP_TPC_MASK …
#define HW_CAP_NIC_SHIFT …
#define HW_CAP_NIC_MASK …
#define GAUDI2_ARC_PCI_MSB_ADDR(addr) …
#define GAUDI2_SOB_INCREMENT_BY_ONE …
#define GAUDI2_NUM_TESTED_QS …
enum gaudi2_reserved_sob_id { … };
enum gaudi2_reserved_mon_id { … };
enum gaudi2_reserved_cq_id { … };
enum substitude_tpc { … };
enum gaudi2_dma_core_id { … };
enum gaudi2_rotator_id { … };
enum gaudi2_mme_id { … };
enum gaudi2_tpc_id { … };
enum gaudi2_dec_id { … };
enum gaudi2_hbm_id { … };
enum gaudi2_edma_id { … };
#define GAUDI2_NUM_USER_INTERRUPTS …
#define GAUDI2_NUM_RESERVED_INTERRUPTS …
#define GAUDI2_TOTAL_USER_INTERRUPTS …
enum gaudi2_irq_num { … };
static_assert(…);
struct dup_block_ctx { … };
struct gaudi2_queues_test_info { … };
struct gaudi2_device { … };
enum gaudi2_block_types { … };
extern const u32 gaudi2_dma_core_blocks_bases[DMA_CORE_ID_SIZE];
extern const u32 gaudi2_qm_blocks_bases[GAUDI2_QUEUE_ID_SIZE];
extern const u32 gaudi2_mme_acc_blocks_bases[MME_ID_SIZE];
extern const u32 gaudi2_mme_ctrl_lo_blocks_bases[MME_ID_SIZE];
extern const u32 edma_stream_base[NUM_OF_EDMA_PER_DCORE * NUM_OF_DCORES];
extern const u32 gaudi2_rot_blocks_bases[ROTATOR_ID_SIZE];
void gaudi2_iterate_tpcs(struct hl_device *hdev, struct iterate_module_ctx *ctx);
int gaudi2_coresight_init(struct hl_device *hdev);
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);
void gaudi2_init_blocks(struct hl_device *hdev, struct dup_block_ctx *cfg_ctx);
bool gaudi2_is_hmmu_enabled(struct hl_device *hdev, int dcore_id, int hmmu_id);
void gaudi2_write_rr_to_all_lbw_rtrs(struct hl_device *hdev, u8 rr_type, u32 rr_index, u64 min_val,
u64 max_val);
void gaudi2_pb_print_security_errors(struct hl_device *hdev, u32 block_addr, u32 cause,
u32 offended_addr);
int gaudi2_init_security(struct hl_device *hdev);
void gaudi2_ack_protection_bits_errors(struct hl_device *hdev);
int gaudi2_send_device_activity(struct hl_device *hdev, bool open);
#endif