diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 20:47:07 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-06 20:47:07 -0400 |
| commit | 9fe8bf7705a121de9e34dce8b43384186a8df90b (patch) | |
| tree | 90626820cdc79710ebf188a09c106b4b8e6c867e /kernel/gsp_phys_booter.c | |
| parent | e3055432c8db427c816accdf847c58d1f6c6085d (diff) | |
| download | open-iov-9fe8bf7705a121de9e34dce8b43384186a8df90b.tar.gz open-iov-9fe8bf7705a121de9e34dce8b43384186a8df90b.zip | |
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)
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 32 |
1 files changed, 32 insertions, 0 deletions
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 @@ -12634,6 +12635,32 @@ static int gsp_phys_rmcall_user_lane_notifier(void __iomem *bar0) } /* + * 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, * hVASpace 0, hContextShare (the mode-34 share), flags 0x00201320, @@ -12661,6 +12688,9 @@ static int gsp_phys_rmcall_alloc_user_lane_channel(void __iomem *bar0) ret = gsp_phys_rmcall_user_lane_notifier(bar0); if (ret) return ret; + ret = gsp_phys_rmcall_user_lane_userd(bar0); + if (ret) + return ret; memset(&ch, 0, sizeof(ch)); ch.h_object_error = @@ -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( |
