diff options
author | Tom Joseph <tomjoseph@in.ibm.com> | 2017-07-12 20:07:11 +0530 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-07-18 21:21:28 +0000 |
commit | 6f6dd4d733339d8e3783dd1630f365b903035dcf (patch) | |
tree | 7a2a560857ed58c862980501f848f8496bc1b5bd /dcmihandler.hpp | |
parent | be5eaa10b211fd3116762fee5e1b86475bed092f (diff) | |
download | phosphor-host-ipmid-6f6dd4d733339d8e3783dd1630f365b903035dcf.tar.gz phosphor-host-ipmid-6f6dd4d733339d8e3783dd1630f365b903035dcf.zip |
dcmi: asset-tag: Implement the Get Asset Tag command
Change-Id: Ic2fb1e707174ece63fbb758bf1422c2c4d95723b
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'dcmihandler.hpp')
-rw-r--r-- | dcmihandler.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dcmihandler.hpp b/dcmihandler.hpp index dfe1d4e..f2369a0 100644 --- a/dcmihandler.hpp +++ b/dcmihandler.hpp @@ -10,6 +10,7 @@ enum ipmi_netfn_sen_cmds { // Get capability bits IPMI_CMD_DCMI_GET_POWER = 0x03, + IPMI_CMD_DCMI_GET_ASSET_TAG = 0x06, }; namespace dcmi @@ -30,6 +31,33 @@ namespace assettag } //namespace assettag +static constexpr auto groupExtId = 0xDC; + +static constexpr auto assetTagMaxOffset = 62; +static constexpr auto assetTagMaxSize = 63; +static constexpr auto maxBytes = 16; + +/** @struct GetAssetTagRequest + * + * DCMI payload for Get Asset Tag command request. + */ +struct GetAssetTagRequest +{ + uint8_t groupID; //!< Group extension identification. + uint8_t offset; //!< Offset to read. + uint8_t bytes; //!< Number of bytes to read. +} __attribute__((packed)); + +/** @struct GetAssetTagResponse + * + * DCMI payload for Get Asset Tag command response. + */ +struct GetAssetTagResponse +{ + uint8_t groupID; //!< Group extension identification. + uint8_t tagLength; //!< Total asset tag length. +} __attribute__((packed)); + /** @brief Read the object tree to fetch the object path that implemented the * Asset tag interface. * |