Skip to content

Commit f18a578

Browse files
JacobHarveydcrowell77
authored andcommitted
Add FIR checking to training error checking
Change-Id: I7de696f3724a3a3b10650790d481ecb1130d6d7c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45580 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45583 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>
1 parent 241d612 commit f18a578

File tree

4 files changed

+112
-3
lines changed

4 files changed

+112
-3
lines changed

src/import/chips/p9/procedures/hwp/memory/lib/fir/check.C

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,52 @@ fapi_try_exit:
181181
return fapi2::current_err;
182182
}
183183

184+
///
185+
/// @brief Check FIR bits during draminit training
186+
/// @param[in] i_target the dimm that was trained
187+
/// @note We check for fir errors after training each rank
188+
/// to see if there was a problem with the engine.
189+
/// FFDC errors returned from this will be handled similar to other training errors:
190+
/// Logged as informational if it affects less than a nibble and a bit.
191+
/// Reported if it affects more than that
192+
/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok
193+
///
194+
template<>
195+
fapi2::ReturnCode during_draminit_training( const fapi2::Target<fapi2::TARGET_TYPE_DIMM>& i_target)
196+
{
197+
const auto& l_mca = mss::find_target<fapi2::TARGET_TYPE_MCA>(i_target);
198+
199+
// Creating a mask to check for FIR errors.
200+
// These are DP16 parity errors that would be triggered in case of a general PHY error
201+
// During draminit_training, this would mean a training error dealing with the PHY
202+
fapi2::buffer<uint64_t> l_phyfir_mask;
203+
l_phyfir_mask.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_0>()
204+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_1>()
205+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_2>()
206+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_3>()
207+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_4>()
208+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_5>()
209+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_6>()
210+
.setBit<MCA_IOM_PHY0_DDRPHY_FIR_REG_ERROR_7>();
211+
212+
fapi2::buffer<uint64_t> l_phyfir_data;
213+
fapi2::buffer<uint64_t> l_phyfir_masked;
214+
215+
FAPI_TRY( mss::getScom(l_mca, MCA_IOM_PHY0_DDRPHY_FIR_REG, l_phyfir_data) );
216+
217+
l_phyfir_masked = l_phyfir_data & l_phyfir_mask;
218+
219+
FAPI_ASSERT( l_phyfir_masked == 0,
220+
fapi2::MSS_DRAMINIT_TRAINING_PORT_FIR()
221+
.set_PHY_FIR(l_phyfir_masked)
222+
.set_DIMM_TARGET(i_target)
223+
.set_MCA_TARGET(l_mca),
224+
"Initial CAL failed: Reporting FIR bits set for %s ( phy: 0x%016lx",
225+
mss::c_str(i_target), l_phyfir_masked);
226+
227+
fapi_try_exit:
228+
return fapi2::current_err;
229+
}
184230

185231
}
186232
}

src/import/chips/p9/procedures/hwp/memory/lib/fir/check.H

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HostBoot Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2016 */
8+
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -56,6 +56,19 @@ namespace check
5656
template< fapi2::TargetType T >
5757
fapi2::ReturnCode during_phy_reset( const fapi2::Target<T>& i_target );
5858

59+
///
60+
/// @brief Check FIR bits during draminit training
61+
/// @param[in] i_target the dimm that was trained
62+
/// @note We check for fir errors after training each rank
63+
/// to see if there was a problem with the engine
64+
/// FFDC errors return from this will be handle similar to other training errors
65+
/// Logged if it affects less than a nibble and a bit.
66+
/// Reported if it affects more than that
67+
/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok
68+
///
69+
template< fapi2::TargetType T >
70+
fapi2::ReturnCode during_draminit_training( const fapi2::Target<T>& i_target );
71+
5972
}
6073
}
6174
#endif

