Files
mac_linuxgpu/host
geramyloveless 6a8305facd The host reads the GPU's Resizable BAR capability
MacLinuxGPUHost rebar prints, for each resizable BAR, the sizes the
device can decode and the size it decodes now. It reads the device's
configuration space through the sysfs "config" file as an observer,
like the pcie command, so it writes nothing and works beside a session.

The parser walks the extended capability list from 0x100 and accepts
the capability only as linuxu's pci_rebar_read does: version 1, one to
six entries inside the space, distinct BARs, and a selected size the
BAR supports. test-device-info checks it against the R9700's capability
(BAR0 256 MB of 256 MB to 32 GB, BAR2 2 MB of 2 MB to 256 MB) and
against malformed lists.

macOS sizes every BAR and the bridge windows above it once, when it
enumerates the device. IOPCIFamily never programs this capability and
takes no BAR above 1 GB, and DriverKit has no call to resize one, so
the size shown as now is the one the driver works with.
2026-10-06 16:10:58 -07:00
..