From 9ddfeb04ee5797fffffa200296bc84a18094e27c Mon Sep 17 00:00:00 2001 From: "K80.DEV" Date: Fri, 4 Dec 2026 00:35:19 -0600 Subject: [PATCH] docs(rmapi): fix the VOLTA_USERMODE_A doorbell base for GSP parts (#510) The doc comment states BAR0+0x810000 unconditionally, which is the Volta, non-GSP base. The code that registers the window uses 0x81_0000 only when the GPU is not GSP-owned and 0x82_0000 otherwise, so every GSP part is documented at the wrong offset. One doc comment, no behaviour change. Signed-off-by: Mara Co-authored-by: Mara --- src/nvidia/src/rmapi/memory.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/nvidia/src/rmapi/memory.rs b/src/nvidia/src/rmapi/memory.rs index c90a83c7..f5095553 100644 --- a/src/nvidia/src/rmapi/memory.rs +++ b/src/nvidia/src/rmapi/memory.rs @@ -35,7 +35,15 @@ pub const CLASS_VIDEO: u32 = 0x40; pub const CLASS_SYSTEM: u32 = 0x3e; pub const CLASS_VIRTUAL: u32 = 0x50a0; pub const CLASS_OS_DESCRIPTOR: u32 = 0x71; -/// 0xc361 `VOLTA_USERMODE_A`: BAR0+0x810000 (64 KiB write-only doorbell region; `_nv059710rm`). +/// 0xc361 `VOLTA_USERMODE_A` (`_nv059710rm`): a 64 KiB write-only BAR0 doorbell region. +/// +/// The base is a property of the GPU, not of the class: `0x81_0000` when the GPU is not +/// GSP-RM, `0xbb_0000` (`NV_VIRTUAL_FUNCTION` + 0x30000) when it is (Turing-Blackwell). +/// `0xc361`, `0xc461`, `0xc561` and `0xc661` all take the same base on a given part, so +/// the class id does not select the window; `gpu.rs`'s `memory::CLASS_USERMODE` arm +/// registers it and is the authority over this comment. +/// +/// The in-window address, access width and value semantics are not documented here. pub const CLASS_USERMODE: u32 = 0xc361; /// 0x90e6 `GF100_SUBDEVICE_MASTER`: BAR0+0 (4 KiB read-only PMC page; `_nv029257rm`). pub const CLASS_SUBDEVICE_MASTER: u32 = 0x90e6;