nouveau/gsp + kernel module firmware selection for initramfs generation

There are plans for nouveau to support using the NVIDIA supplied GSP firmware in order to support new hardware going forward

The nouveau project doesn't have any input or control over the firmware. NVIDIA have made no promises around stable ABI or firmware versioning. The current status quo is that NVIDIA will release versioned signed gsp firmwares as part of their driver distribution packages that are version locked to their proprietary drivers (open source and binary). They are working towards allowing these firmwares to be redistributed in linux-firmware.

The NVIDIA firmwares are quite large. The nouveau project will control the selection of what versions of the released firmwares are to be supported by the driver, it's likely a newer firmware will only be pulled into linux-firmware for:

  1. New hardware support (new GPU family or GPU support)
  2. Security fix in the firmware
  3. New features that is required to be supported

This should at least limit the number of firmwares in the linux-firmware project.

However a secondary effect of the size of the firmwares is that having the nouveau kernel module at more and more MODULE_FIRMWARE lines for each iteration will mean the initramfs sizes will get steadily larger on systems, and after a while the initramfs will contain a few gsp firmwares that the driver doesn't even need to run.

To combat this I've looked into adding some sort of module grouping which dracut can pick one out off.

It currently looks something like:

MODULE_FIRMWARE_GROUP_ONLY_ONE("ga106-gsp");
MODULE_FIRMWARE("nvidia/ga106/gsp/gsp-5258902.bin");
MODULE_FIRMWARE("nvidia/ga106/gsp/gsp-5303002.bin");
MODULE_FIRMWARE_GROUP_ONLY_ONE("ga106-gsp"); 

This group only one will end up in the module info section and dracut will only pick one module from the group to install into the initramfs. Due to how the module info section is constructed this will end up picking the last module in the group first.

The dracut MR is: 

https://github.com/dracutdevs/dracut/pull/2309

The kernel one liner is:

https://lore.kernel.org/all/20230419043652.1773413-1-airlied@gmail.com/T/#u


 

Comments

  1. Hi Dave. Long time listener, first time caller. linux-firmware has gotten too big for it's britches.
    Please, please, I beg you, bowing with my forehead against the pavement, consider:
    linux-firmware-wifi
    linux-firmware-server
    linux-firmware-gpu
    linux-firmware-ai-accelerator

    It is truly getting obnoxious having one massive package. Pick your poisons on breaking it up, but, it's time to xfree86-to-xorg it. Using submodules is all well and fine for consistency and order-of-arrival/application... But I just want to make sure a tiny little fire in the back of your mind is lit, if I may be so bold.

    I love dearly that these firmwares are openly distributed, but that does not mean I want wifi firmwares littering a server, 10gbit smartnic firmwares littering a desktop, and the future of the accel subsystem to make the single-snowball ever larger next to this GSP snowball.

    By all means, I am all for selection, but all the flavor in one stew tastes awful.

    ReplyDelete

Post a Comment

Popular posts from this blog

tinygrad + rusticl + aco: why not?

nvk: the kernel changes needed

video decode: crossing the streams