]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arch: mach-k3: security: fix the check for authentication
authorManorit Chawdhry <m-chawdhry@ti.com>
Fri, 14 Jul 2023 05:52:24 +0000 (11:22 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jul 2023 23:37:57 +0000 (19:37 -0400)
Fix regression occurred during refactoring for the mentioned commit.

Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
arch/arm/mach-k3/security.c

index 02a2c12dbd6f6c767743577c604e6a2f178a5209..6038c9665ecbf4ec39414354260b831497a6bf46 100644 (file)
@@ -91,8 +91,9 @@ void ti_secure_image_post_process(void **p_image, size_t *p_size)
                return;
        }
 
-       if (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
-           get_device_type() != K3_DEVICE_TYPE_HS_FS)
+       if (get_device_type() == K3_DEVICE_TYPE_GP &&
+           (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
+            !ti_secure_cert_detected(*p_image)))
                return;
 
        /* Clean out image so it can be seen by system firmware */