From 9fe8bf7705a121de9e34dce8b43384186a8df90b Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 6 Oct 2026 20:47:07 -0400 Subject: vgsp: mode 35 F2b - register the USERD chunk as a memory object and pass hUserdMemory[0] (server construct worker looked one up; 0x57 without it) --- kernel/gsp_phys_booter.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 35a9b1c..3c8ca20 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -1171,6 +1171,7 @@ bool gsp_phys_boot_requested(void) #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_FB 0xcaf000a4u #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_GR_OBJ 0xcaf000a8u #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_NOTIFIER 0xcaf000acu +#define GSP_PHYS_RMCALL_HANDLE_USER_LANE_USERD 0xcaf000bcu #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_FAULT_FB0 0xcaf000b0u #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_FAULT_FB1 0xcaf000b4u #define GSP_PHYS_RMCALL_HANDLE_USER_LANE_PM_FB 0xcaf000b8u @@ -12633,6 +12634,32 @@ static int gsp_phys_rmcall_user_lane_notifier(void __iomem *bar0) return 0; } +/* + * Mode 35 step 4a2 / F2b: register the ladder's sysmem USERD chunk as a + * memory object and pass its handle as hUserdMemory[0]. The real #825 passes + * a USERD memory object (0x5c000014) with userdMem {0x2c02000, 0x200, FBMEM}; + * the server's post-init construct worker (0x52896d8) looks up a handle and + * returned NV_ERR_OBJECT_NOT_FOUND (0x57) while ours was 0. The memdesc + * stays the proven sysmem chunk (server programs the hardware base from it, + * m14), so the host GP_PUT/GP_GET path is unchanged. + */ +static int gsp_phys_rmcall_user_lane_userd(void __iomem *bar0) +{ + struct gsp_phys_boot_chunk *c = + &boot_stage.rmcall_chunks[GSP_PHYS_RMCALL_BUF_USERD]; + int ret; + + ret = gsp_phys_rmcall_register_chunk(bar0, c, + GSP_PHYS_RMCALL_HANDLE_USER_LANE_USERD, + "user-lane USERD (sysmem)"); + if (ret) + return ret; + pr_info("vgsp-boot: rm-call: mode 35 user-lane USERD object: hObject=0x%x sysmem pa=0x%llx size=0x%x (capture passes a USERD memory object; the memdesc stays the proven sysmem chunk)\n", + GSP_PHYS_RMCALL_HANDLE_USER_LANE_USERD, + (u64)gsp_phys_chunk_page_dma(c, 0), GSP_PHYS_PAGE_SIZE); + return 0; +} + /* * Mode 35 step 4b: the V7 real-client user-lane channel (0xcaf000a0). Every * captured #825 field is carried: class 0xc46f, hParent = ladder TSG, @@ -12659,6 +12686,9 @@ static int gsp_phys_rmcall_alloc_user_lane_channel(void __iomem *bar0) if (ret) return ret; ret = gsp_phys_rmcall_user_lane_notifier(bar0); + if (ret) + return ret; + ret = gsp_phys_rmcall_user_lane_userd(bar0); if (ret) return ret; @@ -12679,6 +12709,8 @@ static int gsp_phys_rmcall_alloc_user_lane_channel(void __iomem *bar0) ch.instance_mem = gsp_phys_rmcall_mem_desc_fb(fb, 0x1000); ch.ramfc_mem = gsp_phys_rmcall_mem_desc_fb(fb, 0x200); ch.userd_mem = gsp_phys_rmcall_mem_desc(GSP_PHYS_RMCALL_BUF_USERD); + ch.h_userd_memory[0] = + cpu_to_le32(GSP_PHYS_RMCALL_HANDLE_USER_LANE_USERD); ch.mthdbuf_mem = gsp_phys_rmcall_mem_desc(GSP_PHYS_RMCALL_BUF_MTHDBUF); ch.error_notifier_mem.base = cpu_to_le64( (u64)gsp_phys_chunk_page_dma( -- cgit v1.2.3