| // 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. | |
| { | |
| children: [ | |
| { | |
| name: "critical-services", | |
| url: "fuchsia-boot:///critical-services#meta/critical-services.cm", | |
| // critical-services should start eagerly - the only services it offers may never be called | |
| // on some builds, so there's no other way to start it. Importantly it hosts the crashsvc | |
| // and oom handler. | |
| startup: "eager", | |
| }, | |
| { | |
| name: "shutdown_shim", | |
| url: "fuchsia-boot:///shutdown-shim#meta/shutdown-shim.cm", | |
| }, | |
| ], | |
| capabilities: [ | |
| { dictionary: "diagnostics" }, | |
| ], | |
| offer: [ | |
| { | |
| config: [ | |
| "fuchsia.diagnostics.ExceptionHandlerAvailable", | |
| "fuchsia.diagnostics.StorageStallWatchdogEnabled", | |
| ], | |
| from: "parent", | |
| to: "#critical-services", | |
| }, | |
| { | |
| config: [ "fuchsia.power.SuspendEnabled" ], | |
| from: "parent", | |
| to: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.SaltProvider", | |
| "fuchsia.inspect.InspectSink", | |
| "fuchsia.logger.LogSink", | |
| ], | |
| from: "#archivist", | |
| to: "self/diagnostics", | |
| }, | |
| { | |
| protocol: [ "fuchsia.boot.WriteOnlyLog" ], | |
| from: "parent", | |
| to: [ | |
| "#critical-services", | |
| "#shutdown_shim", | |
| ], | |
| }, | |
| { | |
| protocol: "fuchsia.hardware.power.statecontrol.Admin", | |
| from: "#shutdown_shim", | |
| to: "#critical-services", | |
| }, | |
| // Things shutdown_shim and power_manager need | |
| { | |
| protocol: [ "fuchsia.sys2.SystemController" ], | |
| from: "parent", | |
| to: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: [ "fuchsia.power.system.ActivityGovernor" ], | |
| from: "#system-activity-governor", | |
| to: "#shutdown_shim", | |
| dependency: "weak", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ "fuchsia.power.broker.Topology" ], | |
| from: "#power-broker", | |
| to: "#shutdown_shim", | |
| dependency: "weak", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| dictionary: "diagnostics", | |
| from: "self", | |
| to: [ | |
| "#critical-services", | |
| "#shutdown_shim", | |
| ], | |
| }, | |
| { | |
| runner: "builtin_shutdown_shim", | |
| from: "parent", | |
| to: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.exception.Handler", | |
| "fuchsia.kernel.RootJob", | |
| ], | |
| from: "parent", | |
| to: [ "#critical-services" ], | |
| }, | |
| // For critical-services' storage stall watchdog, which only runs on boards that opt in. | |
| { | |
| protocol: "fuchsia.boot.Arguments", | |
| from: "parent", | |
| to: "#critical-services", | |
| }, | |
| { | |
| // Weak, so that Archivist's shutdown doesn't wait for critical-services. | |
| protocol: "fuchsia.diagnostics.ArchiveAccessor", | |
| from: "#archivist/diagnostics-accessors", | |
| to: "#critical-services", | |
| dependency: "weak", | |
| }, | |
| { | |
| directory: "dev-class", | |
| from: "#devfs-with-pkg", | |
| as: "input", | |
| to: "#critical-services", | |
| subdir: "input", | |
| dependency: "weak", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.ArchiveAccessor", | |
| "fuchsia.diagnostics.host.ArchiveAccessor", | |
| ], | |
| from: "#archivist/diagnostics-accessors", | |
| to: "self/toolbox", | |
| target_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.LogSettings", | |
| "fuchsia.logger.LogSink", | |
| ], | |
| from: "#archivist", | |
| to: "self/toolbox", | |
| target_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.hardware.power.statecontrol.Admin", | |
| "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister", | |
| ], | |
| from: "#shutdown_shim", | |
| to: "self/toolbox", | |
| target_availability: "unknown", | |
| }, | |
| ], | |
| expose: [ | |
| { | |
| protocol: "fuchsia.hardware.pty.Device", | |
| from: "#ptysvc", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ "fuchsia.virtualconsole.SessionManager" ], | |
| from: "#virtual_console", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.hardware.power.statecontrol.Admin", | |
| "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister", | |
| "fuchsia.hardware.power.statecontrol.ShutdownWatcherRegister", | |
| ], | |
| from: "#shutdown_shim", | |
| }, | |
| // TODO(https://fxbug.dev/389134835): Remove the initiator capability. | |
| { | |
| protocol: "fuchsia.power.CollaborativeRebootInitiator", | |
| from: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: "fuchsia.power.internal.CollaborativeRebootScheduler", | |
| from: "#shutdown_shim", | |
| }, | |
| { | |
| protocol: "fuchsia.system.state.SystemStateTransition", | |
| from: "#shutdown_shim", | |
| }, | |
| { | |
| service: "fuchsia.power.broker.ElementInfoProviderService", | |
| from: "#system-activity-governor", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| protocol: "fuchsia.power.button.Monitor", | |
| from: "#critical-services", | |
| }, | |
| { | |
| protocol: "fuchsia.power.cpu.manager.Boost", | |
| from: "#cpu_manager", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| protocol: [ "fuchsia.power.cpu.DomainController" ], | |
| from: "#cpu_manager", | |
| availability: "optional", | |
| source_availability: "unknown", | |
| }, | |
| { | |
| dictionary: "diagnostics-accessors", | |
| from: "#archivist", | |
| }, | |
| { | |
| protocol: [ "fuchsia.diagnostics.host.ArchiveAccessor" ], | |
| from: "#archivist/diagnostics-accessors", | |
| }, | |
| { | |
| protocol: [ | |
| "fuchsia.diagnostics.ArchiveAccessor.logs", | |
| "fuchsia.diagnostics.LogSettings", | |
| "fuchsia.diagnostics.system.SerialLogControl", | |
| "fuchsia.logger.Log", | |
| "fuchsia.logger.LogSink", | |
| ], | |
| from: "#archivist", | |
| }, | |
| { | |
| dictionary: "diagnostics", | |
| from: "self", | |
| }, | |
| { | |
| service: [ "fuchsia.hardware.usb.policy.Service" ], | |
| from: "#boot-drivers", | |
| }, | |
| ], | |
| } |