From 6407898fc569eb63527c6960dbb0ed9e1ebb0212 Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Wed, 20 Dec 2017 14:29:14 -0600 Subject: Connect CDIMM power/slope ATTR with VPD accessor function Change-Id: I7bd048fb17d8041ae97054f6aa30e9dd94c6eaf5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51212 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Prachi Gupta Reviewed-by: Martin Gloff Reviewed-by: William G. Hoffa --- src/include/usr/fapi2/attribute_service.H | 95 ++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) (limited to 'src/include/usr/fapi2/attribute_service.H') diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H index dfdd23803..eb1a1e9ed 100644 --- a/src/include/usr/fapi2/attribute_service.H +++ b/src/include/usr/fapi2/attribute_service.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -438,6 +438,18 @@ ReturnCode getPllBucket(const Target& i_fapiTarget, uint8_t &o_bucket_val, const uint8_t i_index); +/// @brief This function is called by the FAPI_ATTR_GET macro when getting +// the CEN_CDIMM_VPD_* attributes. It should not be called directly. +// +// @param[in] i_fapiTarget The target for the attribute operation. +// @param[in] i_attr Which ATTR extracting from VPD +// @param[out] o_val The retrieved attribute value. +// @return ReturnCode Zero on success, else platform specified error. +ReturnCode platGetMBvpdSlopeInterceptData( + const Target& i_fapiTarget, + const uint32_t i_attr, + uint32_t& o_val); + // ----------------------------------------------------------------------------- // End TODO: End to be supported functions // ----------------------------------------------------------------------------- @@ -1455,5 +1467,86 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL)) fapi2::platAttrSvc::\ platGetMBvpdAttr(ID, TARGET, VAL) +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_MASTER_POWER_INTERCEPT access to the correct +// HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_MASTER_POWER_INTERCEPT_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_MASTER_POWER_SLOPE access to the correct +// HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_MASTER_POWER_SLOPE_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_MASTER_TOTAL_POWER_INTERCEPT access to +// the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_MASTER_TOTAL_POWER_INTERCEPT_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_MASTER_TOTAL_POWER_SLOPE access to +// the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_MASTER_TOTAL_POWER_SLOPE_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT access to the correct +// HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_SUPPLIER_POWER_SLOPE access to the correct +// HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_SUPPLIER_POWER_SLOPE_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_SUPPLIER_TOTAL_POWER_INTERCEPT access to +// the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_SUPPLIER_TOTAL_POWER_INTERCEPT_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_CEN_CDIMM_VPD_SUPPLIER_TOTAL_POWER_SLOPE access to +// the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_CEN_CDIMM_VPD_SUPPLIER_TOTAL_POWER_SLOPE_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) + + #endif // ATTRIBUTESERVICE_H_ -- cgit v1.2.1