PROTOCOLS
CompositeNodeManager
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Protocol through which board drivers can create composite node specs.
Composite node specs are created at runtime to dynamically bridge the static bind rules of a composite driver with the dynamic bind properties of nodes in the system so that the driver bind rules are more generic and reusable.
AddSpec
Adds the given composite node specification to the driver framework.
Request
Name | Type |
---|---|
payload |
CompositeNodeSpec
|
Response
Name | Type |
---|---|
payload |
CompositeNodeManager_AddSpec_Result
|
Driver
Defined in fuchsia.driver.framework/driver.fidl
This protocol is used by the Driver Framework's Driver Host to communicate various messages and
lifecycle hooks to the driver. The connection for this protocol is established through the
|DriverRegistration| defined in the driver_symbols
library.
Once the driver has closed its server end, the Driver Framework will initiate the shutdown of all dispatchers belonging to this driver.
Start
Starts the driver with the given |start_args|.
Drivers should finish their initial setup and enumeration before returning from |Start|.
In particular they should enumerate all currently available nodes by utilizing
fuchsia.driver.framework/Node.AddChild
and waiting for all calls to be completed.
The Framework will not consider the driver to be started until this call has returned successfully. Therefore a driver will not have |Stop| called on it until after it has replied to |Start| successfully.
If a driver returns an error, it will not have |Stop| called on it before the Driver Framework initiates shutdown of the driver's dispatchers. Therefore it should have performed all necessary cleanup before returning an error.
Request
Name | Type |
---|---|
start_args |
DriverStartArgs
|
Response
Name | Type |
---|---|
payload |
Driver_Start_Result
|
Stop
Stops the driver. To stop, the driver should teardown any resources it set up in or after |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should close its server end. Asynchronous operations should fully complete before closing the server end.
Request
<EMPTY>
Node
Defined in fuchsia.driver.framework/topology.fidl
Protocol through which a driver manages a node that it is bound to.
AddChild
Adds a child node to this node.
If node
is present, this driver takes responsibility for binding to
the newly created child. Otherwise, the driver framework will locate an
appropriate driver to bind the child to.
Request
Name | Type |
---|---|
args |
NodeAddArgs
|
controller |
server_end<NodeController>
|
node |
server_end<Node>?
|
Response
Name | Type |
---|---|
payload |
Node_AddChild_Result
|
NodeController
Defined in fuchsia.driver.framework/topology.fidl
Protocol through which a parent node controls one of its children.
OnBind
Event that is triggered when the associated Node
is bound to a driver.
Response
<EMPTY>
Remove
Removes the node and all of its children.
Request
<EMPTY>
RequestBind
Request that the framework attempts to bind a driver to this node. This is an additional request for binding as the framework attempts to bind a node once when the node is created.
- error
ZX_ERR_ALREADY_BOUND
if the node is already bound andforce_rebind
is false. - error
ZX_ERR_ALREADY_EXISTS
if the node has an outstanding |RequestBind| call which has not completed.
Request
Name | Type |
---|---|
payload |
NodeControllerRequestBindRequest
|
Response
Name | Type |
---|---|
payload |
NodeController_RequestBind_Result
|
STRUCTS
BindRule
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Represents a bind rule in a parent specification.
Field | Type | Description | Default |
---|---|---|---|
key |
NodePropertyKey
|
Property key. |
No default |
condition |
Condition
|
Condition for evaluating the property values in the matching process. The values must be ACCEPT or REJECT. |
No default |
values |
vector<NodePropertyValue>[64]
|
A list of property values. Must not be empty. The property values must be the same type. |
No default |
CompositeNodeManager_AddSpec_Response
Defined in fuchsia.driver.framework/composite_node_spec.fidl
<EMPTY>
Driver_Start_Response
Defined in fuchsia.driver.framework/driver.fidl
<EMPTY>
NodeController_RequestBind_Response
Defined in fuchsia.driver.framework/topology.fidl
<EMPTY>
NodeProperty
Defined in fuchsia.driver.framework/topology.fidl
Definition of a property for a node. A property is commonly used to match a node to a driver for driver binding.
Field | Type | Description | Default |
---|---|---|---|
key |
NodePropertyKey
|
Key for the property. |
No default |
value |
NodePropertyValue
|
Value for the property. |
No default |
Node_AddChild_Response
Defined in fuchsia.driver.framework/topology.fidl
<EMPTY>
ParentSpec
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Specification for a node that parents the composite node created from the composite node specification.
Field | Type | Description | Default |
---|---|---|---|
bind_rules |
vector<BindRule>[64]
|
Parent's bind rules. Property keys must be unique. Must not be empty. |
No default |
properties |
vector<NodeProperty>[64]
|
Properties for matching against a composite driver's bind rules. Keys must be unique. |
No default |
ENUMS
CompositeNodeSpecError flexible
Type: uint32
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Error codes for the CompositeNodeManager protocol.
Name | Value | Description |
---|---|---|
MISSING_ARGS |
1 |
An argument of the composite node spec was not provided. |
EMPTY_NODES |
2 |
The given composite node spec's |
ALREADY_EXISTS |
3 |
The |
Condition strict
Type: uint32
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Represents a bind rule condition.
Name | Value | Description |
---|---|---|
UNKNOWN |
0 |
|
ACCEPT |
1 |
|
REJECT |
2 |
NodeError flexible
Type: uint32
Defined in fuchsia.driver.framework/topology.fidl
Error codes for the Node protocol.
Name | Value | Description |
---|---|---|
INTERNAL |
1 |
|
NODE_REMOVED |
2 |
|
NAME_MISSING |
3 |
|
NAME_INVALID |
4 |
The Node's name is invalid. Specifically, it must not contain a period in its name. |
NAME_ALREADY_EXISTS |
5 |
A sibling Node exists with the same name. |
OFFER_SOURCE_NAME_MISSING |
6 |
An offer for this Node is missing a source name. |
OFFER_REF_EXISTS |
7 |
An offer for this Node should not have a source or target. |
SYMBOL_NAME_MISSING |
8 |
A symbol for this Node is missing a name. |
SYMBOL_ADDRESS_MISSING |
9 |
A symbol for this Node is missing an address. |
SYMBOL_ALREADY_EXISTS |
10 |
There is another symbol for this Node with the same name. |
TABLES
CompositeNodeSpec
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Struct that represents a composite node specification.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
string
|
The composite node spec's name. |
2 |
parents |
vector<ParentSpec>
|
The nodes in the composite node spec. Must not be empty. The first node is the primary node. |
DevfsAddArgs resource
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
connector |
fuchsia.device.fs/Connector
|
This is the connector to be installed in devfs.
|
2 |
class_name |
string[255]
|
This is the class name for installing this node in devfs.
The node will be placed within /dev/class/{class_name}.
If |
3 |
inspect |
handle<vmo>
|
This is a vmo of inspect data that will be installed in devfs. Optional: If this is not provided then the devfs's inspect data will be empty. |
DriverStartArgs resource
Defined in fuchsia.driver.framework/driver_start_args.fidl
Arguments for starting a driver.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
node |
Node
|
Node that the driver is bound to. |
2 |
symbols |
vector<NodeSymbol>[64]
|
Symbols provided to the driver, for |node|. These come from the driver that added |node|, and are filtered to the symbols requested in the bind program. |
3 |
url |
fuchsia.url/Url
|
URL of the package containing the driver. This is purely informational, used only to provide data for inspect. |
4 |
program |
fuchsia.data/Dictionary
|
Information about the driver to start. Currently, we support the following entries:
|
5 |
incoming |
vector<fuchsia.component.runner/ComponentNamespaceEntry>[32]
|
Incoming namespace provided to the driver. |
6 |
outgoing_dir |
server_end<fuchsia.io/Directory>
|
Outgoing directory served by the driver. |
7 |
config |
handle<vmo>
|
Configuration passed to the driver. |
8 |
node_name |
string
|
The name of the node the driver is bound to. |
NodeAddArgs resource
Defined in fuchsia.driver.framework/topology.fidl
Arguments for adding a node.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
NodeName
|
Name of the node. |
2 |
offers |
vector<fuchsia.component.decl/Offer>[128]
|
Capabilities to offer to the driver that is bound to this node. The driver must ensure these capabilities are added to its outgoing directory before adding the child node. |
3 |
symbols |
vector<NodeSymbol>[64]
|
Functions to provide to the driver that is bound to this node. |
4 |
properties |
NodePropertyVector
|
Properties of the node. |
5 |
devfs_args |
DevfsAddArgs
|
The arguments for how this node should be added to devfs. |
NodeControllerRequestBindRequest
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
force_rebind |
bool
|
If this is true, then the node unbinds from its matched driver before it attempts to bind through the normal bind process. |
2 |
driver_url_suffix |
string
|
If this is set, then only drivers matching this URL suffix will be considered in binding. E.g: "gpt.cm", "meta/gpt.cm", "fuchsia-boot:///#meta/gpt.cm". |
NodeSymbol
Defined in fuchsia.driver.framework/topology.fidl
Definition of a symbol provided by a driver for a node. A symbol is local to a driver host.
Ordinal | Field | Type | Description |
---|---|---|---|
1 |
name |
string[128]
|
Name of the symbol. |
2 |
address |
uint64
|
Virtual address of the symbol, within a driver host's process. |
UNIONS
CompositeNodeManager_AddSpec_Result strict
Defined in fuchsia.driver.framework/composite_node_spec.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
CompositeNodeManager_AddSpec_Response
|
|
2 |
err |
CompositeNodeSpecError
|
|
3 |
transport_err |
internal
|
Driver_Start_Result strict
Defined in fuchsia.driver.framework/driver.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Driver_Start_Response
|
|
2 |
err |
zx/Status
|
|
3 |
transport_err |
internal
|
NodeController_RequestBind_Result strict
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
NodeController_RequestBind_Response
|
|
2 |
err |
zx/Status
|
|
3 |
transport_err |
internal
|
NodePropertyKey strict
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
int_value |
NodePropertyKeyUint
|
|
2 |
string_value |
NodePropertyKeyString
|
NodePropertyValue flexible
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
int_value |
NodePropertyValueUint
|
|
2 |
string_value |
NodePropertyValueString
|
|
3 |
bool_value |
NodePropertyValueBool
|
|
4 |
enum_value |
NodePropertyValueEnum
|
Node_AddChild_Result strict
Defined in fuchsia.driver.framework/topology.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
Node_AddChild_Response
|
|
2 |
err |
NodeError
|
|
3 |
transport_err |
internal
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
MAX_NAMESPACE_COUNT |
fuchsia.component.runner/MAX_NAMESPACE_COUNT
|
uint32 |
|
MAX_NODE_NAME_LENGTH |
128
|
uint8 |
|
MAX_OFFER_COUNT |
fuchsia.component/MAX_DYNAMIC_OFFER_COUNT
|
uint32 |
|
MAX_PROPERTY_COUNT |
64
|
uint8 |
|
MAX_SYMBOL_COUNT |
64
|
uint8 |
|
MAX_SYMBOL_NAME_LENGTH |
128
|
uint8 |
ALIASES
Name | Value | Description |
---|---|---|
NodeName |
string [MAX_NODE_NAME_LENGTH ] |
|
NodePropertyKeyString |
string [256 ] |
|
NodePropertyKeyUint |
uint32 |
|
NodePropertyValueBool |
bool |
|
NodePropertyValueEnum |
string [256 ] |
|
NodePropertyValueString |
string [256 ] |
|
NodePropertyValueUint |
uint32 |
|
NodePropertyVector |
vector [MAX_PROPERTY_COUNT ] |