diff options
author | Sachin Gupta <sgupta2m@in.ibm.com> | 2014-01-30 11:35:57 +0530 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-14 10:01:53 -0600 |
commit | 1fcce0bf6632d583b831f430ca543b8afcd8a073 (patch) | |
tree | 3b23717d21d57183a0b5af69863fafbaf34db53e /src/usr/diag | |
parent | 674e7cdeb9b688089001b314f60d44e443518977 (diff) | |
download | talos-hostboot-1fcce0bf6632d583b831f430ca543b8afcd8a073.tar.gz talos-hostboot-1fcce0bf6632d583b831f430ca543b8afcd8a073.zip |
PRD: Abort prd when plugins are not present.
RTC: 95298
Change-Id: I26944238f6c0266c0a9445d0887b3c443d78b3cd
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8442
Tested-by: Jenkins Server
Reviewed-by: Christopher T. Phan <cphan@us.ibm.com>
Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8844
Diffstat (limited to 'src/usr/diag')
-rw-r--r-- | src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C index d3b8f6da9..c93cdccb6 100644 --- a/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C +++ b/src/usr/diag/prdf/common/framework/rule/prdfRuleMetaData.C @@ -1018,14 +1018,12 @@ ExtensibleChipFunction *RuleMetaData::getExtensibleFunction( const char * i_func, bool i_expectNull ) { + #define PRDF_FUNC "[RuleMetaData::getExtensibleFunction] " ExtensibleFunctionType * plugin = getPluginGlobalMap().getPlugins(cv_fileName)[i_func]; if (NULL == plugin) { - static Plugin<ExtensibleChip> l_nullPlugin(NULL); - plugin = &l_nullPlugin; - if (!i_expectNull) { errlHndl_t l_errl = NULL; @@ -1054,11 +1052,27 @@ ExtensibleChipFunction *RuleMetaData::getExtensibleFunction( ErrlString ); PRDF_COMMIT_ERRL( l_errl, ERRL_ACTION_REPORT ); + + // We can only reach here in two cases + // 1. PRD patch is not properly applied ( prf files are changed + // but PRDF library is not updated ) + // 2. Obvious miss by developer. + // In both these cases, we should catch these issues at very early + // stage during system Initialize and this scenario should fail + // basic validation. + // So aborting system at this point. + PRDF_ERR( PRDF_FUNC"NULL Function for plugin:%s chip %s", + i_func, cv_fileName ); + + PRDF_ASSERT( NULL != plugin ); } + static Plugin<ExtensibleChip> l_nullPlugin(NULL); + plugin = &l_nullPlugin; + } return ( ExtensibleChipFunction * ) plugin; - + #undef PRDF_FUNC } //------------------------------------------------------------------------------ |