diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2019-04-22 10:36:47 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-04-30 13:34:26 -0500 |
commit | 80295355e810c092007d9df7acf9ae9e9691f88a (patch) | |
tree | 8cdc32ff85bdae911e10c9da616dc53cb0964948 /src/include/usr | |
parent | cbf60d385958cca0ad6c35926284cf35e62da65b (diff) | |
download | talos-hostboot-80295355e810c092007d9df7acf9ae9e9691f88a.tar.gz talos-hostboot-80295355e810c092007d9df7acf9ae9e9691f88a.zip |
Support writable ATTR_FREQ_MCA_MHZ for Axone
ATTR_FREQ_MCA_MHZ is being reused on Axone to drive the memory
clocks out to the OMIs. Previously this value was locked to the
NEST/PB frequency so the value was constant.
Change-Id: I4ab7625c2e22efc83ad63a463ebbb208392209ff
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/76315
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/fapi2/attribute_service.H | 28 | ||||
-rw-r--r-- | src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H | 1 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H index 6144524c5..2e20eec45 100644 --- a/src/include/usr/fapi2/attribute_service.H +++ b/src/include/usr/fapi2/attribute_service.H @@ -49,6 +49,7 @@ #include <devicefw/driverif.H> #include <plat_attr_override_sync.H> #include <vpd/spdenums.H> +#include <config.h> //****************************************************************************** // Interface @@ -115,7 +116,7 @@ ReturnCode getTargetingAttr(const Target<TARGET_TYPE_ALL, /// @param[in] o_pAttr Pointer to attribute where value is copied to /// @return boolean describing if it was successful /// -bool setTargetingAttrHelper(TARGETING::Target * l_pTargTarget, +bool setTargetingAttrHelper(TARGETING::Target * i_pTargTarget, const TARGETING::ATTRIBUTE_ID i_targAttrId, const uint32_t i_attrSize, void * o_pAttr); @@ -191,6 +192,19 @@ ReturnCode platGetTargetPos(const Target<TARGET_TYPE_ALL>& i_pFapiTarget, /// +/// @brief This function is called by the FAPI_ATTR_SET macro when accessing +/// an attribute that should never be set. This is used to handle config- +/// dependent cases where the attribute may need to be writable in general +/// but not in some specific cases. +/// +/// @param[in] i_pTargTarget Pointer to TARGETING Target +/// @param[in] i_fapiAttrId FAPI attribute id +/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code. +/// +ReturnCode platErrorOnSet( TARGETING::Target * i_pTargTarget, + const fapi2::AttributeId i_fapiAttrId ); + +/// /// @brief This function is called by the FAPI_ATTR_GET macro when getting /// ATTR_FUSED_CORE_MODE. It should not be called directly /// @@ -1666,11 +1680,23 @@ 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)\ ? fapi2::ReturnCode() : \ fapi2::platAttrSvc::\ platGetFreqMcaMhz(TARGET, VAL) +#undef ATTR_FREQ_MCA_MHZ_SETMACRO +#define ATTR_FREQ_MCA_MHZ_SETMACRO(ID, TARGET, VAL) \ + AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\ + ? fapi2::ReturnCode() : \ + fapi2::platAttrSvc::platErrorOnSet(TARGET, VAL) +#endif #endif // ATTRIBUTESERVICE_H_ diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H index f0ae90b3a..3e1429b63 100644 --- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H +++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H @@ -68,6 +68,7 @@ namespace fapi2 MOD_FAPI2_PLAT_GET_PROC_TEST = 0x19, MOD_FAPI2_MONITOR_FOR_FSP_MSGS = 0x1A, MOD_FAPI2_PLAT_GET_VPD_OCMB = 0x1B, + MOD_FAPI2_PLAT_ERROR_ON_SET = 0x1C, }; /** |