summaryrefslogtreecommitdiffstats
path: root/selutility.hpp
diff options
context:
space:
mode:
authorjayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2019-05-02 21:13:30 +0000
committerTom Joseph <tomjoseph@in.ibm.com>2019-07-25 04:49:25 +0000
commitb755772f87f0be2b034d04ae0e2f29062bcbb9f3 (patch)
tree64cd8f1d78ec05d2da7e96b65d682bc02d987fdb /selutility.hpp
parent77381f15bdee2bf867337a3ad6c7e2aaed93b2f5 (diff)
downloadphosphor-host-ipmid-b755772f87f0be2b034d04ae0e2f29062bcbb9f3.tar.gz
phosphor-host-ipmid-b755772f87f0be2b034d04ae0e2f29062bcbb9f3.zip
storagehandler: move get & reserve SEL to new API
Rewrite "Get sel info & Reserve SEL" commands to use the new API. Tested: 1. verified ipmitool sel info is same both before and after the changes Command: ipmitool sel info Output: SEL Information Version : 1.5 (v1.5, v2 compliant) Entries : 0 Free Space : 65535 bytes or more Percent Used : unknown Last Add Time : Not Available Last Del Time : Not Available Overflow : false Supported Cmds : 'Delete' 'Reserve' Command: ipmitool raw 0x0a 0x40 Output: 51 00 00 ff ff ff ff ff ff ff ff ff ff 0a 2. verfied the Reserve SEL command ipmitool raw 0x0a 0x42 01 00 ipmitool raw 0x0a 0x42 02 00 Change-Id: I37d602293066274a3fc417ad7e59cea3c73315f7 Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Diffstat (limited to 'selutility.hpp')
-rw-r--r--selutility.hpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/selutility.hpp b/selutility.hpp
index bf16a5c..49ec1b7 100644
--- a/selutility.hpp
+++ b/selutility.hpp
@@ -33,27 +33,21 @@ using PropertyType =
static constexpr auto selVersion = 0x51;
static constexpr auto invalidTimeStamp = 0xFFFFFFFF;
-static constexpr auto operationSupport = 0x0A;
-
-/** @struct GetSELInfoResponse
- *
- * IPMI payload for Get SEL Info command response.
- */
-struct GetSELInfoResponse
-{
- uint8_t selVersion; //!< SEL revision.
- uint16_t entries; //!< Number of log entries in SEL.
- uint16_t freeSpace; //!< Free Space in bytes.
- uint32_t addTimeStamp; //!< Most recent addition timestamp.
- uint32_t eraseTimeStamp; //!< Most recent erase timestamp.
- uint8_t operationSupport; //!< Operation support.
-} __attribute__((packed));
static constexpr auto firstEntry = 0x0000;
static constexpr auto lastEntry = 0xFFFF;
static constexpr auto entireRecord = 0xFF;
static constexpr auto selRecordSize = 16;
+namespace operationSupport
+{
+static constexpr bool overflow = false;
+static constexpr bool deleteSel = true;
+static constexpr bool partialAddSelEntry = false;
+static constexpr bool reserveSel = true;
+static constexpr bool getSelAllocationInfo = false;
+} // namespace operationSupport
+
/** @struct GetSELEntryRequest
*
* IPMI payload for Get SEL Entry command request.
OpenPOWER on IntegriCloud