diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2017-03-29 15:44:23 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-04-03 11:16:35 -0400 |
commit | 3eac7d61c5a1f78006c1c4b0e9621d91e2dbf47f (patch) | |
tree | 973463f7ceddb1cb0e439ffcd8ae17dcbe1cab9e /src | |
parent | 2e29951b63ef577a9e087ad31a075fa7e42de9c8 (diff) | |
download | blackbird-hostboot-3eac7d61c5a1f78006c1c4b0e9621d91e2dbf47f.tar.gz blackbird-hostboot-3eac7d61c5a1f78006c1c4b0e9621d91e2dbf47f.zip |
PRD: add support to resume background scrubbing after pause on error
Change-Id: I3059a243c343c3508a4fb89bea5aa70cb27afd5c
RTC: 164704
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38595
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38700
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/diag/prdf/plat/prdfPlatServices_rt.C | 64 | ||||
-rw-r--r-- | src/usr/diag/prdf/plat/prdfPlatServices_rt.H | 21 |
2 files changed, 84 insertions, 1 deletions
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C index 5a99e7ed5..241344e0a 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.C +++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.C @@ -155,6 +155,47 @@ uint32_t stopBgScrub<TYPE_MCA>( ExtensibleChip * i_chip ) return stopBgScrub<TYPE_MCBIST>( getConnectedParent(i_chip, TYPE_MCBIST) ); } +//------------------------------------------------------------------------------ + +template<> +uint32_t resumeBgScrub<TYPE_MCBIST>( ExtensibleChip * i_chip ) +{ + #define PRDF_FUNC "[PlatServices::resumeBgScrub<TYPE_MCBIST>] " + + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MCBIST == i_chip->getType() ); + + uint32_t rc = SUCCESS; + + fapi2::Target<fapi2::TARGET_TYPE_MCBIST> fapiTrgt ( i_chip->getTrgt() ); + + errlHndl_t errl; + FAPI_INVOKE_HWP( errl, memdiags::continue_cmd, fapiTrgt ); + + if ( nullptr != errl ) + { + PRDF_ERR( PRDF_FUNC "memdiags::continue_cmd(0x%08x) failed", + i_chip->getHuid() ); + PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); + rc = FAIL; + } + + return rc; + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + +template<> +uint32_t resumeBgScrub<TYPE_MCA>( ExtensibleChip * i_chip ) +{ + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MCA == i_chip->getType() ); + + return resumeBgScrub<TYPE_MCBIST>(getConnectedParent(i_chip, TYPE_MCBIST)); +} + //############################################################################## //## Centaur Maintenance Command wrappers //############################################################################## @@ -196,6 +237,29 @@ uint32_t stopBgScrub<TYPE_MBA>( ExtensibleChip * i_chip ) //------------------------------------------------------------------------------ +template<> +uint32_t resumeBgScrub<TYPE_MBA>( ExtensibleChip * i_chip ) +{ + #define PRDF_FUNC "[PlatServices::resumeBgScrub<TYPE_MBA>] " + + PRDF_ASSERT( nullptr != i_chip ); + PRDF_ASSERT( TYPE_MBA == i_chip->getType() ); + + uint32_t rc = SUCCESS; + + PRDF_ERR( PRDF_FUNC "function not implemented yet" ); + + /* TODO: RTC 157888 - Not entirely sure how to do this. Will require a inc + * command followed by a start command. May need the stop conditions + * for the start command. */ + + return rc; + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + } // end namespace PlatServices } // end namespace PRDF diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_rt.H b/src/usr/diag/prdf/plat/prdfPlatServices_rt.H index b591b06ee..66da25424 100644 --- a/src/usr/diag/prdf/plat/prdfPlatServices_rt.H +++ b/src/usr/diag/prdf/plat/prdfPlatServices_rt.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -70,6 +70,25 @@ void sendDynMemDeallocRequest( uint64_t i_startAddr, uint64_t i_endAddr ); template<TARGETING::TYPE T> uint32_t stopBgScrub( ExtensibleChip * i_chip ); +/** + * @brief Resumes background scrubbing after it has paused on error. + * + * There are use cases where we want background scrubbing to pause on error in + * order to collect FFDC (specifically address information), in which case we + * will not start a Targeted Diagnostics procedure. Instead, this command will + * resume the background scrubbing procedure already set up in hardware, + * starting on the next configured address. + * + * @note This function should only be called after pausing background scrubbing + * due to an error. It should not be called after executing a Targeted + * Diagnotics procedure. + * + * @param i_chip MCBIST, MCA, or MBA chip. + * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. + */ +template<TARGETING::TYPE T> +uint32_t resumeBgScrub( ExtensibleChip * i_chip ); + } // end namespace PlatServices } // end namespace PRDF |