Expand description
Multi-driver VFS scheme served at /bus/.
Each successfully-initialised bus driver appears as a sub-directory:
/bus/ -> list of registered driver names + pci/
/bus/pci/inventory -> PCI device table
/bus/pci/count -> number of PCI devices
/bus/pci/rescan -> (write-only) refresh PCI cache
/bus/pci/find/<vid>/<did> -> find devices by vendor/device
/bus/pci/cfg/<b:d.f>/<off>/<w> -> raw PCI config read
/bus/<driver>/ -> driver info (compatible, errors, โฆ)
/bus/<driver>/status -> driver status
/bus/<driver>/error_count -> driver error count
/bus/<driver>/reg/<hex> -> read/write a driver register
(NOTE: on software-defined buses without a
register file, e.g. `moxtet`, `reg/<idx>` is
a logical slot index, not an MMIO offset โ
see `moxtet::Moxtet` docs)
/bus/<driver>/<child> -> child-device info (if the driver reports any)Structsยง
Enumsยง
- Handle
Kind ๐
Constantsยง
- DRV_
ERROR_ ๐COUNT - DRV_
FIREWALL_ ๐DIR - DRV_
FIREWALL_ ๐INFO - DRV_
REG_ ๐PREFIX - DRV_
RESUME ๐ - DRV_
STATUS ๐ - Driver-specific paths (relative to the driver prefix).
- DRV_
SUSPEND ๐ - FIREWALL_
GRANT_ ๐PREFIX - FIREWALL_
RELEASE_ ๐PREFIX - MAX_
FIND_ ๐CACHE_ ENTRIES - Upper bound on cached
pci/findresults. - MAX_
HANDLES_ ๐PER_ SENDER - Max simultaneously open handles per sender. Without it, one client could fill the global table and starve all others out of the scheme server.
- MAX_
OPEN_ ๐HANDLES - Upper bound on simultaneously open handles. Prevents a single client from exhausting server memory by opening handles in a loop without closing them (DoS on the scheme server).
- PCI_
PREFIX ๐ - Top-level paths.
- READDIR_
DATA_ ๐CAPACITY - Max bytes usable for readdir entries: full payload minus the fixed
reply prologue (
next_cursor+count+size, written at 4..8). - READDIR_
HEADER_ ๐SIZE - Fixed reply prologue of a READDIR reply:
status(4) +next_cursor(2) +count(1) +size(1), written at payload offsets 0..8. - READ_
DATA_ ๐CAPACITY - Max inline data bytes carried by a READ reply:
full payload minus the
status/countprefix. - READ_
HEADER_ ๐SIZE - Fixed reply prologue of a READ reply:
status(4) +count(4). - STATUS_
OK ๐