blob: 589b97b63b3ddde5419c11259a11c30125ae9f9d [file] [log] [blame]
George Keishingd2795d62018-02-04 23:12:23 -06001#!/usr/bin/env python
2
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 Keishing39967eb2018-04-30 11:36:23 -050010# The currently supported cipher level list.
11# Refer: openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json
12valid_cipher_list = [1, 2, 3, 15, 16, 17]
13
George Keishingd2795d62018-02-04 23:12:23 -060014IPMI_RAW_CMD = {
15 # Interface name
16 'power_supply_redundancy':
17 {
18 # Command action type
19 'Get':
20 [
21 # raw command, expected output(s), comment
22 "0x04 0x2d 0x0b",
23 "00 00 01 00",
24 "Byte position 3rd LSB e.g. 01 indicates disabled",
25 "00 00 02 00",
26 "Byte position 3rd LSB e.g. 02 indicates enabled",
27 ],
28 'Enabled':
29 [
30 # raw command, expected output, comment
31 "0x04 0x30 0x0b 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00",
32 "none",
33 "Enabled nibble position 6th LSB e.g. 0x2",
34 ],
35 'Disabled':
36 [
37 # raw command, expected output, comment
38 "0x04 0x30 0x0b 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00",
39 "none",
40 "Enabled nibble position 6th LSB e.g. 0x1",
41 ],
Rahul Maheshwariabe13af2018-02-15 22:42:08 -060042 },
43 'power_reading':
44 {
45 'Get':
46 [
47 # raw command, expected output(s), comment
48 "0x2c 0x02 0xdc 0x01 0x01 0x00",
49 "dc d5 00 d5 00 d5 00 d5 00 00 00 00 00 00 00 00 00 00",
50 "Byte position 2nd LSB e.g. d5 Instantaneous power readings",
51 ],
Rahul Maheshwari0eb33f02018-04-10 02:31:54 -050052 },
53 'conf_param':
54 {
55 'Enabled':
56 [
57 # raw command, expected output, comment
58 "0x2c 0x12 0xdc 0x02 0x00 0x01",
59 "dc",
60 "Enabled nibble position 6th LSB e.g. 0x01",
61 ],
62 'Disabled':
63 [
64 # raw command, expected output, comment
65 "0x2c 0x12 0xdc 0x02 0x00 0x00",
66 "dc",
67 "Disable nibble position 6th LSB e.g. 0x00",
68 ]
George Keishingd2795d62018-02-04 23:12:23 -060069 }
70}