通訊協定
裝置
定義於 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。
要求
| 名稱 | 類型 |
|---|---|
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
傳回驅動程式繫結裝置的電源設定。
要求
<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
| 序數 | 欄位 | 類型 | 說明 |
|---|---|---|---|
1 |
vid |
uint32
|
主機板的供應商 ID。 |
2 |
pid |
uint32
|
主機板的產品 ID。 |
3 |
board_name |
string:32
|
開機映像檔平台 ID 記錄中的主機板名稱 (或 x86 平台上的 BIOS)。 |
4 |
board_revision |
uint32
|
主機板專屬修訂版本編號。 |
資源
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | 欄位 | 類型 | 說明 |
|---|---|---|---|
1 |
offset |
zx/Off
|
從 VMO 開頭到 mmio 區域起點的偏移量。 |
2 |
size |
uint64
|
mmio 區域的大小。 |
3 |
vmo |
handle<vmo>
|
應對應至驅動程式庫程式位址空間的虛擬記憶體物件。 |
NodeDeviceInfo
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | 欄位 | 類型 | 說明 |
|---|---|---|---|
1 |
vid |
uint32
|
供應商 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定 |
2 |
pid |
uint32
|
平台 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定 |
3 |
did |
uint32
|
裝置 ID,在 //zircon/system/ulib/ddk-platform-defs/include/lib/ddk/platform-defs.h 中指定 |
4 |
mmio_count |
uint32
|
提供給這部裝置的 MMIO 區域數量。 |
5 |
irq_count |
uint32
|
提供給這部裝置的中斷次數。 |
6 |
bti_count |
uint32
|
提供給這部裝置的匯流排交易啟動器數量。 |
7 |
smc_count |
uint32
|
提供給這部裝置的安全監控呼叫資源數量。 |
8 |
metadata_count |
uint32
|
與這部裝置相關聯的中繼資料 blob 數量。 |
9 |
name |
string:32
|
主機板驅動程式庫為這部裝置提供的名稱。 |
UNIONS
Device_GetBoardInfo_Result strict
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
BoardInfo
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetBtiById_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetBtiById_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetBtiByName_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetBtiByName_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetInterruptById_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetInterruptById_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetInterruptByName_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetInterruptByName_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetMetadata_Result strict
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetMetadata_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetMmioById_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Mmio
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetMmioByName_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Mmio
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetNodeDeviceInfo_Result strict
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
NodeDeviceInfo
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetPowerConfiguration_Result strict
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetPowerConfiguration_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetSmcById_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetSmcById_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Device_GetSmcByName_Result strict resource
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 序數 | Variant | 類型 | 說明 |
|---|---|---|---|
1 |
response |
Device_GetSmcByName_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
服務
服務
定義於 fuchsia.hardware.platform.device/platform-device.fidl
| 名稱 | 類型 | 傳輸 |
|---|---|---|
| device |
fuchsia.hardware.platform.device/Device
|
版本 |