# fuchsia.hardware.qualcomm.fastrpc

<br />

Added: HEAD

## **PROTOCOLS**

## RemoteDomain

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=100)*

### Close

Closes down the domain. This will release all resources associated with this domain.
The server end will close the channel when this is completed.

#### Request

\<EMPTY\>

### GetPayloadBufferSet

Requests \|count\| payload buffers from the driver. The returned vector of buffers should be
managed by the client entirely. When making an \|Invoke\| request, the client can provide
the \|id\| of the buffer of their chosing inside the \|payload_buffer_id\|. The client should
ensure only 1 invoke is active for each of these buffers.

#### Request

| Name | Type |
|---|---|
| `count` | `uint8` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain_GetPayloadBufferSet_Result` |

### Invoke

A user invocation on the remote domain.

#### Request

| Name | Type |
|---|---|
| `remote_thread_id` | `int32` |
| `handle` | `uint32` |
| `method_id` | `uint32` |
| `payload_buffer_id` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#PayloadBufferId` |
| `input_arguments` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#ArgumentEntry>` |
| `output_arguments` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#ArgumentEntry>` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain_Invoke_Result` |

## SecureFastRpc

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=62)*

This is a secure fastrpc protocol and provides certain privileged operations like attaching
to the root protection domain in a remote processor. Currently starnix is the only direct user
of this protocol, therefore we don't need an unsecure variant. If in the future we want to
provide this to client applications directly, we will need to make sure there is also an
UnsecureFastRpc protocol.

<br />

### Allocate

Allocate a contiguous region of memory of at least \|size\|. This memory is meant to be used
in \|VmoArgument\| typed arguments in an \|InvokeParameters\|. This vmo is owned exclusively
by the caller.

#### Request

| Name | Type |
|---|---|
| `size` | `uint64` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_Allocate_Result` |

### AttachRootDomain

Attaches to the root (Guest OS) protection domain in the remote processor.
This domain can access to the memory of its own protection domain,
the memory of the user protection domains, and some system registers.

#### Request

| Name | Type |
|---|---|
| `server` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_AttachRootDomain_Result` |

### CreateStaticDomain

Creates the static (user) protection domain identified by \|name\| on the remote processor.
This is provided with a memory of size \|memory_size\|. This protection domain can access
only its own memory. Static domains are created for specific use cases like audio.

#### Request

| Name | Type |
|---|---|
| `name` | `string` |
| `memory_size` | `uint32` |
| `server` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_CreateStaticDomain_Result` |

### GetCapabilities

Get the vector of capabilities from the remote processor.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_GetCapabilities_Result` |

### GetChannelId

Used to identify the channel id that this device instance talks to.
The channel id is associated with the remote processor target.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_GetChannelId_Result` |

## **STRUCTS**

### Argument

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=42)*

A FastRPC argument that lives in the shared \|payload_buffer\|.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `offset` | `uint64` | The start offset of the argument within the \|payload_buffer\|. | No default |
| `length` | `uint64` | Length of the argument. | No default |

### RemoteDomain_GetPayloadBufferSet_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=111)*

| Field | Type | Description | Default |
|---|---|---|---|
| `buffers` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SharedPayloadBuffer>:100` |   | No default |

### RemoteDomain_Invoke_Response

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=137)*

\<EMPTY\>

### SecureFastRpc_Allocate_Response [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=74)*

| Field | Type | Description | Default |
|---|---|---|---|
| `vmo` | `handle<vmo>` |   | No default |

### SecureFastRpc_AttachRootDomain_Response

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=88)*

\<EMPTY\>

### SecureFastRpc_CreateStaticDomain_Response

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=97)*

\<EMPTY\>

### SecureFastRpc_GetCapabilities_Response

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=79)*

| Field | Type | Description | Default |
|---|---|---|---|
| `capabilities` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Capability>:256` |   | No default |

### SecureFastRpc_GetChannelId_Response

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=65)*

| Field | Type | Description | Default |
|---|---|---|---|
| `channel_id` | `uint32` |   | No default |

### SharedPayloadBuffer [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=24)*

These buffers are allocated in the driver, and provided to the client for use by their id when
communicating with the driver through the \|payload_buffer_id\|.
The ids will be non-zero, as 0 will imply no buffer.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `id` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#PayloadBufferId` |   | No default |
| `vmo` | `handle<vmo>` |   | No default |

### VmoArgument [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=30)*

A FastRPC argument that lives in a standalone vmo.

<br />

| Field | Type | Description | Default |
|---|---|---|---|
| `vmo` | `handle<vmo>` | The vmo that this argument lives in. | No default |
| `offset` | `uint64` | The start offset of the argument within the vmo. | No default |
| `length` | `uint64` | Length of the argument. | No default |

## **UNIONS**

### ArgumentEntry [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=51)*

A single FastRPC argument.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `argument` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Argument` |   |
| ### 2 | `vmo_argument` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#VmoArgument` |   |

<br />

### RemoteDomain_GetPayloadBufferSet_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=111)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain_GetPayloadBufferSet_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### RemoteDomain_Invoke_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=137)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#RemoteDomain_Invoke_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Error` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SecureFastRpc_Allocate_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=74)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_Allocate_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SecureFastRpc_AttachRootDomain_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=88)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_AttachRootDomain_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Error` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SecureFastRpc_CreateStaticDomain_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=97)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_CreateStaticDomain_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Error` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SecureFastRpc_GetCapabilities_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=79)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_GetCapabilities_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#Error` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### SecureFastRpc_GetChannelId_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=65)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.qualcomm.fastrpc#SecureFastRpc_GetChannelId_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [MAX_CAPABILITIES_COUNT](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=17) | `256` | `uint32` |   |
| [MAX_PAYLOAD_BUFFER_SET](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=19) | `100` | `uint8` |   |

## **ALIASES**

| Name | Value | Description |
|---|---|---|
| [Capability](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=13) | `uint32` |   |
| [Error](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=11) | `int32` | See this header for error definitions: https://github.com/quic/fastrpc/blob/main/inc/AEEStdErr.h |
| [PayloadBufferId](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=15) | `uint32` |   |

## **SERVICES**

### SecureService

*Defined in [fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=140)*

| Name | Type | Transport |
|---|---|---|
| [device](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.qualcomm.fastrpc/fastrpc.fidl;l=141) | `fuchsia.hardware.qualcomm.fastrpc/SecureFastRpc` | Channel |

<br />