[v5,14/18] secboot: set default error value in error register

Submitted by Alexandre Courbot on Dec. 14, 2016, 8:02 a.m.

Details

Message ID 0d4fe15e7a7eeb8fe18c070e667ecff27051d70d.1481702469.git-series.acourbot@nvidia.com
State New
Headers show
Series "Secure Boot refactoring" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Alexandre Courbot Dec. 14, 2016, 8:02 a.m.
Set a default error value in the mailbox 0 register so we can catch
cases where the secure boot binary fails early without being able to
report anything.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drm/nouveau/nvkm/subdev/secboot/gm200.c | 3 +++
 1 file changed, 3 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drm/nouveau/nvkm/subdev/secboot/gm200.c
index 2fcb2f761a54..813c4eb0b25f 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -67,6 +67,9 @@  gm200_secboot_run_blob(struct nvkm_secboot *sb, struct nvkm_gpuobj *blob)
 	/* Disable interrupts as we will poll for the HALT bit */
 	nvkm_mc_intr_mask(sb->subdev.device, falcon->owner->index, false);
 
+	/* Set default error value in mailbox register */
+	nvkm_falcon_wr32(falcon, 0x040, 0xdeada5a5);
+
 	/* Start the HS bootloader */
 	nvkm_falcon_set_start_addr(falcon, sb->acr->start_address);
 	nvkm_falcon_start(falcon);