Ourput an info message when secure boot has been successfully performed.
This is useful when troubleshooting issues that may be caused by
firmware loading being delayed - without an explicit message we have no
way to know whether secure boot has been performed or not.

Signed-off-by: Alexandre Courbot <acour...@nvidia.com>
---
This has been inspired by Ilia's comment on FD bug 94725. Will be useful
to have for future cases like this one.

 drm/nouveau/nvkm/subdev/secboot/base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drm/nouveau/nvkm/subdev/secboot/base.c 
b/drm/nouveau/nvkm/subdev/secboot/base.c
index 520facf9bc07..a4f314803137 100644
--- a/drm/nouveau/nvkm/subdev/secboot/base.c
+++ b/drm/nouveau/nvkm/subdev/secboot/base.c
@@ -135,7 +135,8 @@ nvkm_secboot_falcon_reset(struct nvkm_secboot *sb)
 int
 nvkm_secboot_falcon_run(struct nvkm_secboot *sb)
 {
-       struct nvkm_device *device = sb->subdev.device;
+       struct nvkm_subdev *subdev = &sb->subdev;
+       struct nvkm_device *device = subdev->device;
        int ret;
 
        /* Start falcon */
@@ -149,11 +150,13 @@ nvkm_secboot_falcon_run(struct nvkm_secboot *sb)
        /* If mailbox register contains an error code, then ACR has failed */
        ret = nvkm_rd32(device, sb->base + 0x040);
        if (ret) {
-               nvkm_error(&sb->subdev, "ACR boot failed, ret 0x%08x", ret);
+               nvkm_error(subdev, "ACR boot failed, ret 0x%08x", ret);
                falcon_clear_halt_interrupt(device, sb->base);
                return -EINVAL;
        }
 
+       nvkm_info(subdev, "signed firmware successfully loaded\n");
+
        return 0;
 }
 
-- 
2.7.3

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to