diff options
author | farah kassabri <fkassabri@habana.ai> | 2022-07-20 13:53:37 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2022-09-18 13:29:51 +0300 |
commit | 6419b5232efacb59b227c7088d1c00b98bdb82de (patch) | |
tree | 173eb80e2e181500999f0a36c94affe3b6c62424 /drivers/misc/habanalabs/common/firmware_if.c | |
parent | ab6c08f0d597408ce7ab4a0f92088cf7cefd2915 (diff) | |
download | linux-6419b5232efacb59b227c7088d1c00b98bdb82de.tar.xz |
habanalabs/gaudi2: change device f/w security check
On Gaudi2 the f/w always configures the PCIe iATU and allows access to
scratchpad registers. Therefore, we can know if the f/w is secured
by reading a status bit from the f/w registers.
Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/firmware_if.c')
-rw-r--r-- | drivers/misc/habanalabs/common/firmware_if.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/firmware_if.c b/drivers/misc/habanalabs/common/firmware_if.c index 58c1eff16df6..cbcb9442bdca 100644 --- a/drivers/misc/habanalabs/common/firmware_if.c +++ b/drivers/misc/habanalabs/common/firmware_if.c @@ -1476,6 +1476,8 @@ static void hl_fw_preboot_update_state(struct hl_device *hdev) */ prop->hard_reset_done_by_fw = !!(cpu_boot_dev_sts0 & CPU_BOOT_DEV_STS0_FW_HARD_RST_EN); + prop->fw_security_enabled = !!(cpu_boot_dev_sts0 & CPU_BOOT_DEV_STS0_SECURITY_EN); + dev_dbg(hdev->dev, "Firmware preboot boot device status0 %#x\n", cpu_boot_dev_sts0); |