summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_booter.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_phys_booter.c')
-rw-r--r--kernel/gsp_phys_booter.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index da3ea83..5ca854d 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -17625,6 +17625,26 @@ MODULE_PARM_DESC(sema_gl_mme_nop_param_mask,
"Kept slots whose CALL_MME_MACRO trigger is rewritten to a plain CALL_MME_DATA port write (params conserved, macro not executed; u64 bitmask)");
/*
+ * SESSION 153-CONTINUED-80: the r1181 live A/B validated the retarget above
+ * and it PARKS the PBDMA exactly like the raw kept call - with
+ * keep=5|1<<57 + nop=1<<57 the first post-change launch froze
+ * (MME-FAST begin grfifo=0x00000001, end events=0, no poison, warm sem
+ * WEDGED) while keep=5 (slot 57 call+params elided) retired in 94-106 us
+ * on the same boot (r1176/r1181 baseline). The bare DATA-port run without an
+ * open macro context is not a safe landing for the trigger. With this knob
+ * set, a nop-mask slot joins the drop path instead (the r1144-r1177
+ * proven-safe behavior: whole run elided, retires clean, params NOT
+ * conserved). Use for the all-real-macro A/B: sa_stub_all=0 leaves
+ * 34/39/40/48/51 real while this drops only 57. Default 0 preserves the
+ * retarget behavior so the r1179 transform evidence stays reproducible.
+ */
+static u64 gsp_phys_rmcall_gr_nop_drop;
+module_param_named(sema_gl_mme_nop_drop, gsp_phys_rmcall_gr_nop_drop, ullong,
+ 0644);
+MODULE_PARM_DESC(sema_gl_mme_nop_drop,
+ "Slots whose call runs are dropped entirely (proven-safe retire, SA[slot] stubbed) instead of retargeted to the CALL_MME_DATA port (u64 bitmask; default 0)");
+
+/*
* The same stubbed-slot predicate the launch builder applies (see the
* sa_stub emit decision): a slot is stubbed when stubbing is on and either
* the all-slots knob is set, the capture holds no SA entry, or the IR
@@ -17635,6 +17655,16 @@ static bool gsp_phys_gr_slot_stubbed(u32 j, u64 sa_mask, const u32 *sa_ent)
{
if (j >= 64u || !gsp_sema_gr_sa_stub_value())
return false;
+ /*
+ * SESSION 153-CONTINUED-80: a nop-drop slot is force-stubbed even
+ * when it is also kept or covered - the r1186 evidence shows a kept
+ * slot 57 loses its SA end-noop stub (the stub builder skips kept
+ * slots) and any call-run encoding the drop filter misses then
+ * executes the real macro 57 (the park class). Dropping the runs and
+ * stubbing SA[57] together is the safe combination.
+ */
+ if (READ_ONCE(gsp_phys_rmcall_gr_nop_drop) & (1ull << j))
+ return true;
if (READ_ONCE(gsp_phys_rmcall_gr_keep_mask) & (1ull << j))
return false;
if (READ_ONCE(gsp_phys_rmcall_gr_sa_stub_all))
@@ -17685,6 +17715,19 @@ static u32 gsp_phys_gr_mme_drop_calls(u32 *win, u32 n, u64 sa_mask,
(1ull << j)) &&
(READ_ONCE(gsp_phys_rmcall_gr_nop_param_mask) &
(1ull << j))) {
+ if (READ_ONCE(gsp_phys_rmcall_gr_nop_drop)) {
+ /*
+ * SESSION 153-CONTINUED-80: the
+ * retarget parks the PBDMA
+ * live (see the
+ * sema_gl_mme_nop_drop
+ * comment) - drop the whole
+ * run instead.
+ */
+ iscall = true;
+ dmask |= 1ull << j;
+ break;
+ }
/*
* SESSION 153-CONTINUED-79: kept +
* nop-param slot - keep the run but
@@ -18006,7 +18049,9 @@ static u32 gsp_phys_rmcall_build_gr_launch(u32 *pb,
*/
if (sa_mask & (1ull << j)) {
if (!READ_ONCE(gsp_phys_rmcall_gr_sa_stub_all) &&
- gsp_sema_mme_ir_covered(sa_ent[j])) {
+ gsp_sema_mme_ir_covered(sa_ent[j]) &&
+ !(READ_ONCE(gsp_phys_rmcall_gr_nop_drop) &
+ (1ull << j))) {
for (t = 0; t < sa_ncov; t++)
if (sa_cov[t] == j)
have = true;