class FakePciroot

Defined at line 28 of file ../../src/devices/bus/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)

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

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

void FakePciroot ()

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

void FakePciroot (FakePciroot && )

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

pciroot_protocol_t * proto ()

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

pci_platform_info_t info ()

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

FakeEcam & ecam ()

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

uint8_t bus_start ()

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

uint8_t bus_end ()

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

bool is_extended ()

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

zx::bti & bti ()

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

zx::resource & resource ()

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

std::vector<pci_legacy_irq_t> & legacy_irqs ()

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

std::vector<pci_irq_routing_entry_t> & routing_entries ()

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

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

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

std::vector<pci_bdf_t> & acpi_devices ()

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

std::vector<pci_bdf_t> & devicetree_devices ()

Defined at line 78 of file ../../src/devices/bus/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 81 of file ../../src/devices/bus/drivers/pci/test/fakes/fake_pciroot.h

zx_status_t PcirootConnectSysmem (zx::channel connection)

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

zx_status_t PcirootGetPciPlatformInfo (pci_platform_info_t * out_info)

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

bool PcirootDriverShouldProxyConfig ()

Defined at line 106 of file ../../src/devices/bus/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 107 of file ../../src/devices/bus/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 119 of file ../../src/devices/bus/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 131 of file ../../src/devices/bus/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 142 of file ../../src/devices/bus/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 153 of file ../../src/devices/bus/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 164 of file ../../src/devices/bus/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 176 of file ../../src/devices/bus/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 193 of file ../../src/devices/bus/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 202 of file ../../src/devices/bus/drivers/pci/test/fakes/fake_pciroot.h

void enable_get_bti (bool enable)

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

void enable_connect_sysmem (bool enable)

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

void enable_get_pci_platform_info (bool enable)

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

void enable_driver_should_proxy_config (bool enable)

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

void enable_config_read (bool enable)

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

void enable_config_write (bool enable)

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

void enable_allocate_msi (bool enable)

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

void enable_get_address_space (bool enable)

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

void enable_get_msi_handle (bool enable)

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