pbus_select_window_for_type(9)
π pbus_select_window_for_type(9) π
okay so this is a page from the Kernel API Manual, and the star of the show is pbus_select_window_for_type β one function, one job, and honestly? she serves. π
β¨ NAME β¨
pbus_select_window_for_type β pick a bridge window for a resource type, that's it, that's the whole vibe π¦
π SYNOPSIS π
struct resource * pbus_select_window_for_type (struct pci_bus *bus ,
unsigned long type );
like, exactly that, no cap, copy it character for character bestie π
π«Ά ARGUMENTS π«Ά
busβ the PCI bus in question, she's the main character here πtypeβ the resource type. and here's the cute part: resource flags can be passed as is, no translation era needed β¨
π₯ DESCRIPTION π₯
so the whole point of her is: select the bridge window based on a resource type. simple. iconic. periodt. π
For memory resources, the selection goes down like this β and yes I'm giving you the full rundown because every clause matters:
- Any non-prefetchable resource gets put into the non-prefetchable window. no drama, no debate.
- If there's, like, no prefetchable MMIO window at all? then all memory resources go into the non-prefetchable window. everybody squeezes in together π«
- If there is a 64-bit prefetchable MMIO window, then all 64-bit prefetchable resources go into it, and the 32-bit prefetchable memory gets placed into the non-prefetchable window. yes, that's the rule, don't @ me π
- Otherwise β like in every other case β all prefetchable resources go into the prefetchable window πΈ
β RETURN β
she returns the bridge window resource β¨ or NULL if no bridge window is found π (sad girl hours but make it a return value)
π SEE ALSO π
Kernel file ./drivers/pci/setup-bus.c β and her besties:
pci_dev_res_add_to_list(9)pbus_select_window(9)reassign_resources_sorted(9)assign_requested_resources_sorted(9)pbus_size_io(9)pbus_size_mem(9)
iykyk, go read them, they're all linked in the group chat π₯
okay that's the whole page bestie!! π this came out of ./drivers/pci and it's dated October 2026 β so like, mark your calendar and stan responsibly π§ββοΈπ¦π
π¦ 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