habanalabs: add indication of security-enabled F/W
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 13 Sep 2020 12:51:28 +0000 (15:51 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 22 Sep 2020 15:49:54 +0000 (18:49 +0300)
commit57799ce9f85c23ecbbc9d356969ea54bd6b8a647
tree3ddb15cbec3f4a017c2d7a66eebae8c336cfe916
parentd1f3633599a9178572f3b25f9f23cd9dc423a9fa
habanalabs: add indication of security-enabled F/W

Future F/W versions will have enhanced security measures and the driver
won't be able to do certain configurations that it always did and those
configurations will be done by the firmware.

We use the firmware's preboot version to determine whether security
measures are enabled or not. Because we need this very early in our code,
the read of the preboot version is moved to the earliest possible place,
right after the device's PCI initialization.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/firmware_if.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/pci.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c