Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 1 | #ifndef __HOST_IPMI_STORAGE_HANDLER_H__ |
| 2 | #define __HOST_IPMI_STORAGE_HANDLER_H__ |
| 3 | |
Adriana Kobylak | 8e30f2a | 2015-10-20 10:23:51 -0500 | [diff] [blame] | 4 | // IPMI commands for Storage net functions. |
Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 5 | enum ipmi_netfn_storage_cmds |
| 6 | { |
| 7 | // Get capability bits |
Marri Devender Rao | fa7b4e2 | 2017-07-03 00:52:20 -0500 | [diff] [blame] | 8 | IPMI_CMD_GET_FRU_INV_AREA_INFO = 0x10, |
Dhruvaraj Subhashchandran | e66c3b0 | 2018-02-07 01:21:56 -0600 | [diff] [blame] | 9 | IPMI_CMD_GET_REPOSITORY_INFO = 0x20, |
Marri Devender Rao | fa7b4e2 | 2017-07-03 00:52:20 -0500 | [diff] [blame] | 10 | IPMI_CMD_READ_FRU_DATA = 0x11, |
Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 11 | IPMI_CMD_GET_SEL_INFO = 0x40, |
| 12 | IPMI_CMD_RESERVE_SEL = 0x42, |
Tom Joseph | a495339 | 2017-06-30 19:09:47 +0530 | [diff] [blame] | 13 | IPMI_CMD_GET_SEL_ENTRY = 0x43, |
Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 14 | IPMI_CMD_ADD_SEL = 0x44, |
Tom Joseph | 8f4a2aa | 2017-06-30 19:12:49 +0530 | [diff] [blame] | 15 | IPMI_CMD_DELETE_SEL = 0x46, |
Tom Joseph | 2f05bb5 | 2017-06-30 19:14:49 +0530 | [diff] [blame] | 16 | IPMI_CMD_CLEAR_SEL = 0x47, |
Adriana Kobylak | 8e30f2a | 2015-10-20 10:23:51 -0500 | [diff] [blame] | 17 | IPMI_CMD_GET_SEL_TIME = 0x48, |
| 18 | IPMI_CMD_SET_SEL_TIME = 0x49, |
Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 19 | |
| 20 | }; |
| 21 | |
Chris Austen | 41a4b31 | 2015-10-25 03:45:42 -0500 | [diff] [blame] | 22 | struct ipmi_add_sel_request_t { |
| 23 | |
| 24 | uint8_t recordid[2]; |
| 25 | uint8_t recordtype; |
| 26 | uint8_t timestampe[4]; |
| 27 | uint8_t generatorid[2]; |
| 28 | uint8_t evmrev; |
| 29 | uint8_t sensortype; |
| 30 | uint8_t sensornumber; |
| 31 | uint8_t eventdir; |
| 32 | uint8_t eventdata[3]; |
| 33 | }; |
Marri Devender Rao | cac383b | 2017-07-03 13:24:27 -0500 | [diff] [blame] | 34 | |
| 35 | /** |
| 36 | * @struct Read FRU Data command request data |
| 37 | */ |
| 38 | struct ReadFruDataRequest |
| 39 | { |
| 40 | uint8_t fruID; ///< FRU Device ID. FFh = reserved |
| 41 | uint8_t offsetLS; ///< FRU Inventory Offset to read, LS Byte |
| 42 | uint8_t offsetMS; ///< FRU Inventory Offset ro read, MS Byte |
| 43 | uint8_t count; ///< Count to read |
| 44 | }__attribute__ ((packed)); |
| 45 | |
| 46 | /** |
| 47 | * @struct Get FRU inventory area info command request data |
| 48 | */ |
| 49 | struct FruInvenAreaInfoRequest |
| 50 | { |
| 51 | uint8_t fruID; ///< FRU Device ID. FFH = reserved. |
| 52 | }__attribute__ ((packed)); |
| 53 | |
| 54 | |
| 55 | /** |
| 56 | * @struct Get FRU inventory area info command response |
| 57 | */ |
| 58 | struct FruInvenAreaInfoResponse |
| 59 | { |
| 60 | uint8_t completionCode; ///< Completion code |
| 61 | uint8_t sizels; ///< Fru Inventory area size in bytes, LS Byte |
| 62 | uint8_t sizems; ///< Fru Inventory are size in bytes, MS Byte |
| 63 | uint8_t access; ///< 0b Devices is accessed by bytes, 1b - by words |
| 64 | }__attribute__ ((packed)); |
| 65 | |
Dhruvaraj Subhashchandran | e66c3b0 | 2018-02-07 01:21:56 -0600 | [diff] [blame] | 66 | /** |
| 67 | * @struct Get Repository info command response |
| 68 | */ |
| 69 | struct GetRepositoryInfoResponse |
| 70 | { |
| 71 | uint8_t sdrVersion; //< SDR version |
| 72 | uint8_t recordCountLs; //< Record count LS byte |
| 73 | uint8_t recordCountMs; //< Record count MS bte |
| 74 | uint8_t freeSpace[2]; //< Free space in bytes, LS first |
| 75 | uint8_t additionTimestamp[4]; //< Most recent addition timestamp LS first |
| 76 | uint8_t deletionTimestamp[4]; //< Most recent deletion timestamp LS first |
| 77 | uint8_t operationSupport; //< Operation support |
| 78 | }__attribute__ ((packed)); |
Chris Austen | b4f5b92 | 2015-10-13 12:44:43 -0500 | [diff] [blame] | 79 | #endif |