blob: c25058a049b5f127af7db7fe56cebc3b29b8e4ed [file] [log] [blame]
George Keishinge7e91712021-09-03 11:28:44 -05001#!/usr/bin/env python3
George Keishingd2795d62018-02-04 23:12:23 -06002
3r"""
George Keishingdcf746b2018-02-06 12:43:44 -06004IPMI raw commands table:
George Keishingd2795d62018-02-04 23:12:23 -06005
6 - Define IPMI interface index, commands and expected output.
7
8"""
9
George Keishing45511e82019-10-15 01:26:55 -050010# The currently supported cipher list.
Joy Onyerikwu004ad3c2018-06-11 16:29:56 -050011# Refer:
12# openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipe
13# s-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json
Rahul Maheshwari3aeae4e2020-04-03 07:45:50 -050014valid_ciphers = ['17']
George Keishing45511e82019-10-15 01:26:55 -050015unsupported_ciphers = ['1', '2', '15', '16']
George Keishing39967eb2018-04-30 11:36:23 -050016
George Keishingd2795d62018-02-04 23:12:23 -060017IPMI_RAW_CMD = {
18 # Interface name
19 'power_supply_redundancy':
20 {
21 # Command action type
22 'Get':
23 [
24 # raw command, expected output(s), comment
25 "0x04 0x2d 0x0b",
26 "00 00 01 00",
27 "Byte position 3rd LSB e.g. 01 indicates disabled",
28 "00 00 02 00",
29 "Byte position 3rd LSB e.g. 02 indicates enabled",
Steven Sombar27c1ad42018-09-11 14:44:25 -050030 "00 40 02 00",
31 "40 is scanning enabled and 02 indicates redundancy enabled",
George Keishingd2795d62018-02-04 23:12:23 -060032 ],
33 'Enabled':
34 [
35 # raw command, expected output, comment
36 "0x04 0x30 0x0b 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00",
37 "none",
38 "Enabled nibble position 6th LSB e.g. 0x2",
39 ],
40 'Disabled':
41 [
42 # raw command, expected output, comment
43 "0x04 0x30 0x0b 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00",
44 "none",
45 "Enabled nibble position 6th LSB e.g. 0x1",
46 ],
Rahul Maheshwariabe13af2018-02-15 22:42:08 -060047 },
48 'power_reading':
49 {
50 'Get':
51 [
52 # raw command, expected output(s), comment
53 "0x2c 0x02 0xdc 0x01 0x01 0x00",
54 "dc d5 00 d5 00 d5 00 d5 00 00 00 00 00 00 00 00 00 00",
55 "Byte position 2nd LSB e.g. d5 Instantaneous power readings",
56 ],
Rahul Maheshwari0eb33f02018-04-10 02:31:54 -050057 },
58 'conf_param':
59 {
60 'Enabled':
61 [
62 # raw command, expected output, comment
63 "0x2c 0x12 0xdc 0x02 0x00 0x01",
64 "dc",
65 "Enabled nibble position 6th LSB e.g. 0x01",
66 ],
67 'Disabled':
68 [
69 # raw command, expected output, comment
70 "0x2c 0x12 0xdc 0x02 0x00 0x00",
71 "dc",
72 "Disable nibble position 6th LSB e.g. 0x00",
73 ]
Tony Lee160aa872020-02-12 16:11:39 +080074 },
75 'SEL_entry':
76 {
Tony Lee160aa872020-02-12 16:11:39 +080077 'Reserve':
78 [
79 # raw command, expected output, comment
80 "0x0a 0x42",
81 "27 00",
82 "27 is Reservation ID, LSB, 00 Reservation ID, MSB ",
83 ]
Tony Lee3fdd31e2020-02-15 11:21:40 +080084 },
85 'Self_Test_Results':
86 {
87 'Get':
88 [
89 # raw command, expected output(s), comment
90 "0x06 0x04",
91 "56 00",
92 "56h = Self Test function not implemented in this controller.",
93 ]
94 },
95 'Device GUID':
96 {
97 'Get':
98 [
99 # raw command, expected output(s), comment
100 "0x06 0x08",
101 "01 70 9b ae da 6f dd 9c b4 4c 36 be 66 c8 49 28",
102 "Get GUID bytes 1 through 16.",
103
104 ]
Tony Leec03c8e22020-03-25 13:41:07 +0800105 },
106 'LAN_Config_Params':
107 {
108 'Get':
109 [
110 # raw command, expected output, comment
111 "0x0c 0x02",
112 "11 02",
113 "11 is Parameter revision, 02 is Configuration parameter data e.g. Cipher Suite Entry count",
114 ]
Tony Lee6c998f72020-03-09 18:28:35 +0800115 },
116 'Payload':
117 {
118 'Get_Payload_Activation_Status':
119 [
120 # raw command, expected output(s), comment
121 "0x06 0x4a 0x01",
122 "01 00 00",
123 "1st byte is instance capacity, last two bytes is activation status of instances",
124 ],
125 'Activate_Payload':
126 [
127 # raw command, expected output(s), comment
128 "0x06 0x48 0x01 0x01 0xc6 0x00 0x00 0x00",
129 "00 00 00 00 ff 00 ff 00 6f 02 ff ff",
130 "Last two bits are payload vlan number, - FFFFh if VLAN addressing is not used",
131 ],
132 'Deactivate_Payload':
133 [
134 # raw command, expected output(s), comment
135 "0x06 0x49 0x01 0x01 0x00 0x00 0x00 0x00",
136 "",
137 "Line feed only",
138 ],
139 'Get_Payload_Instance_Info':
140 [
141 # raw command, expected output(s), comment
142 "0x06 0x4b 0x01 0x01",
143 "00 00 00 00 00 00 00 00 00 00 00 00",
144 "When the payload is activated, the first four bytes are the session ID,"
145 "otherwise it should be 00."
146 ]
Nagarjune94e5402022-01-19 15:26:27 -0500147 },
148 'BIOS_POST_Code':
149 {
150 'Get':
151 [
152 # raw command, expected output, comment
153 "0x30 0xe9",
154 "",
155 "Response bytes will vary in length depending on state of system",
156 "0x89",
157 "error response byte when host is powered off"
158 ]
nagarjunb22cfb2c412022-03-15 15:49:27 +0530159 },
160 'Device ID':
161 {
162 'Get':
163 [
164 # raw command
165 "0x06 0x01"
166 ]
167 },
168 'Cold Reset':
169 {
170 'reset':
171 [
172 # raw command
173 "0x06 0x02"
174 ]
175 },
176 'lan_parameters':
177 {
178 'get_ip':
179 [
180 # raw command
181 "0x0c 0x02 0x01 0x03 0 0"
182 ],
183 'get_ip_src':
184 [
185 # raw command
186 "0x0c 0x02 0x01 0x04 0 0"
187 ],
188 'get_dot1q':
189 [
190 # raw command
191 "0x0c 0x02 0x01 0x14 0 0"
192 ]
193 },
194 'SDR_Info':
195 {
196 'get':
197 [
198 # raw command
199 "0x04 0x20 1"
200 ]
201 },
202 'Chassis_status':
203 {
204 'get':
205 [
206 # raw command
207 "0x00 0x01"
208 ]
209 },
210 'SEL_Info':
211 {
212 'get':
213 [
214 # raw command
215 "0x0a 0x40"
216 ]
217 },
leetde9356e2022-03-23 01:39:29 +0000218 'Watchdog':
219 {
220 # Command action type
221 'Get':
222 [
223 # raw command, expected output(s), comment
224 "0x06 0x25",
225 "05 00 00 00 64 00",
226 "don't log bit enabled",
227 "85 00 00 00 64 00",
228 "don't log bit disabled",
229 "05 00 00 00 64 00",
230 "stop bit stop",
231 "45 00 00 00 64 00",
232 "stop bit resume",
233 "01 00 00 00 64 00",
234 "timer use FRB2",
235 "02 00 00 00 64 00",
236 "timer use POST",
237 "03 00 00 00 64 00",
238 "timer use OS",
239 "04 00 00 00 64 00",
240 "timer use SMS",
241 "05 00 00 00 64 00",
242 "timer use OEM",
243 "05 00 00 00 64 00",
244 "pre-timeout interrupt None",
245 "05 20 00 00 64 00",
246 "pre-timeout interrupt NMI",
247 "05 00 00 00 64 00",
248 "timeout action None",
249 "05 01 00 00 64 00",
250 "timeout action Reset",
251 "05 02 00 00 64 00",
252 "timeout action PowerDown",
253 "05 03 00 00 64 00",
254 "timeout action PowerCycle",
255 "01 00 00 02 00 00",
256 "timeout flag FRB2",
257 "02 00 00 04 00 00",
258 "timeout flag POST",
259 "03 00 00 08 00 00",
260 "timeout flag OS",
261 "04 00 00 10 00 00",
262 "timeout flag SMS",
263 "05 00 00 20 00 00",
264 "timeout flag OEM",
265 "05 00 00 00 30 35 30 35",
266 "Get should return 13.6 seconds",
267 "05 00 00 00 ff ff ff ff",
268 "Bit 6 not set when timer stopped",
269 "0x06 0x25 0x00",
270 "Get with one extra byte",
271 ],
272 'Set':
273 [
274 # raw command, expected output, comment
275 "0x06 0x24 0x05 0x00 0x00 0x00 0x64 0x00",
276 "none",
277 "don't log bit enabled",
278 "0x06 0x24 0x85 0x00 0x00 0x00 0x64 0x00",
279 "none",
280 "don't log bit disabled",
281 "0x06 0x24 0x05 0x00 0x00 0x00 0x64 0x00",
282 "none",
283 "stop bit stop",
284 "0x06 0x24 0x45 0x00 0x00 0x00 0x64 0x00",
285 "none",
286 "stop bit resume",
287 "0x06 0x24 0x01 0x00 0x00 0x00 0x64 0x00",
288 "none",
289 "timer use FRB2",
290 "0x06 0x24 0x02 0x00 0x00 0x00 0x64 0x00",
291 "none",
292 "timer use POST",
293 "0x06 0x24 0x03 0x00 0x00 0x00 0x64 0x00",
294 "none",
295 "timer use OS",
296 "0x06 0x24 0x04 0x00 0x00 0x00 0x64 0x00",
297 "none",
298 "timer use SMS",
299 "0x06 0x24 0x05 0x00 0x00 0x00 0x64 0x00",
300 "none",
301 "timer use OEM",
302 "0x06 0x24 0x05 0x00 0x00 0x00 0x64 0x00",
303 "none",
304 "pre-timeout interrupt None",
305 "0x06 0x24 0x05 0x20 0x00 0x00 0x64 0x00",
306 "none",
307 "pre-timeout interrupt NMI",
308 "0x06 0x24 0x05 0x00 0x00 0x00 0x64 0x00",
309 "none",
310 "timeout action None",
311 "0x06 0x24 0x05 0x01 0x00 0x00 0x64 0x00",
312 "none",
313 "timeout action Reset",
314 "0x06 0x24 0x05 0x02 0x00 0x00 0x64 0x00",
315 "none",
316 "timeout action PowerDown",
317 "0x06 0x24 0x05 0x03 0x00 0x00 0x64 0x00",
318 "none",
319 "timeout action PowerCycle",
320 "0x06 0x24 0x01 0x00 0x00 0x3e 0x00 0x00",
321 "none",
322 "timeout flag FRB2",
323 "0x06 0x24 0x02 0x00 0x00 0x3e 0x00 0x00",
324 "none",
325 "timeout flag POST",
326 "0x06 0x24 0x03 0x00 0x00 0x3e 0x00 0x00",
327 "none",
328 "timeout flag OS",
329 "0x06 0x24 0x04 0x00 0x00 0x3e 0x00 0x00",
330 "none",
331 "timeout flag SMS",
332 "0x06 0x24 0x05 0x00 0x00 0x3e 0x00 0x00",
333 "none",
334 "timeout flag OEM",
335 "0x06 0x24 0x01 0x02 0x00 0x00 0x20 0x00",
336 "none",
337 "Power down",
338 "0x06 0x24 0x01 0x01 0x00 0x00 0x20 0x00",
339 "none",
340 "Hard reset",
341 "0x06 0x24 0x01 0x03 0x00 0x00 0x20 0x00",
342 "none",
343 "Power cycle",
344 "0x06 0x24 0x01 0x00 0x00 0x00 0x20 0x00",
345 "none",
346 "No action",
347 "0x06 0x24 0x05 0x00 0x00 0x3e 0x30 0x35",
348 "none",
349 "Set for 13.6 seconds",
350 "0x06 0x24 0x05 0x00 0x07 0x00 0x50 0x00",
351 "none",
352 "Pre-timeout interval passes",
353 "0x06 0x24 0x05 0x00 0x04 0x00 0x0A 0x00",
354 "none",
355 "Pre-timeout interval fails",
356 "0x06 0x24 0x05 0x00 0x00 0x20 0xFF 0xFF",
357 "none",
358 "Bit 6 not set when timer stopped",
359 "0x06 0x24 0x05 0x00 0x08 0x00 0x64",
360 "none",
361 "Set with one less byte",
362 "0x06 0x24 0x05 0x00 0x08 0x00 0x64 0x00 0x00",
363 "none",
364 "Set with one extra byte",
365 ],
366 'Reset':
367 [
368 # raw command, expected output, comment
369 "0x06 0x22",
370 "none",
371 "Reset watchdog timer",
372 "0x06 0x22 0x00",
373 "none",
374 "Reset watchdog timer with extra byte",
375 "0x06 0x22",
376 "none",
377 "Reset watchdog timer without initialized watchdog",
378 ]
379 }
George Keishingd2795d62018-02-04 23:12:23 -0600380}