summaryrefslogtreecommitdiff
path: root/meta-ibm/meta-witherspoon/recipes-phosphor/dbus/thermal-policy/mihawk/thermal-policy.yaml
blob: bb3226af33b2162180ebf5d52bac0bde3bf65bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# Mihawk thermal policy for PDM.
#
# Shut down the system if more than three cores
# have a temperature greater than 95 degrees Celcius.
# or ambient temperature greater than 45 degrees Celcius.

- name: core sensors
  description: >
    'The machine has two processor chips with 24 cores each.'
  class: group
  group: path
  members:
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core0_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core1_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core2_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core3_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core4_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core5_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core6_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core7_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core8_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core9_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core10_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core11_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core12_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core13_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core14_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core15_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core16_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core17_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core18_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core19_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core20_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core21_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core22_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p0_core23_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core0_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core1_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core2_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core3_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core4_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core5_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core6_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core7_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core8_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core9_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core10_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core11_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core12_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core13_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core14_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core15_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core16_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core17_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core18_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core19_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core20_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core21_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core22_temp
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/p1_core23_temp

- name: ambient sensor
  description: >
    'The machine has one ambient temperature sensors.'
  class: group
  group: path
  members:
    - meta: SENSOR
      path: /xyz/openbmc_project/sensors/temperature/ambient_temp

- name: core temp
  description: >
    'Monitor the temperature of each core.'
  class: group
  group: property
  type: int64
  members:
    - interface: xyz.openbmc_project.Sensor.Value
      meta: TEMP
      property: Value

- name: ambient temp
  description: >
    'Monitor the ambient temperature.'
  class: group
  group: property
  type: int64
  members:
    - interface: xyz.openbmc_project.Sensor.Value
      meta: TEMP
      property: Value

- name: watch core temps
  description: >
    'Trigger logic on core temp changes.'
  class: watch
  watch: property
  paths: core sensors
  properties: core temp
  callback: check temps

- name: watch ambient temp
  description: >
    'Trigger logic on ambient temp changes.'
  class: watch
  watch: property
  paths: ambient sensor
  properties: ambient temp
  callback: check ambient temp

- name: check temps
  description: >
    'If this condition passes at least three cores are running
    too hot.  Shut the system down.'
  class: condition
  condition: count
  paths: core sensors
  properties: core temp
  callback: log and shutdown
  countop: '>='
  countbound: 3
  op: '>='
  bound: 95000
  oneshot: true

- name: check ambient temp
  description: >
    'If the ambient sensor is too hot. Shut the system down.'
  class: condition
  condition: count
  paths: ambient sensor
  properties: ambient temp
  callback: ambient log and shutdown
  countop: '>='
  countbound: 1
  op: '>='
  bound: 45000
  oneshot: true

- name: log and shutdown
  description: >
    'Shut the system down and log an event.'
  class: callback
  callback: group
  members:
    - shutdown
    - create criticalhigh error
    - create shutdown error

- name: ambient log and shutdown
  description: >
    'Shut the system down and log an event.'
  class: callback
  callback: group
  members:
    - shutdown
    - create ambient criticalhigh error
    - create ambient shutdown error

- name: shutdown
  description: >
    'Shut down the system.'
  class: callback
  callback: method
  service: org.freedesktop.systemd1
  path: /org/freedesktop/systemd1
  interface: org.freedesktop.systemd1.Manager
  method: StartUnit
  args:
    - value: obmc-chassis-hard-poweroff@0.target
      type: string
    - value: replace
      type: string

- name: create criticalhigh error
  description: >
    'Create a CriticalHigh Error log.'
  class: callback
  callback: elog_with_metadata
  paths: core sensors
  properties: core temp
  error: xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh
  metadata: xyz::openbmc_project::Sensor::Threshold::CriticalHigh::SENSOR_DATA

- name: create ambient criticalhigh error
  description: >
    'Create a Ambient CriticalHigh Error log.'
  class: callback
  callback: elog_with_metadata
  paths: ambient sensor
  properties: ambient temp
  error: xyz::openbmc_project::Sensor::Threshold::Error::CriticalHigh
  metadata: xyz::openbmc_project::Sensor::Threshold::CriticalHigh::SENSOR_DATA

- name: create shutdown error
  description: >
    'Create a SystemShutdown Error log.'
  class: callback
  callback: elog
  paths: core sensors
  properties: core temp
  error: xyz::openbmc_project::State::Shutdown::ThermalEvent::Error::Processor

- name: create ambient shutdown error
  description: >
    'Create a SystemShutdown Error log.'
  class: callback
  callback: elog
  paths: ambient sensor
  properties: ambient temp
  error: xyz::openbmc_project::State::Shutdown::ThermalEvent::Error::Ambient