pci_rebar_get_current_size(9)
π pci_rebar_get_current_size(9) π
okay so this is a page straight out of the Kernel API Manual, and bestie, we're about to learn how to read the current size of a Resizable BAR. it's giving "small function, big energy" β¨ no cap.
πΈ NAME πΈ
pci_rebar_get_current_size β get the current size of a Resizable BAR π
β¨ SYNOPSIS β¨
int pci_rebar_get_current_size (struct pci_dev *pdev , int bar );
like, that's the whole vibe. one function, two args, zero drama π
π¦ ARGUMENTS π¦
pdevβ the PCI device. your main character, basically πbarβ the BAR you wanna get the size from. yes, that BAR π«Ά
π§ DESCRIPTION π§
so what does it actually do? it reads the current size of a BAR from the Resizable BAR config. that's it. that's the whole function. lowkey iconic for how straightforward it is π
β RETURN β
it returns the BAR Size if bar is resizable β and the values are numbered like this: 0=1MB, 31=128TB π (imagine going from one megabyte to a hundred and twenty-eight terabytes, the glow-up is real).
or it returns negative on error. so if you see a negative number, something went wrong and you should respectfully back away π
ngl bestie, always check for that negative return. it's giving red flag π
π₯ SEE ALSO π₯
- Kernel file
./drivers/pci/rebar.c pci_rebar_bytes_to_size(9)pci_rebar_size_to_bytes(9)pci_rebar_find_pos(9)pci_rebar_get_possible_sizes(9)pci_rebar_size_supported(9)pci_rebar_get_max_size(9)pci_rebar_set_size(9)pci_resize_resource(9)
like the whole rebar friend group is tagged, we love a supportive cast π
and that's the tea, bestie π this lil page lives in ./drivers/pci and was dated October 2026 β so if you're reading it, mwah, hope it slayed π periodt πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms