summaryrefslogtreecommitdiffstats
path: root/src/include/usr/fapi2
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2016-03-16 10:53:21 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-03-17 11:40:49 -0400
commit497d9f20a3bc65847435c82358b32cd2cd6d6951 (patch)
treed239eb0a7e6412d5eaa615bb17a4ff0ea84ade43 /src/include/usr/fapi2
parentd3b1b0c3058c0a24f6a59148723459e15e2e5673 (diff)
downloadtalos-hostboot-497d9f20a3bc65847435c82358b32cd2cd6d6951.tar.gz
talos-hostboot-497d9f20a3bc65847435c82358b32cd2cd6d6951.zip
Add function for ATTR_FUSED_MODE
This commit fixes an issue where a HWP was using the attr FUSED_MODE while we did not have it set up yet. This commit covers adding the GET_MACRO to attribute_service.H and creating the function for that macro. Change-Id: Id9038e223ba0179ecc6e78b845032b6ac998d9c9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22112 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2')
-rw-r--r--src/include/usr/fapi2/attribute_service.H18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H
index 44277bf5b..b6939cbe1 100644
--- a/src/include/usr/fapi2/attribute_service.H
+++ b/src/include/usr/fapi2/attribute_service.H
@@ -192,6 +192,16 @@ ReturnCode platGetTargetPos(const Target<TARGET_TYPE_ALL>& i_pFapiTarget,
uint32_t & o_pos);
+///
+/// @brief This function is called by the FAPI_ATTR_GET macro when getting
+/// ATTR_FUSED_CORE_MODE. It should not be called directly
+///
+///
+/// @param[out] o_isFused 0 if not fused
+/// @return void
+///
+void platGetFusedCoreMode(uint8_t & o_isFused);
+
// -----------------------------------------------------------------------------
// End TODO: End to be supported functions
// -----------------------------------------------------------------------------
@@ -249,4 +259,12 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL))
? fapi2::FAPI2_RC_SUCCESS : \
fapi2::platAttrSvc::platGetTargetPos(PTARGET, VAL)
+//------------------------------------------------------------------------------
+// MACRO to route ATTR_FUSED_CORE access to the correct Hostboot function
+//------------------------------------------------------------------------------
+#define ATTR_FUSED_CORE_MODE_GETMACRO(ID, PTARGET, VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, PTARGET, &VAL)\
+ ? fapi2::FAPI2_RC_SUCCESS : \
+ fapi2::platAttrSvc::platGetFusedCoreMode(VAL)
+
#endif // ATTRIBUTESERVICE_H_
OpenPOWER on IntegriCloud