From 80295355e810c092007d9df7acf9ae9e9691f88a Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Mon, 22 Apr 2019 10:36:47 -0500 Subject: Support writable ATTR_FREQ_MCA_MHZ for Axone ATTR_FREQ_MCA_MHZ is being reused on Axone to drive the memory clocks out to the OMIs. Previously this value was locked to the NEST/PB frequency so the value was constant. Change-Id: I4ab7625c2e22efc83ad63a463ebbb208392209ff Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76315 Reviewed-by: Nicholas E. Bofferding Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Corey V. Swenson Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell --- src/usr/fapi2/attribute_service.C | 43 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'src/usr/fapi2') diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C index 0c7442fd9..a6e998143 100644 --- a/src/usr/fapi2/attribute_service.C +++ b/src/usr/fapi2/attribute_service.C @@ -37,6 +37,7 @@ // supported HWPF attributes lists attributes handled by Hostboot #include +#include #include #include #include @@ -178,11 +179,11 @@ errlHndl_t getTargetingTarget(const Target& i_pFapiTarget, return l_errl; } -bool getTargetingAttrHelper(TARGETING::Target * l_pTargTarget, +bool getTargetingAttrHelper(TARGETING::Target * i_pTargTarget, const TARGETING::ATTRIBUTE_ID i_targAttrId, const uint32_t i_attrSize, void * o_pAttr) { - return l_pTargTarget->_tryGetAttr(i_targAttrId, i_attrSize, o_pAttr); + return i_pTargTarget->_tryGetAttr(i_targAttrId, i_attrSize, o_pAttr); } /// @@ -465,6 +466,40 @@ ReturnCode platGetTargetPos(const Target& i_pFapiTarget, return l_rc; } +//****************************************************************************** +// fapi::platAttrSvc::platErrorOnSet function +//****************************************************************************** +ReturnCode platErrorOnSet( TARGETING::Target * i_pTargTarget, + const fapi2::AttributeId i_fapiAttrId ) +{ + // Just create an error to return back + FAPI_ERR("platErrorOnSet: Set not valid for Attribute %X on Target %.8X", + i_fapiAttrId, TARGETING::get_huid(i_pTargTarget) ); + /*@ + * @errortype + * @moduleid fapi2::MOD_FAPI2_PLAT_ERROR_ON_SET + * @reasoncode fapi2::RC_SET_ATTR_NOT_VALID + * @userdata1 Target HUID + * @userdata2 FAPI Attribute Id + * @devdesc platErrorOnSet> Set operation not valid + * @custdesc Firmware error + */ + errlHndl_t l_errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + fapi2::MOD_FAPI2_PLAT_ERROR_ON_SET, + fapi2::RC_SET_ATTR_NOT_VALID, + TARGETING::get_huid(i_pTargTarget), + i_fapiAttrId, + ERRORLOG::ErrlEntry::ADD_SW_CALLOUT); + l_errl->collectTrace(FAPI_TRACE_NAME); + l_errl->collectTrace(FAPI_IMP_TRACE_NAME); + + // attach our log to the fapi RC and return it + ReturnCode l_rc; + l_rc.setPlatDataPtr(reinterpret_cast (l_errl)); + return l_rc; +} + //****************************************************************************** // fapi::platAttrSvc::platGetFusedCoreMode function //****************************************************************************** @@ -2652,11 +2687,12 @@ ReturnCode platGetMBvpdSlopeInterceptData( return rc; } +#ifndef CONFIG_AXONE //****************************************************************************** // fapi::platAttrSvc::platGetFreqMcaMhz function //****************************************************************************** ReturnCode platGetFreqMcaMhz(const Target& i_fapiTarget, - uint32_t & o_val) + ATTR_FREQ_MCA_MHZ_Type & o_val) { // The POR config for Cumulus is to run the MC/DMI clocks directly // off of the NEST PLL in 'sync' mode. To support 'sync' mode FW @@ -2678,6 +2714,7 @@ ReturnCode platGetFreqMcaMhz(const Target& i_fapiTarget, } return l_rc; } +#endif } // End platAttrSvc namespace -- cgit v1.2.1