From a47fed9255527ce2173bbcd6b77f63d9e19fa659 Mon Sep 17 00:00:00 2001 From: Brian Silver Date: Wed, 6 Jul 2016 06:38:20 -0500 Subject: Move unmaking of memdiags fir to the end of draminit_mc Change-Id: I39570fd64e9623dc6773a0b807fbdbbdd00a7ea1 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26667 Tested-by: Jenkins Server Reviewed-by: Zane C. Shelley Tested-by: Hostboot CI Reviewed-by: Caleb N. Palmer Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26668 Reviewed-by: Daniel M. Crowell --- .../p9/procedures/hwp/memory/p9_mss_draminit_mc.C | 6 ++++-- .../chips/p9/procedures/hwp/memory/p9_mss_memdiag.C | 5 ----- .../p9/procedures/hwp/memory/tests/mss_memdiags_ut.C | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 7 deletions(-) (limited to 'src/import') diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C index 27f645360..d9ea25caf 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_draminit_mc.C @@ -31,6 +31,7 @@ #include #include +#include using fapi2::TARGET_TYPE_MCBIST; using fapi2::TARGET_TYPE_MCA; @@ -105,10 +106,11 @@ extern "C" // Step Six: Setup Control Bit ECC FAPI_TRY( mss::enable_read_ecc(p) ); - - // At this point the DDR interface must be monitored for memory errors. Memory related FIRs should be unmasked. } + // At this point the DDR interface must be monitored for memory errors. Memory related FIRs should be unmasked. + FAPI_TRY( mss::unmask_memdiags_errors(i_target) ); + fapi_try_exit: FAPI_INF("End draminit MC"); return fapi2::current_err; diff --git a/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C b/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C index 83f4f4376..6c20dfa10 100644 --- a/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C +++ b/src/import/chips/p9/procedures/hwp/memory/p9_mss_memdiag.C @@ -36,8 +36,6 @@ #include #include -#include - using fapi2::TARGET_TYPE_MCBIST; extern "C" @@ -59,9 +57,6 @@ extern "C" return fapi2::FAPI2_RC_SUCCESS; } - // Unmask the memdiags FIR - FAPI_TRY( mss::unmask_memdiags_errors(i_target) ); - FAPI_TRY( memdiags::sf_init(i_target, mss::mcbist::PATTERN_0) ); // TODO RTC:153951 diff --git a/src/import/chips/p9/procedures/hwp/memory/tests/mss_memdiags_ut.C b/src/import/chips/p9/procedures/hwp/memory/tests/mss_memdiags_ut.C index 21e40a214..41fb88909 100644 --- a/src/import/chips/p9/procedures/hwp/memory/tests/mss_memdiags_ut.C +++ b/src/import/chips/p9/procedures/hwp/memory/tests/mss_memdiags_ut.C @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -803,7 +804,26 @@ TEST_CASE_METHOD(mss::test::mcbist_target_test_fixture, "memdiags", "[memdiags]" REQUIRE( l_poll_results == true ); } + // Reset and check that unmasking sets all the right bits + { + REQUIRE_FALSE( mss::putScom(i_target, MCBIST_MCBISTFIRACT0, 0) ); + REQUIRE_FALSE( mss::putScom(i_target, MCBIST_MCBISTFIRACT1, 0) ); + REQUIRE_FALSE( mss::putScom(i_target, MCBIST_MCBISTFIRMASK_AND, 0) ); + + REQUIRE_FALSE( mss::unmask_memdiags_errors(i_target) ); + + fapi2::buffer l_mcbistfir_mask; + fapi2::buffer l_mcbistfir_action0; + fapi2::buffer l_mcbistfir_action1; + REQUIRE_FALSE( mss::getScom(i_target, MCBIST_MCBISTFIRACT0, l_mcbistfir_action0) ); + REQUIRE_FALSE( mss::getScom(i_target, MCBIST_MCBISTFIRACT1, l_mcbistfir_action1) ); + REQUIRE_FALSE( mss::getScom(i_target, MCBIST_MCBISTFIRMASK_AND, l_mcbistfir_mask) ); + + REQUIRE( 0x0020000000000000 == l_mcbistfir_action0); + REQUIRE( 0x0000000000000000 == l_mcbistfir_action1); + REQUIRE( 0xffdfffffffffffff == l_mcbistfir_mask); + } return 0; }); } -- cgit v1.2.1