class PciDevice
Defined at line 144 of file ../../src/virtualization/bin/vmm/pci.h
Stores the state of PCI devices.
Public Methods
std::string_view name ()
Return a human-readable name for this device, for debugging and logging.
Defined at line 167 of file ../../src/virtualization/bin/vmm/pci.h
const PciBar * bar (size_t n)
Returns a pointer to a base address register for this device.
Returns nullptr if the register is not implemented.
Defined at line 172 of file ../../src/virtualization/bin/vmm/pci.h
const Attributes & attrs ()
Return static device attributes.
Defined at line 175 of file ../../src/virtualization/bin/vmm/pci.h
zx_status_t ReadConfig (uint64_t reg, IoValue * value)
Handle accesses to this device config space.
Defined at line 593 of file ../../src/virtualization/bin/vmm/pci.cc
zx_status_t WriteConfig (uint64_t reg, const IoValue & value)
Defined at line 619 of file ../../src/virtualization/bin/vmm/pci.cc
zx_status_t Interrupt ()
If interrupts are enabled and the device has one pending, send it to the
bus.
Defined at line 689 of file ../../src/virtualization/bin/vmm/pci.cc
Protected Methods
void ~PciDevice ()
Defined at line 179 of file ../../src/virtualization/bin/vmm/pci.h
template <typename T>
zx_status_t AddCapability (const T & capability)
Install the given standard layout, trivially copyable type as a PCI capability.
Capabilities types must have a size aligned to 32-bits.
The "next" pointer in cap header (byte 2) will be overwritten by
the function, and need not contain any particular value.
Defined at line 188 of file ../../src/virtualization/bin/vmm/pci.h
void PciDevice (const Attributes & attrs)
Defined at line 423 of file ../../src/virtualization/bin/vmm/pci.cc
zx::result<size_t> AddBar (PciBar bar)
Install the given PciBar in the next available slot, returning the index
the PciBar was installed at.
Returns ZX_ERR_NO_RESOURCES if all BARs have already been used.
Defined at line 470 of file ../../src/virtualization/bin/vmm/pci.cc
Records
Friends
class PciBus