PROTOCOLS
SharedVmoIo
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
This is a generic protocol for driver IO using shared VMOs. Drivers may compose this protocol and choose which methods to implement based on the uses of the hardware. This protocol is only intended for simple use cases.
Exchange
Simultaneously transmits and receives data. The size fields of tx_buffer and rx_buffer must be the same.
Request
Name | Type |
---|---|
tx_buffer |
SharedVmoBuffer
|
rx_buffer |
SharedVmoBuffer
|
Response
Name | Type |
---|---|
payload |
SharedVmoIo_Exchange_Result
|
Receive
Receives data from the device into buffer.
Request
Name | Type |
---|---|
buffer |
SharedVmoBuffer
|
Response
Name | Type |
---|---|
payload |
SharedVmoIo_Receive_Result
|
Transmit
Sends the data in buffer to the device.
Request
Name | Type |
---|---|
buffer |
SharedVmoBuffer
|
Response
Name | Type |
---|---|
payload |
SharedVmoIo_Transmit_Result
|
SharedVmoRegister
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
This is a generic protocol for sharing VMOs that drivers may compose.
RegisterVmo
Registers a VMO and transfers ownership to the driver. vmo_id: The ID chosen by the client that will be used in operations on this VMO. vmo: The handle, offset, and size of this VMO. IO operations on this VMO will be relative to the offset and size specified here. rights: A bit field of SharedVmoRight values indicating how this VMO may be used. Callers should assume that the driver will map and/or pin the VMO using these rights.
Request
Name | Type |
---|---|
vmo_id |
uint32
|
vmo |
fuchsia.mem/Range
|
rights |
SharedVmoRight
|
Response
Name | Type |
---|---|
payload |
SharedVmoRegister_RegisterVmo_Result
|
UnregisterVmo
Unmaps and/or unpins the VMO and returns the handle to the caller.
Request
Name | Type |
---|---|
vmo_id |
uint32
|
Response
Name | Type |
---|---|
payload |
SharedVmoRegister_UnregisterVmo_Result
|
STRUCTS
SharedVmoBuffer
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Field | Type | Description | Default |
---|---|---|---|
vmo_id |
uint32
|
No default | |
offset |
uint64
|
No default | |
size |
uint64
|
No default |
SharedVmoIo_Exchange_Response
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
<EMPTY>
SharedVmoIo_Receive_Response
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
<EMPTY>
SharedVmoIo_Transmit_Response
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
<EMPTY>
SharedVmoRegister_RegisterVmo_Response
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
<EMPTY>
SharedVmoRegister_UnregisterVmo_Response resource
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Field | Type | Description | Default |
---|---|---|---|
vmo |
handle<vmo>
|
No default |
UNIONS
SharedVmoIo_Exchange_Result strict
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
SharedVmoIo_Exchange_Response
|
|
2 |
err |
zx/Status
|
SharedVmoIo_Receive_Result strict
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
SharedVmoIo_Receive_Response
|
|
2 |
err |
zx/Status
|
SharedVmoIo_Transmit_Result strict
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
SharedVmoIo_Transmit_Response
|
|
2 |
err |
zx/Status
|
SharedVmoRegister_RegisterVmo_Result strict
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
SharedVmoRegister_RegisterVmo_Response
|
|
2 |
err |
zx/Status
|
SharedVmoRegister_UnregisterVmo_Result strict resource
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
SharedVmoRegister_UnregisterVmo_Response
|
|
2 |
err |
zx/Status
|
BITS
SharedVmoRight flexible
Type: uint32
Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl
Name | Value | Description |
---|---|---|
READ |
1 | The protocol implementation can read from this VMO (used for transmit requests). |
WRITE |
2 | The protocol implementation can write to this VMO (used for receive requests). |