PROTOCOLS
Channel
Defined in fuchsia.hardware.mailbox/mailbox.fidl
Channel represents a single mailbox channel that can be used to send messages to a
destination core.
RegisterListener
Registers a listener for incoming messages on this channel. Multiple listeners may NOT be
registered at a time. If a listener is already registered, this call will fail with
ZX_ERR_ALREADY_BOUND.
To unregister a listener, the server will close its end of the channel. Another listener may be registered after the previous listener has been unregistered.
Request
| Name | Type |
|---|---|
listener |
client_end:Listener
|
Response
| Name | Type |
|---|---|
payload |
Channel_RegisterListener_Result
|
SendMessage
Writes the message to the mailbox, interrupts the destination core, and (if applicable) waits for the destination core to ack the message.
Returns ZX_ERR_OUT_OF_RANGE if message is larger than what the hardware can support.
Request
| Name | Type |
|---|---|
message |
vector<uint8>
|
Response
| Name | Type |
|---|---|
payload |
Channel_SendMessage_Result
|
Listener
Defined in fuchsia.hardware.mailbox/mailbox.fidl
Listener is used to receive messages from a mailbox channel.
The server end of this is held by the mailbox client.
OnMessage
Called when a message is received on the mailbox channel.
The mailbox driver will not call OnMessage concurrently. It will wait
for the previous call to complete before sending another message.
If the client fails to respond to OnMessage in a timely manner, the
mailbox driver may run out of memory and drop subsequent messages.
Request
| Name | Type |
|---|---|
message |
vector<uint8>
|
Response
| Name | Type |
|---|---|
payload |
Listener_OnMessage_Result
|
STRUCTS
Channel_RegisterListener_Response
Defined in fuchsia.hardware.mailbox/mailbox.fidl
<EMPTY>
Channel_SendMessage_Response
Defined in fuchsia.hardware.mailbox/mailbox.fidl
<EMPTY>
Listener_OnMessage_Response
Defined in fuchsia.hardware.mailbox/mailbox.fidl
<EMPTY>
TABLES
ChannelInfo
Defined in fuchsia.hardware.mailbox/metadata.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
channel |
uint32
|
Channel number, unique for this controller. Required. |
ControllerInfo
Defined in fuchsia.hardware.mailbox/metadata.fidl
ControllerInfo is passed to mailbox controller drivers via metadata.
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
id |
uint32
|
Board-specific controller ID. Optional. |
2 |
channels |
vector<ChannelInfo>
|
Mailbox channels. Optional. |
UNIONS
Channel_RegisterListener_Result strict
Defined in fuchsia.hardware.mailbox/mailbox.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Channel_RegisterListener_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
Channel_SendMessage_Result strict
Defined in fuchsia.hardware.mailbox/mailbox.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Channel_SendMessage_Response
|
|
2 |
err |
zx/Status
|
Listener_OnMessage_Result strict
Defined in fuchsia.hardware.mailbox/mailbox.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Listener_OnMessage_Response
|
|
2 |
err |
zx/Status
|
|
3 |
framework_err |
internal
|
SERVICES
Service
Defined in fuchsia.hardware.mailbox/mailbox.fidl
| Name | Type | Transport |
|---|---|---|
| channel |
fuchsia.hardware.mailbox/Channel
|
Channel |