summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_rm_tu104.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 14:40:01 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-30 14:40:01 -0400
commit50e54ed1ee3cd7827d01458f8b3b2b22eff833b8 (patch)
tree7bda7aa848a15790eafb3fa7e856093d6f7b9f57 /kernel/gsp_rm_tu104.h
parent62407c334edfb47cf69bf660c7c0d5f06999d10c (diff)
downloadopen-iov-50e54ed1ee3cd7827d01458f8b3b2b22eff833b8.tar.gz
open-iov-50e54ed1ee3cd7827d01458f8b3b2b22eff833b8.zip
GSPRM CLK legacy controls: populate the domain queries the runtime clock helper gates on
The static CUDA runtime's device init failed with cudaErrorInitializationError even though every kernel ioctl returned 0: cuInit succeeded and then cuDeviceGetAttribute(ECC_ENABLED=36) returned CUDA_ERROR_NOT_FOUND (500). Tracing libcuda's clock-domain helper (libcuda+0xe8c410) shows it issues the CLK legacy controls 0x20809009/0x20809064/0x20809001 and bails with 500 when the replies do not carry the expected domain bits/entries; the dependent attribute getters (ECC_ENABLED, TOTAL_CONSTANT_MEMORY) then abort init. Reply to the three queries with the minimal fields the helper checks: bits 32|34 present in 0x20809009, non-zero domain entries at offsets 12/20/28/36 of 0x20809064, and a matching selector in 0x20809001. No frequencies are fabricated (all other fields stay zero). Verified in the guest with the stock 570.144 static-cudart vectorAdd client: cudaGetDeviceCount -> rc=0 (ndev=1), cudaSetDevice, cudaFree, three cudaMallocs and both HtoD copies all return rc=0; the client then parks in cudaDeviceSynchronize waiting for the (not yet forwarded) kernel launch.
Diffstat (limited to 'kernel/gsp_rm_tu104.h')
-rw-r--r--kernel/gsp_rm_tu104.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/gsp_rm_tu104.h b/kernel/gsp_rm_tu104.h
index 7cd5a4b..b5ee4d7 100644
--- a/kernel/gsp_rm_tu104.h
+++ b/kernel/gsp_rm_tu104.h
@@ -728,6 +728,9 @@ static const struct tu104_internal_device_info tu104_internal_device_table[] = {
#define TU104_CTRL_FIFO_GET_DEVICE_INFO_TABLE 0x20801112
#define TU104_CTRL_INTERNAL_INTR_GET_KERNEL_TABLE 0x20800a5c
#define TU104_CTRL_GPU_GET_CONSTRUCTED_FALCON_INFO 0x208001b0
+#define TU104_CTRL_CLK_DOMAIN_MASK 0x20809009
+#define TU104_CTRL_CLK_DOMAIN_DATA 0x20809064
+#define TU104_CTRL_CLK_DOMAIN_SEL 0x20809001
#define TU104_CTRL_INTERNAL_FIFO_GET_NUM_CHANNELS 0x20800a61
#define TU104_CTRL_BUS_GET_PCI_BAR_INFO 0x20801803
#define TU104_CTRL_INTERNAL_DISPLAY_GET_STATIC_INFO 0x20800a01