diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2018-06-05 21:54:45 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-06-08 22:46:09 -0400 |
commit | 47c75711f2be29ef9efe5d244f6ccdd8641d9f8a (patch) | |
tree | 4d7944cab2f5338a46fc4e908951e5e97a25554f /src/usr/diag | |
parent | f54c91bffdc2d9c41fb22e0f7a97f6db8e1d636e (diff) | |
download | talos-hostboot-47c75711f2be29ef9efe5d244f6ccdd8641d9f8a.tar.gz talos-hostboot-47c75711f2be29ef9efe5d244f6ccdd8641d9f8a.zip |
PRD: fixed erroneous trace in PlatConfigurator::build()
Change-Id: Iaba496fb85fe9b2df7a3a4c826ca3690b5145b03
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60000
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@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/60144
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rwxr-xr-x | src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C | 135 |
1 files changed, 54 insertions, 81 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C index 7fe20f430..c55481a72 100755 --- a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C @@ -83,23 +83,42 @@ errlHndl_t PlatConfigurator::build() // Create domains. ProcDomain * procDomain = new ProcDomain( PROC_DOMAIN ); - EqDomain * eqDomain = new EqDomain( EQ_DOMAIN ); - ExDomain * exDomain = new ExDomain( EX_DOMAIN ); - EcDomain * ecDomain = new EcDomain( EC_DOMAIN ); - CappDomain * cappDomain = new CappDomain( CAPP_DOMAIN ); - PecDomain * pecDomain = new PecDomain( PEC_DOMAIN ); - PhbDomain * phbDomain = new PhbDomain( PHB_DOMAIN ); - XbusDomain * xbusDomain = new XbusDomain( XBUS_DOMAIN ); - ObusDomain * obusDomain = new ObusDomain( OBUS_DOMAIN ); - McbistDomain * mcbistDomain = new McbistDomain( MCBIST_DOMAIN ); - McsDomain * mcsDomain = new McsDomain( MCS_DOMAIN ); - McaDomain * mcaDomain = new McaDomain( MCA_DOMAIN ); - McDomain * mcDomain = new McDomain( MC_DOMAIN ); - MiDomain * miDomain = new MiDomain( MI_DOMAIN ); - DmiDomain * dmiDomain = new DmiDomain( DMI_DOMAIN ); - - MembufDomain * membufDomain = new MembufDomain( MEMBUF_DOMAIN ); - MbaDomain * mbaDomain = new MbaDomain( MBA_DOMAIN ); + MembufDomain * membufDomain = nullptr; + + std::map<TARGETING::TYPE, RuleChipDomain *> unitMap; + unitMap[TYPE_EQ ] = new EqDomain( EQ_DOMAIN ); + unitMap[TYPE_EX ] = new ExDomain( EX_DOMAIN ); + unitMap[TYPE_CORE] = new EcDomain( EC_DOMAIN ); + unitMap[TYPE_CAPP] = new CappDomain( CAPP_DOMAIN ); + unitMap[TYPE_PEC ] = new PecDomain( PEC_DOMAIN ); + unitMap[TYPE_PHB ] = new PhbDomain( PHB_DOMAIN ); + unitMap[TYPE_XBUS] = new XbusDomain( XBUS_DOMAIN ); + unitMap[TYPE_OBUS] = new ObusDomain( OBUS_DOMAIN ); + + switch ( getChipModel(getMasterProc()) ) + { + case MODEL_NIMBUS: + unitMap[TYPE_MCBIST] = new McbistDomain( MCBIST_DOMAIN ); + unitMap[TYPE_MCS ] = new McsDomain( MCS_DOMAIN ); + unitMap[TYPE_MCA ] = new McaDomain( MCA_DOMAIN ); + + break; + + case MODEL_CUMULUS: + unitMap[TYPE_MC ] = new McDomain( MC_DOMAIN ); + unitMap[TYPE_MI ] = new MiDomain( MI_DOMAIN ); + unitMap[TYPE_DMI] = new DmiDomain( DMI_DOMAIN ); + + membufDomain = new MembufDomain( MEMBUF_DOMAIN ); + unitMap[TYPE_MBA] = new MbaDomain( MBA_DOMAIN ); + + break; + + default: + PRDF_ERR( "[PlatConfigurator::build] Unsupported master proc " + "type %d", getChipModel(getMasterProc()) ); + PRDF_ASSERT(false); + }; PllDomainMapList pllDmnMapLst; @@ -111,56 +130,21 @@ errlHndl_t PlatConfigurator::build() // NOTE: We should ensure that if build fails midway, deleting System // should be enough to clean up the partial model. - errl = addDomainChips( TYPE_PROC, procDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_EQ, eqDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_EX, exDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_CORE, ecDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_CAPP, cappDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_PEC, pecDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_PHB, phbDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_XBUS, xbusDomain, pllDmnMapLst ); - if ( NULL != errl ) break; + errl = addDomainChips( TYPE_PROC, procDomain, pllDmnMapLst ); + if ( nullptr != errl ) break; - errl = addDomainChips( TYPE_OBUS, obusDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MCBIST, mcbistDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MCS, mcsDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MCA, mcaDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MC, mcDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MI, miDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_DMI, dmiDomain, pllDmnMapLst ); - if ( NULL != errl ) break; - - errl = addDomainChips( TYPE_MEMBUF, membufDomain, pllDmnMapLst ); - if ( NULL != errl ) break; + if ( nullptr != membufDomain ) + { + errl = addDomainChips( TYPE_MEMBUF, membufDomain, pllDmnMapLst ); + if ( nullptr != errl ) break; + } - errl = addDomainChips( TYPE_MBA, mbaDomain, pllDmnMapLst ); - if ( NULL != errl ) break; + // Order does not matter because they are not added to the PLL domains. + for ( auto & d : unitMap ) + { + errl = addDomainChips( d.first, d.second, pllDmnMapLst ); + if ( nullptr != errl ) break; + } } while (0); @@ -177,7 +161,7 @@ errlHndl_t PlatConfigurator::build() addPllDomainsToSystem( pllDmnMapLst ); // Memory chip domains are always second. - sysDmnLst.push_back( membufDomain ); + if ( nullptr != membufDomain ) sysDmnLst.push_back( membufDomain ); // Processor chip domains are always third. sysDmnLst.push_back( procDomain ); @@ -186,21 +170,10 @@ errlHndl_t PlatConfigurator::build() // during System::Analyze() add all chiplet domains after the chip domains. // Note that order of the chiplet domains does not matter because analysis // originates from the chip domains above. - sysDmnLst.push_back( eqDomain ); - sysDmnLst.push_back( exDomain ); - sysDmnLst.push_back( ecDomain ); - sysDmnLst.push_back( cappDomain ); - sysDmnLst.push_back( pecDomain ); - sysDmnLst.push_back( phbDomain ); - sysDmnLst.push_back( xbusDomain ); - sysDmnLst.push_back( obusDomain ); - sysDmnLst.push_back( mcbistDomain ); - sysDmnLst.push_back( mcsDomain ); - sysDmnLst.push_back( mcaDomain ); - sysDmnLst.push_back( mcDomain ); - sysDmnLst.push_back( miDomain ); - sysDmnLst.push_back( dmiDomain ); - sysDmnLst.push_back( mbaDomain ); + for ( auto & d : unitMap ) + { + sysDmnLst.push_back( d.second ); + } // Add chips to the system. Configurator::chipList & chips = getChipList(); |