协议
固件
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
GetFirmware
请求
| 名称 | 类型 |
|---|---|
type |
FirmwareType
|
响应
| 名称 | 类型 |
|---|---|
payload |
Firmware_GetFirmware_Result
|
InterruptAttributor
在 fuchsia.hardware.platform.bus/observability.fidl 中定义
提供与板卡驱动程序分配给各种设备的中断相关的信息。
GetInterruptInfo
请求
| 名称 | 类型 |
|---|---|
payload |
InterruptAttributorGetInterruptInfoRequest
|
响应
| 名称 | 类型 |
|---|---|
payload |
InterruptAttributor_GetInterruptInfo_Result
|
PlatformBus
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
AddCompositeNodeSpec
添加一个复合节点规范,其中 |node| 作为复合节点的父级之一。为此,此方法会执行一些操作。该方法会将 |node| 指定的平台设备节点添加为平台总线的子节点。此外,系统还会向 |spec| 添加一个
fuchsia.driver.framework.ParentSpec,该
与新添加的平台设备节点相匹配。复合绑定规则应包含与 |node| 的属性匹配的节,以便绑定规则与 CompositeNodeSpec 匹配。
请求
| 名称 | 类型 |
|---|---|
node |
Node
|
spec |
fuchsia.driver.framework/CompositeNodeSpec
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_AddCompositeNodeSpec_Result
|
GetBoardInfo
板驱动程序可以使用此信息来获取有关板的信息,并区分其支持的多个板。
请求
<EMPTY>
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_GetBoardInfo_Result
|
NodeAdd
使用 |node| 提供的配置向总线添加新的平台设备节点。平台设备节点是在其各自独立的驱动程序主机中创建的。
请求
| 名称 | 类型 |
|---|---|
node |
Node
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_NodeAdd_Result
|
RegisterIommu
注册 iommu。平台总线将使用此函数,根据传入的参数通过内核创建一个新的 iommu 对象。
请求
| 名称 | 类型 |
|---|---|
iommu_id |
uint32
|
iommu |
Iommu
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_RegisterIommu_Result
|
RegisterSysSuspendCallback
注册一个回调,该回调会在平台总线挂起时由平台总线调用。
请求
| 名称 | 类型 |
|---|---|
suspend_cb |
client_end:SysSuspend
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_RegisterSysSuspendCallback_Result
|
SetBoardInfo
开发板驱动程序可以使用此属性来设置开发板的相关信息。
请求
| 名称 | 类型 |
|---|---|
info |
BoardInfo
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_SetBoardInfo_Result
|
SetBootloaderInfo
板驱动程序可以使用此属性来设置有关引导加载程序的信息。
请求
| 名称 | 类型 |
|---|---|
info |
BootloaderInfo
|
响应
| 名称 | 类型 |
|---|---|
payload |
PlatformBus_SetBootloaderInfo_Result
|
SysSuspend
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
实现此协议的服务器可以注册到平台总线,以接收有关平台总线为何暂停的回调。
回调
当平台总线的挂起钩子被调用时,由平台总线调用。
请求
| 名称 | 类型 |
|---|---|
enable_wake |
bool
|
suspend_reason |
uint8
|
响应
| 名称 | 类型 |
|---|---|
out_status |
zx/Result
|
STRUCTS
ArmSmmu
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
ARM SMMU
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
base_address |
uint64
|
SMMU 的基址。当硬件支持多个 SMMU 时,此属性用于唯一标识要使用的 SMMU。 |
无默认应用 |
FirmwareBlob 资源
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
vmo |
handle<vmo>
|
无默认应用 | |
length |
uint64
|
无默认应用 |
Firmware_GetFirmware_Response 资源
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
blobs |
vector<FirmwareBlob>
|
无默认应用 |
InterruptAttributor_GetInterruptInfo_Response 资源
在 fuchsia.hardware.platform.bus/observability.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
device_name |
string:128
|
板级驱动程序为中断分配到的设备指定的名称。 |
无默认应用 |
component_token |
handle<event>?
|
表示接收到中断的驱动程序组件实例的令牌。 它可能会与驱动程序框架或组件框架交换,以详细了解组件,例如其网址或名字。 如果驱动程序尚未绑定到设备并控制中断,则该中断尚不存在。 |
无默认应用 |
PlatformBus_AddCompositeNodeSpec_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
PlatformBus_GetBoardInfo_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
info |
TemporaryBoardInfo
|
无默认应用 |
PlatformBus_NodeAdd_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
PlatformBus_RegisterIommu_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
PlatformBus_RegisterSysSuspendCallback_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
PlatformBus_SetBoardInfo_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
PlatformBus_SetBootloaderInfo_Response
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
<EMPTY>
StubIommu
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
桩 IOMMU
<EMPTY>
TemporaryBoardInfo
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
此库最初来自 Banjo fuchsia.hardware.platform.device 库,但暂时包含在此处,直到迁移到 FIDL。
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
vid |
uint32
|
主板的供应商 ID。 |
无默认应用 |
pid |
uint32
|
主板的产品 ID。 |
无默认应用 |
board_name |
string:32
|
来自启动映像平台 ID 记录(或 x86 平台上的 BIOS)的主板名称。 |
无默认应用 |
board_revision |
uint32
|
主板特定修订版本号。 |
无默认应用 |
UserspaceIrq
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 字段 | 类型 | 说明 | 默认 |
|---|---|---|---|
irq |
uint32
|
用户空间 irq 编号,对于提供该编号的中断控制器驱动程序而言是唯一的。 |
无默认应用 |
controller_id |
InterruptControllerId
|
提供此中断的控制器的唯一标识符。 |
无默认应用 |
枚举
FirmwareType flexible
类型:uint32
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 名称 | 值 | 说明 |
|---|---|---|
DEVICE_TREE |
1 |
|
ACPI |
2 |
|
SMBIOS |
3 |
ZirconInterruptMode strict
类型:uint32
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
用于创建 Zircon 中断的模式。与 //zircon/system/public/zircon/types.h 中的 ZX_INTERRUPTMODE* 值同步。
| 名称 | 值 | 说明 |
|---|---|---|
默认 |
0 |
|
EDGE_LOW |
2 |
|
EDGE_HIGH |
4 |
|
LEVEL_LOW |
6 |
|
LEVEL_HIGH |
8 |
|
EDGE_BOTH |
10 |
TABLES
BoardInfo
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
由主板驱动程序设置的主板信息。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
board_name |
string:32
|
来自启动映像平台 ID 记录或 x86 平台上的 BIOS 的主板名称。 |
2 |
board_revision |
uint32
|
主板特定修订版本号。 |
BootMetadata
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
要通过 ZBI 记录从引导加载程序传递的设备元数据。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
zbi_type |
uint32
|
元数据类型(与引导加载程序元数据的 |
2 |
zbi_extra |
uint32
|
与引导加载程序元数据的 |
BootloaderInfo
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
由开发板驱动程序设置的引导加载程序信息。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
vendor |
string:32
|
Bti
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
平台设备节点的总线事务发起方 (bti) 的定义。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
iommu_id |
uint32
|
|
2 |
bti_id |
uint32
|
|
3 |
name |
string:128
|
可用于通过 fuchsia.hardware.platform.device/GetBtiByName 检索 BTI 的名称。此字段可以为空,但只能使用 fuchsia.hardware.platform.device/GetBtiById 检索资源。 |
Irq
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
irq |
IrqSpec
|
|
2 |
mode |
ZirconInterruptMode
|
用于设置中断模式的位标志。 |
3 |
properties |
vector<fuchsia.driver.framework/NodeProperty2>:64
|
此中断片段的属性。 |
4 |
name |
string:128
|
可用于通过 fuchsia.hardware.platform.device/GetInterruptByName 检索 irq 的名称。此字段可以为空,但只能使用 fuchsia.hardware.platform.device/GetInterruptById 检索资源。 |
5 |
wake_vector |
bool
|
如果设置为 true,此中断会将设备从挂起状态唤醒。 |
元数据
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
表示平台设备中可用的元数据。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
id |
string
|
元数据标识符。 |
2 |
data |
vector<uint8>
|
元数据字节。 |
Mmio
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
平台设备节点的 MMIO 资源定义。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
base |
uint64
|
MMIO 区域的物理地址。无需与页面对齐。 |
2 |
length |
uint64
|
MMIO 区域的长度(以字节为单位)。无需与页面对齐。 |
3 |
name |
string:128
|
可用于通过 fuchsia.hardware.platform.device/GetMmioByName 检索 Mmio 的名称。此字段可以为空,但只能使用 fuchsia.hardware.platform.device/GetMmioById 检索资源。 |
节点
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
用于向平台总线添加平台设备节点的参数。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
name |
string:128
|
节点的名称。 |
2 |
vid |
uint32
|
|
3 |
pid |
uint32
|
|
4 |
did |
uint32
|
|
5 |
instance_id |
uint32
|
实例 ID。如果非零,则会影响设备名称。
|
6 |
mmio |
vector<Mmio>:32
|
MMIO 区域。 |
7 |
irq |
vector<Irq>:64
|
中断。 |
8 |
bti |
vector<Bti>:10
|
BTIs. |
9 |
smc |
vector<Smc>:10
|
SMC 调用。 |
10 |
metadata |
vector<Metadata>
|
元数据 |
11 |
boot_metadata |
vector<BootMetadata>
|
启动元数据(来自 ZBI 项) |
12 |
properties |
vector<fuchsia.driver.framework/NodeProperty2>:64
|
BIND_PLATFORM_DEV_VID、BIND_PLATFORM_DEV_PID 和 BIND_PLATFORM_DEV_DID 之外的其他节点属性。 |
13 |
power_config |
vector<fuchsia.hardware.power/PowerElementConfiguration>:32
|
|
14 |
driver_host |
string
|
|
15 |
interrupt_controller_id |
InterruptControllerId
|
中断控制器 ID(如果此节点对应于中断控制器)。如果指定,系统将为此节点提供 fuchsia.hardware.interrupt.ControllerRegistry。该值必须与此控制器提供的 |
Smc
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
安全监控器调用 (SMC) 的定义,允许从用户空间进行调用。
| 序数 | 字段 | 类型 | 说明 |
|---|---|---|---|
1 |
service_call_num_base |
uint32
|
设备被授予使用服务调用编号(范围从 service_call_num_base 到 service_call_num_base + count - 1)进行 SMC 调用的能力。 |
2 |
count |
uint32
|
|
3 |
exclusive |
bool
|
设备对此 smc 范围具有独占访问权限。 |
4 |
name |
string:128
|
可用于使用 fuchsia.hardware.platform.device/GetSmcByName 检索 SMC 的名称。此字段可以为空,但只能使用 fuchsia.hardware.platform.device/GetSmcById 检索资源。 |
UNIONS
Firmware_GetFirmware_Result strict resource
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
Firmware_GetFirmware_Response
|
|
2 |
err |
zx/Status
|
strict 类型的 InterruptAttributorGetInterruptInfoRequest
在 fuchsia.hardware.platform.bus/observability.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
interrupt_vector |
uint32
|
中断控制器用于引用此中断的向量。 |
2 |
interrupt_koid |
zx/Koid
|
触发中断的中断对象的 koid。 |
InterruptAttributor_GetInterruptInfo_Result strict resource
在 fuchsia.hardware.platform.bus/observability.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
InterruptAttributor_GetInterruptInfo_Response
|
|
2 |
err |
zx/Status
|
灵活 IOMMU
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
stub_iommu |
StubIommu
|
|
2 |
arm_smmu |
ArmSmmu
|
灵活的 IrqSpec
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
irq |
uint32
|
内核提供的中断的 irq 编号。 |
2 |
userspace_irq |
UserspaceIrq
|
用户空间提供的中断的规范。 |
PlatformBus_AddCompositeNodeSpec_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_AddCompositeNodeSpec_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_GetBoardInfo_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_GetBoardInfo_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_NodeAdd_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_NodeAdd_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_RegisterIommu_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_RegisterIommu_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_RegisterSysSuspendCallback_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_RegisterSysSuspendCallback_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_SetBoardInfo_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_SetBoardInfo_Response
|
|
2 |
err |
zx/Status
|
PlatformBus_SetBootloaderInfo_Result strict
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 序数 | 变体 | 类型 | 说明 |
|---|---|---|---|
1 |
response |
PlatformBus_SetBootloaderInfo_Response
|
|
2 |
err |
zx/Status
|
常量
| 名称 | 值 | 类型 | 说明 |
|---|---|---|---|
| MAX_BTI |
10
|
uint32 |
|
| MAX_INFO_STRING_LENGTH |
32
|
uint32 |
|
| MAX_IRQ |
64
|
uint32 |
|
| MAX_MMIO |
32
|
uint32 |
|
| MAX_POWER_CONFIGS |
32
|
uint32 |
|
| MAX_SMC |
10
|
uint32 |
别名
| 名称 | 值 | 说明 |
|---|---|---|
| InterruptControllerId |
uint32 |
服务
ObservabilityService
在 fuchsia.hardware.platform.bus/observability.fidl 中定义
| 名称 | 类型 | 传输 |
|---|---|---|
| interrupt |
fuchsia.hardware.platform.bus/InterruptAttributor
|
渠道 |
服务
在 fuchsia.hardware.platform.bus/platform-bus.fidl 中定义
| 名称 | 类型 | 传输 |
|---|---|---|
| platform_bus |
fuchsia.hardware.platform.bus/PlatformBus
|
驱动程序 |
| firmware |
fuchsia.hardware.platform.bus/Firmware
|
驱动程序 |