blob: 9884b64bb6ddf4b76a2b03882a4dbd3c32e6725a [file] [log] [blame]
// Copyright 2021 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.
// Realm that acts as a container for general system components.
{
include: [
// Add capabilities that still loop through /core
"//src/sys/core/meta/loopback_capabilities.core_shard.cml",
// Add capabilities used by legacy sys realm and legacy shells
"//src/sys/core/meta/svc_for_sys.core_shard.cml",
],
children: [
{
name: "sl4f_bridge_server",
url: "fuchsia-pkg://fuchsia.com/sl4f-ffx-proxy-server#meta/sl4f_proxy_server.cm",
environment: "#core-env",
},
{
name: "device_settings",
url: "fuchsia-pkg://fuchsia.com/device_settings_manager#meta/device_settings_manager.cm",
},
{
name: "debug-dash-launcher",
url: "fuchsia-pkg://fuchsia.com/debug-dash-launcher#meta/debug_dash_launcher.cm",
},
{
name: "session-manager",
url: "fuchsia-pkg://fuchsia.com/session_manager#meta/session_manager.cm",
startup: "eager",
environment: "#session-env",
},
{
name: "system-update-committer",
url: "fuchsia-pkg://fuchsia.com/system-update-committer#meta/system-update-committer.cm",
startup: "eager",
on_terminate: "reboot",
},
{
name: "mdns",
url: "fuchsia-pkg://fuchsia.com/mdns#meta/mdns.cm",
// TODO(https://fxbug.dev/93539): consider removing eager startup in non-eng builds.
startup: "eager",
},
{
name: "bluetooth-core",
url: "fuchsia-pkg://fuchsia.com/bt-init#meta/bt-init.cm",
},
{
name: "sysmem_connector",
url: "fuchsia-pkg://fuchsia.com/sysmem_connector#meta/sysmem_connector.cm",
// Until there is something analogous to on_terminate: "reboot" for drivers, we need
// sysmem_connector to terminate and trigger a reboot on behalf of sysmem if the sysmem
// driver terminates.
//
// TODO(fxbug.dev/96061): Once we have something like on_terminate: "reboot" for drivers
// we can remove both "eager" and "reboot" here.
startup: "eager",
on_terminate: "reboot",
},
{
name: "cobalt_system_metrics",
url: "fuchsia-pkg://fuchsia.com/cobalt_system_metrics#meta/cobalt_system_metrics.cm",
startup: "eager",
},
{
name: "timekeeper",
url: "fuchsia-pkg://fuchsia.com/timekeeper#meta/timekeeper.cm",
startup: "eager",
},
// Children below this line may be present on some but not all product configurations.
// Children above this line are expected to be present on all configs that include
// core.cml.
//
// TODO(fxbug.dev/81003): If any of the components below are product-specific, move them
// to core realm shards.
{
name: "activity",
url: "fuchsia-pkg://fuchsia.com/activity#meta/activity.cm",
},
{
name: "brightness_manager",
url: "fuchsia-pkg://fuchsia.com/brightness_manager#meta/brightness_manager.cm",
environment: "#core-env",
},
{
name: "cobalt",
url: "fuchsia-pkg://fuchsia.com/cobalt#meta/cobalt.cm",
},
{
name: "detect",
url: "fuchsia-pkg://fuchsia.com/triage-detect#meta/triage-detect.cm",
},
{
name: "diagnostics-persistence",
url: "fuchsia-pkg://fuchsia.com/diagnostics-persistence#meta/diagnostics-persistence.cm",
},
{
name: "diagnostics-kcounter",
url: "fuchsia-pkg://fuchsia.com/diagnostics-kcounter#meta/diagnostics-kcounter.cm",
},
{
name: "log-stats",
url: "fuchsia-pkg://fuchsia.com/log-stats#meta/log-stats.cm",
},
{
name: "sampler",
url: "fuchsia-pkg://fuchsia.com/sampler#meta/sampler.cm",
},
{
name: "starnix_manager",
url: "fuchsia-pkg://fuchsia.com/starnix#meta/starnix_manager.cm",
environment: "#core-env",
},
{
name: "stash",
url: "fuchsia-pkg://fuchsia.com/stash#meta/stash.cm",
},
{
name: "stash2",
url: "fuchsia-pkg://fuchsia.com/stash#meta/stash2.cm",
},
{
name: "stash_secure",
url: "fuchsia-pkg://fuchsia.com/stash#meta/stash_secure.cm",
},
{
name: "regulatory_region",
url: "fuchsia-pkg://fuchsia.com/regulatory_region#meta/regulatory_region.cm",
},
{
name: "font_provider",
url: "fuchsia-pkg://fuchsia.com/fonts#meta/fonts.cm",
},
{
name: "overnetstack",
url: "fuchsia-pkg://fuchsia.com/overnetstack#meta/overnetstack.cm",
environment: "#core-env",
},
{
name: "remote-control",
url: "fuchsia-pkg://fuchsia.com/remote-control#meta/remote-control.cm",
},
{
name: "remote-diagnostics-bridge",
url: "fuchsia-pkg://fuchsia.com/remote-diagnostics-bridge#meta/remote-diagnostics-bridge.cm",
},
{
name: "debug_serial",
url: "fuchsia-pkg://fuchsia.com/debug-serial#meta/debug-serial.cm",
},
{
name: "system-metrics-logger",
url: "fuchsia-pkg://fuchsia.com/system-metrics-logger#meta/system-metrics-logger-component.cm",
environment: "#core-env",
},
{
name: "temperature-logger",
url: "fuchsia-pkg://fuchsia.com/temperature-logger#meta/temperature-logger.cm",
environment: "#core-env",
},
{
name: "metrics-logger",
url: "fuchsia-pkg://fuchsia.com/metrics-logger#meta/metrics-logger.cm",
environment: "#core-env",
},
{
name: "pkg-resolver",
url: "fuchsia-pkg://fuchsia.com/pkg-resolver#meta/pkg-resolver.cm",
},
{
name: "vulkan_loader",
url: "fuchsia-pkg://fuchsia.com/vulkan_loader#meta/vulkan_loader.cm",
environment: "#core-env",
},
{
name: "ssh-key-manager",
url: "fuchsia-pkg://fuchsia.com/ssh-key-manager#meta/ssh-key-manager.cm",
},
{
name: "full-resolver",
url: "fuchsia-pkg://fuchsia.com/full-resolver#meta/full-resolver.cm",
},
{
name: "network",
url: "fuchsia-pkg://fuchsia.com/network#meta/network.cm",
startup: "eager",
},
{
name: "hwinfo",
url: "fuchsia-pkg://fuchsia.com/hwinfo#meta/hwinfo.cm",
},
{
name: "agis",
url: "fuchsia-pkg://fuchsia.com/agis#meta/agis.cm",
environment: "#core-env",
},
], // children
capabilities: [
// Note: `data`, `cache`, and `temp` storage capabilities are defined in a shard and
// included as part of the build process. See restricted-storage.core_shard.cml or
// unrestricted-storage.core_shard.cml
],
offer: [
{
protocol: [ "fuchsia.kernel.DebugResource" ],
from: "parent",
to: "#debug_serial",
},
{
protocol: [
"fuchsia.ui.activity.control.Control",
"fuchsia.ui.activity.Provider",
],
from: "#activity",
to: [
"#cobalt",
"#cobalt_system_metrics",
],
},
{
directory: "dev",
from: "parent",
as: "dev-sysmem",
to: "#sysmem_connector",
subdir: "class/sysmem",
},
{
protocol: [ "fuchsia.pkg.FontResolver" ],
from: "#pkg-resolver",
to: "#font_provider",
},
{
protocol: [ "fuchsia.device.NameProvider" ],
from: "parent",
to: [
"#bluetooth-core",
"#mdns",
"#network",
],
},
{
protocol: [ "fuchsia.scheduler.ProfileProvider" ],
from: "parent",
to: [ "#network" ],
},
{
protocol: "fuchsia.net.http.Loader",
from: "#network",
to: "#cobalt",
},
{
protocol: [ "fuchsia.net.interfaces.State" ],
from: "#network",
to: [
"#mdns",
"#remote-control",
"#timekeeper",
],
},
{
protocol: [
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
],
from: "#network",
to: [
"#cobalt",
"#mdns",
"#pkg-resolver",
"#session-manager",
"#timekeeper",
],
},
{
protocol: [ "fuchsia.posix.socket.Provider" ],
from: "#network",
to: [ "#agis" ],
},
{
protocol: [ "fuchsia.posix.socket.Provider" ],
from: "#network",
to: [ "#sl4f_bridge_server" ],
},
{
protocol: [ "fuchsia.posix.socket.Provider" ],
from: "#network",
to: [ "#starnix_manager" ],
},
{
protocol: "fuchsia.stash.SecureStore",
from: "#stash_secure",
to: [
"#bluetooth-core",
"#network",
],
},
{
directory: "config-data",
from: "parent",
to: [ "#network" ],
},
{
directory: "dev",
from: "parent",
as: "dev-class-ethernet",
to: [ "#network" ],
subdir: "class/ethernet",
},
{
directory: "dev",
from: "parent",
as: "dev-class-network",
to: [ "#network" ],
subdir: "class/network",
},
{
storage: "cache",
from: "self",
to: [ "#network" ],
},
{
storage: "data",
from: "self",
to: [ "#network" ],
},
{
protocol: "fuchsia.pkg.PackageResolver",
from: "#pkg-resolver",
to: "#full-resolver",
},
{
protocol: [
"fuchsia.boot.Arguments",
"fuchsia.pkg.PackageCache",
],
from: "parent",
to: "#pkg-resolver",
},
{
// This capability is only offered to pkg-resolver in test scenarios
protocol: "fuchsia.pkg.LocalMirror",
from: "void",
to: "#pkg-resolver",
availability: "optional",
},
{
storage: "data",
from: "self",
to: "#pkg-resolver",
},
{
directory: "config-data",
from: "parent",
to: "#pkg-resolver",
subdir: "pkg-resolver",
},
{
protocol: [
"fuchsia.diagnostics.ArchiveAccessor",
"fuchsia.logger.Log",
],
from: "parent",
to: [
"#log-stats",
"#sampler",
],
},
{
protocol: [ "fuchsia.hardware.power.statecontrol.RebootMethodsWatcherRegister" ],
from: "parent",
to: "#sampler",
},
{
protocol: [ "fuchsia.diagnostics.FeedbackArchiveAccessor" ],
from: "parent",
to: [
"#detect",
"#diagnostics-persistence",
],
},
{
protocol: [ "fuchsia.logger.LogSink" ],
from: "parent",
to: [
"#activity",
"#agis",
"#bluetooth-core",
"#brightness_manager",
"#cobalt",
"#cobalt_system_metrics",
"#debug-dash-launcher",
"#debug_serial",
"#detect",
"#device_settings",
"#diagnostics-kcounter",
"#diagnostics-persistence",
"#font_provider",
"#full-resolver",
"#hwinfo",
"#log-stats",
"#mdns",
"#metrics-logger",
"#network",
"#overnetstack",
"#pkg-resolver",
"#regulatory_region",
"#remote-control",
"#sampler",
"#session-manager",
"#sl4f_bridge_server",
"#ssh-key-manager",
"#starnix_manager",
"#stash",
"#stash2",
"#stash_secure",
"#sysmem_connector",
"#system-metrics-logger",
"#system-update-committer",
"#temperature-logger",
"#timekeeper",
"#vulkan_loader",
],
},
{
protocol: "fuchsia.hardware.pty.Device",
from: "parent",
to: "#debug-dash-launcher",
},
{
protocol: "fuchsia.pkg.PackageResolver",
from: "#pkg-resolver",
to: "#debug-dash-launcher",
},
{
protocol: [ "fuchsia.kernel.Counter" ],
from: "parent",
to: "#diagnostics-kcounter",
},
{
protocol: [
"fuchsia.hardware.power.statecontrol.Admin",
"fuchsia.paver.Paver",
"fuchsia.update.verify.BlobfsVerifier",
],
from: "parent",
to: "#system-update-committer",
},
{
protocol: [ "fuchsia.kernel.VmexResource" ],
from: "parent",
to: [
"#session-manager",
"#starnix_manager",
],
},
{
protocol: [ "fuchsia.sysmem.Allocator" ],
from: "#sysmem_connector",
to: [
"#session-manager",
"#starnix_manager",
],
},
{
protocol: "fuchsia.factory.MiscFactoryStoreProvider",
from: "#factory_store_providers",
to: "#hwinfo",
source_availability: "unknown",
},
{
directory: "config-data",
from: "parent",
to: "#hwinfo",
subdir: "hwinfo",
},
{
protocol: [
"fuchsia.overnet.Overnet",
"fuchsia.overnet.ServicePublisher",
],
from: "#overnetstack",
to: "#remote-control",
},
{
protocol: [ "fuchsia.posix.socket.Provider" ],
from: "#network",
to: "#remote-control",
},
{
protocol: "fuchsia.hwinfo.Device",
from: "#hwinfo",
to: "#remote-control",
},
{
protocol: [
"fuchsia.device.manager.Administrator",
"fuchsia.device.NameProvider",
],
from: "parent",
to: "#remote-control",
},
{
directory: "config-data",
from: "parent",
to: [ "#remote-control" ],
subdir: "remote-control",
},
{
protocol: [
"fuchsia.diagnostics.ArchiveAccessor",
"fuchsia.logger.LogSink",
],
from: "parent",
to: "#remote-diagnostics-bridge",
},
{
directory: "config-data",
from: "parent",
to: "#font_provider",
subdir: "fonts",
},
{
directory: "config-data",
from: "parent",
to: "#sampler",
subdir: "sampler",
},
{
directory: "config-data",
from: "parent",
to: "#diagnostics-persistence",
subdir: "diagnostics-persistence",
},
{
protocol: "fuchsia.developer.remotecontrol.RemoteDiagnosticsBridge",
from: "#remote-diagnostics-bridge",
to: "#remote-control",
},
{
protocol: [
"fuchsia.feedback.CrashReporter",
"fuchsia.feedback.CrashReportingProductRegister",
],
from: "#feedback",
to: "#detect",
source_availability: "unknown",
},
{
protocol: "fuchsia.fonts.Provider",
from: "#font_provider",
to: [ "#session-manager" ],
},
{
protocol: "fuchsia.kernel.Stats",
from: "parent",
to: [
"#cobalt_system_metrics",
"#system-metrics-logger",
],
},
{
protocol: "fuchsia.process.Launcher",
from: "parent",
to: [
"#debug-dash-launcher",
"#session-manager",
],
},
{
protocol: "fuchsia.sys2.RealmQuery.root",
from: "parent",
as: "fuchsia.sys2.RealmQuery",
to: "#debug-dash-launcher",
},
{
protocol: [ "fuchsia.ui.display.internal.DisplayPower" ],
from: "#ui",
to: "#brightness_manager",
dependency: "weak",
source_availability: "unknown",
},
{
storage: "data",
from: "self",
to: "#brightness_manager",
},
{
directory: "dev",
from: "parent",
as: "dev-backlight",
to: "#brightness_manager",
subdir: "class/backlight",
},
{
directory: "dev",
from: "parent",
as: "dev-input-report",
to: [
"#brightness_manager",
"#session-manager",
],
subdir: "class/input-report",
},
{
directory: "dev",
from: "parent",
to: "#sysmem_connector",
subdir: "class/sysmem",
},
{
directory: "dev",
from: "parent",
as: "dev-temperature",
to: "#temperature-logger",
subdir: "class/temperature",
},
{
directory: "dev",
from: "parent",
as: "dev-thermal",
to: "#temperature-logger",
subdir: "class/thermal",
},
{
directory: "dev",
from: "parent",
as: "dev-temperature",
to: "#metrics-logger",
subdir: "class/temperature",
},
{
directory: "dev",
from: "parent",
as: "dev-thermal",
to: "#metrics-logger",
subdir: "class/thermal",
},
{
directory: "dev",
from: "parent",
as: "dev-power-sensor",
to: "#metrics-logger",
subdir: "class/power-sensor",
},
{
directory: "dev",
from: "parent",
as: "dev-thermal",
to: "#cobalt_system_metrics",
subdir: "class/thermal",
},
{
directory: "dev",
from: "parent",
as: "dev-misc",
to: [ "#cobalt_system_metrics" ],
subdir: "misc",
},
{
directory: "root-ssl-certificates",
from: "parent",
to: [
"#cobalt",
"#network",
"#pkg-resolver",
"#session-manager",
"#timekeeper",
],
},
{
directory: "config-data",
from: "parent",
to: "#temperature-logger",
subdir: "temperature-logger",
},
{
directory: "config-data",
from: "parent",
to: "#metrics-logger",
subdir: "metrics-logger",
},
{
directory: "config-data",
from: "parent",
to: "#detect",
subdir: "triage-detect",
},
{
directory: "config-data",
from: "parent",
to: "#log-stats",
subdir: "log-stats",
},
{
directory: "config-data",
from: "parent",
to: "#system-update-committer",
subdir: "system-update-committer",
},
{
directory: "config-data",
from: "parent",
to: "#cobalt",
subdir: "cobalt",
},
{
directory: "config-data",
from: "parent",
to: "#cobalt_system_metrics",
subdir: "cobalt_system_metrics",
},
{
protocol: [
"fuchsia.device.Controller",
"fuchsia.hardware.temperature.Device",
],
from: "parent",
to: "#temperature-logger",
},
{
protocol: [
"fuchsia.boot.Items",
"fuchsia.kernel.Stats",
],
from: "parent",
to: "#metrics-logger",
},
{
directory: "data",
from: "parent",
as: "ssh",
to: "#ssh-key-manager",
subdir: "ssh",
},
// Note: this is the v2 root hub. The hub in the `expose` section below
// is the v1 root hub.
{
directory: "hub",
from: "parent",
to: "#remote-control",
},
// Note: These protocols are scoped to the root of the component topoology,
// hence the `.root` suffix
{
protocol: [
"fuchsia.sys2.LifecycleController.root",
"fuchsia.sys2.RealmExplorer.root",
"fuchsia.sys2.RealmQuery.root",
"fuchsia.sys2.RouteValidator.root",
],
from: "parent",
to: "#remote-control",
},
{
storage: [
"cache",
"data",
"tmp",
],
from: "self",
to: "#session-manager",
},
{
directory: "config-data",
from: "parent",
to: "#session-manager",
},
{
protocol: "fuchsia.hardware.power.statecontrol.Admin",
from: "parent",
to: "#session-manager",
},
{
resolver: "full-resolver",
from: "#full-resolver",
to: "#session-manager",
},
{
storage: "data",
from: "self",
to: [
"#stash",
"#stash2",
"#stash_secure",
],
},
{
storage: [ "cache" ],
from: "self",
to: "#regulatory_region",
},
{
storage: "cache",
from: "self",
to: "#diagnostics-persistence",
},
{
protocol: [ "fuchsia.vulkan.loader.Loader" ],
from: "#vulkan_loader",
to: [
"#agis",
"#session-manager",
"#starnix_manager",
],
},
{
protocol: "fuchsia.memorypressure.Provider",
from: "#memory_monitor",
to: "#vulkan_loader",
source_availability: "unknown",
},
{
directory: "dev",
from: "parent",
as: "dev-gpu",
to: [
"#metrics-logger",
"#starnix_manager",
"#vulkan_loader",
],
subdir: "class/gpu",
},
{
directory: "dev",
from: "parent",
as: "dev-gpu-dependency-injection",
to: "#vulkan_loader",
subdir: "class/gpu-dependency-injection",
},
{
directory: "dev",
from: "parent",
as: "dev-goldfish-pipe",
to: "#vulkan_loader",
subdir: "class/goldfish-pipe",
},
{
directory: "dev",
from: "parent",
as: "dev-goldfish-control",
to: "#vulkan_loader",
subdir: "class/goldfish-control",
},
{
directory: "dev",
from: "parent",
as: "dev-goldfish-address-space",
to: "#vulkan_loader",
subdir: "class/goldfish-address-space",
},
{
directory: "dev",
from: "parent",
as: "dev-goldfish-sync",
to: "#vulkan_loader",
subdir: "class/goldfish-sync",
},
{
directory: "dev",
from: "parent",
to: "#bluetooth-core",
},
{
directory: "dev",
from: "parent",
as: "dev-rtc",
to: "#timekeeper",
subdir: "class/rtc",
},
{
protocol: "fuchsia.cobalt.LoggerFactory",
from: "#cobalt",
to: [ "#sampler" ],
},
{
protocol: "fuchsia.metrics.MetricEventLoggerFactory",
from: "#cobalt",
to: [
"#cobalt_system_metrics",
"#log-stats",
"#pkg-resolver",
"#sampler",
"#session-manager",
"#sysmem_connector",
"#timekeeper",
],
},
{
protocol: [
"fuchsia.scheduler.ProfileProvider",
"fuchsia.sysinfo.SysInfo",
],
from: "parent",
to: "#cobalt",
},
{
protocol: "fuchsia.sysinfo.SysInfo",
from: "parent",
to: "#cobalt_system_metrics",
},
{
protocol: "fuchsia.settings.Privacy",
from: "#setui_service",
to: "#cobalt",
// TODO: break the cycle
dependency: "weak",
source_availability: "unknown",
},
{
storage: "data",
from: "self",
to: [
"#cobalt",
"#cobalt_system_metrics",
],
},
{
directory: "config-data",
from: "parent",
to: "#mdns",
subdir: "mdns",
},
{
protocol: [ "fuchsia.time.Maintenance" ],
from: "parent",
to: [ "#timekeeper" ],
},
{
protocol: [ "fuchsia.tracing.provider.Registry" ],
from: "#trace_manager",
to: [
"#agis",
"#cobalt_system_metrics",
"#metrics-logger",
"#session-manager",
"#starnix_manager",
"#sysmem_connector",
"#system-metrics-logger",
"#temperature-logger",
],
// 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.
source_availability: "unknown",
},
{
protocol: [ "fuchsia.tracing.provider.Registry" ],
from: "#trace_manager",
to: [
"#cobalt",
"#network",
"#pkg-resolver",
],
// Weak offers to resolve dependency cycles that would be caused by
// using #core-env.
dependency: "weak",
// 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.
source_availability: "unknown",
},
{
protocol: [ "fuchsia.tracing.perfetto.ProducerConnector" ],
from: "#trace_manager",
to: [ "#session-manager" ],
// PerfettoBridge may be excluded from builds where tracing is not
// expected to be used for observability, such as the non-eng
// builds of any product.
source_availability: "unknown",
},
],
expose: [
{
protocol: "fuchsia.component.Binder",
from: "framework",
},
{
protocol: [
"fuchsia.cobalt.LoggerFactory",
"fuchsia.metrics.MetricEventLoggerFactory",
],
from: "#cobalt",
},
{
protocol: [ "fuchsia.component.Binder" ],
from: "#detect",
as: "fuchsia.component.DetectBinder",
},
{
protocol: [ "fuchsia.component.Binder" ],
from: "#diagnostics-kcounter",
as: "fuchsia.component.KcounterBinder",
},
{
protocol: [ "fuchsia.component.Binder" ],
from: "#diagnostics-persistence",
as: "fuchsia.component.PersistenceBinder",
},
{
protocol: [ "fuchsia.component.Binder" ],
from: "#log-stats",
as: "fuchsia.component.LogStatsBinder",
},
{
protocol: [ "fuchsia.component.Binder" ],
from: "#sampler",
as: "fuchsia.component.SamplerBinder",
},
{
protocol: [
"fuchsia.pkg.PackageResolver",
"fuchsia.pkg.RepositoryManager",
"fuchsia.pkg.rewrite.Engine",
],
from: "#pkg-resolver",
},
{
protocol: [ "fuchsia.ui.activity.Provider" ],
from: "#activity",
},
{
protocol: "fuchsia.update.CommitStatusProvider",
from: "#system-update-committer",
},
{
protocol: [
"fuchsia.net.name.Lookup",
"fuchsia.posix.socket.Provider",
],
from: "#network",
},
],
}