On Mon, Feb 10, 2025 at 07:24:59AM +0100, Greg KH wrote: > On Sun, Feb 09, 2025 at 06:30:24PM +0100, Danilo Krummrich wrote: > > +config NOVA_CORE > > + tristate "Nova Core GPU driver" > > + depends on PCI > > + depends on RUST > > + depends on RUST_FW_LOADER_ABSTRACTIONS > > + default n > > Tiny nit, if you happen to respin this, "default n" is always the > default, so there's never a need to specify it. At some point we'll want to change that to 'default m', and I thought keeping it explicit is probably a good reminder. But I'm also fine removing it. > > > +impl Firmware { > > + fn new(dev: &device::Device, spec: &Spec, ver: &str) -> Result<Firmware> { > > + let mut chip_name = CString::try_from_fmt(fmt!("{}", spec.chipset))?; > > + chip_name.make_ascii_lowercase(); > > + > > + let request = |name_| { > > + CString::try_from_fmt(fmt!("nvidia/{}/gsp/{}-{}.bin", &*chip_name, name_, ver)) > > How does this match up with the MODULE_FIRMWARE() aliases that end up in > a kernel module so that the tools know to add the firmware to the system > in the proper place (i.e. initramfs or something like that)? > > I always thought you needed to individually list the firmware files, or > does the rust implementation now somehow handle that in a programatic > way from strings like this? That'd be nice, but the firmware we load is (or in general might be) only a subset of the firmware that the module needs potentially. So, you're right, all (potentially) required firmware files need to be listed in the module!() macro's firmware field (or in this case within module_pci_driver!()). Back when I wrote this code we haven't had this field yet -- thanks for reminding me of that.