diff options
author | Kirill Pakhomov <k.pakhomov@yadro.com> | 2018-11-06 16:06:10 +0300 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-02-12 21:07:41 +0000 |
commit | 2c2af2ca713f56b117ad2c8c1a1f0e370b7c2d9c (patch) | |
tree | 5ec0d267d553129d09b79681eccaa8f5c127865d /dcmihandler.hpp | |
parent | a257362278c2a92676f7ef8b774d2dc3fb382fb2 (diff) | |
download | phosphor-host-ipmid-2c2af2ca713f56b117ad2c8c1a1f0e370b7c2d9c.tar.gz phosphor-host-ipmid-2c2af2ca713f56b117ad2c8c1a1f0e370b7c2d9c.zip |
dcmihandler: Add DCMI Power management support check
According to section 6.6 Power management of DCMI specification,
if power management feature is disabled,
the related commands (Get/Set/Activate/Deactive Power Limit)
should be unsupported.
Change-Id: I887f33babb2fe7a1ab97bb2d0720a693171e48a1
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
Diffstat (limited to 'dcmihandler.hpp')
-rw-r--r-- | dcmihandler.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dcmihandler.hpp b/dcmihandler.hpp index e3fa9de..8b16e3d 100644 --- a/dcmihandler.hpp +++ b/dcmihandler.hpp @@ -56,6 +56,8 @@ static constexpr auto systemPath = "/org/freedesktop/systemd1"; static constexpr auto systemIntf = "org.freedesktop.systemd1.Manager"; static constexpr auto gDCMICapabilitiesConfig = "/usr/share/ipmi-providers/dcmi_cap.json"; +static constexpr auto gDCMIPowerMgmtCapability = "PowerManagement"; +static constexpr auto gDCMIPowerMgmtSupported = 0x1; namespace assettag { @@ -161,6 +163,13 @@ struct SetAssetTagResponse uint8_t tagLength; //!< Total asset tag length. } __attribute__((packed)); +/** @brief Check whether DCMI power management is supported + * in the DCMI Capabilities config file. + * + * @return True if DCMI power management is supported + */ +bool isDCMIPowerMgmtSupported(); + /** @brief Read the object tree to fetch the object path that implemented the * Asset tag interface. * |