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 | |
Marri Devender Rao | cac383b | 2017-07-03 13:24:27 -0500 | [diff] [blame] | 25 | /** |
| 26 | * @struct Read FRU Data command request data |
| 27 | */ |
| 28 | struct ReadFruDataRequest |
| 29 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 30 | uint8_t fruID; ///< FRU Device ID. FFh = reserved |
| 31 | uint8_t offsetLS; ///< FRU Inventory Offset to read, LS Byte |
| 32 | uint8_t offsetMS; ///< FRU Inventory Offset ro read, MS Byte |
| 33 | uint8_t count; ///< Count to read |
| 34 | } __attribute__((packed)); |
Marri Devender Rao | cac383b | 2017-07-03 13:24:27 -0500 | [diff] [blame] | 35 | |
| 36 | /** |
Nagaraju Goruganti | 7f2d7c9 | 2018-03-21 11:18:30 -0500 | [diff] [blame] | 37 | * @struct Read FRU Data command response data |
| 38 | */ |
| 39 | struct ReadFruDataResponse |
| 40 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 41 | uint8_t count; ///< Response data Count. |
Nagaraju Goruganti | 7f2d7c9 | 2018-03-21 11:18:30 -0500 | [diff] [blame] | 42 | uint8_t data[]; ///< Response data. |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 43 | } __attribute__((packed)); |
Nagaraju Goruganti | 7f2d7c9 | 2018-03-21 11:18:30 -0500 | [diff] [blame] | 44 | |
| 45 | /** |
Dhruvaraj Subhashchandran | e66c3b0 | 2018-02-07 01:21:56 -0600 | [diff] [blame] | 46 | * @struct Get Repository info command response |
| 47 | */ |
| 48 | struct GetRepositoryInfoResponse |
| 49 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 50 | uint8_t sdrVersion; //< SDR version |
| 51 | uint8_t recordCountLs; //< Record count LS byte |
| 52 | uint8_t recordCountMs; //< Record count MS bte |
| 53 | uint8_t freeSpace[2]; //< Free space in bytes, LS first |
Dhruvaraj Subhashchandran | e66c3b0 | 2018-02-07 01:21:56 -0600 | [diff] [blame] | 54 | uint8_t additionTimestamp[4]; //< Most recent addition timestamp LS first |
| 55 | uint8_t deletionTimestamp[4]; //< Most recent deletion timestamp LS first |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 56 | uint8_t operationSupport; //< Operation support |
| 57 | } __attribute__((packed)); |