class FakePciroot

Defined at line 28 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

This FakePciroot class for the moment is a stub and test files

will specialize the methods they need. Eventually when more tests

are sorted out it may make sense to have pciroot tests be similar

to the mock-i2c style fakes.

Public Members

static const uint64_t kDefaultHighMemoryAddress
static const uint32_t kDefaultLowMemoryAddress
static const uint16_t kDefaultIoAddress

Public Methods

void FakePciroot (uint8_t bus_start, uint8_t bus_cnt, bool is_extended, uint16_t segment_group)

By default, pciroot won't populate an ecam unless it's called with Create().

Defined at line 34 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void FakePciroot ()

Defined at line 50 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void FakePciroot (FakePciroot && )

Defined at line 52 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

pciroot_protocol_t * proto ()

Defined at line 54 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

pci_platform_info_t info ()

Defined at line 55 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

FakeEcam & ecam ()

Defined at line 73 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

uint8_t bus_start ()

Defined at line 74 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

uint8_t bus_end ()

Defined at line 75 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

uint16_t segment_group ()

Defined at line 76 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

bool is_extended ()

Defined at line 77 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx::bti & bti ()

Defined at line 78 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx::resource & mmio_resource ()

Defined at line 79 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx::resource & ioport_resource ()

Defined at line 80 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

std::vector<pci_legacy_irq_t> & legacy_irqs ()

Defined at line 81 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

std::vector<pci_irq_routing_entry_t> & routing_entries ()

Defined at line 82 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

std::vector<zx::eventpair> & allocation_eps ()

Defined at line 83 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

std::vector<pci_bdf_t> & acpi_devices ()

Defined at line 84 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

std::vector<pci_bdf_t> & devicetree_devices ()

Defined at line 85 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootGetBti (uint32_t bdf, uint32_t index, zx::bti * bti)

Protocol methods.

Defined at line 88 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootConnectSysmem (zx::channel connection)

Defined at line 96 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootGetPciPlatformInfo (pci_platform_info_t * out_info)

Defined at line 104 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

bool PcirootDriverShouldProxyConfig ()

Defined at line 113 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootReadConfig8 (const pci_bdf_t * address, uint16_t offset, uint8_t * value)

Defined at line 114 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootReadConfig16 (const pci_bdf_t * address, uint16_t offset, uint16_t * value)

Defined at line 126 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootReadConfig32 (const pci_bdf_t * address, uint16_t offset, uint32_t * value)

Defined at line 138 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootWriteConfig8 (const pci_bdf_t * address, uint16_t offset, uint8_t value)

Defined at line 149 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootWriteConfig16 (const pci_bdf_t * address, uint16_t offset, uint16_t value)

Defined at line 160 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootWriteConfig32 (const pci_bdf_t * address, uint16_t offset, uint32_t value)

Defined at line 171 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootAllocateMsi (uint32_t requested_irqs, bool can_target_64bit, zx::msi * out_allocation, msi_allocation_info_t * out_info)

Defined at line 183 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootGetMsiHandle (zx::msi allocation, uint32_t options, uint16_t msi_id, zx::vmo cfg_vmo, uint64_t cfg_offset, zx::interrupt * out_interrupt)

Defined at line 200 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_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 * resource, zx::eventpair * eventpair)

Defined at line 209 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_get_bti (bool enable)

Defined at line 242 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_connect_sysmem (bool enable)

Defined at line 243 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_get_pci_platform_info (bool enable)

Defined at line 244 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_driver_should_proxy_config (bool enable)

Defined at line 245 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_config_read (bool enable)

Defined at line 248 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_config_write (bool enable)

Defined at line 249 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_allocate_msi (bool enable)

Defined at line 250 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_get_address_space (bool enable)

Defined at line 251 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h

void enable_get_msi_handle (bool enable)

Defined at line 252 of file ../../src/devices/pci/drivers/pci/test/fakes/fake_pciroot.h