class PcirootBase
Defined at line 113 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
PcirootBase is the interface between a platform's PCI RootHost, and the PCI Bus Driver instances.
It is templated on |PlatformContextType| so that platform specific context can be provided to
each root as necessary. For instance, in ACPI systems this contains the ACPI object for the PCI
root to work with ACPICA.
Many methods may overlap between platforms, but the metadata that a given platform may need to
track can vary. To support this a PcirootBase class templated off the context type is provided
here and platforms are expected to derive it and override the methods they need to implement.
Public Methods
void PcirootBase (PciRootHost * host)
Defined at line 115 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
void ~PcirootBase ()
Defined at line 116 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
bool PcirootDriverShouldProxyConfig ()
If |true| is returned by the Pciroot implementation then the bus driver
will send all config space reads and writes over the Pciroot protocol
rather than in the bus driver using MMIO/IO access. This exists to work
with non-standard PCI implementations that require controller configuration
before accessing a given device.
Defined at line 123 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootReadConfig8 (const pci_bdf_t * address, uint16_t offset, uint8_t * value)
Config space read/write accessors for PCI systems that require platform
bus to configure something before config space is accessible. For ACPI
systems we only intend to use PIO access if MMIO config is unavailable.
In the event we do use them though, we're restricted to the base 256 byte
PCI config header.
Defined at line 136 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootReadConfig16 (const pci_bdf_t * address, uint16_t offset, uint16_t * value)
Defined at line 140 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootReadConfig32 (const pci_bdf_t * address, uint16_t offset, uint32_t * value)
Defined at line 144 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootWriteConfig8 (const pci_bdf_t * address, uint16_t offset, uint8_t value)
Defined at line 148 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootWriteConfig16 (const pci_bdf_t * address, uint16_t offset, uint16_t value)
Defined at line 152 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootWriteConfig32 (const pci_bdf_t * address, uint16_t offset, uint32_t value)
Defined at line 156 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootAllocateMsi (uint32_t msi_cnt, bool can_target_64bit, zx::msi * allocation)
Defined at line 161 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h
zx_status_t PcirootGetAddressSpace (zx_paddr_t in_base, size_t size, pci_address_space_t type, bool low, uint64_t * out_base, zx::resource * out_resource, zx::eventpair * out_eventpair)
Allocate out of the IO / MMIO32 allocators if required, otherwise try to use whichever
MMIO allocator can fulfill the given request of specified base and size.
Defined at line 169 of file ../../src/devices/pci/lib/pci/include/lib/pci/pciroot.h