pci_map_rom(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, this is pci_map_rom from the Kernel API Manual, and its whole serve is mapping a PCI ROM to kernel space. Periodt. ✨


🌸 SYNOPSIS 🌸

The signature is giving low-level but iconic:

void __iomem * pci_map_rom (struct pci_dev *pdev , size_t *size );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” pointer to pci device struct. Like, hand over the PCI device struct pointer and we’re cooking. 🫢
  • size β€” pointer to receive size of pci window over ROM. It’s the β€œhey, put the size here” bestie of the operation. πŸ’…

πŸ’« RETURN πŸ’«

It returns a kernel virtual pointer to image of ROM. That’s the whole return vibe, no cap. 🌟


πŸ¦‹ DESCRIPTION πŸ¦‹

This maps a PCI ROM into kernel space. Important caveat: if the ROM is the boot video ROM, the shadow BIOS copy will be returned instead of the actual ROM. So you’re not getting the actual ROM in that case β€” you’re getting the shadow BIOS copy. Noted, bestie. πŸ“πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

The kernel file ./drivers/pci/rom.c plus these function besties:

iykyk β€” they’re all in the ROM lore. 🧚✨


sign-off tea: source/version is ./drivers/pci, date is October 2026, and this page is pci_map_rom(9). πŸ’œπŸŽ€

πŸ“¦ where this page comes from