From 9e1be45e48abff56989cebe2372380d33108a2d1 Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Wed, 8 Jun 2016 07:02:38 -0500 Subject: 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 Reviewed-by: STEPHEN GLANCY Reviewed-by: Louis Stermole Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26653 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa --- .../procedures/hwp/memory/lib/fir/memdiags_fir.C | 82 ++++++++++++++++++++++ .../procedures/hwp/memory/lib/fir/memdiags_fir.H | 48 +++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.C create mode 100644 src/import/chips/p9/procedures/hwp/memory/lib/fir/memdiags_fir.H (limited to 'src') 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 +// *HWP HWP Backup: Marc Gollub +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#include +#include +#include + +#include +#include + +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& 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 l_mcbistfir_mask(~0); + fapi2::buffer l_mcbistfir_action0; + fapi2::buffer 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(); + l_mcbistfir_action1.clearBit(); + l_mcbistfir_mask.clearBit(); + + // 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 +// *HWP HWP Backup: Marc Gollub +// *HWP Team: Memory +// *HWP Level: 2 +// *HWP Consumed by: FSP:HB + +#ifndef _MSS_MEMDIAGS_FIR_H_ +#define _MSS_MEMDIAGS_FIR_H_ + +#include + +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& i_target ); + +} +#endif -- cgit v1.2.3