George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | r""" |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 4 | IPMI raw commands table: |
George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 5 | |
| 6 | - Define IPMI interface index, commands and expected output. |
| 7 | |
| 8 | """ |
| 9 | |
George Keishing | 39967eb | 2018-04-30 11:36:23 -0500 | [diff] [blame] | 10 | # The currently supported cipher level list. |
Joy Onyerikwu | 004ad3c | 2018-06-11 16:29:56 -0500 | [diff] [blame] | 11 | # Refer: |
| 12 | # openbmc/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipe |
| 13 | # s-phosphor/ipmi/phosphor-ipmi-host/cipher_list.json |
Rahul Maheshwari | 19faedf | 2018-08-29 00:42:09 -0500 | [diff] [blame^] | 14 | valid_cipher_list = [3, 17] |
| 15 | unsupported_cipher_list = [1, 2, 15, 16] |
George Keishing | 39967eb | 2018-04-30 11:36:23 -0500 | [diff] [blame] | 16 | |
George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 17 | IPMI_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", |
| 30 | ], |
| 31 | 'Enabled': |
| 32 | [ |
| 33 | # raw command, expected output, comment |
| 34 | "0x04 0x30 0x0b 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00", |
| 35 | "none", |
| 36 | "Enabled nibble position 6th LSB e.g. 0x2", |
| 37 | ], |
| 38 | 'Disabled': |
| 39 | [ |
| 40 | # raw command, expected output, comment |
| 41 | "0x04 0x30 0x0b 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00", |
| 42 | "none", |
| 43 | "Enabled nibble position 6th LSB e.g. 0x1", |
| 44 | ], |
Rahul Maheshwari | abe13af | 2018-02-15 22:42:08 -0600 | [diff] [blame] | 45 | }, |
| 46 | 'power_reading': |
| 47 | { |
| 48 | 'Get': |
| 49 | [ |
| 50 | # raw command, expected output(s), comment |
| 51 | "0x2c 0x02 0xdc 0x01 0x01 0x00", |
| 52 | "dc d5 00 d5 00 d5 00 d5 00 00 00 00 00 00 00 00 00 00", |
| 53 | "Byte position 2nd LSB e.g. d5 Instantaneous power readings", |
| 54 | ], |
Rahul Maheshwari | 0eb33f0 | 2018-04-10 02:31:54 -0500 | [diff] [blame] | 55 | }, |
| 56 | 'conf_param': |
| 57 | { |
| 58 | 'Enabled': |
| 59 | [ |
| 60 | # raw command, expected output, comment |
| 61 | "0x2c 0x12 0xdc 0x02 0x00 0x01", |
| 62 | "dc", |
| 63 | "Enabled nibble position 6th LSB e.g. 0x01", |
| 64 | ], |
| 65 | 'Disabled': |
| 66 | [ |
| 67 | # raw command, expected output, comment |
| 68 | "0x2c 0x12 0xdc 0x02 0x00 0x00", |
| 69 | "dc", |
| 70 | "Disable nibble position 6th LSB e.g. 0x00", |
| 71 | ] |
George Keishing | d2795d6 | 2018-02-04 23:12:23 -0600 | [diff] [blame] | 72 | } |
| 73 | } |