secboot: print status message on success

Submitted by Alexandre Courbot on April 1, 2016, 2:39 a.m.

Details

Message ID 1459478343-28401-1-git-send-email-acourbot@nvidia.com
State New
Headers show
Series "secboot: print status message on success" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Alexandre Courbot April 1, 2016, 2:39 a.m.
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 <acourbot@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(-)

Patch hide | download patch | download mbox

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;
 }