class Pci
Defined at line 100 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
This class wraps a FIDL client for the fuchsia.hardware.pci/Device protocol. Its interface is
largely compatible with the legacy Banjo PCI protocol for easy migration. It also includes a
number of non-FIDL helper methods.
Public Members
static const char[] kFragmentName
Public Methods
zx_status_t GetDeviceInfo (fuchsia_hardware_pci::wire::DeviceInfo * out_info)
Defined at line 13 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t GetBar (fidl::AnyArena & arena, uint32_t bar_id, fuchsia_hardware_pci::wire::Bar * out_result)
The arena backs the memory of the Bar result and must have the same
lifetime or longer.
Defined at line 22 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t SetBusMastering (bool enabled)
Defined at line 41 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t ResetDevice ()
Defined at line 52 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t AckInterrupt ()
Defined at line 63 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t MapInterrupt (uint32_t which_irq, zx::interrupt * out_interrupt)
Defined at line 74 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void GetInterruptModes (fuchsia_hardware_pci::wire::InterruptModes * out_modes)
Defined at line 86 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t SetInterruptMode (fuchsia_hardware_pci::InterruptMode mode, uint32_t requested_irq_count)
Defined at line 94 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void Pci ()
Defined at line 103 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig8 (uint16_t offset, uint8_t * out_value)
Defined at line 105 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void Pci (zx_device_t * parent)
Construct a PCI client by connecting to the parent's PCI protocol.
This is for drivers that bind directly to a PCI node. For drivers that bind to a PCI composite,
use `FromFragment` instead.
Check `is_valid()` after calling to check for proper initialization. This can fail if the
parent does not expose a FIDL PCI interface.
Defined at line 112 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig8 (fuchsia_hardware_pci::Config offset, uint8_t * out_value)
Defined at line 117 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void Pci (fidl::ClientEnd<fuchsia_hardware_pci::Device> client_end)
Defined at line 121 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig16 (uint16_t offset, uint16_t * out_value)
Defined at line 121 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void Pci (zx_device_t * parent, const char * fragment_name)
Prefer Pci::FromFragment(parent) to construct.
Defined at line 126 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig16 (fuchsia_hardware_pci::Config offset, uint16_t * out_value)
Defined at line 133 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
void Pci (Pci && other)
Defined at line 136 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
Pci & operator= (Pci && other)
Defined at line 137 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig32 (uint16_t offset, uint32_t * out_value)
Defined at line 137 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
Pci FromFragment (zx_device_t * parent)
Check `is_valid()` after calling to check for proper initialization. This can fail if the
composite device does not expose a FIDL PCI interface.
Defined at line 141 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
void ~Pci ()
Defined at line 143 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t ReadConfig32 (fuchsia_hardware_pci::Config offset, uint32_t * out_value)
Defined at line 149 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t WriteConfig8 (uint16_t offset, uint8_t value)
Defined at line 153 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t WriteConfig16 (uint16_t offset, uint16_t value)
Defined at line 164 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t WriteConfig32 (uint16_t offset, uint32_t value)
Defined at line 175 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
bool is_valid ()
Defined at line 181 of file ../../src/devices/pci/lib/device-protocol-pci/include/lib/device-protocol/pci.h
zx_status_t GetFirstCapability (fuchsia_hardware_pci::CapabilityId id, uint8_t * out_offset)
Defined at line 186 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t GetNextCapability (fuchsia_hardware_pci::CapabilityId id, uint8_t start_offset, uint8_t * out_offset)
Defined at line 200 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t GetFirstExtendedCapability (fuchsia_hardware_pci::ExtendedCapabilityId id, uint16_t * out_offset)
Defined at line 216 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t GetNextExtendedCapability (fuchsia_hardware_pci::ExtendedCapabilityId id, uint16_t start_offset, uint16_t * out_offset)
Defined at line 231 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t GetBti (uint32_t index, zx::bti * out_bti)
Defined at line 247 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t ConfigureInterruptMode (uint32_t requested_irq_count, fuchsia_hardware_pci::InterruptMode * out_mode)
These two methods are not Banjo methods but miscellaneous PCI helper
methods.
Defined at line 285 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc
zx_status_t MapMmio (uint32_t bar_id, uint32_t cache_policy, std::optional<fdf::MmioBuffer> * mmio)
Defined at line 259 of file ../../src/devices/pci/lib/device-protocol-pci/pci.cc