Expand description
PCI Capability chain walking and VirtIO capability parsing.
Provides functions to discover and parse VirtIO PCI Modern capabilities.
Β§Reference
- PCI Spec 3.0 Β§6.7 (Capability List)
- VirtIO Spec 1.2 Β§4.1.4 (PCI Device Discovery)
StructsΒ§
- Parsed VirtIO PCI capability information.
- Collection of all VirtIO PCI capabilities for a device.
- Walk
Caps π
ConstantsΒ§
- PCI capability ID: Vendor-specific (used by VirtIO).
- VirtIO PCI capability type: Common configuration.
- VirtIO PCI capability type: Device-specific configuration.
- VirtIO PCI capability type: ISR status.
- VirtIO PCI capability type: Notification area.
- VirtIO PCI capability type: PCI config access alternative.
FunctionsΒ§
- asm_
pci_ π βfind_ cap Find capability by ID. - asm_
pci_ π βfind_ virtio_ cap Find VirtIO capability by cfg_type. - asm_
pci_ π βget_ cap_ ptr Get first capability pointer. - asm_
pci_ π βhas_ capabilities Check if device has capability list. - asm_
virtio_ π βpci_ parse_ cap Parse VirtIO capability at offset. - asm_
virtio_ π βpci_ probe_ caps Probe all VirtIO caps and fill array. - asm_
virtio_ π βpci_ read_ bar Read BAR value. Returns: RAX = address, RDX = 1 if memory / 0 if IO - Dump all capabilities to serial (uses crateβs serial_println if available).
- Find a capability by ID.
- Find a VirtIO capability by cfg_type.
- Get the first capability pointer for a device.
- Check if a PCI device supports capability list.
- Parse a VirtIO capability at the given config space offset.
- Probe all VirtIO capabilities for a device.
- Read a BAR base address.
- Walk capability chain in pure Rust (fallback).