diff options
author | Brian Silver <bsilver@us.ibm.com> | 2016-07-06 06:38:20 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-07-18 17:15:07 -0400 |
commit | a47fed9255527ce2173bbcd6b77f63d9e19fa659 (patch) | |
tree | c1aa5e59cbddf574fcc538b3b7aa6dfd9bb04298 /src/import/chips/p9/procedures/hwp/memory | |
parent | e9f94015f3221a8829c598c8227aa92ca963f368 (diff) | |
download | talos-hostboot-a47fed9255527ce2173bbcd6b77f63d9e19fa659.tar.gz talos-hostboot-a47fed9255527ce2173bbcd6b77f63d9e19fa659.zip |
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 <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26668
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/memory')
3 files changed, 24 insertions, 7 deletions
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 <mss.H> #include <p9_mss_draminit_mc.H> +#include <lib/fir/memdiags_fir.H> 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 <lib/mcbist/memdiags.H> #include <lib/mcbist/mcbist.H> -#include <lib/fir/memdiags_fir.H> - 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 <lib/mcbist/address.H> #include <lib/mcbist/settings.H> #include <lib/eff_config/memory_size.H> +#include <lib/fir/memdiags_fir.H> #include <lib/utils/poll.H> #include <lib/utils/count_dimm.H> @@ -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<uint64_t> l_mcbistfir_mask; + fapi2::buffer<uint64_t> l_mcbistfir_action0; + fapi2::buffer<uint64_t> 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; }); } |