linux/drivers/accel/habanalabs/gaudi/gaudi_security.c

// SPDX-License-Identifier: GPL-2.0

/*
 * Copyright 2016-2018 HabanaLabs, Ltd.
 * All Rights Reserved.
 */

#include "gaudiP.h"
#include "../include/gaudi/asic_reg/gaudi_regs.h"

#define GAUDI_NUMBER_OF_LBW_RR_REGS
#define GAUDI_NUMBER_OF_HBW_RR_REGS
#define GAUDI_NUMBER_OF_LBW_RANGES

static u64 gaudi_rr_lbw_hit_aw_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_lbw_hit_ar_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_lbw_min_aw_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_lbw_max_aw_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_lbw_min_ar_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_lbw_max_ar_regs[GAUDI_NUMBER_OF_LBW_RR_REGS] =;

static u64 gaudi_rr_hbw_hit_aw_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_hit_ar_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_base_low_aw_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_base_high_aw_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_mask_low_aw_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_mask_high_aw_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_base_low_ar_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_base_high_ar_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_mask_low_ar_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

static u64 gaudi_rr_hbw_mask_high_ar_regs[GAUDI_NUMBER_OF_HBW_RR_REGS] =;

/**
 * gaudi_pb_set_block - set the given block as protected
 *
 * @hdev: pointer to hl_device structure
 * @base: block base address
 */
static void gaudi_pb_set_block(struct hl_device *hdev, u64 base)
{}

static void gaudi_init_mme_protection_bits(struct hl_device *hdev)
{}

static void gaudi_init_dma_protection_bits(struct hl_device *hdev)
{}

static void gaudi_init_nic_protection_bits(struct hl_device *hdev)
{}

static void gaudi_init_tpc_protection_bits(struct hl_device *hdev)
{}

/**
 * gaudi_init_protection_bits - Initialize protection bits of specific registers
 *
 * @hdev: pointer to hl_device structure
 *
 * All protection bits are 1 by default, means not protected. Need to set to 0
 * each bit that belongs to a protected register.
 *
 */
static void gaudi_init_protection_bits(struct hl_device *hdev)
{}

static void gaudi_init_range_registers_lbw(struct hl_device *hdev)
{}

static void gaudi_init_range_registers_hbw(struct hl_device *hdev)
{}

/**
 * gaudi_init_security - Initialize security model
 *
 * @hdev: pointer to hl_device structure
 *
 * Initialize the security model of the device
 * That includes range registers and protection bit per register
 *
 */
void gaudi_init_security(struct hl_device *hdev)
{}

void gaudi_ack_protection_bits_errors(struct hl_device *hdev)
{}