summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-21 23:38:30 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-21 23:38:30 -0400
commit9e776d0bd3a77217c700bf2fc538e32ac0d9173e (patch)
treece91938dab13e004056cc47c5226d713cd0deb9b /kernel
parent38425e0891760d86d8a34cc84e8b8f8b39479a8d (diff)
downloadopen-iov-9e776d0bd3a77217c700bf2fc538e32ac0d9173e.tar.gz
open-iov-9e776d0bd3a77217c700bf2fc538e32ac0d9173e.zip
kernel: CrashCat wayfinder suppression (prevent kgspHealthCheck loop)
kgspHealthCheck runs on every RPC drain; if the GSP falcon's DEBUGINFO register (BAR0+0x110094) holds a valid CrashCat wayfinder-L0 signature (0xdead), crashcatEngineGetNextCrashReport reads 'reports' from garbage and loops forever in nv_open_q (which then can't poll RPCs -> fn-10 timeouts). Force the wayfinder invalid - our emulated GSP has no crashcat reports to offer.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_emulation.c16
-rw-r--r--kernel/gsp_emulation.h8
2 files changed, 24 insertions, 0 deletions
diff --git a/kernel/gsp_emulation.c b/kernel/gsp_emulation.c
index 7b3b261..c8f8041 100644
--- a/kernel/gsp_emulation.c
+++ b/kernel/gsp_emulation.c
@@ -190,6 +190,22 @@ static void gsp_emu_poll_boot(struct gsp_emu_context *ctx)
mmu_inv);
}
+ /* CrashCat wayfinder suppression: if the GSP falcon's DEBUGINFO
+ * register holds a valid wayfinder-L0 signature (0xdead), the driver's
+ * kgspHealthCheck (run on every RPC drain) reads "reports" from
+ * garbage and loops forever in nv_open_q, which then can't poll RPCs
+ * (fn-10 FREE timeouts). Force it invalid - our emulated GSP has no
+ * crashcat reports to offer. */
+ {
+ u32 wfl0 = gsp_emu_shadow_read32(ctx, GSP_EMU_REG_FALCON_DEBUGINFO);
+
+ if ((wfl0 & 0xffff) == 0xdead) {
+ gsp_emu_shadow_write32(ctx, GSP_EMU_REG_FALCON_DEBUGINFO, 0);
+ nv_vgpu_info(ctx->vgpu, "GSP-BOOT: cleared CrashCat wayfinder (was 0x%x)",
+ wfl0);
+ }
+ }
+
/* GSP ENGINE reset asserted -> falcon rebooted, restart stage tracking */
if ((engine & 0x1) && ctx->boot_stage != GSP_BOOT_STAGE_IDLE) {
nv_vgpu_info(ctx->vgpu, "GSP-BOOT: falcon reset, back to IDLE");
diff --git a/kernel/gsp_emulation.h b/kernel/gsp_emulation.h
index 156499a..929003e 100644
--- a/kernel/gsp_emulation.h
+++ b/kernel/gsp_emulation.h
@@ -63,6 +63,14 @@
#define GSP_EMU_REG_MMU_INVALIDATE 0x0030b0
#define GSP_EMU_MMU_INVALIDATE_TRIGGER (1U << 31)
+/* NV_PFALCON_FALCON_DEBUGINFO (GSP falcon BAR0+0x110094): holds the CrashCat
+ * wayfinder-L0 descriptor. If its low 16 bits == 0xdead (NV_CRASHCAT_SIGNATURE),
+ * the driver's kgspHealthCheck reads crashcat reports from garbage and loops
+ * forever in nv_open_q (which then can't poll RPCs -> fn-10 FREE timeouts).
+ * Force it to 0 (invalid wayfinder -> crashcatEngineGetNextCrashReport
+ * returns NULL) so the health check always passes. */
+#define GSP_EMU_REG_FALCON_DEBUGINFO 0x110094
+
#define GSP_EMU_CPUCTL_STARTCPU 0x2
#define GSP_EMU_CPUCTL_HALTED 0x10