1GPIO_BASE = 320 2 3 4## System states 5## state can change to next state in 2 ways: 6## - a process emits a GotoSystemState signal with state name to goto 7## - objects specified in EXIT_STATE_DEPEND have started 8SYSTEM_STATES = [ 9 'BASE_APPS', 10 'BMC_STARTING', 11 'BMC_READY', 12 'HOST_POWERING_ON', 13 'HOST_POWERED_ON', 14 'HOST_BOOTING', 15 'HOST_BOOTED', 16 'HOST_POWERED_OFF', 17] 18 19EXIT_STATE_DEPEND = { 20 'BASE_APPS' : { 21 '/org/openbmc/sensors': 0, 22 }, 23 'BMC_STARTING' : { 24 '/org/openbmc/control/chassis0': 0, 25 '/org/openbmc/control/power0' : 0, 26 '/org/openbmc/control/host0' : 0, 27 '/org/openbmc/control/flash/bios' : 0, 28 }, 29} 30 31INVENTORY_ROOT = '/org/openbmc/inventory' 32 33FRU_INSTANCES = { 34 '<inventory_root>/system' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 35 '<inventory_root>/system/bios' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 36 '<inventory_root>/system/misc' : { 'fru_type' : 'SYSTEM','is_fru' : False, }, 37 38 '<inventory_root>/system/chassis' : { 'fru_type' : 'SYSTEM','is_fru' : True, 'present' : "True" }, 39 40 '<inventory_root>/system/chassis/motherboard' : { 'fru_type' : 'MAIN_PLANAR','is_fru' : True, }, 41 42 '<inventory_root>/system/systemevent' : { 'fru_type' : 'SYSTEM_EVENT', 'is_fru' : False, }, 43 '<inventory_root>/system/chassis/motherboard/refclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 44 '<inventory_root>/system/chassis/motherboard/pcieclock': { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 45 '<inventory_root>/system/chassis/motherboard/todclock' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 46 '<inventory_root>/system/chassis/motherboard/apss' : { 'fru_type' : 'MAIN_PLANAR', 'is_fru' : False, }, 47 48 '<inventory_root>/system/chassis/fan0' : { 'fru_type' : 'FAN','is_fru' : True, }, 49 '<inventory_root>/system/chassis/fan1' : { 'fru_type' : 'FAN','is_fru' : True, }, 50 '<inventory_root>/system/chassis/fan2' : { 'fru_type' : 'FAN','is_fru' : True, }, 51 '<inventory_root>/system/chassis/fan3' : { 'fru_type' : 'FAN','is_fru' : True, }, 52 53 '<inventory_root>/system/chassis/motherboard/bmc' : { 'fru_type' : 'BMC','is_fru' : False, 'manufacturer' : 'ASPEED' }, 54 55 '<inventory_root>/system/chassis/motherboard/cpu0' : { 'fru_type' : 'CPU', 'is_fru' : True, }, 56 '<inventory_root>/system/chassis/motherboard/cpu1' : { 'fru_type' : 'CPU', 'is_fru' : True, }, 57 58 '<inventory_root>/system/chassis/motherboard/cpu0/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 59 '<inventory_root>/system/chassis/motherboard/cpu0/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 60 '<inventory_root>/system/chassis/motherboard/cpu0/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 61 '<inventory_root>/system/chassis/motherboard/cpu0/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 62 '<inventory_root>/system/chassis/motherboard/cpu0/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 63 '<inventory_root>/system/chassis/motherboard/cpu0/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 64 '<inventory_root>/system/chassis/motherboard/cpu0/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 65 '<inventory_root>/system/chassis/motherboard/cpu0/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 66 '<inventory_root>/system/chassis/motherboard/cpu0/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 67 '<inventory_root>/system/chassis/motherboard/cpu0/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 68 '<inventory_root>/system/chassis/motherboard/cpu0/core10': { 'fru_type' : 'CORE', 'is_fru' : False, }, 69 '<inventory_root>/system/chassis/motherboard/cpu0/core11': { 'fru_type' : 'CORE', 'is_fru' : False, }, 70 71 '<inventory_root>/system/chassis/motherboard/cpu1/core0' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 72 '<inventory_root>/system/chassis/motherboard/cpu1/core1' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 73 '<inventory_root>/system/chassis/motherboard/cpu1/core2' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 74 '<inventory_root>/system/chassis/motherboard/cpu1/core3' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 75 '<inventory_root>/system/chassis/motherboard/cpu1/core4' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 76 '<inventory_root>/system/chassis/motherboard/cpu1/core5' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 77 '<inventory_root>/system/chassis/motherboard/cpu1/core6' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 78 '<inventory_root>/system/chassis/motherboard/cpu1/core7' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 79 '<inventory_root>/system/chassis/motherboard/cpu1/core8' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 80 '<inventory_root>/system/chassis/motherboard/cpu1/core9' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 81 '<inventory_root>/system/chassis/motherboard/cpu1/core10' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 82 '<inventory_root>/system/chassis/motherboard/cpu1/core11' : { 'fru_type' : 'CORE', 'is_fru' : False, }, 83 84 '<inventory_root>/system/chassis/motherboard/membuf0' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 85 '<inventory_root>/system/chassis/motherboard/membuf1' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 86 '<inventory_root>/system/chassis/motherboard/membuf2' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 87 '<inventory_root>/system/chassis/motherboard/membuf3' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 88 '<inventory_root>/system/chassis/motherboard/membuf4' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 89 '<inventory_root>/system/chassis/motherboard/membuf5' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 90 '<inventory_root>/system/chassis/motherboard/membuf6' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 91 '<inventory_root>/system/chassis/motherboard/membuf7' : { 'fru_type' : 'MEMORY_BUFFER', 'is_fru' : False, }, 92 93 '<inventory_root>/system/chassis/motherboard/dimm0' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 94 '<inventory_root>/system/chassis/motherboard/dimm1' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 95 '<inventory_root>/system/chassis/motherboard/dimm2' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 96 '<inventory_root>/system/chassis/motherboard/dimm3' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 97 '<inventory_root>/system/chassis/motherboard/dimm4' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 98 '<inventory_root>/system/chassis/motherboard/dimm5' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 99 '<inventory_root>/system/chassis/motherboard/dimm6' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 100 '<inventory_root>/system/chassis/motherboard/dimm7' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 101 '<inventory_root>/system/chassis/motherboard/dimm8' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 102 '<inventory_root>/system/chassis/motherboard/dimm9' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 103 '<inventory_root>/system/chassis/motherboard/dimm10' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 104 '<inventory_root>/system/chassis/motherboard/dimm11' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 105 '<inventory_root>/system/chassis/motherboard/dimm12' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 106 '<inventory_root>/system/chassis/motherboard/dimm13' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 107 '<inventory_root>/system/chassis/motherboard/dimm14' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 108 '<inventory_root>/system/chassis/motherboard/dimm15' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 109 '<inventory_root>/system/chassis/motherboard/dimm16' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 110 '<inventory_root>/system/chassis/motherboard/dimm17' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 111 '<inventory_root>/system/chassis/motherboard/dimm18' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 112 '<inventory_root>/system/chassis/motherboard/dimm19' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 113 '<inventory_root>/system/chassis/motherboard/dimm20' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 114 '<inventory_root>/system/chassis/motherboard/dimm21' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 115 '<inventory_root>/system/chassis/motherboard/dimm22' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 116 '<inventory_root>/system/chassis/motherboard/dimm23' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 117 '<inventory_root>/system/chassis/motherboard/dimm24' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 118 '<inventory_root>/system/chassis/motherboard/dimm25' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 119 '<inventory_root>/system/chassis/motherboard/dimm26' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 120 '<inventory_root>/system/chassis/motherboard/dimm27' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 121 '<inventory_root>/system/chassis/motherboard/dimm28' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 122 '<inventory_root>/system/chassis/motherboard/dimm29' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 123 '<inventory_root>/system/chassis/motherboard/dimm30' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 124 '<inventory_root>/system/chassis/motherboard/dimm31' : { 'fru_type' : 'DIMM', 'is_fru' : True,}, 125} 126 127ID_LOOKUP = { 128 'FRU' : { 129 0x01 : '<inventory_root>/system/chassis/motherboard/cpu0', 130 0x02 : '<inventory_root>/system/chassis/motherboard/cpu1', 131 0x03 : '<inventory_root>/system/chassis/motherboard', 132 0x04 : '<inventory_root>/system/chassis/motherboard/membuf0', 133 0x05 : '<inventory_root>/system/chassis/motherboard/membuf1', 134 0x06 : '<inventory_root>/system/chassis/motherboard/membuf2', 135 0x07 : '<inventory_root>/system/chassis/motherboard/membuf3', 136 0x08 : '<inventory_root>/system/chassis/motherboard/membuf4', 137 0x09 : '<inventory_root>/system/chassis/motherboard/membuf5', 138 0x0c : '<inventory_root>/system/chassis/motherboard/dimm0', 139 0x0d : '<inventory_root>/system/chassis/motherboard/dimm1', 140 0x0e : '<inventory_root>/system/chassis/motherboard/dimm2', 141 0x0f : '<inventory_root>/system/chassis/motherboard/dimm3', 142 0x10 : '<inventory_root>/system/chassis/motherboard/dimm4', 143 0x11 : '<inventory_root>/system/chassis/motherboard/dimm5', 144 0x12 : '<inventory_root>/system/chassis/motherboard/dimm6', 145 0x13 : '<inventory_root>/system/chassis/motherboard/dimm7', 146 0x14 : '<inventory_root>/system/chassis/motherboard/dimm8', 147 0x15 : '<inventory_root>/system/chassis/motherboard/dimm9', 148 0x16 : '<inventory_root>/system/chassis/motherboard/dimm10', 149 0x17 : '<inventory_root>/system/chassis/motherboard/dimm11', 150 0x18 : '<inventory_root>/system/chassis/motherboard/dimm12', 151 0x19 : '<inventory_root>/system/chassis/motherboard/dimm13', 152 0x1a : '<inventory_root>/system/chassis/motherboard/dimm14', 153 0x1b : '<inventory_root>/system/chassis/motherboard/dimm15', 154 0x1c : '<inventory_root>/system/chassis/motherboard/dimm16', 155 0x1d : '<inventory_root>/system/chassis/motherboard/dimm17', 156 0x1e : '<inventory_root>/system/chassis/motherboard/dimm18', 157 0x1f : '<inventory_root>/system/chassis/motherboard/dimm19', 158 0x20 : '<inventory_root>/system/chassis/motherboard/dimm20', 159 0x21 : '<inventory_root>/system/chassis/motherboard/dimm21', 160 0x22 : '<inventory_root>/system/chassis/motherboard/dimm22', 161 0x23 : '<inventory_root>/system/chassis/motherboard/dimm23', 162 0x24 : '<inventory_root>/system/chassis/motherboard/dimm24', 163 0x25 : '<inventory_root>/system/chassis/motherboard/dimm25', 164 0x26 : '<inventory_root>/system/chassis/motherboard/dimm26', 165 0x27 : '<inventory_root>/system/chassis/motherboard/dimm27', 166 0x28 : '<inventory_root>/system/chassis/motherboard/dimm28', 167 0x29 : '<inventory_root>/system/chassis/motherboard/dimm29', 168 0x2a : '<inventory_root>/system/chassis/motherboard/dimm30', 169 0x2b : '<inventory_root>/system/chassis/motherboard/dimm31', 170 }, 171 'FRU_STR' : { 172 'PRODUCT_0' : '<inventory_root>/system/bios', 173 'BOARD_1' : '<inventory_root>/system/chassis/motherboard/cpu0', 174 'BOARD_2' : '<inventory_root>/system/chassis/motherboard/cpu1', 175 'CHASSIS_3' : '<inventory_root>/system/chassis/motherboard', 176 'BOARD_3' : '<inventory_root>/system/misc', 177 'BOARD_4' : '<inventory_root>/system/chassis/motherboard/membuf0', 178 'BOARD_5' : '<inventory_root>/system/chassis/motherboard/membuf1', 179 'BOARD_6' : '<inventory_root>/system/chassis/motherboard/membuf2', 180 'BOARD_7' : '<inventory_root>/system/chassis/motherboard/membuf3', 181 'BOARD_8' : '<inventory_root>/system/chassis/motherboard/membuf4', 182 'BOARD_9' : '<inventory_root>/system/chassis/motherboard/membuf5', 183 'BOARD_10' : '<inventory_root>/system/chassis/motherboard/membuf6', 184 'BOARD_11' : '<inventory_root>/system/chassis/motherboard/membuf7', 185 'PRODUCT_12' : '<inventory_root>/system/chassis/motherboard/dimm0', 186 'PRODUCT_13' : '<inventory_root>/system/chassis/motherboard/dimm1', 187 'PRODUCT_14' : '<inventory_root>/system/chassis/motherboard/dimm2', 188 'PRODUCT_15' : '<inventory_root>/system/chassis/motherboard/dimm3', 189 'PRODUCT_16' : '<inventory_root>/system/chassis/motherboard/dimm4', 190 'PRODUCT_17' : '<inventory_root>/system/chassis/motherboard/dimm5', 191 'PRODUCT_18' : '<inventory_root>/system/chassis/motherboard/dimm6', 192 'PRODUCT_19' : '<inventory_root>/system/chassis/motherboard/dimm7', 193 'PRODUCT_20' : '<inventory_root>/system/chassis/motherboard/dimm8', 194 'PRODUCT_21' : '<inventory_root>/system/chassis/motherboard/dimm9', 195 'PRODUCT_22' : '<inventory_root>/system/chassis/motherboard/dimm10', 196 'PRODUCT_23' : '<inventory_root>/system/chassis/motherboard/dimm11', 197 'PRODUCT_24' : '<inventory_root>/system/chassis/motherboard/dimm12', 198 'PRODUCT_25' : '<inventory_root>/system/chassis/motherboard/dimm13', 199 'PRODUCT_26' : '<inventory_root>/system/chassis/motherboard/dimm14', 200 'PRODUCT_27' : '<inventory_root>/system/chassis/motherboard/dimm15', 201 'PRODUCT_28' : '<inventory_root>/system/chassis/motherboard/dimm16', 202 'PRODUCT_29' : '<inventory_root>/system/chassis/motherboard/dimm17', 203 'PRODUCT_30' : '<inventory_root>/system/chassis/motherboard/dimm18', 204 'PRODUCT_31' : '<inventory_root>/system/chassis/motherboard/dimm19', 205 'PRODUCT_32' : '<inventory_root>/system/chassis/motherboard/dimm20', 206 'PRODUCT_33' : '<inventory_root>/system/chassis/motherboard/dimm21', 207 'PRODUCT_34' : '<inventory_root>/system/chassis/motherboard/dimm22', 208 'PRODUCT_35' : '<inventory_root>/system/chassis/motherboard/dimm23', 209 'PRODUCT_36' : '<inventory_root>/system/chassis/motherboard/dimm24', 210 'PRODUCT_37' : '<inventory_root>/system/chassis/motherboard/dimm25', 211 'PRODUCT_38' : '<inventory_root>/system/chassis/motherboard/dimm26', 212 'PRODUCT_39' : '<inventory_root>/system/chassis/motherboard/dimm27', 213 'PRODUCT_40' : '<inventory_root>/system/chassis/motherboard/dimm28', 214 'PRODUCT_41' : '<inventory_root>/system/chassis/motherboard/dimm29', 215 'PRODUCT_42' : '<inventory_root>/system/chassis/motherboard/dimm30', 216 'PRODUCT_43' : '<inventory_root>/system/chassis/motherboard/dimm31', 217 'PRODUCT_47' : '<inventory_root>/system/misc', 218 }, 219 'SENSOR' : { 220 0x04 : '/org/openbmc/sensors/host/HostStatus', 221 0x05 : '/org/openbmc/sensors/host/BootProgress', 222 0x08 : '/org/openbmc/sensors/host/cpu0/OccStatus', 223 0x09 : '/org/openbmc/sensors/host/cpu1/OccStatus', 224 0x0c : '<inventory_root>/system/chassis/motherboard/cpu0', 225 0x0e : '<inventory_root>/system/chassis/motherboard/cpu1', 226 0x1e : '<inventory_root>/system/chassis/motherboard/dimm3', 227 0x1f : '<inventory_root>/system/chassis/motherboard/dimm2', 228 0x20 : '<inventory_root>/system/chassis/motherboard/dimm1', 229 0x21 : '<inventory_root>/system/chassis/motherboard/dimm0', 230 0x22 : '<inventory_root>/system/chassis/motherboard/dimm7', 231 0x23 : '<inventory_root>/system/chassis/motherboard/dimm6', 232 0x24 : '<inventory_root>/system/chassis/motherboard/dimm5', 233 0x25 : '<inventory_root>/system/chassis/motherboard/dimm4', 234 0x26 : '<inventory_root>/system/chassis/motherboard/dimm11', 235 0x27 : '<inventory_root>/system/chassis/motherboard/dimm10', 236 0x28 : '<inventory_root>/system/chassis/motherboard/dimm9', 237 0x29 : '<inventory_root>/system/chassis/motherboard/dimm8', 238 0x2a : '<inventory_root>/system/chassis/motherboard/dimm15', 239 0x2b : '<inventory_root>/system/chassis/motherboard/dimm14', 240 0x2c : '<inventory_root>/system/chassis/motherboard/dimm13', 241 0x2d : '<inventory_root>/system/chassis/motherboard/dimm12', 242 0x2e : '<inventory_root>/system/chassis/motherboard/dimm19', 243 0x2f : '<inventory_root>/system/chassis/motherboard/dimm18', 244 0x30 : '<inventory_root>/system/chassis/motherboard/dimm17', 245 0x31 : '<inventory_root>/system/chassis/motherboard/dimm16', 246 0x32 : '<inventory_root>/system/chassis/motherboard/dimm23', 247 0x33 : '<inventory_root>/system/chassis/motherboard/dimm22', 248 0x34 : '<inventory_root>/system/chassis/motherboard/dimm21', 249 0x35 : '<inventory_root>/system/chassis/motherboard/dimm20', 250 0x36 : '<inventory_root>/system/chassis/motherboard/dimm27', 251 0x37 : '<inventory_root>/system/chassis/motherboard/dimm26', 252 0x38 : '<inventory_root>/system/chassis/motherboard/dimm25', 253 0x39 : '<inventory_root>/system/chassis/motherboard/dimm24', 254 0x3a : '<inventory_root>/system/chassis/motherboard/dimm31', 255 0x3b : '<inventory_root>/system/chassis/motherboard/dimm30', 256 0x3c : '<inventory_root>/system/chassis/motherboard/dimm29', 257 0x3d : '<inventory_root>/system/chassis/motherboard/dimm28', 258 0x3e : '<inventory_root>/system/chassis/motherboard/cpu0/core0', 259 0x3f : '<inventory_root>/system/chassis/motherboard/cpu0/core1', 260 0x40 : '<inventory_root>/system/chassis/motherboard/cpu0/core2', 261 0x41 : '<inventory_root>/system/chassis/motherboard/cpu0/core3', 262 0x42 : '<inventory_root>/system/chassis/motherboard/cpu0/core4', 263 0x43 : '<inventory_root>/system/chassis/motherboard/cpu0/core5', 264 0x44 : '<inventory_root>/system/chassis/motherboard/cpu0/core6', 265 0x45 : '<inventory_root>/system/chassis/motherboard/cpu0/core7', 266 0x46 : '<inventory_root>/system/chassis/motherboard/cpu0/core8', 267 0x47 : '<inventory_root>/system/chassis/motherboard/cpu0/core9', 268 0x48 : '<inventory_root>/system/chassis/motherboard/cpu0/core10', 269 0x49 : '<inventory_root>/system/chassis/motherboard/cpu0/core11', 270 0x4a : '<inventory_root>/system/chassis/motherboard/cpu1/core0', 271 0x4b : '<inventory_root>/system/chassis/motherboard/cpu1/core1', 272 0x4c : '<inventory_root>/system/chassis/motherboard/cpu1/core2', 273 0x4d : '<inventory_root>/system/chassis/motherboard/cpu1/core3', 274 0x4e : '<inventory_root>/system/chassis/motherboard/cpu1/core4', 275 0x4f : '<inventory_root>/system/chassis/motherboard/cpu1/core5', 276 0x50 : '<inventory_root>/system/chassis/motherboard/cpu1/core6', 277 0x51 : '<inventory_root>/system/chassis/motherboard/cpu1/core7', 278 0x52 : '<inventory_root>/system/chassis/motherboard/cpu1/core8', 279 0x53 : '<inventory_root>/system/chassis/motherboard/cpu1/core9', 280 0x54 : '<inventory_root>/system/chassis/motherboard/cpu1/core10', 281 0x55 : '<inventory_root>/system/chassis/motherboard/cpu1/core11', 282 0x56 : '<inventory_root>/system/chassis/motherboard/membuf0', 283 0x57 : '<inventory_root>/system/chassis/motherboard/membuf1', 284 0x58 : '<inventory_root>/system/chassis/motherboard/membuf2', 285 0x59 : '<inventory_root>/system/chassis/motherboard/membuf3', 286 0x5a : '<inventory_root>/system/chassis/motherboard/membuf4', 287 0x5b : '<inventory_root>/system/chassis/motherboard/membuf5', 288 0x5c : '<inventory_root>/system/chassis/motherboard/membuf6', 289 0x5d : '<inventory_root>/system/chassis/motherboard/membuf7', 290 0x5f : '/org/openbmc/sensors/host/BootCount', 291 0x60 : '<inventory_root>/system/chassis/motherboard', 292 0x61 : '<inventory_root>/system/systemevent', 293 0x62 : '<inventory_root>/system/powerlimit', 294 0x63 : '<inventory_root>/system/chassis/motherboard/refclock', 295 0x64 : '<inventory_root>/system/chassis/motherboard/pcieclock', 296 0xb1 : '<inventory_root>/system/chassis/motherboard/todclock', 297 0xb2 : '<inventory_root>/system/chassis/motherboard/apss', 298 0xb3 : '/org/openbmc/sensors/host/powercap', 299 0xb5 : '/org/openbmc/sensors/host/OperatingSystemStatus', 300 0xb6 : '<inventory_root>/system/chassis/motherboard/pcielink', 301 }, 302 'GPIO_PRESENT' : {} 303} 304 305GPIO_CONFIG = {} 306GPIO_CONFIG['BMC_POWER_UP'] = \ 307 {'gpio_pin': 'D1', 'direction': 'out'} 308GPIO_CONFIG['SYS_PWROK_BUFF'] = \ 309 {'gpio_pin': 'D2', 'direction': 'in'} 310GPIO_CONFIG['BMC_WD_CLEAR_PULSE_N'] = \ 311 {'gpio_pin': 'N4', 'direction': 'out'} 312GPIO_CONFIG['CM1_OE_R_N'] = \ 313 {'gpio_pin': 'Q6', 'direction': 'out'} 314GPIO_CONFIG['BMC_CP0_RESET_N'] = \ 315 {'gpio_pin': 'O2', 'direction': 'out'} 316GPIO_CONFIG['BMC_CFAM_RESET_N_R'] = \ 317 {'gpio_pin': 'J2', 'direction': 'out'} 318GPIO_CONFIG['PEX8718_DEVICES_RESET_N'] = \ 319 {'gpio_pin': 'B6', 'direction': 'out'} 320GPIO_CONFIG['CP0_DEVICES_RESET_N'] = \ 321 {'gpio_pin': 'N3', 'direction': 'out'} 322GPIO_CONFIG['CP1_DEVICES_RESET_N'] = \ 323 {'gpio_pin': 'N5', 'direction': 'out'} 324GPIO_CONFIG['IDBTN'] = \ 325 { 'gpio_pin': 'Q7', 'direction': 'out' } 326GPIO_CONFIG['FSI_DATA'] = \ 327 {'gpio_pin': 'A5', 'direction': 'out'} 328GPIO_CONFIG['FSI_CLK'] = \ 329 {'gpio_pin': 'A4', 'direction': 'out'} 330GPIO_CONFIG['FSI_ENABLE'] = \ 331 {'gpio_pin': 'D0', 'direction': 'out'} 332GPIO_CONFIG['CRONUS_SEL'] = \ 333 {'gpio_pin': 'A6', 'direction': 'out'} 334GPIO_CONFIG['BMC_THROTTLE'] = \ 335 {'gpio_pin': 'J3', 'direction': 'out'} 336 337GPIO_CONFIG['POWER_BUTTON'] = \ 338 {'gpio_pin': 'E0', 'direction': 'both'} 339GPIO_CONFIG['RESET_BUTTON'] = \ 340 {'gpio_pin': 'E4', 'direction': 'both'} 341GPIO_CONFIG['CHECKSTOP'] = \ 342 {'gpio_pin': 'H0', 'direction': 'falling'} 343 344GPIO_CONFIG['PS0_PRES_N'] = \ 345 {'gpio_pin': 'P7', 'direction': 'in'} 346GPIO_CONFIG['PS1_PRES_N'] = \ 347 {'gpio_pin': 'N0', 'direction': 'in'} 348GPIO_CONFIG['CARD_PRES_N'] = \ 349 {'gpio_pin': 'J0', 'direction': 'in'} 350 351 352 353 354def convertGpio(name): 355 name = name.upper() 356 c = name[0:1] 357 offset = int(name[1:]) 358 a = ord(c)-65 359 base = a*8+GPIO_BASE 360 return base+offset 361 362 363HWMON_CONFIG = { 364 '4-0050' : { 365 'names' : { 366 'caps_curr_powercap' : { 'object_path' : 'powercap/curr_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 367 'caps_curr_powerreading' : { 'object_path' : 'powercap/system_power','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 368 'caps_max_powercap' : { 'object_path' : 'powercap/max_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 369 'caps_min_powercap' : { 'object_path' : 'powercap/min_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 370 'caps_norm_powercap' : { 'object_path' : 'powercap/n_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 371 'caps_user_powerlimit' : { 'object_path' : 'powercap/user_cap','poll_interval' : 10000,'scale' : 1,'units' : 'W' }, 372 }, 373 'labels' : { 374 '176' : { 'object_path' : 'temperature/cpu0/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C', 375 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 376 '177' : { 'object_path' : 'temperature/cpu0/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C', 377 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 378 '178' : { 'object_path' : 'temperature/cpu0/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C', 379 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 380 '179' : { 'object_path' : 'temperature/cpu0/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C', 381 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 382 '180' : { 'object_path' : 'temperature/cpu0/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C', 383 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 384 '181' : { 'object_path' : 'temperature/cpu0/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C', 385 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 386 '182' : { 'object_path' : 'temperature/cpu0/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C', 387 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 388 '183' : { 'object_path' : 'temperature/cpu0/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C', 389 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 390 '184' : { 'object_path' : 'temperature/cpu0/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C', 391 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 392 '185' : { 'object_path' : 'temperature/cpu0/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C', 393 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 394 '186' : { 'object_path' : 'temperature/cpu0/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C', 395 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 396 '187' : { 'object_path' : 'temperature/cpu0/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C', 397 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 398 '102' : { 'object_path' : 'temperature/dimm0','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 399 '103' : { 'object_path' : 'temperature/dimm1','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 400 '104' : { 'object_path' : 'temperature/dimm2','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 401 '105' : { 'object_path' : 'temperature/dimm3','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 402 '106' : { 'object_path' : 'temperature/dimm4','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 403 '107' : { 'object_path' : 'temperature/dimm5','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 404 '108' : { 'object_path' : 'temperature/dimm6','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 405 '109' : { 'object_path' : 'temperature/dimm7','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 406 '110' : { 'object_path' : 'temperature/dimm8','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 407 '111' : { 'object_path' : 'temperature/dimm9','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 408 '112' : { 'object_path' : 'temperature/dimm10','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 409 '113' : { 'object_path' : 'temperature/dimm11','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 410 '114' : { 'object_path' : 'temperature/dimm12','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 411 '115' : { 'object_path' : 'temperature/dimm13','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 412 '116' : { 'object_path' : 'temperature/dimm14','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 413 '117' : { 'object_path' : 'temperature/dimm15','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 414 '94' : { 'object_path' : 'temperature/membuf0','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 415 '95' : { 'object_path' : 'temperature/membuf1','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 416 '96' : { 'object_path' : 'temperature/membuf2','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 417 '97' : { 'object_path' : 'temperature/membuf3','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 418 } 419 }, 420 '5-0050' : { 421 'labels' : { 422 '188' : { 'object_path' : 'temperature/cpu1/core0','poll_interval' : 5000,'scale' : -3,'units' : 'C', 423 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 424 '189' : { 'object_path' : 'temperature/cpu1/core1','poll_interval' : 5000,'scale' : -3,'units' : 'C', 425 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 426 '190' : { 'object_path' : 'temperature/cpu1/core2','poll_interval' : 5000,'scale' : -3,'units' : 'C', 427 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 428 '191' : { 'object_path' : 'temperature/cpu1/core3','poll_interval' : 5000,'scale' : -3,'units' : 'C', 429 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 430 '192' : { 'object_path' : 'temperature/cpu1/core4','poll_interval' : 5000,'scale' : -3,'units' : 'C', 431 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 432 '193' : { 'object_path' : 'temperature/cpu1/core5','poll_interval' : 5000,'scale' : -3,'units' : 'C', 433 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 434 '194' : { 'object_path' : 'temperature/cpu1/core6','poll_interval' : 5000,'scale' : -3,'units' : 'C', 435 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 436 '195' : { 'object_path' : 'temperature/cpu1/core7','poll_interval' : 5000,'scale' : -3,'units' : 'C', 437 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 438 '196' : { 'object_path' : 'temperature/cpu1/core8','poll_interval' : 5000,'scale' : -3,'units' : 'C', 439 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 440 '197' : { 'object_path' : 'temperature/cpu1/core9','poll_interval' : 5000,'scale' : -3,'units' : 'C', 441 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 442 '198' : { 'object_path' : 'temperature/cpu1/core10','poll_interval' : 5000,'scale' : -3,'units' : 'C', 443 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 444 '199' : { 'object_path' : 'temperature/cpu1/core11','poll_interval' : 5000,'scale' : -3,'units' : 'C', 445 'critical_upper' : 100, 'critical_lower' : -100, 'warning_upper' : 90, 'warning_lower' : -99, 'emergency_enabled' : True }, 446 '118' : { 'object_path' : 'temperature/dimm16','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 447 '119' : { 'object_path' : 'temperature/dimm17','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 448 '120' : { 'object_path' : 'temperature/dimm18','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 449 '121' : { 'object_path' : 'temperature/dimm19','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 450 '122' : { 'object_path' : 'temperature/dimm20','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 451 '123' : { 'object_path' : 'temperature/dimm21','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 452 '124' : { 'object_path' : 'temperature/dimm22','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 453 '125' : { 'object_path' : 'temperature/dimm23','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 454 '126' : { 'object_path' : 'temperature/dimm24','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 455 '127' : { 'object_path' : 'temperature/dimm25','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 456 '128' : { 'object_path' : 'temperature/dimm26','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 457 '129' : { 'object_path' : 'temperature/dimm27','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 458 '130' : { 'object_path' : 'temperature/dimm28','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 459 '131' : { 'object_path' : 'temperature/dimm29','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 460 '132' : { 'object_path' : 'temperature/dimm30','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 461 '133' : { 'object_path' : 'temperature/dimm31','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 462 '98' : { 'object_path' : 'temperature/membuf4','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 463 '99' : { 'object_path' : 'temperature/membuf5','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 464 '100' : { 'object_path' : 'temperature/membuf6','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 465 '101' : { 'object_path' : 'temperature/membuf7','poll_interval' : 5000,'scale' : -3,'units' : 'C' }, 466 } 467 }, 468} 469 470 471# Miscellaneous non-poll sensor with system specific properties. 472# The sensor id is the same as those defined in ID_LOOKUP['SENSOR']. 473MISC_SENSORS = { 474 0x5f : { 'class' : 'BootCountSensor' }, 475 0x05 : { 'class' : 'BootProgressSensor' }, 476 0x08 : { 'class' : 'OccStatusSensor', 477 'os_path' : '/sys/class/i2c-adapter/i2c-4/4-0050/online' }, 478 0x09 : { 'class' : 'OccStatusSensor', 479 'os_path' : '/sys/class/i2c-adapter/i2c-5/5-0050/online' }, 480 0xb5 : { 'class' : 'OperatingSystemStatusSensor' }, 481 0xb3 : { 'class' : 'PowerCap', 482 'os_path' : '/sys/class/hwmon/hwmon3/user_powercap' }, 483} 484 485# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 486