blob: 2fc793e59072a4c24e63f3702ce1b1ef44906cb5 [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.
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 Maheshwari19faedf2018-08-29 00:42:09 -050014valid_cipher_list = [3, 17]
15unsupported_cipher_list = [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 ]
George Keishingd2795d62018-02-04 23:12:23 -060074 }
75}