Commit 38a43580 authored by Ofir Bitton's avatar Ofir Bitton Committed by Oded Gabbay

habanalabs: expose device security status using info ioctl

In order for the user to know if he is running on a secured device
or not, we add it also to the hw_ip info ioctl.
Signed-off-by: default avatarOfir Bitton <obitton@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 6457271f
...@@ -104,6 +104,7 @@ static int hw_ip_info(struct hl_device *hdev, struct hl_info_args *args) ...@@ -104,6 +104,7 @@ static int hw_ip_info(struct hl_device *hdev, struct hl_info_args *args)
hw_ip.edma_enabled_mask = prop->edma_enabled_mask; hw_ip.edma_enabled_mask = prop->edma_enabled_mask;
hw_ip.server_type = prop->server_type; hw_ip.server_type = prop->server_type;
hw_ip.security_enabled = prop->fw_security_enabled;
return copy_to_user(out, &hw_ip, return copy_to_user(out, &hw_ip,
min((size_t) size, sizeof(hw_ip))) ? -EFAULT : 0; min((size_t) size, sizeof(hw_ip))) ? -EFAULT : 0;
......
...@@ -840,6 +840,7 @@ enum hl_server_type { ...@@ -840,6 +840,7 @@ enum hl_server_type {
* @tpc_enabled_mask: Bit-mask that represents which TPCs are enabled. Relevant * @tpc_enabled_mask: Bit-mask that represents which TPCs are enabled. Relevant
* for Goya/Gaudi only. * for Goya/Gaudi only.
* @dram_enabled: Whether the DRAM is enabled. * @dram_enabled: Whether the DRAM is enabled.
* @security_enabled: Whether security is enabled on device.
* @mme_master_slave_mode: Indicate whether the MME is working in master/slave * @mme_master_slave_mode: Indicate whether the MME is working in master/slave
* configuration. Relevant for Greco and later. * configuration. Relevant for Greco and later.
* @cpucp_version: The CPUCP f/w version. * @cpucp_version: The CPUCP f/w version.
...@@ -871,7 +872,7 @@ struct hl_info_hw_ip_info { ...@@ -871,7 +872,7 @@ struct hl_info_hw_ip_info {
__u32 psoc_pci_pll_div_factor; __u32 psoc_pci_pll_div_factor;
__u8 tpc_enabled_mask; __u8 tpc_enabled_mask;
__u8 dram_enabled; __u8 dram_enabled;
__u8 reserved; __u8 security_enabled;
__u8 mme_master_slave_mode; __u8 mme_master_slave_mode;
__u8 cpucp_version[HL_INFO_VERSION_MAX_LEN]; __u8 cpucp_version[HL_INFO_VERSION_MAX_LEN];
__u8 card_name[HL_INFO_CARD_NAME_MAX_LEN]; __u8 card_name[HL_INFO_CARD_NAME_MAX_LEN];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment