summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-16 04:15:26 -0500
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-11-16 04:15:26 -0500
commit1ae11a19a3bc1dae2f33479416c0df0628f1c381 (patch)
tree18dc59fac05d21b27a995c3734f8300c22b05189 /kernel/gsp_sema_service.c
parentc9466885f8da0905d87e6c2191258d5f609c09a4 (diff)
downloadopen-iov-1ae11a19a3bc1dae2f33479416c0df0628f1c381.tar.gz
open-iov-1ae11a19a3bc1dae2f33479416c0df0628f1c381.zip
vgsp: eng83 - decode the 0x3810 payload shape: base is d[4], end is d[2]
c836 proved the client's VERTEX_STREAM CALL(2) payload is [stream, end_hi, end_lo, base_hi, base_lo] (MME-VSTREAM: end=0x1e02100 base=0x1e001f4, MME-VSTREAM-LINE base=0x450c1f4 end=0x450e100 pages=3 first8=...3f800000 3e4ccccd...). eng79 wrongly took d[2] (the END 0x450e100, a zero page) as the stream base; the base d[4]=0x450c1f4 carries the float2 vertices. The Doris slot-2 sim with the full 5-word payload emits LOCATION 0x1c08<-base and SIZE 0x604<-end-base. - service: svc_gl_vs_call[5] (getter out[5]) - capture v0..v4, log 5 words; eng82 page-set collection adds the end (v2) and base (v4). - booter eng79: slot-2 base = vcall[4] (require vcall[1]==0, vcall[3]==0, aligned), end = vcall[2]; size pair = end-base; receipt base=.. end=..; VS-BLOB2 dumps at the base. - booter eng77: emit the FULL 5-word 0x3810 call (op=5 cnt=5) even when the window carries its own call (the slot-34 reorder moves the draw ahead of it); the 0x3810 MME-VSTREAM patch maps [base,end] into one contiguous shadow line.
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index aeddb7f..4cd2eca 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -9808,7 +9808,7 @@ static u32 svc_gl_vs_log;
* call; capture the last observed payload (3 words) so the booter can
* replay it before the DRAW_IAB. The census scans every beef push.
*/
-static u32 svc_gl_vs_call[3];
+static u32 svc_gl_vs_call[5];
static u8 svc_gl_vs_call_ok;
static u32 svc_gl_vs_call_log;
@@ -9819,6 +9819,8 @@ bool gsp_sema_gl_vs_call(u32 out[3])
out[0] = READ_ONCE(svc_gl_vs_call[0]);
out[1] = READ_ONCE(svc_gl_vs_call[1]);
out[2] = READ_ONCE(svc_gl_vs_call[2]);
+ out[3] = READ_ONCE(svc_gl_vs_call[3]);
+ out[4] = READ_ONCE(svc_gl_vs_call[4]);
return true;
}
@@ -10971,11 +10973,16 @@ static void svc_gl_field(u32 addr, u32 count, const u8 *data, u32 dlen)
if (addr == 0x3810u) {
u32 k;
- for (k = 1; k < count && k < 4u; k++) {
+ /*
+ * [stream, end_hi, end_lo, base_hi, base_lo]: collect the
+ * 32-bit end/base words (v[2], v[4]) - the base page carries
+ * the vertex payload.
+ */
+ for (k = 2; k < count && k < 5u; k++) {
u32 w = v[k];
if (w >= 0x100000u && w < 0x1000000000ULL &&
- !(w & 3u))
+ !(w & 3u) && (k == 2u || k == 4u))
svc_gl_add_ptr((u64)w);
}
return;
@@ -18362,7 +18369,7 @@ static void svc_mme_census(const u8 *buf, u32 len, u64 push_va, u32 h_object)
(addr >= 0x1c00u && addr <= 0x1cf8u) ||
(addr >= 0x3400u && addr <= 0x34fcu) ||
(addr >= 0x3800u && addr <= 0x39fcu)) {
- u32 v0 = 0, v1 = 0, v2 = 0;
+ u32 v0 = 0, v1 = 0, v2 = 0, v3 = 0, v4 = 0;
if (off + 8 <= len)
memcpy(&v0, buf + off + 4, 4);
@@ -18370,23 +18377,29 @@ static void svc_mme_census(const u8 *buf, u32 len, u64 push_va, u32 h_object)
memcpy(&v1, buf + off + 8, 4);
if (off + 16 <= len)
memcpy(&v2, buf + off + 12, 4);
+ if (off + 20 <= len)
+ memcpy(&v3, buf + off + 16, 4);
+ if (off + 24 <= len)
+ memcpy(&v4, buf + off + 20, 4);
/*
* eng77: remember the VERTEX_STREAM_TURING
* CALL_MME_MACRO(2) payload (the VTG stream state
* the DRAW window slices omit).
*/
- if (addr == 0x3810u && off + 16 <= len) {
+ if (addr == 0x3810u && off + 24 <= len) {
bool changed = !READ_ONCE(svc_gl_vs_call_ok) ||
- READ_ONCE(svc_gl_vs_call[2]) != v2;
+ READ_ONCE(svc_gl_vs_call[4]) != v4;
WRITE_ONCE(svc_gl_vs_call[0], v0);
WRITE_ONCE(svc_gl_vs_call[1], v1);
WRITE_ONCE(svc_gl_vs_call[2], v2);
+ WRITE_ONCE(svc_gl_vs_call[3], v3);
+ WRITE_ONCE(svc_gl_vs_call[4], v4);
WRITE_ONCE(svc_gl_vs_call_ok, 1);
if (changed && svc_gl_vs_call_log < 8u) {
svc_gl_vs_call_log++;
- pr_info("sema-gl: VS-CALL 0x3810 payload=%08x,%08x,%08x\n",
- v0, v1, v2);
+ pr_info("sema-gl: VS-CALL 0x3810 payload=%08x,%08x,%08x,%08x,%08x\n",
+ v0, v1, v2, v3, v4);
}
}
lc += scnprintf(line + lc, sizeof(line) - lc,