175fe8cc4SPatrick Williams# System states 275fe8cc4SPatrick Williams# state can change to next state in 2 ways: 375fe8cc4SPatrick Williams# - a process emits a GotoSystemState signal with state name to goto 475fe8cc4SPatrick Williams# - objects specified in EXIT_STATE_DEPEND have started 540a360c2SBrad BishopSYSTEM_STATES = [ 675fe8cc4SPatrick Williams "BASE_APPS", 775fe8cc4SPatrick Williams "BMC_STARTING", 875fe8cc4SPatrick Williams "BMC_READY", 975fe8cc4SPatrick Williams "HOST_POWERING_ON", 1075fe8cc4SPatrick Williams "HOST_POWERED_ON", 1175fe8cc4SPatrick Williams "HOST_BOOTING", 1275fe8cc4SPatrick Williams "HOST_BOOTED", 1375fe8cc4SPatrick Williams "HOST_POWERED_OFF", 1440a360c2SBrad Bishop] 1540a360c2SBrad Bishop 1640a360c2SBrad BishopEXIT_STATE_DEPEND = { 1775fe8cc4SPatrick Williams "BASE_APPS": { 1875fe8cc4SPatrick Williams "/org/openbmc/sensors": 0, 1940a360c2SBrad Bishop }, 2075fe8cc4SPatrick Williams "BMC_STARTING": { 2175fe8cc4SPatrick Williams "/org/openbmc/control/chassis0": 0, 2275fe8cc4SPatrick Williams "/org/openbmc/control/power0": 0, 2375fe8cc4SPatrick Williams "/org/openbmc/control/led/identify": 0, 2475fe8cc4SPatrick Williams "/org/openbmc/control/host0": 0, 2575fe8cc4SPatrick Williams "/org/openbmc/control/flash/bios": 0, 2675fe8cc4SPatrick Williams }, 2740a360c2SBrad Bishop} 2840a360c2SBrad Bishop 2940a360c2SBrad BishopID_LOOKUP = { 3075fe8cc4SPatrick Williams "FRU": { 3175fe8cc4SPatrick Williams 0x0D: "<inventory_root>/system/chassis", 3275fe8cc4SPatrick Williams 0x34: "<inventory_root>/system/chassis/motherboard", 3375fe8cc4SPatrick Williams 0x01: "<inventory_root>/system/chassis/motherboard/cpu", 3475fe8cc4SPatrick Williams 0x02: "<inventory_root>/system/chassis/motherboard/membuf", 3575fe8cc4SPatrick Williams 0x03: "<inventory_root>/system/chassis/motherboard/dimm0", 3675fe8cc4SPatrick Williams 0x04: "<inventory_root>/system/chassis/motherboard/dimm1", 3775fe8cc4SPatrick Williams 0x05: "<inventory_root>/system/chassis/motherboard/dimm2", 3875fe8cc4SPatrick Williams 0x06: "<inventory_root>/system/chassis/motherboard/dimm3", 3975fe8cc4SPatrick Williams 0x35: "<inventory_root>/system", 4040a360c2SBrad Bishop }, 4175fe8cc4SPatrick Williams "FRU_STR": { 4275fe8cc4SPatrick Williams "PRODUCT_15": "<inventory_root>/system", 4375fe8cc4SPatrick Williams "CHASSIS_2": "<inventory_root>/system/chassis", 4475fe8cc4SPatrick Williams "BOARD_1": "<inventory_root>/system/chassis/motherboard/cpu", 4575fe8cc4SPatrick Williams "BOARD_2": "<inventory_root>/system/chassis/motherboard/membuf", 4675fe8cc4SPatrick Williams "BOARD_14": "<inventory_root>/system/chassis/motherboard", 4775fe8cc4SPatrick Williams "PRODUCT_3": "<inventory_root>/system/chassis/motherboard/dimm0", 4875fe8cc4SPatrick Williams "PRODUCT_4": "<inventory_root>/system/chassis/motherboard/dimm1", 4975fe8cc4SPatrick Williams "PRODUCT_5": "<inventory_root>/system/chassis/motherboard/dimm2", 5075fe8cc4SPatrick Williams "PRODUCT_6": "<inventory_root>/system/chassis/motherboard/dimm3", 5140a360c2SBrad Bishop }, 5275fe8cc4SPatrick Williams "SENSOR": { 5375fe8cc4SPatrick Williams 0x34: "<inventory_root>/system/chassis/motherboard", 5475fe8cc4SPatrick Williams 0x37: "<inventory_root>/system/chassis/motherboard/refclock", 5575fe8cc4SPatrick Williams 0x38: "<inventory_root>/system/chassis/motherboard/pcieclock", 5675fe8cc4SPatrick Williams 0x39: "<inventory_root>/system/chassis/motherboard/todclock", 5775fe8cc4SPatrick Williams 0x3A: "<inventory_root>/system/chassis/apss", 5875fe8cc4SPatrick Williams 0x2F: "<inventory_root>/system/chassis/motherboard/cpu", 5975fe8cc4SPatrick Williams 0x22: "<inventory_root>/system/chassis/motherboard/cpu/core1", 6075fe8cc4SPatrick Williams 0x23: "<inventory_root>/system/chassis/motherboard/cpu/core2", 6175fe8cc4SPatrick Williams 0x24: "<inventory_root>/system/chassis/motherboard/cpu/core3", 6275fe8cc4SPatrick Williams 0x25: "<inventory_root>/system/chassis/motherboard/cpu/core4", 6375fe8cc4SPatrick Williams 0x26: "<inventory_root>/system/chassis/motherboard/cpu/core5", 6475fe8cc4SPatrick Williams 0x27: "<inventory_root>/system/chassis/motherboard/cpu/core6", 6575fe8cc4SPatrick Williams 0x28: "<inventory_root>/system/chassis/motherboard/cpu/core9", 6675fe8cc4SPatrick Williams 0x29: "<inventory_root>/system/chassis/motherboard/cpu/core10", 6775fe8cc4SPatrick Williams 0x2A: "<inventory_root>/system/chassis/motherboard/cpu/core11", 6875fe8cc4SPatrick Williams 0x2B: "<inventory_root>/system/chassis/motherboard/cpu/core12", 6975fe8cc4SPatrick Williams 0x2C: "<inventory_root>/system/chassis/motherboard/cpu/core13", 7075fe8cc4SPatrick Williams 0x2D: "<inventory_root>/system/chassis/motherboard/cpu/core14", 7175fe8cc4SPatrick Williams 0x2E: "<inventory_root>/system/chassis/motherboard/membuf", 7275fe8cc4SPatrick Williams 0x1E: "<inventory_root>/system/chassis/motherboard/dimm0", 7375fe8cc4SPatrick Williams 0x1F: "<inventory_root>/system/chassis/motherboard/dimm1", 7475fe8cc4SPatrick Williams 0x20: "<inventory_root>/system/chassis/motherboard/dimm2", 7575fe8cc4SPatrick Williams 0x21: "<inventory_root>/system/chassis/motherboard/dimm3", 7675fe8cc4SPatrick Williams 0x09: "/org/openbmc/sensors/host/BootCount", 7775fe8cc4SPatrick Williams 0x05: "/org/openbmc/sensors/host/BootProgress", 7875fe8cc4SPatrick Williams 0x32: "/org/openbmc/sensors/host/OperatingSystemStatus", 7940a360c2SBrad Bishop }, 8075fe8cc4SPatrick Williams "GPIO_PRESENT": { 81*d8c6f5a3SPatrick Williams "SLOT0_PRESENT": ( 82*d8c6f5a3SPatrick Williams "<inventory_root>/system/chassis/motherboard/pciecard_x16" 83*d8c6f5a3SPatrick Williams ), 84*d8c6f5a3SPatrick Williams "SLOT1_PRESENT": ( 85*d8c6f5a3SPatrick Williams "<inventory_root>/system/chassis/motherboard/pciecard_x8" 86*d8c6f5a3SPatrick Williams ), 8775fe8cc4SPatrick Williams }, 8840a360c2SBrad Bishop} 8940a360c2SBrad Bishop 9040a360c2SBrad Bishop# Miscellaneous non-poll sensor with system specific properties. 9140a360c2SBrad Bishop# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. 9275fe8cc4SPatrick WilliamsMISC_SENSORS = {} 93