fuchsia.hardware.sharedmemory

Added: HEAD

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

NameType
tx_buffer SharedVmoBuffer
rx_buffer SharedVmoBuffer

Response

NameType
payload SharedVmoIo_Exchange_Result

Receive

Receives data from the device into buffer.

Request

NameType
buffer SharedVmoBuffer

Response

NameType
payload SharedVmoIo_Receive_Result

Transmit

Sends the data in buffer to the device.

Request

NameType
buffer SharedVmoBuffer

Response

NameType
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

NameType
vmo_id uint32
vmo fuchsia.mem/Range
rights SharedVmoRight

Response

NameType
payload SharedVmoRegister_RegisterVmo_Result

UnregisterVmo

Unmaps and/or unpins the VMO and returns the handle to the caller.

Request

NameType
vmo_id uint32

Response

NameType
payload SharedVmoRegister_UnregisterVmo_Result

STRUCTS

SharedVmoBuffer

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

FieldTypeDescriptionDefault
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

FieldTypeDescriptionDefault
vmo handle<vmo> No default

UNIONS

SharedVmoIo_Exchange_Result strict

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

OrdinalVariantTypeDescription
response SharedVmoIo_Exchange_Response
err zx/Status

SharedVmoIo_Receive_Result strict

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

OrdinalVariantTypeDescription
response SharedVmoIo_Receive_Response
err zx/Status

SharedVmoIo_Transmit_Result strict

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

OrdinalVariantTypeDescription
response SharedVmoIo_Transmit_Response
err zx/Status

SharedVmoRegister_RegisterVmo_Result strict

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

OrdinalVariantTypeDescription
response SharedVmoRegister_RegisterVmo_Response
err zx/Status

SharedVmoRegister_UnregisterVmo_Result strict resource

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

OrdinalVariantTypeDescription
response SharedVmoRegister_UnregisterVmo_Response
err zx/Status

BITS

SharedVmoRight flexible

Type: uint32

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameValueDescription
1

The protocol implementation can read from this VMO (used for transmit requests).

2

The protocol implementation can write to this VMO (used for receive requests).