diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 17:49:27 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 17:49:27 -0400 |
| commit | e6d7031748fc5bc82f89a62ebc89f51662812bf6 (patch) | |
| tree | d287eb5ff2ff90cdce7080a1bb8a04b51a9ab00c /kernel/gsp_phys_booter.c | |
| parent | 930789eafcb2ed05929c5ca8f92b5fda3b58875c (diff) | |
| download | open-iov-e6d7031748fc5bc82f89a62ebc89f51662812bf6.tar.gz open-iov-e6d7031748fc5bc82f89a62ebc89f51662812bf6.zip | |
vgsp: mode 33 - wired golden sibling A as execution channel (compile-verified, untested)m33
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 228 |
1 files changed, 202 insertions, 26 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index dc8e961..3069fbe 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -666,6 +666,23 @@ bool gsp_phys_boot_requested(void) */ #define GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT 31u /* + * Mode 33 (2026-10-06): mode 31 with the TSG-parented sibling A upgraded to a + * fully-wired, object-carrying execution channel. D still runs the + * device-parented golden first-init (alloc 0xcaf00054 -> 9-entry promote, + * skip_fecs=false -> TURING_A 0xcaf00058), which initializes the golden + * image; V6 is allocated and constructed exactly as mode 31 (commit-carrier + * relationship). A is then allocated with the mode-29 wired execution shape + * (golden_exec_shape bits 0/1/2/3/4/6/7 - every field the replay's exec-shape + * branch applies except bit5, which only selects D's TURING_A skip) while + * keeping its own GOLDEN9_SIBLING_A flags and FBMEM instance/RAMFC/mthd + * memdescs, runs the 9-entry promote (skip_fecs=true), and gets a + * TURING_COMPUTE_A (0xc5c0) object constructed on it after the accepted + * promote. boot_stage.rmcall_channel is then swapped to A, so stage 4 + * BIND/SCHEDULE/token/GR-sem and every forwarded launch execute on the wired + * golden sibling instead of V6. Any failure aborts stage 3 with no retry. + */ +#define GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC 33u +/* * Mode-28 golden execution channel shape bits (gsp_phys_rmcall_golden_exec_shape, * default 7). Every combination keeps the captured flags 0x00200320 and the * FBMEM instance/RAMFC/mthd slices; the bits only choose the client-visible @@ -779,7 +796,7 @@ bool gsp_phys_boot_requested(void) */ #define GSP_PHYS_RMCALL_FWCLIENT_MASK_FECS_SYSMEM (1u << 16) #define GSP_PHYS_RMCALL_GR_PROMOTE_MAX \ - (GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) + (GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) /* * Work-submit token notifier slot. The default index is @@ -1053,6 +1070,12 @@ bool gsp_phys_boot_requested(void) */ #define GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING 0xcaf00084u #define GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_FB 0xcaf00088u +/* + * Mode 33: the TURING_COMPUTE_A (0xc5c0) class object constructed on the + * wired sibling A after its 9-entry promote; the forwarded launch's + * SET_OBJECT binds this class in A's execution context. + */ +#define GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ 0xcaf0008cu /* * Golden-image replay sizes (kernel_graphics.c:2058-2060, 2273-2276): the @@ -7681,6 +7704,8 @@ static const char *gsp_phys_rmcall_gr_promote_name(void) return "mode 30: clean unwired TSG sibling A (promote + TURING_A first-init) + V6 execution"; case GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT: return "mode 31: mode-25 D first-init + TSG sibling A 9-entry promote after V6 (explicit TSG commit) + V6 execution"; + case GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC: + return "mode 33: mode 31 with the TSG sibling A wired as the object-carrying execution channel (ring/sysmem USERD/TSG parent, TURING_COMPUTE_A on A, execution swap to A)"; default: return "off (PROMOTE_CTX never sent)"; } @@ -7871,7 +7896,9 @@ static int gsp_phys_rmcall_alloc_channel(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT)) { + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC)) { vars = &gsp_phys_rmcall_channel_variant_skipctx; attempts = 1; } @@ -8334,7 +8361,9 @@ static int gsp_phys_rmcall_golden_replay(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) && + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && gsp_phys_rmcall_engine_is_gr()) { if (gsp_phys_rmcall_fwclient_mask_value() & GSP_PHYS_RMCALL_GOLDEN9_MASK_LADDER_VAS) { @@ -8446,7 +8475,9 @@ static int gsp_phys_rmcall_golden_replay(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) && + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && gsp_phys_rmcall_engine_is_gr()) { ch.flags = cpu_to_le32(GSP_PHYS_RMCALL_CHANNEL_FLAG_GOLDEN9); ch.internal_flags = cpu_to_le32( @@ -8652,7 +8683,9 @@ static int gsp_phys_rmcall_golden_replay(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) && + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && gsp_phys_rmcall_engine_is_gr()) { ret = gsp_phys_rmcall_golden9_promote(bar0); if (ret) @@ -9571,7 +9604,9 @@ static int gsp_phys_rmcall_gr_ctx_prepare(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN9 || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) { + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { u64 fb_base = 0; ret = gsp_phys_rmcall_alloc_fb_mem(bar0, @@ -9631,7 +9666,9 @@ static int gsp_phys_rmcall_gr_ctx_prepare(void __iomem *bar0) if (boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN9 || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) { + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { ret = gsp_phys_rmcall_golden9_fb_aux_prepare(bar0); if (ret) { pr_err("vgsp-boot: rm-call: GOLDEN9E FBMEM aux prepare failed (%d); aborting the ladder with no retry\n", @@ -10043,11 +10080,19 @@ static int gsp_phys_rmcall_golden9_promote(void __iomem *bar0) * (fifo_gv100.c:1480-1494) commits V6's instance pointer + RAMFC while V6's * own promote is suppressed. Two 9-entry promotes total (D and A); V6 gets * none. + * + * Mode 33: the same sibling A, but allocated with the mode-29 wired execution + * shape (golden_exec_shape fields; A keeps its own GOLDEN9_SIBLING_A flags and + * FBMEM instance/RAMFC/mthd memdescs), and after the accepted promote a + * TURING_COMPUTE_A (0xc5c0) class object is constructed on A. The caller then + * swaps boot_stage.rmcall_channel to A, so stage 4 and the forwarded launches + * execute on A. Any failure aborts stage 3 with no retry. */ static int gsp_phys_rmcall_golden_sibling_alloc(void __iomem *bar0) { struct gsp_phys_rmcall_channel_params ch; u32 rpc = 0, status = 0; + u32 ch_parent = boot_stage.rmcall_tsg; u64 fb = 0; int ret; @@ -10068,20 +10113,112 @@ static int gsp_phys_rmcall_golden_sibling_alloc(void __iomem *bar0) ch.userd_mem = gsp_phys_rmcall_mem_desc_fb(fb + 0x1000, 0x200); ch.ramfc_mem = gsp_phys_rmcall_mem_desc_fb(fb + 0x2000, 0x1000); ch.mthdbuf_mem = gsp_phys_rmcall_mem_desc_fb(fb + 0x3000, 0x1000); + /* + * Mode 33: upgrade A from the unwired mode-31 commit carrier to the + * mode-29 wired execution shape. The golden_exec_shape machinery is + * reused field-for-field (RING -> gpFifoOffset at VA_GPFIFO, ENTRIES8 + * -> the shared ring's 8-entry size, USERD_SYSMEM -> the ladder sysmem + * USERD chunk, optional USERD_SIZE200, HOBJ_VAS, TSG_PARENT), except + * bit5 which only selects D's TURING_A skip and must not gate A. A's + * captured-shape flags (GOLDEN9_SIBLING_A, USERD_INDEX_VALUE=4) and + * FBMEM instance/RAMFC/mthd slices stay untouched; the shape bits only + * wire the client submission path. The activation recipe passes + * gsp_phys_rmcall_golden_exec_shape=0xE7 (bit7 = host USERD control + * offset 0, the m14 fetch requirement). + */ + if (boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { + u32 exec_shape = gsp_phys_rmcall_golden_exec_shape_value(); + + if (exec_shape & GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_RING) + ch.gp_fifo_offset = + cpu_to_le64(GSP_PHYS_RMCALL_VA_GPFIFO); + if (exec_shape & GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_ENTRIES8) + ch.gp_fifo_entries = cpu_to_le32( + GSP_PHYS_RMCALL_GPFIFO_ENTRIES); + if (exec_shape & + GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_USERD_SYSMEM) { + struct gsp_phys_rmcall_mem_desc ud = + gsp_phys_rmcall_mem_desc( + GSP_PHYS_RMCALL_BUF_USERD); + + if (exec_shape & + GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_USERD_SIZE200) + ud.size = cpu_to_le64(0x200); + ch.userd_mem = ud; + } + if (exec_shape & + GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_HOBJ_VAS) + ch.h_object_buffer = + cpu_to_le32(boot_stage.rmcall_vas); + if (exec_shape & + GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_TSG_PARENT) { + ch_parent = boot_stage.rmcall_tsg; + ch.h_va_space = cpu_to_le32(0); + } + } ret = gsp_phys_rmcall_alloc(bar0, boot_stage.rmcall_client, - boot_stage.rmcall_tsg, + ch_parent, GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING, GSP_PHYS_RMCALL_CLASS_CHANNEL, &ch, sizeof(ch), false, NULL, - "mode 31 GOLDEN SIBLING A (TSG commit carrier)", + (boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) ? + "mode 33 GOLDEN SIBLING A (wired execution carrier)" : + "mode 31 GOLDEN SIBLING A (TSG commit carrier)", true, &rpc, &status); if (ret) return ret; + if (boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) + pr_info("vgsp-boot: rm-call: mode 33 GOLDEN SIBLING A wired shape: shape=0x%x gpFifoOffset=0x%llx gpFifoEntries=%u userd=%s size=0x%llx hObjectBuffer=0x%x hParent=%s hVASpace=0x%x; flags=0x%x instance/ramfc/mthd stay FBMEM\n", + gsp_phys_rmcall_golden_exec_shape_value(), + le64_to_cpu(ch.gp_fifo_offset), + le32_to_cpu(ch.gp_fifo_entries), + (ch.userd_mem.address_space == + cpu_to_le32(GSP_PHYS_RMCALL_ADDR_SYSMEM)) ? + "sysmem" : "FBMEM", + le64_to_cpu(ch.userd_mem.size), + le32_to_cpu(ch.h_object_buffer), + ch_parent == boot_stage.rmcall_tsg ? + "ladder-TSG" : "device", + le32_to_cpu(ch.h_va_space), + GSP_PHYS_RMCALL_CHANNEL_FLAG_GOLDEN9_SIBLING_A); gsp_phys_rmcall_ctx_diag_decode("post-V6-constructs pre-A-commit"); ret = gsp_phys_rmcall_golden9_promote_on(bar0, GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING, true); if (ret) return ret; + /* + * Mode 33: with the promote accepted, construct the TURING_COMPUTE_A + * (0xc5c0) class object on A. The forwarded launch's SET_OBJECT binds + * class 0xc5c0 in the execution channel's context, so the object must + * be a child of A (V6's object 0xcaf0002c belongs to V6's context and + * stays there for the mode-31 commit-carrier relationship). The + * construct runs after the accepted promote by design: every construct + * before/after the promote on the D golden channel deadlocked RM + * (m3a-m3g, m15 -110); this is the first construct on the post-promote + * wired sibling. A failure aborts stage 3 with no retry, exactly like + * a failed promote. + */ + if (boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { + pr_info("vgsp-boot: rm-call: mode 33: TURING_COMPUTE_A on sibling A\n"); + ret = gsp_phys_rmcall_alloc_gr_object_class(bar0, + GSP_PHYS_RMCALL_CLASS_COMPUTE, + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ, + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING, + "TURING_COMPUTE_A on sibling A (mode 33)", + &rpc, &status); + if (ret) { + pr_err("vgsp-boot: rm-call: mode 33: TURING_COMPUTE_A on sibling A (0xc5c0, hObject=0x%x) failed (status=0x%x rpc_result=0x%x ret=%d); A has no class object and the ladder aborts with no retry\n", + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ, + status, rpc, ret); + return ret; + } + boot_stage.rmcall_gr_object = + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ; + } gsp_phys_rmcall_ctx_diag_dump("INSTANCE (post-A-commit pre-BIND)", &boot_stage.rmcall_chunks[GSP_PHYS_RMCALL_BUF_INSTANCE]); gsp_phys_rmcall_ctx_diag_dump("RAMFC (post-A-commit pre-BIND)", @@ -10276,14 +10413,15 @@ static int gsp_phys_rmcall_gr_ctx_promote(void __iomem *bar0) mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC || mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC_LAST || mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || - mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) && + mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && (!gsp_phys_rmcall_golden_enabled() || !gsp_phys_gpu_enabled())) { pr_err("vgsp-boot: rm-call: mode %u requires gsp_phys_rmcall_golden=1 and gsp_phys_gpu=1 (the golden replay did not run); no PROMOTE_CTX is sent and the ladder aborts with no retry\n", mode); return -EINVAL; } /* - * Mode 30/31: the sibling A's 9-entry promote carries the group + * Mode 30/31/33: the sibling A's 9-entry promote carries the group * context commit; nothing is sent on the V6 channel. A multi-entry * promote containing MAIN is refused for a SKIP-ctx channel * (graphics_context.c: bKMDVirtualContext -> NV_ERR_INVALID_ARGUMENT) @@ -10291,11 +10429,16 @@ static int gsp_phys_rmcall_gr_ctx_promote(void __iomem *bar0) * shapes never establish, so a V6 promote would abort stage 3 on 0x1f. */ if (mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || - mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) { + mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { if (mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING) pr_info("vgsp-boot: rm-call: mode 30: no PROMOTE_CTX on V6; the sibling A carries the group context commit (config_group ppEngCtxDesc), V6 inherits via the TSG commit/channel setup\n"); - else + else if (mode == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) pr_info("vgsp-boot: rm-call: mode 31: no PROMOTE_CTX on V6; sibling A's 9-entry promote ran after V6's alloc and the TSG loop (fifo_gv100.c:1480-1494) already committed V6\n"); + else + pr_info("vgsp-boot: rm-call: mode 33: no PROMOTE_CTX on V6; wired sibling A's 9-entry promote ran (TSG commit) and A carries both the class object and the execution (hChannel=0x%x, hGr=0x%x)\n", + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING, + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ); boot_stage.rmcall_gr_promote_step = 1; return 0; } @@ -12133,7 +12276,9 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0) boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) && + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && gsp_phys_rmcall_engine_is_gr()) { pr_err("vgsp-boot: rm-call: stage 3 aborted: mode-%u golden replay failed (%d); the golden construct is atomic and is not retried\n", boot_stage.rmcall_gr_promote, ret); @@ -12178,9 +12323,9 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0) return ret; /* - * Mode 30/31 readback point 1: V6's instance/RAMFC right after the + * Mode 30/31/33 readback point 1: V6's instance/RAMFC right after the * channel alloc (mode 30: A's replay contains the 9-entry promote and - * A's TURING_A first-init by now; mode 31: D's replay ran and the + * A's TURING_A first-init by now; modes 31/33: D's replay ran and the * sibling A commit plus V6's constructs are still ahead), so the * commit effect can be separated from the later BIND/GPFIFO_SCHEDULE. * The decode line prints the decisive fields (instance WFI pointer @@ -12190,7 +12335,9 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0) (boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT)) { + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC)) { gsp_phys_rmcall_ctx_diag_dump( "INSTANCE (post-V6-alloc pre-A-commit)", &boot_stage.rmcall_chunks[GSP_PHYS_RMCALL_BUF_INSTANCE]); @@ -12268,24 +12415,45 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0) return -EOPNOTSUPP; } /* - * Mode 31: allocate the TSG-parented sibling A and run its + * Mode 31/33: allocate the TSG-parented sibling A and run its * 9-entry promote here, after V6's own constructs, so the * server's TSG-wide commit walk sees V6 in its group; V6's * own promote is suppressed in gsp_phys_rmcall_gr_ctx_promote. + * Mode 33 allocates A with the wired execution shape, gets a + * TURING_COMPUTE_A object on A after the accepted promote and + * then swaps boot_stage.rmcall_channel to A, so stage 4 + * BIND/SCHEDULE/token/GR-sem and every forwarded launch run on + * A instead of V6 (the mode-28/29 swap shape, applied here so + * V6's own constructs keep running on V6 first). */ if (boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT) { + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_COMMIT || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { if (!gsp_phys_rmcall_golden_enabled() || !gsp_phys_gpu_enabled()) { - pr_err("vgsp-boot: rm-call: mode 31 requires gsp_phys_rmcall_golden=1 and gsp_phys_gpu=1 (the golden replay did not run); sibling A is not allocated and no promote is sent; the ladder aborts with no retry\n"); + pr_err("vgsp-boot: rm-call: mode %u requires gsp_phys_rmcall_golden=1 and gsp_phys_gpu=1 (the golden replay did not run); sibling A is not allocated and no promote is sent; the ladder aborts with no retry\n", + boot_stage.rmcall_gr_promote); return -EINVAL; } ret = gsp_phys_rmcall_golden_sibling_alloc(bar0); if (ret) { - pr_err("vgsp-boot: rm-call: mode 31 sibling A commit failed (%d); no V6 promote follows; the ladder aborts with no retry\n", - ret); + pr_err("vgsp-boot: rm-call: mode %u sibling A commit failed (%d); no V6 promote follows; the ladder aborts with no retry\n", + boot_stage.rmcall_gr_promote, ret); return ret; } + if (boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) { + pr_info("vgsp-boot: rm-call: mode 33: execution channel switched from V6 0x%x to wired golden sibling A 0x%x (client ring gpFifoVa=0x%llx sysmem USERD shape=0x%x, TSG-parented, TURING_COMPUTE_A 0x%x on A); the V6 channel stays unscheduled\n", + boot_stage.rmcall_channel, + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING, + GSP_PHYS_RMCALL_VA_GPFIFO, + gsp_phys_rmcall_golden_exec_shape_value(), + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING_GR_OBJ); + boot_stage.rmcall_channel = + GSP_PHYS_RMCALL_HANDLE_GOLDEN_SIBLING; + boot_stage.rmcall_channel_server_mem = false; + } } ret = gsp_phys_rmcall_gr_ctx_promote(bar0); if (ret) { @@ -12484,17 +12652,25 @@ struct gsp_phys_rmcall_ce_submit { * 0x8c/0x88 of the chunk. Mode 28 keeps the captured golden channel flags * (USERD_INDEX_VALUE=3 within a fixed USERD page), so the hardware control * block sits at userd+0x600 and every host USERD touch must use the same - * offset or host and hardware would poll different words. + * offset or host and hardware would poll different words. Mode 29 (shape + * bit7) and mode 33's wired sibling A write the host control block at + * offset 0: m14 proved the server applies the sysmem userd_mem base + * directly and ignores the captured USERD_INDEX_VALUE, and the PBDMA + * consumed the entry at +0x0 (GP_GET advanced) while +0x600 stayed dead. */ static u32 gsp_phys_rmcall_userd_ctl_off(void) { if ((boot_stage.rmcall_gr_promote == GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC || boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC_LAST) && + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC_LAST || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && gsp_phys_rmcall_engine_is_gr()) { - if (boot_stage.rmcall_gr_promote == - GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC_LAST && + if ((boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_EXEC_LAST || + boot_stage.rmcall_gr_promote == + GSP_PHYS_RMCALL_GR_PROMOTE_GOLDEN_SIBLING_EXEC) && (gsp_phys_rmcall_golden_exec_shape_value() & GSP_PHYS_RMCALL_GOLDEN_EXEC_SHAPE_USERD_INDEX0)) return 0; |
