1// Copyright 2020 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto3"; 6 7package chromiumos.config.api; 8 9import "chromiumos/config/api/component.proto"; 10import "chromiumos/config/api/design.proto"; 11import "chromiumos/config/api/design_id.proto"; 12import "chromiumos/config/api/device_brand_id.proto"; 13import "chromiumos/config/api/program_id.proto"; 14import "chromiumos/config/api/resource_config.proto"; 15import "chromiumos/config/api/schedqos_config.proto"; 16import "chromiumos/config/api/topology.proto"; 17import "chromiumos/config/public_replication/public_replication.proto"; 18 19option go_package = "go.chromium.org/chromiumos/config/go/api"; 20 21// Defines how space in a firmware configuration field is allocated. 22// 23// This is used for both FW_CONFIG and Second Source Factory Cache (SSFC) fields 24// 25// Every FirmwareConfiguration must specify a mask that aligns with a segment. 26// No segments for a program within a field can overlap. 27message FirmwareConfigurationSegment { 28 // Human-readable name describing the segment, e.g. "Daughter board". 29 string name = 1; 30 31 // The mask of valid bits that could be used by this type of Topology. 32 uint32 mask = 2; 33} 34 35// A segment of DesignConfigIds allocated to a given Design. 36// 37// To ensure that DesignConfigIds are unique within a Program, a segment can be 38// allocated to each Design. For example, Design "A" gets ids [11, 20], Design 39// "B" gets ids [21, 30], etc. 40// 41// The "unprovisioned" id 0x7FFFFFFF is exempt from this check. 42// 43// No segments in a program can overlap. 44message DesignConfigIdSegment { 45 // Design the segment applies to. 46 DesignId design_id = 1; 47 48 // Min and max DesignConfigIds the Design can use. Both are inclusive. 49 uint32 min_id = 2; 50 uint32 max_id = 3; 51} 52 53// Defines the signing key that will be used for a given device brand. 54message DeviceSignerConfig { 55 // Associates a key to either a specific brand or design. 56 // Per brand association supports Whitelabel devices with separate brands. 57 oneof identifier { 58 DeviceBrandId brand_id = 1; 59 DesignId design_id = 3; 60 } 61 string key_id = 2; 62} 63 64// Defines a Chromium OS program, which establishes the set of constraints and 65// guidelines for all hardware design projects developed under the given 66// program. 67// 68// Reference designs developed for a given program will be treated like any 69// other hardware design project. They will either fully comply with the 70// prescribed program constraints or provide waivers that highlight any 71// constraint violations. 72// Next ID: 15 73message Program { 74 // Fields replicated to public configs. 75 chromiumos.config.public_replication.PublicReplication public_replication = 8; 76 77 // Globally unique program identifier. 78 ProgramId id = 1; 79 80 // Program codename (human friendly). 81 string name = 2; 82 83 // The base program associated with this program. The programs can be defined 84 // separately, but can still build from same overlay and board. This field is 85 // optional and needs to be only defined if multiple program definitions are 86 // present and share the same build packages as the base program. 87 string base_program = 14; 88 89 // platform-name override for mosys. This should not need to be 90 // set for most programs. 91 string mosys_platform_name = 10; 92 93 // Next ID: 12 94 message Platform { 95 enum Arch { 96 ARCH_UNKNOWN = 0; 97 X86 = 1; 98 X86_64 = 2; 99 ARM = 3; 100 ARM64 = 4; 101 } 102 103 // Next ID: 13 104 enum AcceleratedVideoCodec { 105 CODEC_UNDEFINED = 0; 106 H264_DECODE = 1; 107 H264_ENCODE = 2; 108 VP8_DECODE = 3; 109 VP8_ENCODE = 4; 110 VP9_DECODE = 5; 111 VP9_ENCODE = 6; 112 VP9_2_DECODE = 7; 113 VP9_2_ENCODE = 8; 114 H265_DECODE = 9; 115 H265_ENCODE = 10; 116 MJPG_DECODE = 11; 117 MJPG_ENCODE = 12; 118 } 119 120 enum GraphicsApi { 121 GRAPHICS_API_UNDEFINED = 0; 122 GRAPHICS_API_OPENGL = 1; 123 GRAPHICS_API_OPENGL_ES = 2; 124 } 125 126 // Specify the SoC for the design as a canonicalized string representing the 127 // SoC family. Store a string to prevent leakage of non public platform 128 // names. 129 // 130 // Replace spaces with underscores, upper case everything and specify 131 // variants separated by dashes: 132 // KABY_LAKE_U_R -- indicates KBL-U or KBL-R chips (both ultra-low power) 133 // 134 string soc_family = 1; 135 Arch soc_arch = 2; 136 137 string gpu_family = 3; // canonicalized gpu family name 138 139 // supported graphics APIs 140 repeated GraphicsApi graphics_apis = 4; 141 142 // Hardware accelerated video codecs supported 143 repeated AcceleratedVideoCodec video_codecs = 5; 144 145 message Capabilities { 146 // Whether suspend to idle (S0ix/S0i3) is supported on this platform. 147 bool suspend_to_idle = 1; 148 149 // Whether dark resume is supported on this platform. 150 bool dark_resume = 2; 151 152 // Whether wake on DisplayPort plug is supported on this platform. 153 bool wake_on_dp = 3; 154 } 155 Capabilities capabilities = 6; 156 157 message SchedulerTune { 158 // Scheduler's boost value(%) for urgent tasks. When an urgent thread is 159 // created, chrome applies this value to scheduler attribute. Tasks with 160 // higher boost value are more likely to have higher operating power point 161 // even when the system is low utilized. 162 // Minimum value: 0x0. Maximum value: 0x64. 163 uint32 boost_urgent = 1; 164 165 // Non-urgent task are only allowed to use given CPUs. 166 string cpuset_nonurgent = 2; 167 168 // Chromium kernel has a cpu-boost feature, which boosts CPUs for a short 169 // duration when user interaction is detected from input devices. This value 170 // specifies how much CPUs will be boosted. 171 // Minimum value: 0x0. Maximum value: 0x64. 172 uint32 input_boost = 3; 173 174 // Scheduler's boost value(%) for topmost applications on ARCVM. When 175 // booting the ARCVM, chrome applies this value to the Android for top-app 176 // application classes. 177 // Minimum value: 0x0. Maximum value: 0x64. 178 uint32 boost_top_app = 4; 179 180 // Global scheduler's boost factor of the ARCVM vcores and host services. 181 // The boost_arcvm parameter is used to scale the boost depending on the 182 // little/big cores frequency. If the frequencies are the same, it's 183 // applied directly without further scaling. 184 // Minimum value: 0.0. Maximum value: 1.0. 185 double boost_arcvm = 5; 186 } 187 SchedulerTune scheduler_tune = 7; 188 189 message ArcSettings { 190 string media_codecs_suffix = 1; 191 } 192 ArcSettings arc_settings = 8; 193 194 HardwareFeatures.Present hevc_support = 9; 195 196 ResourceConfig resource_config = 10; 197 198 SchedqosConfig schedqos_config = 11; 199 200 message SwapConfig { 201 // The size of zram swap in the multiplier of the physical memory. 202 double size_multiplier = 1; 203 } 204 SwapConfig swap_config = 12; 205 } 206 Platform platform = 11; 207 208 message AudioConfig { 209 // The card configs to include for all design configs within this program. 210 repeated HardwareFeatures.Audio.CardConfig card_configs = 1; 211 212 // Whether an alsa-<program>.conf should be installed. 213 bool has_module_file = 2; 214 215 // The UCM suffix pattern to use as the program-level default. 216 string default_ucm_suffix = 3; 217 218 // The cras suffix pattern to use as the program-level default. 219 string default_cras_suffix = 4; 220 } 221 AudioConfig audio_config = 12; 222 223 // If true, the ARC media_profiles.xml will be generated from Boxster and 224 // override the one installed by overlays. 225 bool generate_camera_media_profiles = 13; 226 227 // Defines program constraints for all proposed design configs. 228 repeated Design.Config.Constraint design_config_constraints = 3; 229 230 // Components for the given program and their corresponding qualification 231 // status. 232 repeated Component.Qualification component_quals = 4; 233 234 // Firmware segment allocations for the given program. 235 repeated FirmwareConfigurationSegment firmware_configuration_segments = 5; 236 237 // Second Source Factory Cache (SSFC) allocations for the given program. 238 repeated FirmwareConfigurationSegment ssfc_segments = 9; 239 240 // DesignConfigId segment allocations for the given program. 241 repeated DesignConfigIdSegment design_config_id_segments = 7; 242 243 repeated DeviceSignerConfig device_signer_configs = 6; 244} 245