summaryrefslogtreecommitdiffstats
path: root/src/import/chips
diff options
context:
space:
mode:
authorBrian Silver <bsilver@us.ibm.com>2016-06-08 07:02:38 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-07-06 10:06:42 -0400
commit9e1be45e48abff56989cebe2372380d33108a2d1 (patch)
tree8563a87ae2eceefdb43f6dfa3443aded3d284282 /src/import/chips
parent10546b02585480bd56101198fd9a94461d0a5103 (diff)
downloadtalos-hostboot-9e1be45e48abff56989cebe2372380d33108a2d1.tar.gz
talos-hostboot-9e1be45e48abff56989cebe2372380d33108a2d1.zip
Add unmasking of FIR for memdiags
Change-Id: Idd0f157402b395c44a9f74069000dbfa1c1926eb Original-Change-Id: Icc64171ffc9d2ee9aec113b290c2952a5dac0c22 RTC: 155733 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25493 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Marc Gollub <gollub@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26653 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C82
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H48
2 files changed, 130 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C
new file mode 100644
index 000000000..f95722da4
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C
@@ -0,0 +1,82 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+///
+/// @file memdiags_fir.C
+/// @brief Subroutines for memdiags/prd FIR
+///
+// *HWP HWP Owner: Brian Silver <bsilver@us.ibm.com>
+// *HWP HWP Backup: Marc Gollub <gollub@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 2
+// *HWP Consumed by: FSP:HB
+
+#include <fapi2.H>
+#include <p9_mc_scom_addresses.H>
+#include <p9_mc_scom_addresses_fld.H>
+
+#include <lib/utils/scom.H>
+#include <lib/fir/memdiags_fir.H>
+
+using fapi2::TARGET_TYPE_MCBIST;
+
+namespace mss
+{
+
+///
+/// @brief Unmask and setup actions for memdiags related FIR
+/// @param[in] i_target the fapi2::Target
+/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok
+///
+template<>
+fapi2::ReturnCode unmask_memdiags_errors( const fapi2::Target<TARGET_TYPE_MCBIST>& i_target )
+{
+ FAPI_INF("unmask_memdiags_errors");
+
+ // Fill our buffer with F's as we're going to clear the bits we want to
+ // unmask and then drop the result in to the _AND register.
+ fapi2::buffer<uint64_t> l_mcbistfir_mask(~0);
+ fapi2::buffer<uint64_t> l_mcbistfir_action0;
+ fapi2::buffer<uint64_t> l_mcbistfir_action1;
+
+ FAPI_TRY( mss::getScom(i_target, MCBIST_MCBISTFIRACT0, l_mcbistfir_action0) );
+ FAPI_TRY( mss::getScom(i_target, MCBIST_MCBISTFIRACT1, l_mcbistfir_action1) );
+
+ // There's not much to do here right now as Marc needs to work out the new FIR
+ // and whatnot for Nimbus. Lets make sure we setup everything as PRD needs it
+ // for sim, and we'll circle back to add the other FIR as the design completes.
+
+ // Don't unmask the main address skipped FIR. First, we rely on the skipping so
+ // we probably don't want any one to see it and second it's broken per Shelton 5/16.
+
+ // Unmask the program complete bit and setup the actions for an attention
+ l_mcbistfir_action0.setBit<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>();
+ l_mcbistfir_action1.clearBit<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>();
+ l_mcbistfir_mask.clearBit<MCBIST_MCBISTFIRQ_MCBIST_PROGRAM_COMPLETE>();
+
+ // Hit the and register of the fir mask
+ FAPI_TRY( mss::putScom(i_target, MCBIST_MCBISTFIRACT0, l_mcbistfir_action0) );
+ FAPI_TRY( mss::putScom(i_target, MCBIST_MCBISTFIRACT1, l_mcbistfir_action1) );
+ FAPI_TRY( mss::putScom(i_target, MCBIST_MCBISTFIRMASK_AND, l_mcbistfir_mask) );
+
+fapi_try_exit:
+ return fapi2::current_err;
+}
+
+}
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H
new file mode 100644
index 000000000..1ebf18d4e
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H
@@ -0,0 +1,48 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2016 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+///
+/// @file memdiags_fir.H
+/// @brief Subroutines for memdiags/prd FIR
+///
+// *HWP HWP Owner: Brian Silver <bsilver@us.ibm.com>
+// *HWP HWP Backup: Marc Gollub <gollub@us.ibm.com>
+// *HWP Team: Memory
+// *HWP Level: 2
+// *HWP Consumed by: FSP:HB
+
+#ifndef _MSS_MEMDIAGS_FIR_H_
+#define _MSS_MEMDIAGS_FIR_H_
+
+#include <fapi2.H>
+
+namespace mss
+{
+
+///
+/// @brief Unmask and setup actions for memdiags related FIR
+/// @tparam T the fapi2::TargetType which hold the FIR bits
+/// @param[in] i_target the fapi2::Target
+/// @return fapi2::ReturnCode FAPI2_RC_SUCCESS iff ok
+///
+template< fapi2::TargetType T >
+fapi2::ReturnCode unmask_memdiags_errors( const fapi2::Target<T>& i_target );
+
+}
+#endif
OpenPOWER on IntegriCloud