pci_rebar_bytes_to_size(9)
β¨ pci_rebar_bytes_to_size(9) β¨
okay so this is a kernel API manual page, and bestie, it's literally all about turning a size in bytes into something the PCI hardware actually understands π
the manual name is pci_rebar_bytes_to_size(9) and yes it's giving main character energy, let's get into it π«Ά
πΈ NAME πΈ
pci_rebar_bytes_to_size β the glow-up function that converts a size in bytes into a PCI BAR Size, no cap β¨
π SYNOPSIS π
int pci_rebar_bytes_to_size (u64 bytes );
π¦ ARGUMENTS π¦
bytesβ the size in bytes, like the raw truth before the makeover π
π DESCRIPTION π
So here's the vibe: this function converts a size in bytes into an encoded BAR Size in the Resizable BAR Capability (PCIe r6.2, sec. 7.8.6.3). It's lowkey a translator between your cute little byte number and the encoded form the PCIe spec speaks π₯
β RETURN β
It returns the encoded BAR Size as defined in the PCIe spec β and the spec's scale is iconic: 0=1MB, 31=128TB π the range is literally unhinged and I'm obsessed.
π SEE ALSO π
- Kernel file
./drivers/pci/rebar.c pci_rebar_size_to_bytes(9)β the reverse glow-up, iykyk π«pci_rebar_find_pos(9)pci_rebar_get_possible_sizes(9)pci_rebar_size_supported(9)pci_rebar_get_max_size(9)pci_rebar_get_current_size(9)pci_rebar_set_size(9)pci_resize_resource(9)
that's the whole page bestie, every flag-free detail intact and every SEE ALSO reference accounted for π
it lives in ./drivers/pci, and the source/version stamp dates it to October 2026 β so mark your calendars, 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