diff options
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 84 |
1 files changed, 82 insertions, 2 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 2be4a60..5f1b99f 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -19164,7 +19164,19 @@ MODULE_PARM_DESC(sema_gl_mme_release_chain, * carry 1+cnt words; only op 1/3 walk past the header method), so a * CALL_MME_DATA(34) port write (0x3914) or another slot's call never * selects the record. + * + * eng89s: the real 570.144 direct-GL draw is CALL_MME_MACRO(0) - an IMMD + * (op 4) write to 0x3800 whose immediate is the macro program length + * (c1022: hdr 0x8d480e00 imm=0xd48=3400) - with 0x3960/0x39c8/0x39d0 + * (slots 44/57/58) as secondaries. Accept it as a DRAW_IAB-bearing + * window so the saved-window release prefers the real draw chunk. */ +static bool gsp_phys_gr_mme_draw_method(u32 m) +{ + return m == 0x3800u || m == 0x3910u || m == 0x3914u || + m == 0x3960u || m == 0x39c8u || m == 0x39d0u; +} + static bool gsp_phys_gr_mme_window_has_draw_ia(const u32 *win, u32 n) { u32 r = 0; @@ -19185,14 +19197,19 @@ static bool gsp_phys_gr_mme_window_has_draw_ia(const u32 *win, u32 n) * k=(0x3910-0x804)/4 with the macro data/address in the * following word. Only count it when that data word exists * (k + 1 < span), so a bare method mention is not a CALL. + * eng89s: an op=4 CALL(0) carries its argument as the header + * immediate, so it needs no following data word. */ for (k = 0; k < span; k++) { u32 m = ((h & 0xfffu) << 2) + 4u * k; if (k && op != 1u && op != 3u) break; - if (m == 0x3800u + 34u * 8u && - k + 1u < span && r + k + 1u < n) + if (!gsp_phys_gr_mme_draw_method(m)) + continue; + if (m == 0x3800u && op == 4u && cnt) + return true; + if (k + 1u < span && r + k + 1u < n) return true; } r += span; @@ -19503,6 +19520,28 @@ static void gsp_phys_gr_mme_call_census(const struct gsp_phys_gr_submit *req, (have_gold ? gent : 0u), win_n, held); } + /* + * eng89s: the real draw's CALL_MME_MACRO(0) target. + * An IMMD carries its argument in the header immediate; + * an interior INC/ONEINC run carries it in the following + * data word. + */ + if (j == 0u) { + u32 data = 0; + + if (op == 4u) + data = (h >> 16) & 0x1fffu; + else if (k + 1u < span) + data = req->stream[r + k + 1u]; + pr_info("vgsp-gr: MME-CALL-ARGS slot=0 data=0x%x at=%u\n", + data, r + k); + pr_info("vgsp-gr: MME-CALL-TARGET slot=0 method=0x%x client=0x%x golden=0x%x used=0x%x win=%u held=%u\n", + m, have_cli ? sa_ent[0] : 0u, + have_gold ? gent : 0u, + have_cli ? sa_ent[0] : + (have_gold ? gent : 0u), + win_n, held); + } } r += span; } @@ -26014,6 +26053,47 @@ if (gsp_phys_gr_slot_kept(j, sa_mask, } } /* + * eng89s: op=4 CALL_MME_MACRO(0) execution receipt. There is + * no kernel-side CALL interpreter: the FINAL emitted window is + * walked by the physical GR front-end, and CALL(0) resolves to + * the START-ADDRESS RAM entry the prelude pack uploaded. A + * call that survived the hold/elision passes above is in the + * emitted bytes, so name its resolved target; a held call has + * no receipt (MME-CALL-HOLD names the hold instead). + */ + if ((u32)(p - pb) > win_emit_off) { + static u32 mme_exec_log; + u32 ew = win_emit_off, en = (u32)(p - pb); + + while (ew < en && mme_exec_log < 32u) { + u32 h = pb[ew]; + u32 op = (h >> 29) & 7u; + u32 cnt = (h >> 16) & 0x1fffu; + u32 span = 1u; + u32 m0 = (h & 0xfffu) << 2; + + if ((op <= 3u || op == 5u) && cnt && + ew + 1u + cnt <= en) + span = 1u + cnt; + if (m0 == 0x3800u && + (op == 4u || op == 0u || op == 1u || + op == 3u || op == 5u)) { + u32 sa_ent[64] = { 0 }; + u64 sa_mask = gsp_sema_mme_sa_get( + sa_ent, 64); + u32 addr = (sa_mask & 1ull) ? + sa_ent[0] : 0u; + + mme_exec_log++; + pr_info("vgsp-gr: MME-EXEC-CALL slot=0 addr=0x%x h=0x%x push=0x%llx rel=%u op=%u imm=0x%x\n", + addr, req->h_object, + req->push_va, req->stream_rel, + op, op == 4u ? cnt : 0u); + } + ew += span; + } + } + /* * eng39: neutralize the client's own notify/report-semaphore * targets in the FINAL emitted window (after the CALL/pair * elisions above, before the ladder's own release tail below |
