mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
Init-from-ROM (IFR) is a special GPU feature used for power management on some Nvidia GPUs. It references data in the VBIOS for its operation, but for drivers the important piece is the header that precedes the VBIOS PCI Expansion ROM. Parsing VBIOS is necessary to boot GSP-RM on Turing, Ampere, and Ada GPUs. Most such GPUs do not need to parse the IFR header in order to find the VBIOS, but the Nvidia GA100 is the exception. GA100 lacks a display engine, so the PRAMIN method (which reads the VBIOS from VRAM via display hardware) is unavailable, forcing the driver to read the ROM directly via PROM. On other similar GPUs, either PRAMIN succeeds before PROM is tried, or the IFR hardware has already applied the ROM offset so that PROM reads transparently skip the IFR header. Note that GH100 also does not have a display engine, but it uses a completely different method to boot GSP-RM. This information is derived from NVIDIA's open-source GPU kernel module driver (aka OpenRM), specifically the NV_PBUS_IFR_FMT_FIXEDx definitions in dev_bus.h and the parsing logic in s_romImgFindPciHeader_TU102(). Signed-off-by: Timur Tabi <ttabi@nvidia.com> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Link: https://patch.msgid.link/20260408142132.3911466-1-ttabi@nvidia.com [acourbot: fix TOTAL_DATA_SIZE definition.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>