diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/fapi2/attribute_service.H | 33 | ||||
-rw-r--r-- | src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H | 2 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H index d331d9637..e02053024 100644 --- a/src/include/usr/fapi2/attribute_service.H +++ b/src/include/usr/fapi2/attribute_service.H @@ -461,6 +461,22 @@ ReturnCode platGetMBvpdSlopeInterceptData( const uint32_t i_attr, uint32_t& o_val); +/// @brief This function is called by the FAPI_ATTR_GET macro when getting +// ATTR_FREQ_MCA_MHZ +// @param[in] i_fapiTarget FAPI2 Target pointer +// @param[out] o_val PB frequency from ATTR_FREQ_PB_MHZ +// @return ReturnCode Zero on success, else platform specified error. +ReturnCode platGetFreqMcaMhz(const Target<TARGET_TYPE_ALL>& i_fapiTarget, + uint32_t& o_val); + +/// @brief This function is called by the FAPI_ATTR_SET macro when getting +// ATTR_FREQ_MCA_MHZ +// @param[in] i_fapiTarget FAPI2 Target pointer +// @param[in] i_val New frequency +// @return ReturnCode Zero on success, else platform specified error. +ReturnCode platSetFreqMcaMhz(const Target<TARGET_TYPE_ALL>& i_fapiTarget, + uint32_t i_val); + // ----------------------------------------------------------------------------- // End TODO: End to be supported functions // ----------------------------------------------------------------------------- @@ -1567,6 +1583,23 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL)) fapi2::platAttrSvc::\ platGetMBvpdSlopeInterceptData(TARGET, ID, VAL) +//---------------------------------------------------------------------------- +// MACRO to route ATTR_FREQ_MCA_MHZ access to the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_FREQ_MCA_MHZ_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetFreqMcaMhz(TARGET, VAL) + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_FREQ_MCA_MHZ access to the correct HB function +//---------------------------------------------------------------------------- +#define ATTR_FREQ_MCA_MHZ_SETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platSetFreqMcaMhz(TARGET, VAL) #endif // ATTRIBUTESERVICE_H_ diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H index 0a4ebe089..f516425ad 100644 --- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H +++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H @@ -64,6 +64,7 @@ namespace fapi2 MOD_FAPI2_GET_MB_VPD_ATTR = 0x15, MOD_FAPI2_GET_PLL_BUCKET = 0x16, MOD_FAPI2_GET_RING = 0x17, + MOD_FAPI2_SET_ATTR_FREQ_MCA_MHZ = 0x18, }; /** @@ -141,6 +142,7 @@ namespace fapi2 RC_FAILED_TO_DECOMPRESS_RING = FAPI2_COMP_ID | 0x3C, RC_INCORRECT_HW_IMAGE_TYPE = FAPI2_COMP_ID | 0x3D, RC_DD_SUPPORT_CHECK_FAILED = FAPI2_COMP_ID | 0x3E, + RC_SET_ATTR_NOT_VALID = FAPI2_COMP_ID | 0x3F, // HWP generated errors RC_HWP_GENERATED_ERROR = HWPF_COMP_ID | 0x0f, |