summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-04-22 10:36:47 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-04-30 13:34:26 -0500
commit80295355e810c092007d9df7acf9ae9e9691f88a (patch)
tree8cdc32ff85bdae911e10c9da616dc53cb0964948 /src/usr/fapi2
parentcbf60d385958cca0ad6c35926284cf35e62da65b (diff)
downloadtalos-hostboot-80295355e810c092007d9df7acf9ae9e9691f88a.tar.gz
talos-hostboot-80295355e810c092007d9df7acf9ae9e9691f88a.zip
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 <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2')
-rw-r--r--src/usr/fapi2/attribute_service.C43
1 files changed, 40 insertions, 3 deletions
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 <stdint.h>
+#include <config.h>
#include <return_code.H>
#include <attribute_ids.H>
#include <attributeenums.H>
@@ -178,11 +179,11 @@ errlHndl_t getTargetingTarget(const Target<TARGET_TYPE_ALL>& 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);
}
///
@@ -466,6 +467,40 @@ ReturnCode platGetTargetPos(const Target<TARGET_TYPE_ALL>& i_pFapiTarget,
}
//******************************************************************************
+// 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<void *> (l_errl));
+ return l_rc;
+}
+
+//******************************************************************************
// fapi::platAttrSvc::platGetFusedCoreMode function
//******************************************************************************
ReturnCode platGetFusedCoreMode(uint8_t & o_isFused)
@@ -2652,11 +2687,12 @@ ReturnCode platGetMBvpdSlopeInterceptData(
return rc;
}
+#ifndef CONFIG_AXONE
//******************************************************************************
// fapi::platAttrSvc::platGetFreqMcaMhz function
//******************************************************************************
ReturnCode platGetFreqMcaMhz(const Target<TARGET_TYPE_ALL>& 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<TARGET_TYPE_ALL>& i_fapiTarget,
}
return l_rc;
}
+#endif
} // End platAttrSvc namespace
OpenPOWER on IntegriCloud