diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2019-06-07 12:21:11 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-06-28 15:56:25 -0500 |
commit | 4154aa7077447bad31241e4c7405040c5c314ee9 (patch) | |
tree | 97e93dc41d3fbc793d486516b502d36b255b9f40 /src/include | |
parent | 3c2d8ccc8fdbcf62e9d116166fedb3deae59f758 (diff) | |
download | talos-hostboot-4154aa7077447bad31241e4c7405040c5c314ee9.tar.gz talos-hostboot-4154aa7077447bad31241e4c7405040c5c314ee9.zip |
Add functions to back ATTR_FREQ_MCA_MHZ and ATTR_MC_PLL_BUCKET in P9A
The FREQ_MCA_MHZ is being used differently in Axone than previously
in P9 systems. Now this attribute is now tied in a relationship with
the MC_PLL_BUCKET and OMI_PLL_VCO attributes which is defined in the
OMI_PLL_FREQ_LIST in the EKB. Hostboot will use the FREQ_OMI_MHZ,
which was determined from the parsing DDIMM's VPD, to tell if we
have decided that a different PLL bucket than what we booted with
is more optimal. At least one scominit procedure is also looking up
these values. This commit provides that functions that will allow
the Hostboot platform to easily lookup these values.
Change-Id: I8e8d970c682d11a73f9fd1962782b613f55bee48
RTC: 207596
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/78542
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/fapi2/attribute_service.H | 32 | ||||
-rw-r--r-- | src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H | 4 |
2 files changed, 31 insertions, 5 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H index 2e20eec45..2a3ebc9c9 100644 --- a/src/include/usr/fapi2/attribute_service.H +++ b/src/include/usr/fapi2/attribute_service.H @@ -537,6 +537,14 @@ ReturnCode platGetFreqMcaMhz(const Target<TARGET_TYPE_ALL>& i_fapiTarget, ReturnCode platSetFreqMcaMhz(const Target<TARGET_TYPE_ALL>& i_fapiTarget, uint32_t i_val); +/// @brief This function is called by the FAPI_ATTR_GET macro when getting +// ATTR_MC_PLL_BUCKET +// @param[in] i_fapiTarget FAPI2 Target pointer +// @param[in] o_val PLL bucket associated with a given OMI freq +// @return ReturnCode Zero on success, else platform specified error. +ReturnCode platGetMcPllBucket(const Target<TARGET_TYPE_ALL>& i_fapiTarget, + uint8_t& o_val); + // ----------------------------------------------------------------------------- // End TODO: End to be supported functions // ----------------------------------------------------------------------------- @@ -1681,10 +1689,6 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL)) // MACRO to route ATTR_FREQ_MCA_MHZ access to the correct HB function //---------------------------------------------------------------------------- -// For Axone ATTR_FREQ_MCA_MHZ is a regular writable attribute -// For Nimbus/Cumulus ATTR_FREQ_MCA_MHZ is readonly and based on NEST -#ifndef CONFIG_AXONE - #undef ATTR_FREQ_MCA_MHZ_GETMACRO #define ATTR_FREQ_MCA_MHZ_GETMACRO(ID, TARGET, VAL) \ AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ @@ -1697,6 +1701,24 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL)) ? fapi2::ReturnCode() : \ fapi2::platAttrSvc::platErrorOnSet(TARGET, VAL) -#endif +#ifdef CONFIG_AXONE + +//---------------------------------------------------------------------------- +// MACRO to route ATTR_MC_PLL_BUCKET access to the correct HB function +//---------------------------------------------------------------------------- + +#undef ATTR_MC_PLL_BUCKET_GETMACRO +#define ATTR_MC_PLL_BUCKET_GETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::\ + platGetMcPllBucket(TARGET, VAL) +#undef ATTR_MC_PLL_BUCKET_SETMACRO +#define ATTR_MC_PLL_BUCKET_SETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::platErrorOnSet(TARGET, VAL) + +#endif //CONFIG_AXONE #endif // ATTRIBUTESERVICE_H_ diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H index 9d276b67c..8c85fa1dd 100644 --- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H +++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H @@ -69,6 +69,9 @@ namespace fapi2 MOD_FAPI2_MONITOR_FOR_FSP_MSGS = 0x1A, MOD_FAPI2_PLAT_GET_VPD_OCMB = 0x1B, MOD_FAPI2_PLAT_ERROR_ON_SET = 0x1C, + MOD_FAPI2_PLAT_GET_MC_PLL_BUCKET = 0x1D, + MOD_FAPI2_PLAT_GET_FREQ_MCA_MHZ = 0x1E, + MOD_GET_OMI_FREQ_AND_VCO = 0x1F, }; /** @@ -139,6 +142,7 @@ namespace fapi2 // PLL_BUCKET generated errors RC_NO_MATCHING_FREQ = HWPF_COMP_ID | 0x31, RC_FREQ_LIST_NOT_FOUND = HWPF_COMP_ID | 0x32, + RC_PROC_FREQ_MISMATCH = HWPF_COMP_ID | 0x33, }; /** |