Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.platform.bus

PROTOCOLS

PBus

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

AddComposite

Adds a composite platform device to the bus.

Request

NameType
dev PbusDev
fragments uint64
fragment_count uint64
primary_fragment string

Response

NameType
s zx/status

CompositeDeviceAdd

Deprecated, use AddComposite() instead. Adds a composite platform device to the bus. The platform device specified by |dev| is the zeroth fragment and the |fragments| array specifies fragments 1 through n. The composite device is started in a the driver host of the |primary_fragment| if it is specified, or a new driver host if it is is NULL. It is not possible to set the primary fragment to "pdev" as that would cause the driver to spawn in the platform bus's driver host.

Request

NameType
dev PbusDev
fragments uint64
fragments_count uint64
primary_fragment string

Response

NameType
s zx/status

DeviceAdd

Adds a new platform device to the bus, using configuration provided by |dev|. Platform devices are created in their own separate devhosts.

Request

NameType
dev PbusDev

Response

NameType
s zx/status

GetBoardInfo

Board drivers may use this to get information about the board, and to differentiate between multiple boards that they support.

Request

<EMPTY>

Response

NameType
s zx/status
info fuchsia.hardware.platform.device/PdevBoardInfo

ProtocolDeviceAdd

Adds a device for binding a protocol implementation driver. These devices are added in the same devhost as the platform bus. After the driver binds to the device it calls pbus_register_protocol() to register its protocol with the platform bus. pbus_protocol_device_add() blocks until the protocol implementation driver registers its protocol (or times out).

Request

NameType
proto_id uint32
dev PbusDev

Response

NameType
s zx/status

RegisterProtocol

Called by protocol implementation drivers to register their protocol with the platform bus.

Request

NameType
proto_id uint32
protocol vector<uint8>

Response

NameType
s zx/status

RegisterSysSuspendCallback

Request

NameType
suspend_cb PbusSysSuspend

Response

NameType
s zx/status

SetBoardInfo

Board drivers may use this to set information about the board (like the board revision number). Platform device drivers can access this via pdev_get_board_info().

Request

NameType
info PbusBoardInfo

Response

NameType
s zx/status

SetBootloaderInfo

Board drivers may use this to set information about the bootloader.

Request

NameType
info PbusBootloaderInfo

Response

NameType
s zx/status

PbusSysSuspend

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

Callback

Request

NameType
requested_state uint8
enable_wake bool
suspend_reason uint8

Response

NameType
out_status zx/status
out_state uint8

STRUCTS

PbusBoardInfo

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

Subset of pdev_board_info_t to be set by the board driver.

FieldTypeDescriptionDefault
board_name string[32]

Board name from the boot image platform ID record, (or from the BIOS on x86 platforms).

No default
board_revision uint32

Board specific revision number.

No default

PbusBootMetadata

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

Device metadata to be passed from bootloader via a ZBI record.

FieldTypeDescriptionDefault
zbi_type uint32

Metadata type (matches zbi_header_t.type for bootloader metadata).

No default
zbi_extra uint32

Matches zbi_header_t.extra for bootloader metadata. Used in cases where bootloader provides multiple metadata records of the same type.

No default

PbusBootloaderInfo

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
vendor string[32] No default

PbusBti

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
iommu_index uint32 No default
bti_id uint32 No default

PbusDev

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
name string No default
vid uint32

BIND_PLATFORM_DEV_VID

No default
pid uint32

BIND_PLATFORM_DEV_PID

No default
did uint32

BIND_PLATFORM_DEV_DID

No default
instance_id uint32

Instance ID. Contributes to device-name if non-zero. BIND_PLATFORM_DEV_INSTANCE_ID

No default
mmio vector<PbusMmio> No default
irq vector<PbusIrq> No default
bti vector<PbusBti> No default
smc vector<PbusSmc> No default
metadata vector<PbusMetadata> No default
boot_metadata vector<PbusBootMetadata> No default

PbusIrq

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
irq uint32 No default
mode uint32

ZX_INTERRUPT_MODE_* flags

No default

PbusMetadata

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

Device metadata.

FieldTypeDescriptionDefault
type uint32

Metadata type.

No default
data vector<uint8>

Pointer to metadata.

No default

PbusMmio

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
base zx/paddr

Physical address of MMIO region. Does not need to be page aligned.

No default
length uint64

Length of MMIO region in bytes. Does not need to be page aligned.

No default

PbusSmc

Defined in fuchsia.hardware.platform.bus/platform-bus.fidl

FieldTypeDescriptionDefault
service_call_num_base uint32

The device is granted the ability to make SMC calls with service call numbers ranging from service_call_num_base to service_call_num_base + count - 1.

No default
count uint32 No default
exclusive bool

The device has exclusive access to this smc range.

No default