fuchsia.hardware.platform.bus

新增:HEAD

通訊協定

韌體

定義於 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 物件。

新增:HEAD

要求

名稱類型
iommu_id uint32
iommu Iommu

回應

名稱類型
payload PlatformBus_RegisterIommu_Result

RegisterSysSuspendCallback

註冊回呼,在平台匯流排暫停時由該匯流排叫用。

新增:HEAD

要求

名稱類型
suspend_cb client_end:SysSuspend

回應

名稱類型
payload PlatformBus_RegisterSysSuspendCallback_Result

SetBoardInfo

主機板驅動程式可能會使用這個屬性設定主機板的相關資訊。

要求

名稱類型
info BoardInfo

回應

名稱類型
payload PlatformBus_SetBoardInfo_Result

SetBootloaderInfo

主機板驅動程式可能會使用這項資訊,設定開機載入程式的相關資訊。

新增:HEAD

要求

名稱類型
info BootloaderInfo

回應

名稱類型
payload PlatformBus_SetBootloaderInfo_Result

SysSuspend

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

實作這項通訊協定的伺服器可註冊至平台匯流排,接收平台匯流排暫停原因的回呼。

新增:HEAD

Callback

當平台匯流排的暫停掛鉤遭到呼叫時,由平台匯流排叫用。

要求

名稱類型
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 resource

定義於 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

提供這個中斷要求的控制器專屬 ID。

無預設值

列舉

FirmwareType flexible

類型:uint32

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

名稱值說明
1
2
3

ZirconInterruptMode strict

類型:uint32

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

建立 Zircon 中斷的模式。與 //zircon/system/public/zircon/types.h 中的 ZX_INTERRUPTMODE* 值同步。

名稱值說明
0
2
4
6
8
10

TABLES

BoardInfo

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

由主面板驅動程式庫設定的主面板資訊。

序數欄位類型說明
board_name string:32

開機映像檔平台 ID 記錄或 x86 平台 BIOS 中的主機板名稱。

board_revision uint32

主機板專屬修訂版本編號。

BootMetadata

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

要從系統啟動載入程式透過 ZBI 記錄傳遞的裝置中繼資料。

序數欄位類型說明
zbi_type uint32

中繼資料類型 (與系統啟動載入程式中繼資料的 zbi_header_t.type 相符)。

zbi_extra uint32

比對開機載入程式中繼資料的 zbi_header_t.extra。如果系統啟動載入程式提供多筆相同類型的中繼資料記錄,就會使用這個欄位。

BootloaderInfo

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

由主機板驅動程式庫設定的 Bootloader 資訊。

新增:HEAD

序數欄位類型說明
vendor string:32

Bti

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

平台裝置節點的匯流排交易發起端 (bti) 定義。

序數欄位類型說明
iommu_id uint32
bti_id uint32
name string:128

可使用 fuchsia.hardware.platform.device/GetBtiByName 擷取 BTI 的名稱。這個欄位可以留空,但資源只能透過 fuchsia.hardware.platform.device/GetBtiById 擷取。

Irq

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數欄位類型說明
irq IrqSpec
mode ZirconInterruptMode

用於設定中斷模式的位元旗標。

properties vector<fuchsia.driver.framework/NodeProperty2>:64

這個插播片段的屬性。

name string:128

可使用 fuchsia.hardware.platform.device/GetInterruptByName 擷取 irq 的名稱。這個欄位可以留空,但資源只能透過 fuchsia.hardware.platform.device/GetInterruptById 擷取。

wake_vector bool

如果設為 true,這個中斷就會將裝置從暫停狀態喚醒。

中繼資料

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

代表平台裝置中可用的中繼資料。

序數欄位類型說明
id string

中繼資料 ID。

data vector<uint8>

中繼資料位元組。

Mmio

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

平台裝置節點的 MMIO 資源定義。

序數欄位類型說明
base uint64

MMIO 區域的實體位址。不需與頁面對齊。

