blob: a51db083b86c476c5305363a0c7ffc9ecd50512b [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Definitions for the probe API exposed by the cros_healthd daemon. This API is
// normally consumed by the browser.
// NOTE: This mojom should be kept in sync with the copy in Chromium's repo in
// src/chromeos/services/cros_healthd/public/mojom//cros_healthd_probe.mojom.
module chromeos.cros_healthd.mojom;
import "diagnostics/mojom/external/network_health.mojom";
import "diagnostics/mojom/public/nullable_primitives.mojom";
// An enumeration of CPU architectures.
//
// NextMinVersion: 1, NextIndex: 4
[Extensible]
enum CpuArchitectureEnum {
[Default] kUnknown = 0,
kX86_64 = 1,
kAArch64 = 2,
kArmv7l = 3,
};
// An enumeration of each category of information that cros_healthd can report.
//
// NextMinVersion: 1, NextIndex: 19
[Extensible]
enum ProbeCategoryEnum {
[Default] kUnknown = 16,
kBattery = 0,
kNonRemovableBlockDevices = 1,
kCpu = 2,
kTimezone = 3,
kMemory = 4,
kBacklight = 5,
kFan = 6,
kStatefulPartition = 7,
kBluetooth = 8,
kSystem = 9,
kNetwork = 10,
kAudio = 11,
kBootPerformance = 12,
kBus = 13,
kTpm = 14,
kGraphics = 15,
kDisplay = 17,
kNetworkInterface = 18,
// TODO(b/190459636): Rename it to kSystem after migration.
kSystem2 = 0x10000,
};
// An enumeration of the different categories of errors that can occur when
// probing telemetry information.
//
// NextMinVersion: 1, NextIndex: 5
[Extensible]
enum ErrorType {
[Default] kUnknown = 4,
// An error reading a system file.
kFileReadError = 0,
// An error parsing data into a consumable form.
kParseError = 1,
// An error using a system utility.
kSystemUtilityError = 2,
// The external service used to probe the information is not available.
kServiceUnavailable = 3,
};
// Structure that contains error information for a telemetry probe.
//
// NextMinVersion: 1, NextIndex: 2
struct ProbeError {
// The type of error that occurred.
ErrorType type@0;
// A debug message with more information about the error. This string is not
// intended to be shown to the user.
string msg@1;
};
// An enumeration of states a process can be in.
//
// NextMinVersion: 1, NextIndex: 8
[Extensible]
enum ProcessState {
[Default] kUnknown = 7,
// The process is running.
kRunning = 0,
// The process is sleeping in an interruptible wait.
kSleeping = 1,
// The process is waiting in an uninterruptible disk sleep.
kWaiting = 2,
// The process is a zombie.
kZombie = 3,
// The process is stopped on a signal.
kStopped = 4,
// The process is stopped by tracing.
kTracingStop = 5,
// The process is dead.
kDead = 6,
};
// Process probe result. Can either be populated with the ProcessInfo or an
// error retrieving the information.
union ProcessResult {
// Valid ProcessInfo.
ProcessInfo process_info;
// The error that occurred attempting to retrieve the ProcessInfo.
ProbeError error;
};
// Information related to a particular process.
//
// NextMinVersion: 1, NextIndex: 16
struct ProcessInfo {
// Command which started the process.
string command@0;
// User the process is running as.
uint32 user_id@1;
// If the process is running a real-time scheduling policy, this field is the
// negated scheduling priority, minus one. Real-time priorities range from 1
// to 99, so this will range from -2 to -100. If the process is not running a
// real-time scheduling priority, this field will be the raw nice value, where
// 0 corresponds to the user-visible high priority nice value of -20, and 39
// corresponds to the user-visible low priority nice value of 19.
int8 priority@2;
// User-visible nice value of the process, from a low priority of 19 to a high
// priority of -20.
int8 nice@3;
// Uptime of the process, in clock ticks.
uint64 uptime_ticks@4;
// State of the process.
ProcessState state@5;
// Total memory allocated to the process, in KiB.
uint32 total_memory_kib@6;
// Amount of resident memory currently used by the process, in KiB.
uint32 resident_memory_kib@7;
// Unused memory available to the process, in KiB. This will always be
// |total_memory_kib| - |resident_memory_kib|.
uint32 free_memory_kib@8;
// The sum of bytes passed to system read calls. This includes terminal
// I/O and is independent of whether the physical disk is accessed.
uint64 bytes_read@9;
// The sum of bytes passed to system write calls. This includes terminal
// I/O and is independent of whether the physical disk is accessed.
uint64 bytes_written@10;
// Attempted count of read syscalls.
uint64 read_system_calls@11;
// Attempted count of write syscalls.
uint64 write_system_calls@12;
// Attempt to count the number of bytes which this process really did cause
// to be fetched from the storage layer.
uint64 physical_bytes_read@13;
// Attempt to count the number of bytes which this process caused to be sent
// to the storage layer.
uint64 physical_bytes_written@14;
// Number of bytes which this process caused to not happen, by truncating
// pagecache.
uint64 cancelled_bytes_written@15;
};
// Battery probe result. Can either be populated with the BatteryInfo or an
// error retrieving the information.
union BatteryResult {
// Valid BatteryInfo. Null value if a battery is not present.
BatteryInfo? battery_info;
// The error that occurred attempting to retrieve the BatteryInfo.
ProbeError error;
};
// Information related to the main battery.
//
// NextMinVersion: 1, NextIndex: 14
struct BatteryInfo {
// TODO(https://crbug.com/979245): Update "smart" cycle count.
int64 cycle_count@0;
// Current battery voltage (V)
double voltage_now@1;
// Manufacturer of the battery
string vendor@2;
// Serial number of the battery
string serial_number@3;
// Design capacity (Ah)
double charge_full_design@4;
// Full capacity (Ah)
double charge_full@5;
// Desired minimum output voltage (V)
double voltage_min_design@6;
// Model name.
string model_name@7;
// Current battery charge (Ah)
double charge_now@8;
// Current battery current (A)
double current_now@9;
// Technology of the battery
string technology@10;
// Status of the battery
string status@11;
// The fields below are optionally included if the main battery is a Smart
// Battery as defined in http://sbs-forum.org/specs/sbdat110.pdf.
// Manufacture date converted to yyyy-mm-dd format.
string? manufacture_date@12;
// Temperature in 0.1K. Included when the main battery is a Smart Battery.
NullableUint64? temperature@13;
};
// Non-removable block device probe result. Can either be populated with the
// NonRemovableBlockDeviceInfo or an error retrieving the information.
union NonRemovableBlockDeviceResult {
// Valid NonRemovableBlockDeviceInfo.
array<NonRemovableBlockDeviceInfo> block_device_info;
// The error that occurred attempting to retrieve the
// NonRemovableBlockDeviceInfo.
ProbeError error;
};
// Unions for device-specific data fields. |other| is provided by the default
// data adapter and filled with a default value for the unknown device type.
// The manufacturer of the block device.
union BlockDeviceVendor {
uint32 nvme_subsystem_vendor;
uint16 emmc_oemid;
uint16 other;
};
// The manufacturer-specific product identifier.
union BlockDeviceProduct {
uint32 nvme_subsystem_device;
uint64 emmc_pnm;
uint16 other;
};
// The revision of the device's hardware.
union BlockDeviceRevision {
uint8 nvme_pcie_rev;
uint8 emmc_prv;
uint16 other;
};
// The revision of the device's firmware.
union BlockDeviceFirmware {
uint64 nvme_firmware_rev;
uint64 emmc_fwrev;
uint16 other;
};
// Purpose of the storage device.
//
// NextMinVersion: 1, NextIndex: 3
[Extensible]
enum StorageDevicePurpose {
[Default] kUnknown = 0,
kBootDevice = 1,
kSwapDevice = 2,
};
// Information related to a specific non-removable block device.
//
// NextMinVersion: 1, NextIndex: 17
struct NonRemovableBlockDeviceInfo {
// IO statistics
// Bytes read since last boot.
uint64 bytes_read_since_last_boot@0;
// Bytes written since last boot.
uint64 bytes_written_since_last_boot@1;
// Time spent reading since last boot.
uint64 read_time_seconds_since_last_boot@2;
// Time spent writing since last boot.
uint64 write_time_seconds_since_last_boot@3;
// Time spent doing I/O since last boot. Counts the time the disk and queue
// were busy, so unlike the fields above, parallel requests are not counted
// multiple times.
uint64 io_time_seconds_since_last_boot@4;
// Time spent discarding since last boot. Discarding is writing to clear
// blocks which are no longer in use. Supported on kernels 4.18+.
NullableUint64? discard_time_seconds_since_last_boot@5;
// Device identification.
// Device vendor identification.
BlockDeviceVendor vendor_id@6;
// Device product identification.
BlockDeviceProduct product_id@7;
// Device revision.
BlockDeviceRevision revision@8;
// Device model.
string name@9;
// Device size in bytes.
uint64 size@10;
// Firmware version.
BlockDeviceFirmware firmware_version@11;
// Storage type, could be MMC / NVMe / ATA, based on udev subsystem.
string type@12;
// Purpose of the device e.g. "boot", "swap".
StorageDevicePurpose purpose@13;
// Additional identification.
// The path of this storage on the system. It is useful if caller needs to
// correlate with other information.
string path@14;
// Manufacturer ID, 8 bits.
uint8 manufacturer_id@15;
// PSN: Product serial number, 32 bits
uint32 serial@16;
};
// CPU probe result. Can either be populated with the CpuInfo or an error
// retrieving the information.
union CpuResult {
// Valid CpuInfo.
CpuInfo cpu_info;
// The error that occurred attempting to retrieve the CpuInfo.
ProbeError error;
};
// Information about the device's CPUs.
//
// NextMinVersion: 2, NextIndex: 7
struct CpuInfo {
// Number of total threads available.
uint32 num_total_threads@0;
// The CPU architecture - it's assumed all of a device's CPUs share an
// architecture.
CpuArchitectureEnum architecture@1;
// Information about the device's physical CPUs.
array<PhysicalCpuInfo> physical_cpus@2;
// Information about the CPU temperature channels.
array<CpuTemperatureChannel> temperature_channels@3;
// Information about keylocker.
KeylockerInfo? keylocker_info@4;
// The general virtualization info.
[MinVersion=1] VirtualizationInfo? virtualization@5;
// The cpu vulnerability info. The key is the name of the vulnerability.
[MinVersion=1] map<string, VulnerabilityInfo>? vulnerabilities@6;
};
// Information related to virtualization.
//
// NextMinVersion: 1, NextIndex: 3
struct VirtualizationInfo {
// The possible states of Simultaneous multithreading(SMT) control.
[Extensible]
enum SMTControl{
// This is required for backwards compatibility, should not be used.
[Default] kUnmappedEnumField,
// SMT is enabled.
kOn,
// SMT is disabled.
kOff,
// SMT is force disabled. Cannot be changed.
kForceOff,
// SMT is not supported by the CPU.
kNotSupported,
// SMT runtime toggling is not implemented for the architecture, or the
// kernel version doesn't support SMT detection yet.
kNotImplemented,
};
// Whether the /dev/kvm device exists.
bool has_kvm_device@0;
// Whether SMT is active, False if SMT detection is not supported by kernel
// version.
bool is_smt_active@1;
// The state of SMT control.
SMTControl smt_control@2;
};
// Information related to CPU Vulnerabilities.
//
// NextMinVersion: 1, NextIndex: 2
struct VulnerabilityInfo {
// The status of the vulnerability.
[Extensible]
enum Status{
// This is required for backwards compatibility, should not be used.
[Default] kUnmappedEnumField,
// Not affected by this vulnerability.
kNotAffected,
// Vulnerable by this vulnerability.
kVulnerable,
// Vulnerability is mitigated.
kMitigation,
// Vulnerability is unknown.
kUnknown,
// Vulnerability is unrecognized by parser.
kUnrecognized,
};
Status status@0;
// The description of the vulnerability.
string message@1;
};
// Information related to Keylocker.
//
// NextMinVersion: 1, NextIndex: 1
struct KeylockerInfo {
// Has Keylocker been configured or not.
bool keylocker_configured@0;
};
// Information related to a particular physical CPU.
//
// NextMinVersion: 2, NextIndex: 4
struct PhysicalCpuInfo {
// The CPU model name, if available.
// For Arm devices, we will return SoC model instead.
string? model_name@0;
// Logical CPUs corresponding to this physical CPU.
array<LogicalCpuInfo> logical_cpus@1;
// The cpu flags, labelled as |flags| in x86 architecture and |Features| in
// ARM architecture.
[MinVersion=1] array<string>? flags@2;
// The virtualization info of this cpu.
[MinVersion=1] CpuVirtualizationInfo? virtualization@3;
};
// Information related to virtualization status of a cpu.
//
// NextMinVersion: 1, NextIndex: 3
struct CpuVirtualizationInfo {
// The type of cpu hardware virtualization.
[Extensible]
enum Type{
// This is required for backwards compatibility, should not be used.
[Default] kUnmappedEnumField,
// The cpu supports Intel virtualization (VT-x).
kVMX,
// The cpu supports AMD virtualization (AMD-V).
kSVM,
};
Type type@0;
// Whether virtualization is enabled.
bool is_enabled@1;
// Whether the virtualization configuration is locked and cannot be modified.
// This is usually set by the BIOS to prevent the OS changing the setting
// after booting into the OS.
bool is_locked@2;
};
// Information related to a particular logical CPU.
//
// NextMinVersion: 1, NextIndex: 7
struct LogicalCpuInfo {
// The max CPU clock speed in kHz.
uint32 max_clock_speed_khz@0;
// Maximum frequency the CPU is allowed to run at, by policy.
uint32 scaling_max_frequency_khz@1;
// Current frequency the CPU is running at.
uint32 scaling_current_frequency_khz@2;
// Time spent in user mode since last boot. USER_HZ can be converted to
// seconds with the conversion factor given by sysconf(_SC_CLK_TCK).
uint64 user_time_user_hz@3;
// Time spent in system mode since last boot. USER_HZ can be converted to
// seconds with the conversion factor given by sysconf(_SC_CLK_TCK).
uint64 system_time_user_hz@4;
// Idle time since last boot. USER_HZ can be converted to seconds with the
// conversion factor given by sysconf(_SC_CLK_TCK).
uint64 idle_time_user_hz@5;
// Information about the logical CPU's time in various C-states.
array<CpuCStateInfo> c_states@6;
};
// Information about a CPU's C-states.
//
// NextMinVersion: 1, NextIndex: 2
struct CpuCStateInfo {
// Name of the state.
string name@0;
// Time spent in the state since the last reboot, in microseconds.
uint64 time_in_state_since_last_boot_us@1;
};
// Information about a single CPU temperature channel.
//
// NextMinVersion: 1, NextIndex: 2
struct CpuTemperatureChannel {
// Temperature channel label, if found on the device.
string? label@0;
// CPU temperature in Celsius.
int32 temperature_celsius@1;
};
// Timezone probe result. Can either be populated with the TimezoneInfo or an
// error retrieving the information.
union TimezoneResult {
// Valid TimezoneInfo.
TimezoneInfo timezone_info;
// The error that occurred attempting to retrieve the TimezoneInfo.
ProbeError error;
};
// Timezone information.
//
// NextMinVersion: 1, NextIndex: 2
struct TimezoneInfo {
// The timezone of the device in POSIX standard.
string posix@0;
// The timezone region of the device.
string region@1;
};
// Memory probe result. Can either be populated with the MemoryInfo or an
// error retrieving the information.
union MemoryResult {
// Valid MemoryInfo.
MemoryInfo memory_info;
// The error that occurred attempting to retrieve the MemoryInfo.
ProbeError error;
};
// Memory information.
//
// NextMinVersion: 2, NextIndex: 5
struct MemoryInfo {
// Total memory, in KiB.
uint32 total_memory_kib@0;
// Free memory, in KiB.
uint32 free_memory_kib@1;
// Available memory, in KiB.
uint32 available_memory_kib@2;
// Number of page faults since the last boot.
uint64 page_faults_since_last_boot@3;
// Memory Encryption info.
[MinVersion=1] MemoryEncryptionInfo? memory_encryption_info@4;
};
// NextMinVersion: 1, NextIndex: 4
struct MemoryEncryptionInfo {
// Memory encryption state.
EncryptionState encryption_state@0;
// Max number of encryption keys.
uint32 max_key_number@1;
// Encryption key length.
uint32 key_length@2;
// Crypto algorithm currently used.
CryptoAlgorithm active_algorithm@3;
};
// Memory encryption states.
// NextMinVersion: 1, NextIndex: 4
[Extensible]
enum EncryptionState {
kUnknown = 0,
kEncryptionDisabled = 1,
kTmeEnabled = 2,
kMktmeEnabled = 3,
};
// Crypto algorithm.
// NextMinVersion: 1, NextIndex: 3
[Extensible]
enum CryptoAlgorithm {
kUnknown = 0,
kAesXts128 = 1,
kAesXts256 = 2,
};
// Backlight probe result. Can either be populated with the BacklightInfo or an
// error retrieving the information.
union BacklightResult {
// Valid BacklightInfo.
array<BacklightInfo> backlight_info;
// The error that occurred attempting to retrieve the BacklightInfo.
ProbeError error;
};
// Backlight information.
//
// NextMinVersion: 1, NextIndex: 3
struct BacklightInfo {
// Path to this backlight on the system. Useful if the caller needs to
// correlate with other information.
string path@0;
// Maximum brightness for the backlight.
uint32 max_brightness@1;
// Current brightness of the backlight, between 0 and max_brightness.
uint32 brightness@2;
};
// Fan probe result. Can either be populated with the FanInfo or an error
// retrieving the information
union FanResult {
// A list of valid FanInfo.
array<FanInfo> fan_info;
// The error that occurred attempting to retrieve the FanInfo.
ProbeError error;
};
// Fan information.
//
// NextMinVersion: 1, NextIndex: 1
struct FanInfo {
// Fan speed in RPM.
uint32 speed_rpm@0;
};
// Stateful partition probe result. Can either be populated with a valid
// StatefulPartitionInfo or an error retrieving the information.
union StatefulPartitionResult {
// A valid StatefulPartitionInfo.
StatefulPartitionInfo partition_info;
// The error that occurred attempting to retrieve the StatefulPartitionInfo.
ProbeError error;
};
// Stateful partition info
//
// NextMinVersion: 1, NextIndex: 4
struct StatefulPartitionInfo {
// Available space for user data storage in the device in bytes.
uint64 available_space@0;
// Total space for user data storage in the device in bytes.
uint64 total_space@1;
// File system on stateful partition. e.g. ext4.
string filesystem@2;
// Source of stateful partition. e.g. /dev/mmcblk0p1.
string mount_source@3;
};
// Bluetooth probe result. Can either be populated with the BluetoothAdapterInfo
// or an error retrieving the information.
union BluetoothResult {
// Valid BluetoothAdapterInfo.
array<BluetoothAdapterInfo> bluetooth_adapter_info;
// The error that occurred attempting to retrieve the BluetoothAdapterInfo.
ProbeError error;
};
// Information related to one of a device's Bluetooth adapters.
//
// NextMinVersion: 3, NextIndex: 11
struct BluetoothAdapterInfo {
// The name of the adapter.
string name@0;
// The MAC address of the adapter.
string address@1;
// Indicates whether the adapter is on or off.
bool powered@2;
// The number of devices connected to this adapter.
uint32 num_connected_devices@3;
// The info of connected devices to this adapter.
[MinVersion=1] array<BluetoothDeviceInfo>? connected_devices@4;
// The adapter is visible or not.
[MinVersion=1] bool discoverable@5;
// The device discovery procedure is active or not.
[MinVersion=1] bool discovering@6;
// The list of the available local services.
[MinVersion=1] array<string>? uuids@7;
// Local Device ID information.
[MinVersion=1] string? modalias@8;
// List of allowed system devices.
[MinVersion=2] array<string>? service_allow_list@9;
// A dictionary of supported capabilities.
[MinVersion=2] SupportedCapabilities? supported_capabilities@10;
};
// Information related to one of a adapter's Bluetooth connected devices.
//
// NextMinVersion: 2, NextIndex: 9
struct BluetoothDeviceInfo {
// The MAC address of the device.
string address@0;
// The name of the device.
string? name@1;
// The carriers supported by this remote device ("BR/EDR", "LE", or "DUAL").
BluetoothDeviceType type@2;
// The external appearance of the device.
NullableUint16 appearance@3;
// Remote Device ID information.
string? modalias@4;
// Received Signal Strength Indicator.
NullableInt16 rssi@5;
// The Maximum Transmission Unit used in ATT communication.
NullableUint16 mtu@6;
// The list of the available remote services.
array<string>? uuids@7;
// The battery percentage of the device.
[MinVersion=1] NullableUint8? battery_percentage@8;
};
// An enumeration of type in Bluetooth device info.
//
// NextMinVersion: 1, NextIndex: 4
[Extensible]
enum BluetoothDeviceType {
// An enum value not defined in this version of the enum definition.
[Default] kUnmappedEnumField = 0,
// Unfound type.
kUnfound = 1,
// BR/EDR.
kBrEdr = 2,
// LE.
kLe = 3,
// DUAL.
kDual = 4,
};
// Supported Capabilities related information.
//
// NextMinVersion: 1, NextIndex: 4
struct SupportedCapabilities {
// Max advertising data length.
uint8 max_adv_len@0;
// Max advertising scan response length.
uint8 max_scn_rsp_len@1;
// Min advertising tx power (dBm).
int16 min_tx_power@2;
// Max advertising tx power (dBm).
int16 max_tx_power@3;
};
// System probe result. Can either be populated with the SystemInfo or an error
// retrieving the information.
// DEPRECATED(b/188508561): Use SystemResultV2 instead.
union SystemResult {
// Valid SystemInfo.
SystemInfo system_info;
// The error that occurred attempting to retrieve SystemInfo.
ProbeError error;
};
// System probe result. Can either be populated with the SystemInfoV2 or an
// error retrieving the information.
union SystemResultV2 {
// Valid SystemInfoV2.
SystemInfoV2 system_info_v2;
// The error that occurred attempting to retrieve SystemInfo.
ProbeError error;
};
// System Information.
// DEPRECATED(b/188508561): Use SystemInfoV2 instead.
//
// NextMinVersion: 1, NextIndex: 12
struct SystemInfo {
// The date the device was first activated.
// Format: YYYY-WW.
string? first_power_date@0;
// The date the device was manufactured (finalized in factory).
// Format: YYYY-MM-DD.
string? manufacture_date@1;
// The product SKU number.
string? product_sku_number@2;
// The product serial number.
string? product_serial_number@3;
// The product model name.
string? product_model_name@4;
// Contents of CrosConfig in /branding/marketing-name.
string marketing_name@5;
// The BIOS version.
string? bios_version@6;
// The product name of the motherboard.
string? board_name@7;
// The version of the motherboard.
string? board_version@8;
// The chassis type of the device. The values reported by chassis type are
// mapped in
// www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf.
NullableUint64? chassis_type@9;
// The product name (model) of the system.
string? product_name@10;
// The OS version of the system.
OsVersion os_version@11;
};
// System Information.
// TODO(b/190459636): Rename it to SystemInfo after migration.
//
// NextMinVersion: 1, NextIndex: 3
struct SystemInfoV2 {
// The info related to the OS.
OsInfo os_info@0;
// The info from the VPD cache.
VpdInfo? vpd_info@1;
// The info from DMI (x86 only). The info from here should only be used for
// logging and debugging.
DmiInfo? dmi_info@2;
};
// The OS information.
//
// NextMinVersion: 2, NextIndex: 5
struct OsInfo {
// Google code name for the given model. While it is OK to use this string for
// human-display purposes (such as in a debug log or help dialog), or for a
// searchable-key in metrics collection, it is not recommended to use this
// property for creating model-specific behaviors.
string code_name@0;
// Contents of CrosConfig in /branding/marketing-name.
string? marketing_name@1;
// The OS version of the system.
OsVersion os_version@2;
// The boot flow used by the current boot.
BootMode boot_mode@3;
// Contents of CrosConfig in /branding/oem-name.
[MinVersion=1] string? oem_name@4;
};
// Structure containing information about the operating system version of the
// device. This structure decomposes a full version string
// (e.g. "87.13544.59.0") into its parts:
//
// NextMinVersion: 1, NextIndex: 4
struct OsVersion {
// The OS version release milestone (e.g. "87").
string release_milestone@0;
// The OS version build number (e.g. "13544").
string build_number@1;
// The OS version patch number (e.g. "59.0").
string patch_number@2;
// The OS release channel (e.g. "stable-channel").
string release_channel@3;
};
// The boot mode of the current os.
//
// NextMinVersion: 1, NextIndex: 5
[Extensible]
enum BootMode {
[Default] kUnknown = 0,
// Boot with ChromeOS firmware.
kCrosSecure = 1,
// Boot with EFI
kCrosEfi = 2,
// Boot with Legacy BIOS.
kCrosLegacy = 3,
// Boot with EFI security boot.
kCrosEfiSecure = 4,
};
// The list of VPD fields are available in the ChromeOS Partner Site document
// "VPD Field Requirements":
// https://chromeos.google.com/partner/dlm/docs/factory/vpd.html
// Note that all the fields (include required fields) are not guaranteed to be
// exist in some situation. (e.g. in a early stage device)
//
// NextMinVersion: 1, NextIndex: 6
struct VpdInfo {
// A unique identifier of the device. (Required RO VPD field)
string? serial_number@0;
// Defines a market region where devices share a particular configuration of
// keyboard layout, language, and timezone. (Required VPD field)
string? region@1;
// The date the device was manufactured. (Required RO VPD field)
// Format: YYYY-MM-DD.
string? mfg_date@2;
// The date the device was first activated. (Runtime RW VPD field)
// Format: YYYY-WW.
string? activate_date@3;
// The product SKU number. (Optional RO VPD field. b/35512367)
string? sku_number@4;
// The product model name. (Optional RO VPD field. b/35512367)
string? model_name@5;
};
// DMI (a.k.a. SMBIOS) is only supported on x86 platform. These info can be used
// to identify the hardware.
//
// NextMinVersion: 1, NextIndex: 11
struct DmiInfo {
// The BIOS vendor.
string? bios_vendor@0;
// The BIOS version.
string? bios_version@1;
// The product name of the motherboard.
string? board_name@2;
// The vendor of the motherboard.
string? board_vendor@3;
// The version of the motherboard.
string? board_version@4;
// The vendor of the chassis.
string? chassis_vendor@5;
// The chassis type of the device. The values reported by chassis type are
// mapped in
// www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0.0.pdf.
NullableUint64? chassis_type@6;
// The product family name.
string? product_family@7;
// The product name (model) of the system.
string? product_name@8;
// The product version.
string? product_version@9;
// The system vendor name.
string? sys_vendor@10;
};
// Network probe result. Can either be populated with the NetworkHealthSnapshot
// or an error retrieving the information.
union NetworkResult {
// Valid NetworkHealthSnapshot.
chromeos.network_health.mojom.NetworkHealthState network_health;
// The error that occurred attempting to retrieve the NetworkHealthSnapshot.
ProbeError error;
};
union NetworkInterfaceResult {
// Valid network interfaces.
array<NetworkInterfaceInfo> network_interface_info;
// Error occurred while fetching network interface data.
ProbeError error;
};
// Will expand to beyond wireless interface.
// NextMinVersion: 1, NextIndex: 1
union NetworkInterfaceInfo {
// Wireless interfaces.
WirelessInterfaceInfo wireless_interface_info@0;
};
// NextMinVersion: 1, NextIndex: 3
struct WirelessInterfaceInfo {
// Interface name.
string interface_name@0;
// Is power management enabled for wifi or not.
bool power_management_on@1;
// Link info only available when device is connected to an access point.
WirelessLinkInfo? wireless_link_info@2;
};
// NextMinVersion: 1, NextIndex: 7
struct WirelessLinkInfo {
// Access point address.
string access_point_address_str@0;
// Tx bit rate measured in Mbps.
uint32 tx_bit_rate_mbps@1;
// Rx bit rate measured in Mbps.
uint32 rx_bit_rate_mbps@2;
// Transmission power measured in dBm.
int32 tx_power_dBm@3;
// Is wifi encryption key on or not.
bool encyption_on@4;
// Wifi link quality.
uint32 link_quality@5;
// Wifi signal level in dBm.
int32 signal_level_dBm@6;
};
// Audio probe result. Can either be populated with the AudioInfo or an
// error retrieving the information.
union AudioResult {
// Valid AudioInfo.
AudioInfo audio_info;
// The error that occurred attempting to retrieve the AudioInfo.
ProbeError error;
};
// Audio information.
//
// NextMinVersion: 1, NextIndex: 8
struct AudioInfo {
// Is active output device mute or not.
bool output_mute@0;
// Is active input device mute or not.
bool input_mute@1;
// Active output device's volume in [0, 100].
uint64 output_volume@2;
// Active output device's name.
string output_device_name@3;
// Active input device's gain in [0, 100].
uint32 input_gain@4;
// Active input device's name.
string input_device_name@5;
// Numbers of underruns.
uint32 underruns@6;
// Numbers of severe underruns.
uint32 severe_underruns@7;
};
// Boot performance result.
union BootPerformanceResult {
// Valid BootPerformanceInfo.
BootPerformanceInfo boot_performance_info;
// The error that occurred attempting to retrieve the BootPerformanceInfo.
ProbeError error;
};
// Boot performance information.
//
// NextMinVersion: 1, NextIndex: 5
struct BootPerformanceInfo {
// Total time since power on to login screen prompt.
double boot_up_seconds@0;
// The timestamp when power on.
double boot_up_timestamp@1;
// Total time(rough) since shutdown start to power off.
// Only meaningful when shutdown_reason is not "N/A".
double shutdown_seconds@2;
// The timestamp when shutdown.
// Only meaningful when shutdown_reason is not "N/A".
double shutdown_timestamp@3;
// The shutdown reason (including reboot).
string shutdown_reason@4;
};
// Bus probe result. Can either be populated with the BusDevice or an error
// retrieving the information.
union BusResult {
// Valid BusDevice.
array<BusDevice> bus_devices;
// The error that occurred attempting to retrieve the BusDevice.
ProbeError error;
};
// The classes of the bus devices. Can be used to group the devices by their
// use.
//
// NextMinVersion: 1, NextIndex: 6
[Extensible]
enum BusDeviceClass {
// For the devices which cannot be classified.
[Default] kOthers = 0,
kDisplayController = 1,
kEthernetController = 2,
kWirelessController = 3,
kBluetoothAdapter = 4,
kThunderboltController = 5,
};
// The bus device info.
//
// NextMinVersion: 1, NextIndex: 4
struct BusDevice {
// The vendor / product name of the device. These are extracted from the
// databases on the system and should only be used for showing / logging.
// Don't use these to identify the devices.
string vendor_name@0;
string product_name@1;
// The class of the device.
BusDeviceClass device_class@2;
// The info related to specific bus type.
BusInfo bus_info@3;
};
// The info related to specific bus type.
union BusInfo {
// The info related to pci.
PciBusInfo pci_bus_info;
// The info related to usb.
UsbBusInfo usb_bus_info;
// The info related to thunderbolt.
ThunderboltBusInfo thunderbolt_bus_info;
};
// The info related to pci.
//
// NextMinVersion: 1, NextIndex: 6
struct PciBusInfo {
// These fields can be used to classify / identify the pci devices. See the
// pci.ids database for the values. (https://github.com/gentoo/hwids)
uint8 class_id@0;
uint8 subclass_id@1;
uint8 prog_if_id@2;
uint16 vendor_id@3;
uint16 device_id@4;
// The driver used by the device. This is the name of the matched driver which
// is registered in the kernel. See "{kernel root}/drivers/". for the list of
// the built in drivers.
string? driver@5;
};
// The info related to usb.
//
// NextMinVersion: 2, NextIndex: 7
struct UsbBusInfo {
// These fields can be used to classify / identify the usb devices. See the
// usb.ids database for the values. (https://github.com/gentoo/hwids)
uint8 class_id@0;
uint8 subclass_id@1;
uint8 protocol_id@2;
uint16 vendor_id@3;
uint16 product_id@4;
// The usb interfaces under the device. A usb device has at least one
// interface. Each interface may or may not work independently, based on each
// device. This allows a usb device to provide multiple features.
// The interfaces are sorted by the |interface_number| field.
array<UsbBusInterfaceInfo> interfaces@5;
// The firmware version obtained from fwupd.
[MinVersion=1] FwupdFirmwareVersionInfo? fwupd_firmware_version_info@6;
};
// The info related to firmware version obtained from fwupd.
//
// NextMinVersion: 1, NextIndex: 2
struct FwupdFirmwareVersionInfo {
// The string form of the firmware version.
string version@0;
// The format for parsing the version string.
FwupdVersionFormat version_format@1;
};
// An enumeration of the formats of firmware version in fwpud. See the fwupd
// repo for the values. (https://github.com/fwupd/fwupd)
//
// NextMinVersion: 1, NextIndex: 14
[Extensible]
enum FwupdVersionFormat {
// An enum value not defined in this version of the enum definition.
[Default] kUnmappedEnumField = 0,
// Unknown version format.
kUnknown = 1,
// An unidentified format text string.
kPlain = 2,
// A single integer version number.
kNumber = 3,
// Two AABB.CCDD version numbers.
kPair = 4,
// Microsoft-style AA.BB.CCDD version numbers.
kTriplet = 5,
// UEFI-style AA.BB.CC.DD version numbers.
kQuad = 6,
// Binary coded decimal notation.
kBcd = 7,
// Intel ME-style bitshifted notation.
kIntelMe = 8,
// Intel ME-style A.B.CC.DDDD notation.
kIntelMe2 = 9,
// Legacy Microsoft Surface 10b.12b.10b.
kSurfaceLegacy = 10,
// Microsoft Surface 8b.16b.8b.
kSurface = 11,
// Dell BIOS BB.CC.DD style.
kDellBios = 12,
// Hexadecimal 0xAABCCDD style.
kHex = 13,
};
// The info related to usb interfaces.
//
// NextMinVersion: 1, NextIndex: 5
struct UsbBusInterfaceInfo {
// The zero-based number (index) of the interface.
uint8 interface_number@0;
// These fields can be used to classify / identify the usb interfaces. See the
// usb.ids database for the values.
uint8 class_id@1;
uint8 subclass_id@2;
uint8 protocol_id@3;
// The driver used by the device. This is the name of the matched driver which
// is registered in the kernel. See "{kernel root}/drivers/". for the list of
// the built in drivers.
string? driver@4;
};
// TPM probe result. Can either be populated with the TpmInfo or an error
// retrieving the information.
union TpmResult {
// Valid TpmInfo.
TpmInfo tpm_info;
// The error that occurred attempting to retrieve the TpmInfo.
ProbeError error;
};
// Information of the Trusted Platform Module(TPM).
//
// NextMinVersion: 1, NextIndex: 6
struct TpmInfo {
// TPM version related information.
TpmVersion version@0;
// TPM status related information.
TpmStatus status@1;
// TPM dictionary attack (DA) related information.
TpmDictionaryAttack dictionary_attack@2;
// TPM attestation related information.
TpmAttestation attestation@3;
// TPM supported features information.
TpmSupportedFeatures supported_features@4;
// [Do NOT use] TPM did_vid file. This field is only used in Cloudready
// project. It is going to drop the support in few milestone.
// TODO(b/199686982): Remove this.
string? did_vid@5;
};
// The version of Google security chip(GSC).
//
// NextMinVersion: 1, NextIndex: 3
[Extensible]
enum TpmGSCVersion {
// For the devices which cannot be classified.
[Default] kNotGSC = 0,
// Devices with Cr50 firmware.
kCr50 = 1,
// Devices with Ti50 firmware.
kTi50 = 2,
};
// TPM version related information.
//
// NextMinVersion: 1, NextIndex: 7
struct TpmVersion {
// GSC version.
TpmGSCVersion gsc_version@0;
// TPM family. We use the TPM 2.0 style encoding, e.g.:
// * TPM 1.2: "1.2" -> 0x312e3200
// * TPM 2.0: "2.0" -> 0x322e3000
uint32 family@1;
// TPM spec level.
uint64 spec_level@2;
// Manufacturer code.
uint32 manufacturer@3;
// TPM model number.
uint32 tpm_model@4;
// Firmware version.
uint64 firmware_version@5;
// Vendor specific information.
string? vendor_specific@6;
};
// TPM status related information.
//
// NextMinVersion: 1, NextIndex: 3
struct TpmStatus {
// Whether a TPM is enabled on the system.
bool enabled@0;
// Whether the TPM has been owned.
bool owned@1;
// Whether the owner password is still retained.
bool owner_password_is_present@2;
};
// TPM dictionary attack (DA) related information.
//
// NextMinVersion: 1, NextIndex: 4
struct TpmDictionaryAttack {
// The current dictionary attack counter value.
uint32 counter@0;
// The current dictionary attack counter threshold.
uint32 threshold@1;
// Whether the TPM is in some form of dictionary attack lockout.
bool lockout_in_effect@2;
// The number of seconds remaining in the lockout.
uint32 lockout_seconds_remaining@3;
};
// TPM attestation related information.
//
// NextMinVersion: 1, NextIndex: 2
struct TpmAttestation {
// Is prepared for enrollment? True if prepared for *any* CA.
bool prepared_for_enrollment@0;
// Is enrolled (AIK certificate created)? True if enrolled with *any* CA.
bool enrolled@1;
};
// TPM supported features information.
//
// NextMinVersion: 1, NextIndex: 4
struct TpmSupportedFeatures {
// Whether the u2f is supported or not.
bool support_u2f@0;
// Whether the pinweaver is supported or not.
bool support_pinweaver@1;
// Whether the platform supports runtime TPM selection or not.
bool support_runtime_selection@2;
// Whether the TPM is allowed to use or not.
bool is_allowed@3;
};
// Graphics probe result. Can either be populated with the GraphicsInfo or an
// error retrieving the information.
union GraphicsResult {
// Valid GraphicsInfo.
GraphicsInfo graphics_info;
// The error that occurred attempting to retrieve the GraphicsInfo.
ProbeError error;
};
// Graphics information.
//
// NextMinVersion: 1, NextIndex: 2
struct GraphicsInfo {
// OpenGL | ES information.
GLESInfo gles_info@0;
// EGL information.
EGLInfo egl_info@1;
};
// NextMinVersion: 1, NextIndex: 5
struct GLESInfo {
// GL version.
string version@0;
// GL shading version.
string shading_version@1;
// GL vendor.
string vendor@2;
// GL renderer.
string renderer@3;
// GL extensions.
array<string> extensions@4;
};
// NextMinVersion: 1, NextIndex: 4
struct EGLInfo {
// EGL version.
string version@0;
// EGL vendor.
string vendor@1;
// EGL client API.
string client_api@2;
// EGL extensions.
array<string> extensions@3;
};
// Display result.
union DisplayResult {
// Valid DisplayInfo.
DisplayInfo display_info;
// The error that occurred attempting to retrieve the DisplayInfo.
ProbeError error;
};
// Display information.
//
// NextMinVersion: 2, NextIndex: 2
struct DisplayInfo {
// Embedded display info.
EmbeddedDisplayInfo edp_info@0;
// External display info.
[MinVersion=1] array<ExternalDisplayInfo>? dp_infos@1;
};
// NextMinVersion: 2, NextIndex: 7
struct EmbeddedDisplayInfo {
// Privacy screen is supported or not.
bool privacy_screen_supported@0;
// Privacy screen is enabled or not.
bool privacy_screen_enabled@1;
// Display width in millimeters.
[MinVersion=1] NullableUint32? display_width@2;
// Display height in millimeters.
[MinVersion=1] NullableUint32? display_height@3;
// Horizontal resolution.
[MinVersion=1] NullableUint32? resolution_horizontal@4;
// Vertical resolution.
[MinVersion=1] NullableUint32? resolution_vertical@5;
// Refresh rate.
[MinVersion=1] NullableDouble? refresh_rate@6;
};
// NextMinVersion: 1, NextIndex: 5
struct ExternalDisplayInfo {
// Display width in millimeters.
NullableUint32? display_width@0;
// Display height in millimeters.
NullableUint32? display_height@1;
// Horizontal resolution.
NullableUint32? resolution_horizontal@2;
// Vertical resolution.
NullableUint32? resolution_vertical@3;
// Refresh rate.
NullableDouble? refresh_rate@4;
};
// Information related to a Thunderbolt device.
//
// NextMinVersion: 1, NextIndex: 8
struct ThunderboltBusInterfaceInfo {
// Vendor name of connected device interface.
string vendor_name@0;
// Product name of connected device interface.
string device_name@1;
// Type of device.
string device_type@2;
// The device unique id.
string device_uuid@3;
// Transmit link speed for thunderbolt interface.
uint32 tx_speed_gbs@4;
// Receive link speed for thunderbolt interface.
uint32 rx_speed_gbs@5;
// Connection is authorized or not.
bool authorized@6;
// nvm firmware version.
string device_fw_version@7;
};
// NextMinVersion: 1, NextIndex: 6
[Extensible]
enum ThunderboltSecurityLevel {
[Default] kNone = 0,
kUserLevel = 1,
kSecureLevel = 2,
kDpOnlyLevel = 3,
kUsbOnlyLevel = 4,
kNoPcieLevel = 5,
};
// NextMinVersion: 1, NextIndex: 2
struct ThunderboltBusInfo {
// Security level none, user, secure, dponly.
ThunderboltSecurityLevel security_level@0;
// Info of devices attached to the controller.
array<ThunderboltBusInterfaceInfo> thunderbolt_interfaces@1;
};
// A collection of all the device's telemetry information that cros_healthd is
// capable of reporting. Note that every field in TelemetryInfo is nullable, and
// the response for a particular ProbeTelemetryInfo request will only contain
// fields corresponding to the categories passed to the ProbeTelemetryInfo
// request. All optional array members will be null if cros_healthd did not
// attempt to fetch that information, and size zero if cros_healthd did attempt
// to fetch that information, but was unable to.
//
// NextMinVersion: 3, NextIndex: 19
struct TelemetryInfo {
// Information about the device's main battery. Only present when kBattery was
// included in the categories input to ProbeTelemetryInfo.
BatteryResult? battery_result@0;
// Information about all of the device's non-removable block devices. Only
// present when kNonRemovableBlockDevices was included in the categories input
// to ProbeTelemetryInfo.
NonRemovableBlockDeviceResult? block_device_result@1;
// Information about each of the device's CPUs. Only present when kCpu was
// included in the categories input to ProbeTelemetryInfo.
CpuResult? cpu_result@2;
// Information about the device's timezone. Only present when kTimezone was
// included in the categories input to ProbeTelemetryInfo.
TimezoneResult? timezone_result@3;
// Information about the system's memory. Only present when kMemory was
// included in the categories input to ProbeTelemetryInfo.
MemoryResult? memory_result@4;
// Information about all of the device's backlights. Only present when
// kBacklight was included in the categories input to ProbeTelemetryInfo.
BacklightResult? backlight_result@5;
// Information about each of the device's fans. Only present when kFan was
// included in the categories input to ProbeTelemetryInfo.
FanResult? fan_result@6;
// Information about the stateful partition. Only present when
// kStatefulPartition was included in the categories input to
// ProbeTelemetryInfo.
StatefulPartitionResult? stateful_partition_result@7;
// Information about the device's Bluetooth adapters and devices. Only present
// when kBluetooth was included in the categories input to ProbeTelemetryInfo.
BluetoothResult? bluetooth_result@8;
// Information about the system. Only present when kSystem was included in
// the categories input to ProbeTelemetryInfo.
// DEPRECATED(b/188508561): Use system_result_v2 instead.
SystemResult? system_result@9;
// Information about the networking devices and associated networks of the
// system. Only present when kNetwork was included in the categories input to
// ProbeTelemetryInfo.
NetworkResult? network_result@10;
// Information about the audio devices. Only present when kAudio was included
// in the categories input to ProbeTelemetryInfo.
AudioResult? audio_result@11;
// Information about boot performance. Only present when kBootPerformance was
// included in the categories input to ProbeTelemetryInfo.
BootPerformanceResult? boot_performance_result@12;
// Information about the bus devices. Only present when kBus was included
// in the categories input to ProbeTelemetryInfo.
BusResult? bus_result@13;
// Information about the system. Only present when kSystem2 was included in
// the categories input to ProbeTelemetryInfo.
SystemResultV2? system_result_v2@14;
// Information about the tpm. Only present when kTpm was included in
// the categories input to ProbeTelemetryInfo.
TpmResult? tpm_result@15;
// Information about the graphics. Only present when kGraphics was included in
// the categories input to ProbeTelemetryInfo.
GraphicsResult? graphics_result@16;
// Information about the display. Only present when kDisplay was included in
// the categories input to ProbeTelemetryInfo.
[MinVersion=1] DisplayResult? display_result@17;
// Information about the network interfaces. Only present when
// kNetworkInterface was included in the categories input to
// ProbeTelemetryInfo.
[MinVersion=2] NetworkInterfaceResult? network_interface_result@18;
};