fuchsia.hardware.platform.device

Added: HEAD

协议

设备

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

GetBoardInfo

返回设备所连接的开发板的相关信息。

请求

<EMPTY>

响应

名称类型
payload Device_GetBoardInfo_Result

GetBtiById

返回给定 |index| 的总线事务发起方 (bti) 句柄。

  • 如果 |index| 等于或大于位数,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 bti 无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
index uint32

响应

名称类型
payload Device_GetBtiById_Result

GetBtiByName

返回给定 |name| 的总线事务发起方 (bti) 句柄。

  • 如果 |name| 为空字符串,则返回错误 ZX_ERR_INVALID_ARGS。
  • 如果找不到 |name|,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 bti 无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
name string:128

响应

名称类型
payload Device_GetBtiByName_Result

GetInterruptById

返回给定 |index| 的中断句柄。|flags| 作为 |options| 参数转发到 zx_interrupt_create。

  • 如果 |index| 等于或大于中断次数,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的中断无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
index uint32
flags uint32

响应

名称类型
payload Device_GetInterruptById_Result

GetInterruptByName

返回给定 |name| 的中断句柄。|flags| 作为 |options| 参数转发到 zx_interrupt_create。

  • 如果 |name| 为空字符串,则返回错误 ZX_ERR_INVALID_ARGS。
  • 如果找不到 |name|,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的中断无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
name string:128
flags uint32

响应

名称类型
payload Device_GetInterruptByName_Result

GetMetadata

返回与设备和 |id| 关联的元数据。如果元数据不存在,则返回 ZX_ERR_NOT_FOUND。

Added: HEAD

请求

名称类型
id string

响应

名称类型
payload Device_GetMetadata_Result

GetMmioById

返回给定 |index| 的内存映射 IO (MMIO) 资源。

  • 如果 |index| 等于或大于 mmio 的数量,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 mmio 无效,则返回错误 ZX_ERR_INTERNAL。
  • 如果检索到的 mmio 的基址为 NULL,则返回错误 ZX_ERR_NOT_FOUND。

请求

名称类型
index uint32

响应

名称类型
payload Device_GetMmioById_Result

GetMmioByName

返回给定 |name| 的内存映射 IO (MMIO) 资源。

  • 如果 |name| 为空字符串,则返回错误 ZX_ERR_INVALID_ARGS。
  • 如果找不到 |name|,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 mmio 无效,则返回错误 ZX_ERR_INTERNAL。
  • 如果检索到的 mmio 基址为 NULL,则返回错误 ZX_ERR_NOT_FOUND。

请求

名称类型
name string:128

响应

名称类型
payload Device_GetMmioByName_Result

GetNodeDeviceInfo

返回与驱动程序已绑定到的节点对应的设备的相关信息。

请求

<EMPTY>

响应

名称类型
payload Device_GetNodeDeviceInfo_Result

GetPowerConfiguration

返回驱动程序已绑定到的设备的电源配置。

Added: HEAD

请求

<EMPTY>

响应

名称类型
payload Device_GetPowerConfiguration_Result

GetSmcById

返回给定 |index| 的安全监控调用 (smc) 句柄。

  • 如果 |index| 等于或大于 smc 的数量,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 smc 无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
index uint32

响应

名称类型
payload Device_GetSmcById_Result

GetSmcByName

返回给定 |name| 的安全监控器调用 (smc) 句柄。

  • 如果 |name| 为空字符串,则返回错误 ZX_ERR_INVALID_ARGS。
  • 如果找不到 |name|,则返回错误 ZX_ERR_OUT_OF_RANGE。
  • 如果检索到的 smc 无效,则返回错误 ZX_ERR_INTERNAL。

请求

名称类型
name string:128

响应

名称类型
payload Device_GetSmcByName_Result

STRUCTS

Device_GetBtiById_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
bti handle<bti> 无默认应用

Device_GetBtiByName_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
bti handle<bti> 无默认应用

Device_GetInterruptById_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
irq handle<interrupt> 无默认应用

Device_GetInterruptByName_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
irq handle<interrupt> 无默认应用

Device_GetMetadata_Response

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
metadata vector<uint8> 无默认应用

Device_GetPowerConfiguration_Response

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
config vector<fuchsia.hardware.power/PowerElementConfiguration>:32 无默认应用

Device_GetSmcById_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
smc handle<resource> 无默认应用

Device_GetSmcByName_Response 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

字段类型说明默认
smc handle<resource> 无默认应用

TABLES

BoardInfo

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数字段类型说明
vid uint32

主板的供应商 ID。

pid uint32

主板的产品 ID。

board_name string:32

来自启动映像平台 ID 记录(或 x86 平台上的 BIOS)的主板名称。

board_revision uint32

主板特定修订版本号。

Mmio 资源

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数字段类型说明
offset zx/Off

从 VMO 开头到 mmio 区域开头的偏移量。

size uint64

mmio 区域的大小。

vmo handle<vmo>

应映射到驱动程序地址空间的虚拟内存对象。

NodeDeviceInfo

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数字段类型说明
vid uint32

供应商 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定

pid uint32

平台 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定

did uint32

设备 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定

mmio_count uint32

提供给此设备的 MMIO 区域数量。

irq_count uint32

提供给此设备的中断数量。

bti_count uint32

为此设备提供的总线事务发起方数量。

smc_count uint32

为此设备提供的安全监控器调用资源数量。

metadata_count uint32

此设备提供的关联元数据 blob 的数量。

name string:32

主板驱动程序为此设备提供的名称。

UNIONS

Device_GetBoardInfo_Result strict

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response BoardInfo
err zx/Status
framework_err internal

Device_GetBtiById_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetBtiById_Response
err zx/Status
framework_err internal

Device_GetBtiByName_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetBtiByName_Response
err zx/Status
framework_err internal

Device_GetInterruptById_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetInterruptById_Response
err zx/Status
framework_err internal

Device_GetInterruptByName_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetInterruptByName_Response
err zx/Status
framework_err internal

Device_GetMetadata_Result strict

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetMetadata_Response
err zx/Status
framework_err internal

Device_GetMmioById_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Mmio
err zx/Status
framework_err internal

Device_GetMmioByName_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Mmio
err zx/Status
framework_err internal

Device_GetNodeDeviceInfo_Result strict

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response NodeDeviceInfo
err zx/Status
framework_err internal

Device_GetPowerConfiguration_Result strict

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetPowerConfiguration_Response
err zx/Status
framework_err internal

Device_GetSmcById_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetSmcById_Response
err zx/Status
framework_err internal

Device_GetSmcByName_Result strict resource

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

序数变体类型说明
response Device_GetSmcByName_Response
err zx/Status
framework_err internal

服务

服务

在 fuchsia.hardware.platform.device/platform-device.fidl 中定义

名称类型传输
设备 fuchsia.hardware.platform.device/Device 渠道