diff options
author | crgeddes <crgeddes@us.ibm.com> | 2016-03-16 10:53:21 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2016-03-17 11:40:49 -0400 |
commit | 497d9f20a3bc65847435c82358b32cd2cd6d6951 (patch) | |
tree | d239eb0a7e6412d5eaa615bb17a4ff0ea84ade43 | |
parent | d3b1b0c3058c0a24f6a59148723459e15e2e5673 (diff) | |
download | talos-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>
-rw-r--r-- | src/include/usr/fapi2/attribute_service.H | 18 | ||||
-rw-r--r-- | src/usr/fapi2/attribute_service.C | 11 |
2 files changed, 29 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_ diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C index be9bee453..6541f6e58 100644 --- a/src/usr/fapi2/attribute_service.C +++ b/src/usr/fapi2/attribute_service.C @@ -58,6 +58,7 @@ #include <targeting/common/targetservice.H> #include <targeting/common/predicates/predicatectm.H> #include <targeting/common/utilFilter.H> +#include <targeting/common/util.H> //****************************************************************************** // Implementation @@ -381,6 +382,16 @@ ReturnCode platGetTargetPos(const Target<TARGET_TYPE_ALL>& i_pFapiTarget, return l_rc; } +//****************************************************************************** +// fapi::platAttrSvc::platGetFusedCoreMode function +//****************************************************************************** +void platGetFusedCoreMode(uint8_t & o_isFused) +{ + + o_isFused = TARGETING::is_fused_mode(); + +} + } // End platAttrSvc namespace } // End fapi2 namespace |