blob: 68fa5f8fe23101bd06863a23a2f4e63f36bc283f [file]
edition = "2023";
package uhmm;
option features.field_presence = EXPLICIT;
option java_multiple_files = true;
option java_package = "com.google.uhmm";
option java_outer_classname = "BusTopologyProto";
// Message to represent an address relative to a device connected to a bus
message I2CAddress {
int32 address = 1;
enum AddressLength {
ADDRESS_LENGTH_UNSPECIFIED = 0;
// 7 bit addressing.
ADDRESS_LENGTH_BIT7 = 1;
// 10 bit addressing.
ADDRESS_LENGTH_BIT10 = 2;
}
AddressLength address_length = 2;
}
message Mux {
// The PMBUS reported model number of this mux.
string model = 1;
I2CAddress address_identifier = 2;
// The downstream buses that are connected to the mux.
repeated Bus downstream_buses = 3;
}
message Eeprom {
// The PMBUS reported model number of this EEPROM.
string model = 1;
// The barepath of the plugin that the EERPOM resides on.
string barepath = 2;
I2CAddress address_identifier = 3;
// Addressing mode of the eeprom.
enum AddressingMode {
ADDRESSING_MODE_UNSPECIFIED = 0;
ADDRESSING_MODE_BIT8 = 1;
ADDRESSING_MODE_BIT16 = 2;
}
AddressingMode addressing_mode = 4;
int32 size_bytes = 5;
// Represents the different reporting areas of an EEPROM.
enum ReportingArea {
REPORTING_AREA_UNSPECIFIED = 0;
REPORTING_AREA_CHASSIS = 1;
REPORTING_AREA_BOARD = 2;
REPORTING_AREA_PRODUCT = 3;
}
// The content expected to be written on the EEPROM in accordance with
// go/fru-eeprom-specification and the associated reporting area.
message FruDeviceInformation {
// The area of the EEPROM's memory that contains this information.
ReportingArea reporting_area = 1;
string manufacturer = 2;
string part_number = 3;
string serial_number = 4;
}
repeated FruDeviceInformation part_information = 6;
}
message GpioController {
// The PMBUS reported model number of this GPIO controller.
string model = 1;
I2CAddress address_identifier = 2;
// The barepath of the plugin that the GPIO controller resides on.
string barepath = 3;
}
message SensorController {
// The PMBUS reported model number of this sensor controller.
string model = 1;
I2CAddress address_identifier = 2;
// The barepath of the plugin that the sensor controller resides on.
string barepath = 3;
message MonitoredComponent {
// The barepath of the FRU component that is being monitored by the sensor
// controller.
string barepath = 1;
// The identifier of the probing sensor on the sensor controller that is
// monitoring the component.
string sensor_id = 2;
}
repeated MonitoredComponent monitored_components = 4;
}
message Bus {
// Relative bus/channel id of the controller/muxes are upstream of this bus.
int32 channel_id = 1;
// Muxes connected to the bus and routing traffic to its downstream.
repeated Mux muxes = 2;
repeated Eeprom eeproms = 3;
repeated GpioController gpio_controllers = 4;
repeated SensorController sensor_controllers = 5;
}
message I2cRoot {
// The node entity tag of the target node to be installed with this data.
string node_entity_tag = 1;
// The buses that are connected to the controller.
repeated Bus buses = 2;
// The chip model of the BMC as reported by the manufacturer.
string chip_model = 3;
}
// Represents the overarching USB root of a node, containing all logical
// USB buses across all physical host controllers in the system.
// Since MC2 manages endpoints and devices without needing to track which
// logical buses map to which physical controller ASICs (e.g., xHCI vs EHCI),
// all logical USB buses are consolidated under a single UsbRoot.
message UsbRoot {
repeated UsbBus buses = 1;
}
// Represents a logical USB Bus in the system.
// In USB topology, every bus originates from a Root Hub. A single physical
// controller (like XHCI) often registers multiple logical buses (Root Hubs)
// to separate traffic by speed/protocol (e.g., one for USB 2.0 and one for
// USB 3.0).
message UsbBus {
// Alternative to hub_path, this is the bus number of the root hub which will
// be static across reboots, which is guaranteed by the udev rules.
int32 bus_number = 1;
// Downstream ports on this root hub.
repeated UsbPort ports = 2;
}
// Explicit port container isolates the port index and defines what is
// connected.
message UsbPort {
// Physical port number on the parent hub.
int32 port_id = 1;
// A port can either branch into another chain of hubs or terminate at a
// plugin (IOX), a generic USB device, or a UART device.
// More downstream devices will be added in future revisions.
oneof downstream_device {
UsbHub hub = 2;
}
}
message UsbHub {
repeated UsbPort ports = 1;
}
message BmcMonitoredComponentsResponse {
message MonitoredComponent {
string barepath = 1;
string plugin_id = 2;
// Probe paths are encoding of the BMC software interface used to probe data
// about a particular part.
enum ProbePath {
PROBE_PATH_UNSPECIFIED = 0;
PROBE_PATH_I2C = 1;
PROBE_PATH_NCSI = 2;
PROBE_PATH_SMBIOS = 3;
PROBE_PATH_ADC = 4;
}
ProbePath probe_path = 3;
}
repeated MonitoredComponent monitored_components = 1;
}