class FakePciProtocolInternal
Defined at line 27 of file ../../src/devices/pci/testing/protocol/internal.h
Public Members
static const uint8_t kPciExpressCapabilitySize
Public Methods
void FakePciProtocolInternal ()
Defined at line 21 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetBar (uint32_t bar_id, pci_bar_t * out_res)
Defined at line 29 of file ../../src/devices/pci/testing/protocol/internal.cc
void ~FakePciProtocolInternal ()
Defined at line 32 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciReadConfig8 (uint16_t offset, uint8_t * out_value)
Defined at line 43 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciReadConfig16 (uint16_t offset, uint16_t * out_value)
Defined at line 47 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciReadConfig32 (uint16_t offset, uint32_t * out_value)
Defined at line 51 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciWriteConfig8 (uint16_t offset, uint8_t value)
Defined at line 55 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciWriteConfig16 (uint16_t offset, uint16_t value)
Defined at line 57 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciAckInterrupt ()
Defined at line 60 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciWriteConfig32 (uint16_t offset, uint32_t value)
Defined at line 61 of file ../../src/devices/pci/testing/protocol/internal.h
zx_status_t PciMapInterrupt (uint32_t which_irq, zx::interrupt * out_handle)
Defined at line 64 of file ../../src/devices/pci/testing/protocol/internal.cc
void PciGetInterruptModes (fuchsia_hardware_pci::wire::InterruptModes * modes)
Defined at line 94 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciSetInterruptMode (fuchsia_hardware_pci::InterruptMode mode, uint32_t requested_irq_count)
Defined at line 111 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciSetBusMastering (bool enable)
Defined at line 163 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciResetDevice ()
Defined at line 168 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetDeviceInfo (pci_device_info_t * out_info)
Defined at line 173 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetFirstCapability (uint8_t id, uint8_t * out_offset)
Defined at line 187 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetNextCapability (uint8_tid,uint8_toffset,uint8_t *out_offset)
Defined at line 191 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetFirstExtendedCapability (uint16_t id, uint16_t * out_offset)
Defined at line 196 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetNextExtendedCapability (uint16_tid,uint16_toffset,uint16_t *out_offset)
Defined at line 201 of file ../../src/devices/pci/testing/protocol/internal.cc
zx_status_t PciGetBti (uint32_t index, zx::bti * out_bti)
Defined at line 206 of file ../../src/devices/pci/testing/protocol/internal.cc
Protected Methods
fuchsia_hardware_pci::InterruptMode irq_mode ()
Defined at line 104 of file ../../src/devices/pci/testing/protocol/internal.h
uint32_t irq_cnt ()
Defined at line 105 of file ../../src/devices/pci/testing/protocol/internal.h
std::array<FakeBar, 6> & bars ()
Defined at line 106 of file ../../src/devices/pci/testing/protocol/internal.h
std::vector<FakeCapability> & capabilities ()
Defined at line 107 of file ../../src/devices/pci/testing/protocol/internal.h
uint32_t reset_cnt ()
Defined at line 109 of file ../../src/devices/pci/testing/protocol/internal.h
std::optional<bool> bus_master_en ()
Defined at line 110 of file ../../src/devices/pci/testing/protocol/internal.h
fuchsia_hardware_pci::wire::DeviceInfo & info ()
Defined at line 111 of file ../../src/devices/pci/testing/protocol/internal.h
zx::vmo & config ()
Defined at line 112 of file ../../src/devices/pci/testing/protocol/internal.h
void AddCapabilityInternal (uint8_tcapability_id,uint8_tposition,uint8_tsize)
Capabilities are the hardest part to implement because if a device expects a capability
at a given address in configuration space then it's possible they will want to write to it.
Additionally, vendor capabilities are of a variable size which is read from the capability
at runtime. To further complicate things, particular devices will have registers in their
configuration space that the device may be expected to use but which are not exposed
through any PCI base address register mechanism. This makes it risky to lay out a
capability wherever we wish for fear it may overlap with one of these spaces. For this
reason we do no validation of the capability's setup in configuration space besides writing
the capability id and next pointer. The test author is responsible for setting up the
layout of the capabilities as necessary to match their device, but we can provide helper
methods to ensure they're doing it properly.
Defined at line 213 of file ../../src/devices/pci/testing/protocol/internal.cc
void AddCapabilityInternal (fuchsia_hardware_pci::CapabilityIdcapability_id,uint8_tposition,uint8_tsize)
Defined at line 248 of file ../../src/devices/pci/testing/protocol/internal.cc
zx::interrupt & AddInterrupt (fuchsia_hardware_pci::InterruptMode mode)
Defined at line 253 of file ../../src/devices/pci/testing/protocol/internal.cc
fuchsia_hardware_pci::wire::DeviceInfo SetDeviceInfoInternal (fuchsia_hardware_pci::wire::DeviceInfo new_info)
Defined at line 284 of file ../../src/devices/pci/testing/protocol/internal.cc
void reset ()
Defined at line 303 of file ../../src/devices/pci/testing/protocol/internal.cc