fuchsia.hardware.goldfish

PROTOCOLS

AddressSpaceDevice

Defined in fuchsia.hardware.goldfish/goldfish_address_space.fidl

OpenChildDriver

Request

NameType
type AddressSpaceChildDriverType
req request<AddressSpaceChildDriver>

AddressSpaceChildDriver

Defined in fuchsia.hardware.goldfish/goldfish_address_space.fidl

AllocateBlock

Request

NameType
size uint64

Response

NameType
res zx/status
paddr uint64
vmo handle<vmo>?

DeallocateBlock

Request

NameType
paddr uint64

Response

NameType
res zx/status

ClaimSharedBlock

Request

NameType
offset uint64
size uint64

Response

NameType
res zx/status
vmo handle<vmo>?

UnclaimSharedBlock

Request

NameType
offset uint64

Response

NameType
res zx/status

Ping

Request

NameType
ping AddressSpaceChildDriverPingMessage

Response

NameType
res zx/status
ping AddressSpaceChildDriverPingMessage

ControlDevice

Defined in fuchsia.hardware.goldfish/goldfish_control.fidl

Interface for the Goldfish control driver providing color buffers.

CreateColorBuffer

Create shared color buffer. Color buffer is automatically freed when all references to vmo have been closed. Fails if VMO is not associated with goldfish heap memory. Returns ZX_ERR_ALREADY_EXISTS if color buffer has already been created.

Request

NameType
vmo handle<vmo>
width uint32
height uint32
format ColorBufferFormatType

Response

NameType
res zx/status

GetColorBuffer

Get color buffer for VMO. Fails if VMO is not associated with a color buffer.

Request

NameType
vmo handle<vmo>

Response

NameType
res zx/status
id uint32

PipeDevice

Defined in fuchsia.hardware.goldfish/goldfish_pipe.fidl

Interface for the Goldfish pipe driver.

OpenPipe

Open pipe. A protocol request |pipe_request| provides an interface to the pipe. Multiple pipes can be opened for a single device. Closing the device connection will also close all pipe connections. TODO(DX-1766): Unify device and pipe.

Request

NameType
pipe_request request<Pipe>

Pipe

Defined in fuchsia.hardware.goldfish/goldfish_pipe.fidl

SetBufferSize

Request new IO buffer size. Can fail if out of memory. Discards contents of existing buffer on success. Leaves existing buffer intact on failure.

Request

NameType
size uint64

Response

NameType
res zx/status

SetEvent

Set event used to signal device state. Discards existing event after having transferred device state to the new event.

Request

NameType
event handle<event>

GetBuffer

Acquire VMO for IO buffer. Can be called multiple times. Each call returns a new handle to the VMO.

Request

NameType

Response

NameType
res zx/status
vmo handle<vmo>?

Read

Attempt to read up to count bytes into IO buffer at specified offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not readable.

Request

NameType
count uint64
offset uint64

Response

NameType
res zx/status
actual uint64

Write

Writes up to count bytes from the IO buffer at specified offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not writable.

Request

NameType
count uint64
offset uint64

Response

NameType
res zx/status
actual uint64

Call

Writes count bytes from the IO buffer at specified write offset. Blocks if pipe device is not writable. Subsequently reads read_count bytes into the IO buffer at specified read offset. Returns ZX_ERR_SHOULD_WAIT if pipe device is not readable.

Request

NameType
count uint64
offset uint64
read_count uint64
read_offset uint64

Response

NameType
res zx/status
actual uint64

STRUCTS

AddressSpaceChildDriverPingMessage

Defined in fuchsia.hardware.goldfish/goldfish_address_space.fidl

After opening the child driver, the client and hardware communicate via a child driver-specific protocol, with notifications driven by Ping(), each of which writes and reads messages to the hardware that follow this AddressSpaceChildDriverPingMessage struct. Each child driver type will have its own semantics for each field. It's common for child drivers to refer to offset/size plus a metadata field. We also provide extra data fields for other use cases in particular child drivers.

NameTypeDescriptionDefault
offset uint64 No default
size uint64 No default
metadata uint64 No default
data0 uint64 No default
data1 uint64 No default
data2 uint32 No default
data3 uint32 No default

ENUMS

AddressSpaceChildDriverType

Type: uint32

Defined in fuchsia.hardware.goldfish/goldfish_address_space.fidl

NameValueDescription
DEFAULT 0

The DEFAULT child driver type is for graphics.

ColorBufferFormatType

Type: uint32

Defined in fuchsia.hardware.goldfish/goldfish_control.fidl

Color buffer formats.

NameValueDescription
RGBA 6408
BGRA 32993

CONSTANTS

NameValueTypeDescription
SIGNAL_READABLE 16777216 uint32

Signal that will be active on event handle if the Read() method will return data.

SIGNAL_WRITABLE 33554432 uint32

Signal that will be active on event handle if the Write() method will accept data.

SIGNAL_HANGUP 67108864 uint32

Signal that will be active on event handle if the device has been disconnected.