diff options
-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 |