| // 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: "toolbox" }, |
| { dictionary: "diagnostics" }, |
| ], |
| offer: [ |
| { |
| config: [ "fuchsia.diagnostics.ExceptionHandlerAvailable" ], |
| from: "parent", |
| to: "#critical-services", |
| }, |
| { |
| config: [ "fuchsia.power.SuspendEnabled" ], |
| from: "parent", |
| to: "#shutdown_shim", |
| }, |
| { |
| protocol: [ |
| "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" ], |
| }, |
| { |
| directory: "dev-class", |
| from: "#devfs-with-pkg", |
| as: "input", |
| to: "#critical-services", |
| subdir: "input", |
| dependency: "weak", |
| }, |
| { |
| protocol: "fuchsia.diagnostics.host.ArchiveAccessor", |
| from: "#archivist/diagnostics-accessors", |
| to: "self/toolbox", |
| }, |
| { |
| protocol: [ "fuchsia.diagnostics.LogSettings" ], |
| from: "#archivist", |
| to: "self/toolbox", |
| }, |
| ], |
| expose: [ |
| { |
| dictionary: "toolbox", |
| from: "self", |
| }, |
| { |
| 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", |
| }, |
| { |
| 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", |
| }, |
| { |
| dictionary: "diagnostics-accessors", |
| from: "#archivist", |
| }, |
| { |
| protocol: [ |
| "fuchsia.diagnostics.LogSettings", |
| "fuchsia.diagnostics.system.SerialLogControl", |
| "fuchsia.logger.Log", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "#archivist", |
| }, |
| { |
| dictionary: "diagnostics", |
| from: "self", |
| }, |
| ], |
| } |