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