You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
845 B
35 lines
845 B
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2021. All rights reserved.
|
|
* Description:KS driver in register level.
|
|
* Author: Hisilicon
|
|
* Create: 2019/06/22
|
|
*/
|
|
#ifndef HAL_KS_H
|
|
#define HAL_KS_H
|
|
|
|
#include "drv_keyslot_define.h"
|
|
#include "drv_ioctl_keyslot.h"
|
|
#include "hal_keyslot_reg.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
KS_STAT_UN_LOCK = 0x0,
|
|
KS_STAT_REE_LOCK = 0x1,
|
|
KS_STAT_TEE_LOCK = 0x2,
|
|
KS_STAT_HPP_LOCK = 0x3,
|
|
KS_STAT_MAX
|
|
} ks_slot_stat;
|
|
|
|
td_s32 hal_ks_lock(const ext_keyslot_type slot_ind, const td_u32 slot_num);
|
|
td_s32 hal_ks_unlock(const ext_keyslot_type slot_ind, const td_u32 slot_num);
|
|
ks_slot_stat hal_ks_status(const ext_keyslot_type slot_ind, const td_u32 slot_num);
|
|
td_u32 _ks_read_reg(const td_u32 addr);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* HAL_KS_H */
|