diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2017-02-07 16:37:44 +0100 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-02-28 22:22:42 -0500 |
commit | 29dc73e65524295f14b624fdb86c2f0de5875ad2 (patch) | |
tree | 3dd3472b66961808f8ec3be7714fee0408fbf4b1 /src/import/chips/p9/procedures | |
parent | 85dc29537b385cd6be8f184280f5d30041d67535 (diff) | |
download | talos-sbe-29dc73e65524295f14b624fdb86c2f0de5875ad2.tar.gz talos-sbe-29dc73e65524295f14b624fdb86c2f0de5875ad2.zip |
p9_fastarray: Fix scanning after dump, make dump repeatable
Change the cleanup code to let the ABIST run to completion and
deassert ABIST mode, so that the ABIST engines end up in a clean
state, enabling repeated dumps of the same core.
Also leaving ABIST mode asserted caused scan access to ec_abst
to fail -- this is fixed now too.
Plus add an option to the wrapper to force non-sparse scanning.
Change-Id: I3eac75878e589e13a506eb67031778964e6770ab
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36029
Reviewed-by: NAGENDRA K. GURRAM <nagendra.g@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36045
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_cleanup.C | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_cleanup.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_cleanup.C index 311ef67a..c0b18fcd 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_cleanup.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_cleanup.C @@ -38,7 +38,8 @@ //----------------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------------- -#include <p9_sbe_fastarray_cleanup.H> +#include "p9_sbe_fastarray_cleanup.H" +#include "p9_sbe_fastarray_abist_catchup.H" #include <p9_perv_scom_addresses.H> #include <p9_perv_scom_addresses_fld.H> @@ -50,11 +51,25 @@ fapi2::ReturnCode p9_sbe_fastarray_cleanup( const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_chiplet) { - /* Clean up clock controller */ - fapi2::buffer<uint64_t> buf = 0; - FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_CLK_REGION, buf), "Failed to clear clock regions"); - FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_OPCG_CAPT1, buf), "Failed to clear OPCG_CAPT1"); - FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_OPCG_CAPT2, buf), "Failed to clear OPCG_CAPT2"); + fapi2::buffer<uint64_t> l_buf; + + /* Let ABIST engines run to completion */ + do + { + FAPI_TRY(p9_sbe_fastarray_abist_catchup(i_target_chiplet, 0xFFF), "Failed to clock ABIST to completion"); + FAPI_TRY(fapi2::getScom(i_target_chiplet, PERV_CPLT_STAT0, l_buf), "Failed to read Chiplet Status 0 Register"); + } + while (!l_buf.getBit<PERV_1_CPLT_STAT0_SRAM_ABIST_DONE_DC>()); + + /* Disable ABIST and clock engines so they can cleanly reset */ + l_buf = 0; + FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_BIST, l_buf), "Failed to clear BIST reg"); + FAPI_TRY(p9_sbe_fastarray_abist_catchup(i_target_chiplet, 0xFF), "Failed to clock ABIST engine reset"); + + /* Clean up the clock controller */ + FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_CLK_REGION, l_buf), "Failed to clear clock regions"); + FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_OPCG_CAPT1, l_buf), "Failed to clear OPCG_CAPT1"); + FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_OPCG_CAPT2, l_buf), "Failed to clear OPCG_CAPT2"); return fapi2::FAPI2_RC_SUCCESS; |