blob: 6b5288f523565003a1f083b5584375285dab305e [file] [log] [blame]
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
{
capabilities: [
{
directory: "dev",
// TODO(https://fxbug.dev/42165885): make this read-only when /dev/null
// and /dev/zero are no longer implemented by this component.
rights: [ "rw*" ],
path: "/dev",
},
{
protocol: [
"fuchsia.device.fs.lifecycle.Lifecycle",
"fuchsia.device.fs.with.pkg.lifecycle.Lifecycle",
"fuchsia.device.manager.Administrator",
"fuchsia.driver.development.Manager",
"fuchsia.driver.framework.CompositeNodeManager",
],
},
{ service: "fuchsia.driver.compat.Service" },
// Component runner for drivers
{
runner: "driver",
path: "/svc/fuchsia.component.runner.ComponentRunner",
},
{
runner: "driver-host2",
path: "/svc/fuchsia.component.runner.DriverHostRunner",
},
],
use: [
{
protocol: [
"fuchsia.boot.Items",
"fuchsia.component.resolution.Resolver-base",
"fuchsia.component.resolution.Resolver-boot",
"fuchsia.device.manager.SystemStateTransition",
"fuchsia.driver.index.DevelopmentManager",
"fuchsia.driver.index.DriverIndex",
"fuchsia.scheduler.RoleManager",
"power-manager-outlives-driver-manager",
],
},
{
// This is only used when the kernel commandline flag devmgr.enable-ephemeral
// is set, which enables loading drivers ephemerally. This is intended for
// eng builds only.
protocol: [ "fuchsia.component.resolution.Resolver-full" ],
availability: "optional",
},
{
protocol: [ "fuchsia.tracing.provider.Registry" ],
// Trace manager may be excluded from builds where tracing is not
// expected to be used for observability, such as in the bringup
// product and non-eng builds of any product.
availability: "optional",
},
{
// The Realm protocol is required to start components.
protocol: "fuchsia.component.Realm",
},
{
config: "fuchsia.driver.DelayFallbackUntilBaseDriversIndexed",
key: "delay_fallback_until_base_drivers_indexed",
availability: "optional",
type: "bool",
},
{
config: "fuchsia.driver.manager.DriverHostCrashPolicy",
key: "driver_host_crash_policy",
availability: "optional",
type: "string",
max_size: 20,
},
{
config: "fuchsia.driver.manager.RootDriver",
key: "root_driver",
availability: "optional",
type: "string",
max_size: 100,
},
{
config: "fuchsia.driver.manager.EnableTestShutdownDelays",
key: "enable_test_shutdown_delays",
availability: "optional",
type: "bool",
},
],
expose: [
{
directory: "dev",
from: "self",
},
{
protocol: [
"fuchsia.device.fs.lifecycle.Lifecycle",
"fuchsia.device.fs.with.pkg.lifecycle.Lifecycle",
"fuchsia.device.manager.Administrator",
"fuchsia.driver.development.Manager",
"fuchsia.driver.framework.CompositeNodeManager",
],
from: "self",
},
{
runner: "driver",
from: "self",
},
{
runner: "driver-host2",
from: "self",
},
{
service: "fuchsia.driver.compat.Service",
from: "self",
},
],
config: {
// Whether to set the root driver host as critical or not.
set_root_driver_host_critical: { type: "bool" },
// Whether or not fallback drivers should wait until base drivers have been indexed
// before bound.
delay_fallback_until_base_drivers_indexed: { type: "bool" },
// If this option is set, the system invokes kernel fallback to reboot or poweroff
// the device when the operation did not finish in 10 seconds.
suspend_timeout_fallback: { type: "bool" },
// If true, set the verbosity level to log all logs.
verbose: { type: "bool" },
// Sets the policy for what action to take when a driver host crash is observed by
// the driver manager.
//
// Valid options include:
//
// * `restart-driver-host` : Restarts the driver host (up to 3 times).
// * `reboot-system` : Reboots the system.
// * `do-nothing` : Take no action on observed crash.
driver_host_crash_policy: {
type: "string",
max_size: 20,
},
// URL for the root driver to load.
root_driver: {
type: "string",
max_size: 100,
},
enable_test_shutdown_delays: { type: "bool" },
},
}