fuchsia.hardware.platform.device

添加日期:18

协议

设备

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

GetBoardInfo

返回有关设备所连接主板的信息。

请求

<EMPTY>

响应

名称类型
payload Device_GetBoardInfo_Result

GetBtiById

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

  • 如果 |index| 等于或大于 Btis 的数量,则出现错误 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

GetMmioById

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

  • 如果 |index| 等于或大于 mmios 的数量,则会收到 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

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

添加了: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

结构

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_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> 无默认取景方式

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]

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

联合

Device_GetBoardInfo_Result 严格

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

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

Device_GetBtiById_Result 严格 资源

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

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

Device_GetBtiByName_Result 严格 资源

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

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

Device_GetInterruptById_Result strict 资源

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

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

Device_GetInterruptByName_Result strict 资源

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

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

Device_GetMmioById_Result strict 资源

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

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

Device_GetMmioByName_Result strict 资源

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

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

Device_GetNodeDeviceInfo_Result 严格

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

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

Device_GetPowerConfiguration_Result 严格

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

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

Device_GetSmcById_Result strict 资源

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

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

Device_GetSmcByName_Result strict 资源

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 频道