src/import/chips/p9/procedures/hwp/memory/lib/phy/ddr_phy.C

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <lib/phy/adr32s.H>
4747
#include <lib/phy/adr.H>
4848
#include <lib/phy/seq.H>
49+
#include <lib/fir/check.H>
4950
#include <lib/workarounds/dp16_workarounds.H>
5051
#include <lib/workarounds/wr_vref_workarounds.H>
5152
#include <lib/dimm/ddr4/latch_wr_vref.H>
@@ -540,7 +541,11 @@ fapi2::ReturnCode process_initial_cal_errors( const fapi2::Target<TARGET_TYPE_DI
540541

541542
if ((l_rank_pairs == 0) || (l_errors == 0))
542543
{
543-
FAPI_INF("Initial cal - no errors reported %s", mss::c_str(l_mca));
544+
// If we got here, we check the phy firs to see if the engine had a problem
545+
// If there's no FIRs lit up, we return SUCCESS
546+
// If there's a FIR, we return a general error that will trigger a BAD_DQ check by the calling function
547+
FAPI_TRY( mss::check::during_draminit_training(i_target) );
548+
FAPI_INF("Initial cal success %s", mss::c_str(l_mca));
544549
return fapi2::FAPI2_RC_SUCCESS;
545550
}
546551

@@ -683,6 +688,10 @@ fapi2::ReturnCode process_initial_cal_errors( const fapi2::Target<TARGET_TYPE_DI
683688
);
684689

685690
fapi_try_exit:
691+
FAPI_INF("Initial cal - %s %s",
692+
(fapi2::current_err == fapi2::FAPI2_RC_SUCCESS ? "success" : "errors reported"),
693+
mss::c_str(l_mca));
694+
686695
return fapi2::current_err;
687696
}
688697

@@ -750,8 +759,9 @@ fapi2::ReturnCode find_and_log_cal_errors(const fapi2::Target<fapi2::TARGET_TYPE
750759
}
751760
}
752761

753-
FAPI_ERR("Seeing calibration errors for p9_mss_draminit_training %s: Keep running? %s",
762+
FAPI_ERR("Seeing calibration errors for p9_mss_draminit_training %s rp %d: Keep running? %s",
754763
mss::c_str(l_dimm),
764+
i_rp,
755765
(l_rc == fapi2::FAPI2_RC_SUCCESS) ? "Yes" : "no");
756766

757767
// Let's update the attribute with the failing DQ bits since we had a training error

src/import/chips/p9/procedures/xml/error_info/p9_memory_mss_draminit_training.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,46 @@
9797
<scomRegister>MCA_IOM_PHY0_DDRPHY_FIR_REG</scomRegister>
9898
</registerFfdc>
9999

100+
<hwpError>
101+
<rc>RC_MSS_DRAMINIT_TRAINING_PORT_FIR</rc>
102+
<description>
103+
A PHY fir was lit up due to draminit training.
104+
There could be a problem with the training engine
105+
Checking fir bits 1-7
106+
</description>
107+
<ffdc>PHY_FIR</ffdc>
108+
<ffdc>DIMM_TARGET</ffdc>
109+
<collectRegisterFfdc>
110+
<id>REG_FFDC_MSS_DRAMINIT_TRAINING_ERROR_INFO</id>
111+
<target>MCA_TARGET</target>
112+
<targetType>TARGET_TYPE_MCA</targetType>
113+
</collectRegisterFfdc>
114+
<collectRegisterFfdc>
115+
<id>REG_FFDC_MSS_DRAMINIT_TRAINING_FAILURE_DISABLE_REGS</id>
116+
<target>MCA_TARGET</target>
117+
<targetType>TARGET_TYPE_MCA</targetType>
118+
</collectRegisterFfdc>
119+
<collectRegisterFfdc>
120+
<id>REG_FFDC_MSS_DRAMINIT_TRAINING_ERROR_STATUS</id>
121+
<target>MCA_TARGET</target>
122+
<targetType>TARGET_TYPE_MCA</targetType>
123+
</collectRegisterFfdc>
124+
<callout>
125+
<target>DIMM_TARGET</target>
126+
<priority>HIGH</priority>
127+
</callout>
128+
<deconfigure>
129+
<target>DIMM_TARGET</target>
130+
</deconfigure>
131+
<gard>
132+
<target>DIMM_TARGET</target>
133+
</gard>
134+
<callout>
135+
<procedure>CODE</procedure>
136+
<priority>MEDIUM</priority>
137+
</callout>
138+
</hwpError>
139+
100140
<hwpError>
101141
<rc>RC_MSS_DRAMINIT_TRAINING_MULTIPLE_ERRORS</rc>
102142
<description>Multiple training steps failed for a given position within this calibration.</description>

0 commit comments

Comments
 (0)