fuchsia.hardware.platform.device

Added: 18

PROTOCOLS

Device

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

GetBoardInfo

Return information about the board the device is attached to.

Request

<EMPTY>

Response

NameType
payload Device_GetBoardInfo_Result

GetBtiById

Returns a bus transaction initiator (bti) handle for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of btis.
  • error ZX_ERR_INTERNAL if the retrieved bti is not valid.

Request

NameType
index uint32

Response

NameType
payload Device_GetBtiById_Result

GetBtiByName

Returns a bus transaction initiator (bti) handle for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved bti is not valid.

Request

NameType
name string:128

Response

NameType
payload Device_GetBtiByName_Result

GetInterruptById

Returns an interrupt handle for the given |index|. |flags| is forwarded as the |options| parameter to zx_interrupt_create.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of interrupts.
  • error ZX_ERR_INTERNAL if the retrieved interrupt is not valid.

Request

NameType
index uint32
flags uint32

Response

NameType
payload Device_GetInterruptById_Result

GetInterruptByName

Returns an interrupt handle for the given |name|. |flags| is forwarded as the |options| parameter to zx_interrupt_create.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved interrupt is not valid.

Request

NameType
name string:128
flags uint32

Response

NameType
payload Device_GetInterruptByName_Result

GetMetadata

Returns the metadata associated with the device and |type|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.

Added: HEAD

Request

NameType
type uint32

Response

NameType
payload Device_GetMetadata_Result

GetMetadata2

Returns the metadata associated with the device and |id|. Returns ZX_ERR_NOT_FOUND if the metadata does not exist.

Added: HEAD

Request

NameType
id string

Response

NameType
payload Device_GetMetadata2_Result

GetMmioById

Returns a memory mapped IO (MMIO) resource for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of mmios.
  • error ZX_ERR_INTERNAL if the retrieved mmio is not valid.
  • error ZX_ERR_NOT_FOUND if the retrieved mmio's base address is NULL.

Request

NameType
index uint32

Response

NameType
payload Device_GetMmioById_Result

GetMmioByName

Returns a memory mapped IO (MMIO) resource for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved mmio is not valid.
  • error ZX_ERR_NOT_FOUND if the retrieved's mmio base address is NULL.

Request

NameType
name string:128

Response

NameType
payload Device_GetMmioByName_Result

GetNodeDeviceInfo

Returns information about the device corresponding to the node that the driver has bound to.

Request

<EMPTY>

Response

NameType
payload Device_GetNodeDeviceInfo_Result

GetPowerConfiguration

Returns power configuration for the device the driver has bound to.

Added: HEAD

Request

<EMPTY>

Response

NameType
payload Device_GetPowerConfiguration_Result

GetSmcById

Returns a secure monitor call (smc) handle for the given |index|.

  • error ZX_ERR_OUT_OF_RANGE if |index| is equal or greater than the number of smcs.
  • error ZX_ERR_INTERNAL if the retrieved smc is not valid.

Request

NameType
index uint32

Response

NameType
payload Device_GetSmcById_Result

GetSmcByName

Returns a secure monitor call (smc) handle for the given |name|.

  • error ZX_ERR_INVALID_ARGS if |name| is an empty string.
  • error ZX_ERR_OUT_OF_RANGE if |name| is not found.
  • error ZX_ERR_INTERNAL if the retrieved smc is not valid.

Request

NameType
name string:128

Response

NameType
payload Device_GetSmcByName_Result

STRUCTS

Device_GetBtiById_Response resource

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

FieldTypeDescriptionDefault
bti handle<bti> No default

Device_GetBtiByName_Response resource

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

FieldTypeDescriptionDefault
bti handle<bti> No default

Device_GetInterruptById_Response resource

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

FieldTypeDescriptionDefault
irq handle<interrupt> No default

Device_GetInterruptByName_Response resource

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

FieldTypeDescriptionDefault
irq handle<interrupt> No default

Device_GetMetadata2_Response

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

FieldTypeDescriptionDefault
metadata vector<uint8> No default

Device_GetMetadata_Response

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

FieldTypeDescriptionDefault
metadata vector<uint8> No default

Device_GetPowerConfiguration_Response

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

FieldTypeDescriptionDefault
config vector<fuchsia.hardware.power/PowerElementConfiguration>:32 No default

Device_GetSmcById_Response resource

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

FieldTypeDescriptionDefault
smc handle<resource> No default

Device_GetSmcByName_Response resource

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

FieldTypeDescriptionDefault
smc handle<resource> No default

TABLES

BoardInfo

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

OrdinalFieldTypeDescription
vid uint32

Vendor ID for the board.

pid uint32

Product ID for the board.

board_name string:32

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

board_revision uint32

Board specific revision number.

Mmio resource

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

OrdinalFieldTypeDescription
offset zx/Off

Offset from beginning of VMO where the mmio region begins.

size uint64

Size of mmio region.

vmo handle<vmo>

The virtual memory object which should be mapped into the driver's address space.

NodeDeviceInfo

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

OrdinalFieldTypeDescription
vid uint32

Vendor ID, specified in //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h

pid uint32

Platform ID, specified in //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h

did uint32

Device ID, specified in //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h

mmio_count uint32

The number of MMIO regions provided to this device.

irq_count uint32

The number of interrupts provided to this device.

bti_count uint32

The number of bus transaction initiaitors provided to this device.

smc_count uint32

The number of secure monitor call resources provided to this device.

metadata_count uint32

The number of metadata blobs associated provided this device.

name string:32

The name the board driver provided for this device.

UNIONS

Device_GetBoardInfo_Result strict

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

OrdinalVariantTypeDescription
response BoardInfo
err zx/Status
framework_err internal

Device_GetBtiById_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetBtiById_Response
err zx/Status
framework_err internal

Device_GetBtiByName_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetBtiByName_Response
err zx/Status
framework_err internal

Device_GetInterruptById_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetInterruptById_Response
err zx/Status
framework_err internal

Device_GetInterruptByName_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetInterruptByName_Response
err zx/Status
framework_err internal

Device_GetMetadata2_Result strict

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

OrdinalVariantTypeDescription
response Device_GetMetadata2_Response
err zx/Status
framework_err internal

Device_GetMetadata_Result strict

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

OrdinalVariantTypeDescription
response Device_GetMetadata_Response
err zx/Status
framework_err internal

Device_GetMmioById_Result strict resource

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

OrdinalVariantTypeDescription
response Mmio
err zx/Status
framework_err internal

Device_GetMmioByName_Result strict resource

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

OrdinalVariantTypeDescription
response Mmio
err zx/Status
framework_err internal

Device_GetNodeDeviceInfo_Result strict

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

OrdinalVariantTypeDescription
response NodeDeviceInfo
err zx/Status
framework_err internal

Device_GetPowerConfiguration_Result strict

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

OrdinalVariantTypeDescription
response Device_GetPowerConfiguration_Response
err zx/Status
framework_err internal

Device_GetSmcById_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetSmcById_Response
err zx/Status
framework_err internal

Device_GetSmcByName_Result strict resource

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

OrdinalVariantTypeDescription
response Device_GetSmcByName_Response
err zx/Status
framework_err internal

SERVICES

Service

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

NameTypeTransport
device fuchsia.hardware.platform.device/Device Channel