pci_rebar_get_max_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ pci_rebar_get_max_size(9) πŸ¦‹

okay bestie, this is a page from the Kernel API Manual β€” and yes, we are about to find out the biggest supported size of a resizable BAR. iconic behavior only πŸ’…

✨ NAME ✨

pci_rebar_get_max_size β€” get the maximum supported size of a BAR πŸŽ€

πŸŽ€ SYNOPSIS πŸŽ€

int pci_rebar_get_max_size (struct pci_dev *pdev , int bar );

πŸ’… ARGUMENTS πŸ’…

  • pdev β€” the PCI device πŸ’³
  • bar β€” the BAR to query 🎯

🌸 DESCRIPTION 🌸

Get the largest supported size of a resizable BAR as a size. That's it, that's the vibe β€” it's giving "maximum supported size" realness ✨

πŸ”₯ RETURN πŸ”₯

It returns the encoded maximum BAR size as defined in the PCIe spec β€” 0=1MB, 31=128TB β€” or -NOENT on error. No cap, those are the exact numbers 🫢

real talk: this is the encoded value, so don't treat it like a raw byte count without checking the encoding, iykyk.

🫢 SEE ALSO 🫢

Kernel file ./drivers/pci/rebar.c plus the whole friend group:


mwah πŸ’‹ this cutie came from ./drivers/pci, dated October 2026. bestie signing off πŸŽ€

πŸ“¦ where this page comes from