On Fri, 2025-11-07 at 20:39 -0800, John Hubbard wrote:
> + // Turing and later:
> + //
> + // Supported by Nova. Identified by first checking boot0 to
> ensure that the GPU
> is not
> + // from an earlier (pre-Fermi) era, and then using boot42 to
> precisely identify
> the GPU.
> + // Somewhere in the Rubin timeframe, boot0 will no longer have
> space to add new
> GPU IDs.
> +
> let boot0 = regs::NV_PMC_BOOT_0::read(bar);
>
> - Spec::try_from(boot0)
> + if boot0.use_boot42_instead() {
> + Spec::try_from(regs::NV_PMC_BOOT_42::read(bar))
> + } else {
> + Spec::try_from(boot0)
> + }
> }
Spec::try_from(boot0) will always fail, because we can't generate a Spec from a
pre-Turing GPU,
so it seems weird that we have it as an else condition.
I don't think the comment and the code aligns. The code implies that sometimes
we'll be using
boot0 to generate the Spec, but that isn't true. However, the comment makes it
clear that we'll
be using boot42 only.