From 7fb93de695db73807f4fd70a689f62b381ce7515 Mon Sep 17 00:00:00 2001 From: Zane Shelley Date: Thu, 5 Feb 2015 11:17:04 -0600 Subject: PRD: Continuous Background Scrubbing when HBRT PRD is disabled Change-Id: I9123a8c22d1ca9b8f8640e11d1eb1cd7f34f1195 RTC: 123117 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15568 Tested-by: Jenkins Server Reviewed-by: Christopher T. Phan Reviewed-by: Prem Shanker Jha Reviewed-by: Sachin Gupta Reviewed-by: Bilicon Patil Reviewed-by: A. Patrick Williams III Reviewed-by: Zane Shelley Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15737 --- .../diag/prdf/plat/pegasus/prdfCenMbaTdCtlr_ipl.C | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr_ipl.C b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr_ipl.C index 8cca955fa..78ba858e8 100644 --- a/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr_ipl.C +++ b/src/usr/diag/prdf/plat/pegasus/prdfCenMbaTdCtlr_ipl.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -271,10 +271,31 @@ int32_t CenMbaTdCtlr::startInitialBgScrub() ? mss_MaintCmd::FAST_MED_BW_IMPACT : mss_MaintCmd::FAST_MIN_BW_IMPACT; + uint32_t stopCond = COND_FAST_SCRUB; + + // TODO: RTC 123338: There are some OpenPOWER companies that do not want + // to run with HBRT PRD enabled. Currently the only option right + // now is to use the compile flag. Eventually, we may want to add + // this as MRW/BIOS option. + #ifndef CONFIG_HBRT_PRD + + // HBRT PRD is not enabled. Check if this system has an FSP. + if ( !isSpConfigFsp() ) + { + // No runtime PRD will be present. Do not start the initial fast + // scrub. Instead, simply start continuous background scrubbing with + // no stop-on-error conditions. + cmdSpeed = enableFastBgScrub() ? mss_MaintCmd::FAST_MED_BW_IMPACT + : mss_MaintCmd::BG_SCRUB; + stopCond = 0; + } + + #endif // ifdef CONFIG_HBRT_PRD + // Start the initial fast scrub. iv_mssCmd = createMssCmd( mss_MaintCmdWrapper::TIMEBASE_SCRUB, iv_mbaTrgt, startAddr.getRank(), - COND_FAST_SCRUB, cmdSpeed, + stopCond, cmdSpeed, mss_MaintCmdWrapper::END_OF_MEMORY ); if ( NULL == iv_mssCmd ) { -- cgit v1.2.3