arm: mach-k3: security: Remove certificate if detected on GP device
authorAndrew Davis <afd@ti.com>
Fri, 15 Jul 2022 16:34:35 +0000 (11:34 -0500)
committerTom Rini <trini@konsulko.com>
Thu, 4 Aug 2022 19:32:20 +0000 (15:32 -0400)
commitb661c1bc92f9ac096ffaf0aec7e60a5413ce8b34
tree9e15d9e6ef79fc1dfd4f56e112a81bc25ea6f7b9
parenta0379c6fe3bfac4e0d7633830b9d23166f3edacf
arm: mach-k3: security: Remove certificate if detected on GP device

If the device is a GP and we detect a signing certificate then remove it.
It would fail to authenticate otherwise as the device is GP and has no
secure authentication services in SYSFW.

This shouldn't happen often as trying to boot signed images on GP devices
doesn't make much sense, but if we run into a signed image we should at
least try to ignore the certificate and boot the image anyway. This could
help with users of GP devices who only have HS images available.

If this does happen, print a nice big warning.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-k3/security.c