On Mon, 2025-09-22 at 21:30 +1000, Alistair Popple wrote:
> +const GSP_REGISTRY_NUM_ENTRIES: usize = 2;
> +struct RegistryEntry {
> + key: &'static str,
> + value: u32,
> +}
Probably should add a comment saying that although GSP-RM technically supports
strings as values, we
don't intend to use that feature. You just have
REGISTRY_TABLE_ENTRY_TYPE_DWORD defined without any
explanation that there are other entry types.
Maybe REGISTRY_TABLE_ENTRY_TYPE_DWORD should be an enum instead of a const.
> +pub(crate) fn build_registry(cmdq: &mut GspCmdq, bar: &Bar0) -> Result {
> + let registry = RegistryTable {
> + entries: [
> + RegistryEntry {
> + key: "RMSecBusResetEnable",
> + value: 1,
> + },
> + RegistryEntry {
> + key: "RMForcePcieConfigSave",
> + value: 1,
> + },
> + ],
> + };
You might want to add another field to RegistryEntry that adds documentation
for each of these
files? Nouveau documents them as comments.
Also, you're missing RMDevidCheckIgnore. See
https://lore-kernel.gnuweeb.org/nouveau/[email protected]/T/