From aeb9e292925d8942a53f258416dea5de4218ec43 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 1 Oct 2026 07:22:09 -0400 Subject: gsp-phys: read-only FWSEC dry-run mode; match the 6-byte BIT token decode --- kernel/gsp_phys_gpu.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'kernel/gsp_phys_gpu.c') diff --git a/kernel/gsp_phys_gpu.c b/kernel/gsp_phys_gpu.c index a7c8e57..9726b84 100644 --- a/kernel/gsp_phys_gpu.c +++ b/kernel/gsp_phys_gpu.c @@ -703,15 +703,37 @@ int gsp_phys_gpu_claim(void) phys.bar1_len)) { pr_warn("gsp-phys: boot layout/allocation failed; " "backend stays at rung 2\n"); - } else if (gsp_phys_fwsec_enabled()) { - if (gsp_phys_fwsec_run(&phys.boot, phys.pdev, - phys.bar0)) + } else if (gsp_phys_fwsec_enabled() || + gsp_phys_fwsec_dryrun_enabled()) { + if (gsp_phys_fwsec_enabled() && + gsp_phys_fwsec_dryrun_enabled()) { + pr_err("gsp-phys: gsp_phys_fwsec=1 and " + "gsp_phys_fwsec_dryrun=1 are " + "mutually exclusive; refusing " + "both (no writes, nothing run)\n"); + } else if (gsp_phys_fwsec_dryrun_enabled()) { + if (gsp_phys_fwsec_dryrun_run( + &phys.boot, phys.pdev, + phys.bar0)) + pr_warn("gsp-phys: stage 3c " + "dry-run failed " + "(read-only; see log " + "above)\n"); + else + pr_info("gsp-phys: stage 3c " + "dry-run complete " + "(read-only; nothing " + "written)\n"); + } else if (gsp_phys_fwsec_run(&phys.boot, + phys.pdev, + phys.bar0)) { pr_warn("gsp-phys: stage 3c FWSEC failed " "(see recovery log above)\n"); - else + } else { pr_info("gsp-phys: stage 3c FWSEC complete " "(WPR2 up; release will tear it " "down)\n"); + } } } } -- cgit v1.2.3