class PcirootProtocolClient

Defined at line 198 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

Public Members

static const uint32_t kProtocolId

Public Methods

void PcirootProtocolClient ()

Defined at line 203 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

void PcirootProtocolClient (const pciroot_protocol_t * proto)

Defined at line 205 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

void PcirootProtocolClient (zx_device_t * parent)

Defined at line 208 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

void PcirootProtocolClient (zx_device_t * parent, const char * fragment_name)

Defined at line 219 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t CreateFromDevice (zx_device_t * parent, PcirootProtocolClient * result)

Create a PcirootProtocolClient from the given parent device + "fragment".

If ZX_OK is returned, the created object will be initialized in |result|.

Defined at line 233 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t CreateFromDevice (zx_device_t * parent, const char * fragment_name, PcirootProtocolClient * result)

Create a PcirootProtocolClient from the given parent device.

If ZX_OK is returned, the created object will be initialized in |result|.

Defined at line 248 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

void GetProto (pciroot_protocol_t * proto)

Defined at line 260 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

bool is_valid ()

Defined at line 264 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

void clear ()

Defined at line 267 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t GetBti (uint32_t bdf, uint32_t index, zx::bti * out_bti)

Legacy methods

Defined at line 273 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t GetPciPlatformInfo (pci_platform_info_t * out_info)

Get the platform information structure from the pciroot protocol to be used for bus init.

Defined at line 278 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

bool DriverShouldProxyConfig ()

Contemporary methods:

Returns true if the bus driver should proxy all device config access to pciroot. This is

necessary in cases of IO config on x86, or for controllers that require configuration to

map in device config headers.

Defined at line 286 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t ReadConfig8 (const pci_bdf_t * address, uint16_t offset, uint8_t * out_value)

Read 8 bytes from config space for device at bdf address |address|:we, offset |offset|.

Defined at line 291 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t ReadConfig16 (const pci_bdf_t * address, uint16_t offset, uint16_t * out_value)

Read 16 bytes from config space for device at bdf address |address|, offset |offset|.

Defined at line 296 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t ReadConfig32 (const pci_bdf_t * address, uint16_t offset, uint32_t * out_value)

Read 32 bytes from config space for device at bdf address |address|, offset |offset|.

Defined at line 301 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

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

Write 8 bytes to config space for device at bdf |address| offset |offset|.

Defined at line 306 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

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

Write 16 bytes to config space for device at bdf |address| offset |offset|.

Defined at line 311 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

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

Write 32 bytes to config space for device at bdf |address| offset |offset|.

Defined at line 316 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t GetAddressSpace (uint64_t in_base, uint64_t size, pci_address_space_t type, bool low, uint64_t * out_base, zx::resource * out_resource, zx::eventpair * out_token)

Request address space reservations from platform bus to use for mapping bars / bridges

|in_base| is an optional requested start address which should otherwise be 0. |size| is the

size of the request in bytes. |low| dictates whether the allocation should be an address

below 4 GB or not.

On success, the base address is provided in |out_base| and the size is |size|.

An error will be returned if |size| cannot be fulfilled, |low| is set with |in_base|+|size|

being >=4GB, or if a requested |in_base| cannot be provided.

Defined at line 329 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

zx_status_t AllocateMsi (uint32_t msi_count, bool can_target_64bit, zx::msi * out_allocation, msi_allocation_info_t * out_info)

Defined at line 333 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h

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

Get a handle corresponding to an InterruptDispatcher for the provided |msi_id| in |allocation|.

Errors:

|ZX_ERR_INVALID_ARGS|: |options| is not 0, |msi_id| is out of bounds,

or |cfg_vmo| contains an invalid VMO handle.

|ZX_ERR_ALREADY_BOUND|: A handle for |msi_id| has already been returned and is still

outstanding.

Defined at line 344 of file fidling/gen/sdk/banjo/fuchsia.hardware.pciroot/fuchsia.hardware.pciroot/banjo/cpp/fuchsia/hardware/pciroot/cpp/banjo.h