From e8665007c850aea68f494b34705276585ce13086 Mon Sep 17 00:00:00 2001 From: Maxim Polyakov Date: Mon, 13 May 2019 16:51:10 +0300 Subject: ipmidcmi: Get DCMI capabilities info to check PM support According to section 6.6 Power management of DCMI spec, the DCMI Get Power Limit command isn`t supported if Get DCMI Capabilities Info command indicates no Power Management support. Commit adds code to get DCMI capabilities information from BMC to check this Tested on the Vesnin P8 server Change-Id: I3c4216e2ee4f5fa98ffbcfa95c4af6771f81b43c RTC: 123256 Resolves #176 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80681 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Martha Broyles Reviewed-by: Daniel M Crowell --- src/include/usr/ipmi/ipmi_reasoncodes.H | 4 +++- src/include/usr/ipmi/ipmiif.H | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/include/usr') diff --git a/src/include/usr/ipmi/ipmi_reasoncodes.H b/src/include/usr/ipmi/ipmi_reasoncodes.H index 65d8e64d3..6bb7e4b4b 100644 --- a/src/include/usr/ipmi/ipmi_reasoncodes.H +++ b/src/include/usr/ipmi/ipmi_reasoncodes.H @@ -5,9 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2019 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ +/* [+] Maxim Polyakov */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -64,6 +65,7 @@ namespace IPMI RC_INVALID_VPD_DATA = IPMI_COMP_ID | 0x0e, RC_INVALID_SENSOR_NUMBER = IPMI_COMP_ID | 0x0f, RC_INVALID_SENSOR_SETTING = IPMI_COMP_ID | 0x10, + RC_GET_DCMI_CAP_CMD_FAILED = IPMI_COMP_ID | 0x11, }; }; diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H index 0421aaef3..68adfa392 100644 --- a/src/include/usr/ipmi/ipmiif.H +++ b/src/include/usr/ipmi/ipmiif.H @@ -5,9 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ +/* [+] Maxim Polyakov */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -304,7 +305,10 @@ namespace IPMI inline const command_t hiomap_event(void) { return std::make_pair(NETFUN_IBM, 0x0f); } - // $TODO RTC:123256 - need to add code to get dcmi capabilities + // Used to get dcmi capabilities + inline const command_t get_dcmi_capability_info(void) + { return std::make_pair(NETFUN_GRPEXT, 0x01); } + // This is a dcmi message used to request the // user defined power limit from the BMC. inline const command_t get_power_limit(void) -- cgit v1.2.1