Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.sharedmemory

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
result SharedVmoIo_Exchange_Result

Receive

Receives data from the device into buffer.

Request

NameType
buffer SharedVmoBuffer

Response

NameType
result SharedVmoIo_Receive_Result

Transmit

Sends the data in buffer to the device.

Request

NameType
buffer SharedVmoBuffer

Response

NameType
result 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
result SharedVmoRegister_RegisterVmo_Result

UnregisterVmo

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

Request

NameType
vmo_id uint32

Response

NameType
result SharedVmoRegister_UnregisterVmo_Result

STRUCTS

SharedVmoBuffer

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault
vmo_id uint32 No default
offset uint64 No default
size uint64 No default

SharedVmoIo_Exchange_Response

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault

SharedVmoIo_Receive_Response

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault

SharedVmoIo_Transmit_Response

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault

SharedVmoRegister_RegisterVmo_Response

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault

SharedVmoRegister_UnregisterVmo_Response

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescriptionDefault
vmo handle<vmo> No default

UNIONS

SharedVmoIo_Exchange_Result

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescription
response SharedVmoIo_Exchange_Response
err zx/status

SharedVmoIo_Receive_Result

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescription
response SharedVmoIo_Receive_Response
err zx/status

SharedVmoIo_Transmit_Result

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescription
response SharedVmoIo_Transmit_Response
err zx/status

SharedVmoRegister_RegisterVmo_Result

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescription
response SharedVmoRegister_RegisterVmo_Response
err zx/status

SharedVmoRegister_UnregisterVmo_Result

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameTypeDescription
response SharedVmoRegister_UnregisterVmo_Response
err zx/status

BITS

SharedVmoRight

Type: uint32

Defined in fuchsia.hardware.sharedmemory/sharedmemory.fidl

NameValueDescription
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).