diff options
author | Tom Joseph <tomjoseph@in.ibm.com> | 2017-07-26 18:18:06 +0530 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-07-28 02:26:09 +0000 |
commit | 6c8d51baee01211c671567881dec27c327ae2c86 (patch) | |
tree | 44016607e1819af26e7cb20f5866e7535e7104b5 /dcmihandler.hpp | |
parent | 46fa37d94fcfa617357deb2de41dca84a4550a19 (diff) | |
download | phosphor-host-ipmid-6c8d51baee01211c671567881dec27c327ae2c86.tar.gz phosphor-host-ipmid-6c8d51baee01211c671567881dec27c327ae2c86.zip |
dcmi: Implement activate/deactivate power limit
Resolves openbmc/openbmc#1955
Change-Id: I4f97e3f22e9a36879dba56a06ae3c6bb5d34e34c
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 e318294..cb46d5c 100644 --- a/dcmihandler.hpp +++ b/dcmihandler.hpp @@ -12,6 +12,7 @@ enum ipmi_netfn_sen_cmds // Get capability bits IPMI_CMD_DCMI_GET_POWER_LIMIT = 0x03, IPMI_CMD_DCMI_SET_POWER_LIMIT = 0x04, + IPMI_CMD_DCMI_APPLY_POWER_LIMIT = 0x05, IPMI_CMD_DCMI_GET_ASSET_TAG = 0x06, IPMI_CMD_DCMI_SET_ASSET_TAG = 0x08, }; @@ -178,6 +179,33 @@ struct SetPowerLimitResponse uint8_t groupID; //!< Group extension identification. } __attribute__((packed)); +/** @brief Enable or disable the power capping + * + * @param[in] bus - dbus connection + * @param[in] enabled - enable/disable + */ +void setPcapEnable(sdbusplus::bus::bus& bus, bool enabled); + +/** @struct ApplyPowerLimitRequest + * + * DCMI payload for Activate/Deactivate Power Limit command request. + */ +struct ApplyPowerLimitRequest +{ + uint8_t groupID; //!< Group extension identification. + uint8_t powerLimitAction; //!< Power limit activation + uint16_t reserved; //!< Reserved +} __attribute__((packed)); + +/** @struct ApplyPowerLimitResponse + * + * DCMI payload for Acticate/Deactivate Power Limit command response. + */ +struct ApplyPowerLimitResponse +{ + uint8_t groupID; //!< Group extension identification. +} __attribute__((packed)); + } // namespace dcmi #endif |