From f37f1f6a92939a8c147da1ed5a9032d9e8604ddc Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 15 Nov 2026 15:48:59 -0500 Subject: vgsp: eng62 - fill missing golden SA entries (slot 34 DRAW_IAB = IR 0x265), default off The golden overlay writes all 55 slot bodies, but the CALL_MME_MACRO(34) DRAW_IAB run targets SA[34]; the client's captured SA table only covered slots 0-11 (c772), so slot 34 resolved to IR 0 (the slot-0 body) and the macro never produced mac=0x22. Add sema_gl_mme_sa_golden_fill (bool, 0): for every slot whose client SA entry is missing/zero and whose golden body exists (kernel/golden-mme-tu104.h golden_mme_tu104_sa[64]), set the SA entry to the golden body's IR entry (slot 34 = 0x265, 75 words) and mark it present. Nonzero client entries are never overwritten. Fill runs in the golden overlay, in the submit path before the stub/call-drop walk, and in the SA re-arm (the release-carrier path); the release path re-fetches and emits the filled 0x11c pairs. New MME-GOLDEN sa-fill/sa-census receipts. c774 proves the fill: `MME-GOLDEN sa-fill slot=34 entry=0x265 (client=missing)`. Enable in params-r1624. Build rc 0; the mac=0x22 validation needs a c772-class release boot. --- kernel/gsp_sema_service.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'kernel/gsp_sema_service.c') diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 26d3b1a..603e9f0 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -20364,6 +20364,30 @@ static void svc_mme_sa_record(u32 slot, u32 entry) svc_mme_sa_present |= 1ull << slot; } +/* + * Golden SA completion (sema_gl_mme_sa_golden_fill): publish a slot's + * golden IR entry into the host-side START-ADDRESS RAM table when the + * client's own 0x11c/0x120 runs never supplied it (present bit clear, or + * present with entry 0 - the r1231 "SA[34]=0 lands last" shape). A + * nonzero client entry is never overwritten: the client's own upload is + * always the authority. The GR builder calls this before its per-launch + * SA re-arm and its stub/call-drop decisions, so a golden-served slot + * (e.g. DRAW_IAB slot 34 -> IR 0x265) resolves to the same IR offset the + * pack overlay wrote instead of jumping to macro 0. + */ +bool gsp_sema_mme_sa_fill(u32 slot, u32 entry) +{ + if (slot >= 64u) + return false; + if ((READ_ONCE(svc_mme_sa_present) & (1ull << slot)) && + svc_mme_sa_entry[slot]) + return false; + WRITE_ONCE(svc_mme_sa_entry[slot], entry); + WRITE_ONCE(svc_mme_sa_present, + READ_ONCE(svc_mme_sa_present) | (1ull << slot)); + return true; +} + static bool svc_mme_setup_run_addr(u32 addr) { return (addr >= 0x114u && addr <= 0x124u) || addr == 0x234u || -- cgit v1.2.3