length uint64

MMIO 區域長度 (以位元組為單位)。不需與頁面對齊。

name string:128

可使用 fuchsia.hardware.platform.device/GetMmioByName 擷取 Mmio 的名稱。這個欄位可以留空,但這樣一來,就只能使用 fuchsia.hardware.platform.device/GetMmioById 擷取資源。

節點

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

將平台裝置節點新增至平台匯流排的引數。

序數欄位類型說明
name string:128

節點名稱。

vid uint32

BIND_PLATFORM_DEV_VID

pid uint32

BIND_PLATFORM_DEV_PID

did uint32

BIND_PLATFORM_DEV_DID

instance_id uint32

執行個體 ID。如果非零,則會影響裝置名稱。 BIND_PLATFORM_DEV_INSTANCE_ID

mmio vector<Mmio>:32

MMIO 區域。

irq vector<Irq>:64

中斷。

bti vector<Bti>:10

BTIs。

smc vector<Smc>:10

SMC 呼叫。

metadata vector<Metadata>

中繼資料

boot_metadata vector<BootMetadata>

開機中繼資料 (來自 ZBI 項目)

properties vector<fuchsia.driver.framework/NodeProperty2>:64

BIND_PLATFORM_DEV_VID、BIND_PLATFORM_DEV_PID 和 BIND_PLATFORM_DEV_DID 以外的其他節點屬性。

power_config vector<fuchsia.hardware.power/PowerElementConfiguration>:32
driver_host string
interrupt_controller_id InterruptControllerId

中斷控制器 ID (如果這個節點對應至中斷控制器)。如果指定,fuchsia.hardware.interrupt.ControllerRegistry 將提供給這個節點。這個值必須與這個控制器提供的 UserspaceIrq 相符。

Smc

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

安全監控呼叫 (SMC) 的定義,可從使用者空間發出呼叫。

序數欄位類型說明
service_call_num_base uint32

裝置可使用服務呼叫號碼 (範圍從 service_call_num_base 到 service_call_num_base + count - 1) 進行 SMC 呼叫。

count uint32
exclusive bool

裝置具有這個 smc 範圍的專屬存取權。

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

序數Variant類型說明
response Firmware_GetFirmware_Response
err zx/Status

InterruptAttributorGetInterruptInfoRequest strict

定義於 fuchsia.hardware.platform.bus/observability.fidl

序數Variant類型說明
interrupt_vector uint32

中斷控制器用來參照這個中斷的向量。

interrupt_koid zx/Koid

觸發中斷的中斷物件 KOID。

InterruptAttributor_GetInterruptInfo_Result strict resource

定義於 fuchsia.hardware.platform.bus/observability.fidl

序數Variant類型說明
response InterruptAttributor_GetInterruptInfo_Response
err zx/Status

Iommu 彈性

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
stub_iommu StubIommu
arm_smmu ArmSmmu

彈性 IrqSpec

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
irq uint32

核心提供中斷的 irq 編號。

userspace_irq UserspaceIrq

使用者空間提供的中斷規格。

PlatformBus_AddCompositeNodeSpec_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_AddCompositeNodeSpec_Response
err zx/Status

PlatformBus_GetBoardInfo_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_GetBoardInfo_Response
err zx/Status

PlatformBus_NodeAdd_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_NodeAdd_Response
err zx/Status

PlatformBus_RegisterIommu_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_RegisterIommu_Response
err zx/Status

PlatformBus_RegisterSysSuspendCallback_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_RegisterSysSuspendCallback_Response
err zx/Status

PlatformBus_SetBoardInfo_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_SetBoardInfo_Response
err zx/Status

PlatformBus_SetBootloaderInfo_Result strict

定義於 fuchsia.hardware.platform.bus/platform-bus.fidl

序數Variant類型說明
response PlatformBus_SetBootloaderInfo_Response
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 駕駛
韌體 fuchsia.hardware.platform.bus/Firmware 駕駛