summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
diff options
context:
space:
mode:
authorJacob Harvey <jlharvey@us.ibm.com>2017-09-19 09:57:54 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-26 17:08:55 -0400
commit7f59b42ea81b713c5e3c0cbeed38bd8858aa3ff6 (patch)
treeebd9218a76a6f078d5088b850850c161de093d5c /src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
parentad079f548f91b86b0526927ff32659e82349f895 (diff)
downloadtalos-hostboot-7f59b42ea81b713c5e3c0cbeed38bd8858aa3ff6.tar.gz
talos-hostboot-7f59b42ea81b713c5e3c0cbeed38bd8858aa3ff6.zip
Increment red_waterfall for low vdn fix
Change-Id: Iaa5dbf94fe223cdfef7ebbfe8598f98f5472c956 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46420 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Dev-Ready: JACOB L. HARVEY <jlharvey@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Matt K. Light <mklight@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46455 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: JACOB L. HARVEY <jlharvey@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
index 8fdb47f5c..2c9d3872d 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/workarounds/dp16_workarounds.H
@@ -197,6 +197,51 @@ fapi2::ReturnCode fix_blue_waterfall_gate( const fapi2::Target<fapi2::TARGET_TYP
const bool i_always_run = false );
///
+/// @brief Fixes red waterfall values in a port
+/// @param[in] i_target - the target to operate on
+/// @param[in] i_rp, the rank pair that's being trained
+/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
+///
+fapi2::ReturnCode fix_red_waterfall_gate( const fapi2::Target<fapi2::TARGET_TYPE_MCA>& i_target, const uint64_t i_rp);
+
+
+///
+/// @brief Moves the red waterfall forward by one
+/// @param[in,out] io_red_waterfall - the red waterfall value
+///
+inline void update_red_waterfall(uint64_t& io_red_waterfall)
+{
+ constexpr uint64_t MAX_RED_WATERFALL_VALUE = 4;
+
+ if (++io_red_waterfall >= MAX_RED_WATERFALL_VALUE)
+ {
+ io_red_waterfall = 0;
+ }
+}
+
+///
+/// @brief Gets the red waterfall and gate delay values for a given DP quad
+/// @tparam uint64_t QUAD - which quad to access
+/// @param[in,out] io_waterfall_reg - waterfall register data
+///
+template< uint64_t QUAD>
+void update_red_waterfall_for_quad(fapi2::buffer<uint64_t>& io_waterfall_reg)
+{
+ constexpr uint64_t NUM_QUAD = 4;
+ // Valid quad values are from 0-3, exit if the requested value is greater
+ static_assert(QUAD < NUM_QUAD, "Inserted quad value is greater than or equal to 4");
+
+ // Gets the data for this Quad
+ auto l_red_waterfall = mss::dp16::get_red_waterfall<QUAD>(io_waterfall_reg);
+
+ // Updates the waterfall and gate delay
+ update_red_waterfall(l_red_waterfall);
+
+ // Sets the data back into the register
+ mss::dp16::set_red_waterfall<QUAD>(io_waterfall_reg, l_red_waterfall);
+}
+
+///
/// @brief Modifies HW calibration results based upon workarounds
/// @param[in] i_target - the target to operate on
/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS if ok
OpenPOWER on IntegriCloud