diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2018-01-03 14:10:09 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-01-16 14:23:27 -0500 |
commit | 4ba260490a2f04dfed66d9de7d6a5e5e233d1ac5 (patch) | |
tree | 08dd020e9fa1cbbc7510b243375c0fa0f19c855e /src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C | |
parent | 1b258924a049ac384325cfc6826a3d3f3220f6c8 (diff) | |
download | talos-hostboot-4ba260490a2f04dfed66d9de7d6a5e5e233d1ac5.tar.gz talos-hostboot-4ba260490a2f04dfed66d9de7d6a5e5e233d1ac5.zip |
PRD: Make sure iv_stoppedRank is set in handleCmdComplete
Change-Id: I91f7d565ebece5428c4323f9acb43b43fa889b77
CQ: SW408978
Backport: release-op910
Backport: release-fips910
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51420
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51864
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C')
-rw-r--r-- | src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C | 94 |
1 files changed, 62 insertions, 32 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C index db3501a3a..c78e71571 100644 --- a/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C +++ b/src/usr/diag/prdf/plat/mem/prdfMemTdCtlr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -46,6 +46,37 @@ using namespace PlatServices; //------------------------------------------------------------------------------ +template<TARGETING::TYPE T> +TdRankListEntry __getStopRank( ExtensibleChip * i_chip, const MemAddr & i_addr ) +{ + MemRank stopRank = i_addr.getRank(); + + // ############################ SIMICs only ############################ + // We have found it to be increasingly difficult to simulate the MCBMCAT + // register in SIMICs. We tried copying the address in the MCBEA + // registers, but the HWP code will input the last possible address to + // the MCBEA registers, but it is likely that this address is not a + // configured address. MCBIST commands are tolerant of this, where MBA + // maintenance commands are not. Also, there are multiple possible + // subtests for MCBIST commands. So it is difficult to determine which + // subtest will be the last configured address. To maintain sanity, we + // will simply short-circuit the code and ensure we always get the last + // configured rank. + if ( ::Util::isSimicsRunning() ) + { + std::vector<MemRank> list; + getSlaveRanks<T>( i_chip->getTrgt(), list ); + PRDF_ASSERT( !list.empty() ); // func target with no config ranks + + stopRank = list.back(); // Get the last configured rank. + } + // ##################################################################### + + return TdRankListEntry( i_chip, stopRank ); +} + +//------------------------------------------------------------------------------ + template <TARGETING::TYPE T> uint32_t MemTdCtlr<T>::handleCmdComplete( STEP_CODE_DATA_STRUCT & io_sc ) { @@ -111,6 +142,36 @@ uint32_t MemTdCtlr<T>::handleCmdComplete( STEP_CODE_DATA_STRUCT & io_sc ) // informational error logs. if ( !errorsFound ) io_sc.service_data->setDontCommitErrl(); } + else + { + // Make sure iv_stoppedRank still gets updated. + std::vector<ExtensibleChip *> portList; + o_rc = getMcbistMaintPort( iv_chip, portList ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "getMcbistMaintPort(0x%08x) failed", + iv_chip->getHuid() ); + break; + } + + // In broadcast mode, the rank configuration for all ports will be + // the same. In non-broadcast mode, there will only be one MCA in + // the list. Therefore, we can simply use the first MCA in the list + // for all configs. + ExtensibleChip * stopChip = portList.front(); + + // Get the address in which the command stopped. + MemAddr addr; + o_rc = getMemMaintAddr<T>( iv_chip, addr ); + if ( SUCCESS != o_rc ) + { + PRDF_ERR( PRDF_FUNC "getMemMaintAddr<T>(0x%08x) failed", + iv_chip->getHuid() ); + break; + } + + iv_stoppedRank = __getStopRank<TYPE_MCA>( stopChip, addr ); + } // Move onto the next step in the state machine. o_rc = nextStep( io_sc ); @@ -185,37 +246,6 @@ uint32_t __checkEcc( ExtensibleChip * i_chip, TdQueue & io_queue, //------------------------------------------------------------------------------ template<TARGETING::TYPE T> -TdRankListEntry __getStopRank( ExtensibleChip * i_chip, const MemAddr & i_addr ) -{ - MemRank stopRank = i_addr.getRank(); - - // ############################ SIMICs only ############################ - // We have found it to be increasingly difficult to simulate the MCBMCAT - // register in SIMICs. We tried copying the address in the MCBEA - // registers, but the HWP code will input the last possible address to - // the MCBEA registers, but it is likely that this address is not a - // configured address. MCBIST commands are tolerant of this, where MBA - // maintenance commands are not. Also, there are multiple possible - // subtests for MCBIST commands. So it is difficult to determine which - // subtest will be the last configured address. To maintain sanity, we - // will simply short-circuit the code and ensure we always get the last - // configured rank. - if ( ::Util::isSimicsRunning() ) - { - std::vector<MemRank> list; - getSlaveRanks<T>( i_chip->getTrgt(), list ); - PRDF_ASSERT( !list.empty() ); // func target with no config ranks - - stopRank = list.back(); // Get the last configured rank. - } - // ##################################################################### - - return TdRankListEntry( i_chip, stopRank ); -} - -//------------------------------------------------------------------------------ - -template<TARGETING::TYPE T> uint32_t __analyzeCmdComplete( ExtensibleChip * i_chip, TdQueue & io_queue, TdRankListEntry & o_stoppedRank, |