diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2016-04-08 10:33:15 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-05-02 12:00:12 -0400 |
commit | 7057ace0dd090782177982d9dcda3532286e33ab (patch) | |
tree | dc02b69d733a12eb37802661d2a758fce307b01f /src | |
parent | bd81810ed1cb2a9559fd14ae8babb63415b596e7 (diff) | |
download | blackbird-hostboot-7057ace0dd090782177982d9dcda3532286e33ab.tar.gz blackbird-hostboot-7057ace0dd090782177982d9dcda3532286e33ab.zip |
PRD: added support for new HOST_ATTN attention type
Change-Id: I9c351931dab0bc1759ef9b609a997ad8a8194c3a
RTC: 151229
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23049
Tested-by: Jenkins Server
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Squashed: Iae8d7fe98a5b5b6d4577a82806be71aaff931c6f
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23807
Tested-by: FSP CI Jenkins
Diffstat (limited to 'src')
17 files changed, 156 insertions, 69 deletions
diff --git a/src/include/usr/diag/prdf/common/prdfAttnTypes.H b/src/include/usr/diag/prdf/common/prdfAttnTypes.H new file mode 100644 index 000000000..dd8e22afc --- /dev/null +++ b/src/include/usr/diag/prdf/common/prdfAttnTypes.H @@ -0,0 +1,55 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/diag/prdf/common/prdfAttnTypes.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ + +#ifndef __prdfAttnTypes_H +#define __prdfAttnTypes_H + +/** @file prdfAttnTypes.H */ + +namespace PRDF +{ + +/** + * @brief Enum specifying supported attention types. + * @note Order is important. The highest priority attention types should have a + * lower value. + */ +enum ATTENTION_VALUE_TYPE +{ + INVALID_ATTENTION_TYPE = 0, + MACHINE_CHECK = 1, + CHECK_STOP = MACHINE_CHECK, + UNIT_CS = 2, + PROC_CS = UNIT_CS, + RECOVERABLE = 3, + SPECIAL = 4, + HOST_ATTN = 5, + END_ATTENTION_TYPE = 6 +}; + +} // end namespace PRDF + +#endif // __prdfAttnTypes_H + diff --git a/src/include/usr/diag/prdf/common/prdfMain_common.H b/src/include/usr/diag/prdf/common/prdfMain_common.H index 772762488..5af8757c6 100755 --- a/src/include/usr/diag/prdf/common/prdfMain_common.H +++ b/src/include/usr/diag/prdf/common/prdfMain_common.H @@ -40,26 +40,6 @@ namespace PRDF { -// Move here from iipsdbug.h -/** - * @brief Enum specifying attention type - */ -// If changes are made to ATTENTION_VALUE_TYPE then subsequent changes need to be made to: -// /prdf/sim/prdsimAttentionParser.C and /prdf/sim/errl2tcd.C -enum ATTENTION_VALUE_TYPE -{ - INVALID_ATTENTION_TYPE = 0, - MACHINE_CHECK = 1, - CHECK_STOP = MACHINE_CHECK, - UNIT_CS = 2, - PROC_CS = UNIT_CS, - RECOVERABLE = 3, - SPECIAL = 4, - HOST_ATTN = 5, - END_ATTENTION_TYPE = 6 -}; - - // Move here from xspprdsdbug.C /** * @brief Structure of target handle and its attention type diff --git a/src/include/usr/diag/prdf/prdfMain.H b/src/include/usr/diag/prdf/prdfMain.H index 3458a3278..ed543afe6 100644 --- a/src/include/usr/diag/prdf/prdfMain.H +++ b/src/include/usr/diag/prdf/prdfMain.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -36,6 +36,8 @@ #include <errl/errlmanager.H> // for errlHndl_t +#include <diag/prdf/common/prdfAttnTypes.H> + // This must be included after all Hostboot specific includes. This will take // care of cases where a file must be included in the common code, but the // include paths are different between FSP and Hostboot. diff --git a/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C b/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C index 9c3fa4524..5032dd524 100755 --- a/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C +++ b/src/usr/diag/prdf/common/framework/config/prdfRuleChipDomain.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -67,6 +67,7 @@ bool RuleChipDomain::Query( ATTENTION_TYPE i_attnType ) funcName = "IgnoreRecoveredAttn"; break; case SPECIAL: + case HOST_ATTN: funcName = "IgnoreSpecialAttn"; break; default: @@ -118,6 +119,7 @@ void RuleChipDomain::Order( ATTENTION_TYPE i_attnType ) funcName = "IgnoreRecoveredAttn"; break; case SPECIAL: + case HOST_ATTN: funcName = "IgnoreSpecialAttn"; break; default: diff --git a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H index c03136379..01780e37e 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H +++ b/src/usr/diag/prdf/common/framework/register/prdfOperatorRegister.H @@ -507,7 +507,8 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS public: AttnTypeRegister() : SCAN_COMM_REGISTER_CLASS( ), iv_check(&cv_null), iv_recov(&cv_null), - iv_special(&cv_null), iv_proccs(&cv_null), iv_iBS(0) + iv_special(&cv_null), iv_proccs(&cv_null), iv_hostattn(&cv_null), + iv_iBS(0) { iv_bs = &iv_iBS; } @@ -515,12 +516,14 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS AttnTypeRegister( SCAN_COMM_REGISTER_CLASS & i_check, SCAN_COMM_REGISTER_CLASS & i_recov, SCAN_COMM_REGISTER_CLASS & i_special, - SCAN_COMM_REGISTER_CLASS & i_proccs ) : + SCAN_COMM_REGISTER_CLASS & i_proccs, + SCAN_COMM_REGISTER_CLASS & i_hostattn ) : SCAN_COMM_REGISTER_CLASS( ), - iv_check( NULL == &i_check ? &cv_null : &i_check), - iv_recov( NULL == &i_recov ? &cv_null : &i_recov), - iv_special(NULL == &i_special ? &cv_null : &i_special), - iv_proccs( NULL == &i_proccs ? &cv_null : &i_proccs), + iv_check( NULL == &i_check ? &cv_null : &i_check), + iv_recov( NULL == &i_recov ? &cv_null : &i_recov), + iv_special( NULL == &i_special ? &cv_null : &i_special), + iv_proccs( NULL == &i_proccs ? &cv_null : &i_proccs), + iv_hostattn( NULL == &i_hostattn ? &cv_null : &i_hostattn), iv_iBS(0) // will fully initialize this inside ctor. { uint32_t l_length = 1024; @@ -528,6 +531,7 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS l_length = std::min(l_length, iv_recov->GetBitLength()); l_length = std::min(l_length, iv_special->GetBitLength()); l_length = std::min(l_length, iv_proccs->GetBitLength()); + l_length = std::min(l_length, iv_hostattn->GetBitLength()); iv_iBS = BitStringBuffer(l_length); iv_bs = &iv_iBS; } @@ -535,10 +539,11 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS AttnTypeRegister & operator=(const AttnTypeRegister & r) { //iv_null = r.iv_null; <-- don't do this! - iv_check = (r.iv_check == &r.cv_null ? &cv_null : r.iv_check); - iv_recov = (r.iv_recov == &r.cv_null ? &cv_null : r.iv_recov); - iv_special = (r.iv_special == &r.cv_null ? &cv_null : r.iv_special); - iv_proccs = (r.iv_proccs == &r.cv_null ? &cv_null : r.iv_proccs); + iv_check = (r.iv_check == &r.cv_null ? &cv_null : r.iv_check); + iv_recov = (r.iv_recov == &r.cv_null ? &cv_null : r.iv_recov); + iv_special = (r.iv_special == &r.cv_null ? &cv_null : r.iv_special); + iv_proccs = (r.iv_proccs == &r.cv_null ? &cv_null : r.iv_proccs); + iv_hostattn = (r.iv_hostattn == &r.cv_null ? &cv_null : r.iv_hostattn); iv_iBS = r.iv_iBS; //iv_bs = r.iv_bs; <-- don't do this! return *this; @@ -547,13 +552,15 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS virtual uint32_t Read() const { return iv_check->Read() | iv_recov->Read() | - iv_special->Read() | iv_proccs->Read(); + iv_special->Read() | iv_proccs->Read() | + iv_hostattn->Read(); } virtual uint32_t Write() { return iv_check->Write() | iv_recov->Write() | - iv_special->Write() | iv_proccs->Write(); + iv_special->Write() | iv_proccs->Write() | + iv_hostattn->Write(); } const BIT_STRING_CLASS * GetBitString( @@ -580,6 +587,11 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS (*iv_bs) = BIT_STRING_BUFFER_CLASS( *iv_proccs->GetBitString(i_type)); break; + + case HOST_ATTN: + (*iv_bs) = BIT_STRING_BUFFER_CLASS( + *iv_hostattn->GetBitString(i_type)); + break; } return iv_bs; @@ -592,6 +604,7 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS l_rc = Prdr::SignatureOp::combineSig(l_rc, iv_recov->GetId()); l_rc = Prdr::SignatureOp::combineSig(l_rc, iv_special->GetId()); l_rc = Prdr::SignatureOp::combineSig(l_rc, iv_proccs->GetId()); + l_rc = Prdr::SignatureOp::combineSig(l_rc, iv_hostattn->GetId()); return l_rc; } @@ -600,7 +613,8 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS bool operator==(const AttnTypeRegister & r) const { return (r.iv_check == iv_check) && (r.iv_recov == iv_recov) && - (r.iv_special == iv_special) && (r.iv_proccs == iv_proccs); + (r.iv_special == iv_special) && (r.iv_proccs == iv_proccs) && + (r.iv_special == iv_hostattn); } protected: @@ -614,6 +628,7 @@ class AttnTypeRegister : public SCAN_COMM_REGISTER_CLASS SCAN_COMM_REGISTER_CLASS * iv_recov; SCAN_COMM_REGISTER_CLASS * iv_special; SCAN_COMM_REGISTER_CLASS * iv_proccs; + SCAN_COMM_REGISTER_CLASS * iv_hostattn; BitStringBuffer * iv_bs; BitStringBuffer iv_iBS; diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C index 8e5252b94..7737433b0 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.C @@ -154,12 +154,13 @@ SCAN_COMM_REGISTER_CLASS & ScanFacility::GetOrRegister( //----------------------------------------------------------------------------- SCAN_COMM_REGISTER_CLASS & ScanFacility::GetAttnTypeRegister( - SCAN_COMM_REGISTER_CLASS * i_check, - SCAN_COMM_REGISTER_CLASS * i_recov, - SCAN_COMM_REGISTER_CLASS * i_special, - SCAN_COMM_REGISTER_CLASS * i_proccs ) + SCAN_COMM_REGISTER_CLASS * i_check, + SCAN_COMM_REGISTER_CLASS * i_recov, + SCAN_COMM_REGISTER_CLASS * i_special, + SCAN_COMM_REGISTER_CLASS * i_proccs, + SCAN_COMM_REGISTER_CLASS * i_hostattn ) { - AttnTypeRegister r(*i_check, *i_recov, *i_special, *i_proccs); + AttnTypeRegister r(*i_check, *i_recov, *i_special, *i_proccs, *i_hostattn); return iv_attnRegFw.get(r); } diff --git a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H index 917cefe3e..be52a8124 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H +++ b/src/usr/diag/prdf/common/framework/register/prdfScanFacility.H @@ -137,14 +137,15 @@ public: /** * @brief Get a AttnTypeRegister - * @params 4 pointers to scr Registers + * @params 5 pointers to scr Registers * @post only one instance of the register with these SCR's will exist */ SCAN_COMM_REGISTER_CLASS & GetAttnTypeRegister( SCAN_COMM_REGISTER_CLASS * i_check, SCAN_COMM_REGISTER_CLASS * i_recov, SCAN_COMM_REGISTER_CLASS * i_special, - SCAN_COMM_REGISTER_CLASS * i_proccs); + SCAN_COMM_REGISTER_CLASS * i_proccs, + SCAN_COMM_REGISTER_CLASS * i_hostattn ); /** * @brief Get a PrdfConstantRegister diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C index 8f0a27baa..5ca0f28e1 100644 --- a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C +++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C @@ -40,7 +40,7 @@ #include <utilmem.H> #include <prdfCalloutsData.H> // For MruType enum -#include <prdfMain_common.H> // For ATTENTION_VALUE_TYPE enum +#include <prdfAttnTypes.H> // For ATTENTION_VALUE_TYPE enum #include <srcisrc.H> @@ -480,6 +480,7 @@ const char * attnTypeToStr( uint32_t i_attnType ) case UNIT_CS: return "UNIT_CS"; case RECOVERABLE: return "RECOVERABLE"; case SPECIAL: return "SPECIAL"; + case HOST_ATTN: return "HOST_ATTN"; default: return ""; } } diff --git a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C index 2aed6d8e2..95d09a1da 100644 --- a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C +++ b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C @@ -379,7 +379,7 @@ errlHndl_t RuleMetaData::loadRuleFile( ScanFacility & i_scanFactory , this->createGroup( (Group *) l_groupMap[i+l_vregMax+1], i,l_localData ); } - for ( int i = 0; i < Prdr::NUM_GROUP_ATTN; i++ ) + for ( int i = 0; i < Prdr::MAX_NUM_ATTN_TYPES; i++ ) cv_groupAttn[i] = l_groupMap[l_chip->cv_groupAttn[i]]; } @@ -439,13 +439,13 @@ int32_t RuleMetaData::Analyze( STEP_CODE_DATA_STRUCT & i_serviceData, l_errReg = cv_groupAttn[2]; break; - // @jl02 JL Added this code to support the new Unit Check Stop. case UNIT_CS: - // @jl02 JL I don't know if this is the correct cv_groupAttn to add - // here or if it's needed. l_errReg = cv_groupAttn[3]; break; + case HOST_ATTN: + l_errReg = cv_groupAttn[4]; + break; } if (NULL != l_errReg) { //mp02 a Start @@ -604,7 +604,7 @@ SCAN_COMM_REGISTER_CLASS * RuleMetaData::createVirtualRegister( Prdr::Expr * i_vReg, RuleFileData & i_data ) { - SCAN_COMM_REGISTER_CLASS * l_arg[4] = { NULL }; + SCAN_COMM_REGISTER_CLASS * l_arg[5] = { NULL }; uint32_t l_tmp32 = 0; SCAN_COMM_REGISTER_CLASS * l_rc = NULL; @@ -699,11 +699,17 @@ SCAN_COMM_REGISTER_CLASS * RuleMetaData::createVirtualRegister( l_arg[3] = createVirtualRegister(i_vReg->cv_value[3].p, i_data); } + if ( NULL != i_vReg->cv_value[4].p ) + { + l_arg[4] = createVirtualRegister(i_vReg->cv_value[4].p, i_data); + } + // passing NULL objects in *l_arg[x] l_rc = &i_data.cv_scanFactory.GetAttnTypeRegister(l_arg[0], l_arg[1], l_arg[2], - l_arg[3]); + l_arg[3], + l_arg[4]); break; case Prdr::BIT_STR: diff --git a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.H b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.H index e8f8a03f3..74e3273dd 100644 --- a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.H +++ b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.H @@ -222,7 +222,7 @@ class RuleMetaData SCAN_COMM_REGISTER_CLASS * getNullRegister( const char * i_reg, bool i_expectNull ); - ErrorRegisterType * cv_groupAttn[Prdr::NUM_GROUP_ATTN]; + ErrorRegisterType * cv_groupAttn[Prdr::MAX_NUM_ATTN_TYPES]; private: // Data diff --git a/src/usr/diag/prdf/common/rule/prdrCommon.H b/src/usr/diag/prdf/common/rule/prdrCommon.H index a34ce7030..8e13adfe3 100755 --- a/src/usr/diag/prdf/common/rule/prdrCommon.H +++ b/src/usr/diag/prdf/common/rule/prdrCommon.H @@ -48,7 +48,7 @@ namespace Prdr enum NumberOfAttentions { - NUM_GROUP_ATTN = 4, + MAX_NUM_ATTN_TYPES = 5, }; /** diff --git a/src/usr/diag/prdf/common/rule/prdrCompile.C b/src/usr/diag/prdf/common/rule/prdrCompile.C index 67f417fbf..2f9156ea1 100644 --- a/src/usr/diag/prdf/common/rule/prdrCompile.C +++ b/src/usr/diag/prdf/common/rule/prdrCompile.C @@ -173,9 +173,10 @@ int main(int argc, char ** argv) PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); l_size = htons((uint16_t)prdrGetRefId(&g_attentionStartGroup["SPECIAL"])); PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); - //@jl02 JL Adding this code to account for the new Attention entry type. - l_size = htons((uint16_t)prdrGetRefId(&g_attentionStartGroup["UNIT_CS"])); // @jl02 - PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); // @jl02 + l_size = htons((uint16_t)prdrGetRefId(&g_attentionStartGroup["UNIT_CS"])); + PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); + l_size = htons((uint16_t)prdrGetRefId(&g_attentionStartGroup["HOST_ATTN"])); + PRDR_FWRITE(&l_size, sizeof(l_size), 1, l_prfFile); l_htmlFile << "<H2> Register Groups </H2>" << std::endl; l_htmlFile << "Generated from " << l_backingBuild << "<BR>" << std::endl; diff --git a/src/usr/diag/prdf/common/rule/prdrCompile.y b/src/usr/diag/prdf/common/rule/prdrCompile.y index a76df8e13..0553e8c5a 100644 --- a/src/usr/diag/prdf/common/rule/prdrCompile.y +++ b/src/usr/diag/prdf/common/rule/prdrCompile.y @@ -684,7 +684,7 @@ rule: PRDR_RULE PRDR_ID '{' ruleexpr ';' '}' ';' | PRDR_RULE PRDR_ID '{' PRDR_ID ':' ruleexpr ';' '}' ';' { g_rules[*$2] = new ExprOp1(Prdr::RULE, - new ExprAttnLink($4, $6, NULL, NULL, NULL, NULL, NULL, NULL)); + new ExprAttnLink($4, $6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)); delete $2; delete $4; } @@ -693,7 +693,7 @@ rule: PRDR_RULE PRDR_ID '{' ruleexpr ';' '}' ';' '}' ';' { g_rules[*$2] = new ExprOp1(Prdr::RULE, - new ExprAttnLink($4, $6, $8, $10, NULL, NULL, NULL, NULL)); + new ExprAttnLink($4, $6, $8, $10, NULL, NULL, NULL, NULL, NULL, NULL)); delete $2; delete $4; delete $8; @@ -704,7 +704,7 @@ rule: PRDR_RULE PRDR_ID '{' ruleexpr ';' '}' ';' '}' ';' { g_rules[*$2] = new ExprOp1(Prdr::RULE, - new ExprAttnLink($4, $6, $8, $10, $12, $14, NULL, NULL)); + new ExprAttnLink($4, $6, $8, $10, $12, $14, NULL, NULL, NULL, NULL)); delete $2; delete $4; delete $8; @@ -717,13 +717,29 @@ rule: PRDR_RULE PRDR_ID '{' ruleexpr ';' '}' ';' '}' ';' { g_rules[*$2] = new ExprOp1(Prdr::RULE, - new ExprAttnLink($4, $6, $8, $10, $12, $14, $16, $18)); + new ExprAttnLink($4, $6, $8, $10, $12, $14, $16, $18, NULL, NULL)); delete $2; delete $4; delete $8; delete $12; delete $16; } + | PRDR_RULE PRDR_ID '{' PRDR_ID ':' ruleexpr ';' + PRDR_ID ':' ruleexpr ';' + PRDR_ID ':' ruleexpr ';' + PRDR_ID ':' ruleexpr ';' + PRDR_ID ':' ruleexpr ';' + '}' ';' + { + g_rules[*$2] = new ExprOp1(Prdr::RULE, + new ExprAttnLink($4, $6, $8, $10, $12, $14, $16, $18, $20, $22)); + delete $2; + delete $4; + delete $8; + delete $12; + delete $16; + delete $20; + } ; ruleexpr: ruleexpr_small { $$ = $1; } diff --git a/src/usr/diag/prdf/common/rule/prdrExpr.H b/src/usr/diag/prdf/common/rule/prdrExpr.H index ceb97e758..57a3d3ecc 100755 --- a/src/usr/diag/prdf/common/rule/prdrExpr.H +++ b/src/usr/diag/prdf/common/rule/prdrExpr.H @@ -387,15 +387,15 @@ class ExprOp2 : public Expr class ExprAttnLink : public Expr { public: - static const int MAX_ATTNS = 4; - Expr * cv_arg[MAX_ATTNS]; + Expr * cv_arg[Prdr::MAX_NUM_ATTN_TYPES]; ExprAttnLink(std::string * attn1, Expr * exp1, std::string * attn2, Expr * exp2, std::string * attn3, Expr * exp3, - std::string * attn4, Expr * exp4) + std::string * attn4, Expr * exp4, + std::string * attn5, Expr * exp5) { - for (int i = 0; i < MAX_ATTNS; i++) + for (int i = 0; i < Prdr::MAX_NUM_ATTN_TYPES; i++) cv_arg[i] = NULL; cv_arg[decodeAttnType(attn1)] = exp1; @@ -405,6 +405,8 @@ class ExprAttnLink : public Expr cv_arg[decodeAttnType(attn3)] = exp3; if (NULL != exp4) cv_arg[decodeAttnType(attn4)] = exp4; + if (NULL != exp5) + cv_arg[decodeAttnType(attn5)] = exp5; }; int output(FILE * i_file) @@ -413,12 +415,12 @@ class ExprAttnLink : public Expr PRDR_FWRITE(&cv_op, 1, 1, i_file); cv_op = 0; - for (int i = 0; i < MAX_ATTNS; i++) + for (int i = 0; i < Prdr::MAX_NUM_ATTN_TYPES; i++) if (NULL != cv_arg[i]) cv_op++; PRDR_FWRITE(&cv_op, 1, 1, i_file); - for (int i = 0; i < MAX_ATTNS; i++) + for (int i = 0; i < Prdr::MAX_NUM_ATTN_TYPES; i++) if (NULL != cv_arg[i]) { cv_op = i; @@ -432,7 +434,7 @@ class ExprAttnLink : public Expr uint16_t getSignature() { uint16_t l_val = SignatureOp::DEFAULT_SIGNATURE; - for (int i = 0; i < MAX_ATTNS; i++) + for (int i = 0; i < Prdr::MAX_NUM_ATTN_TYPES; i++) if (NULL != cv_arg[i]) l_val = SignatureOp::combineSig(l_val, cv_arg[i]->getSignature()); @@ -465,9 +467,13 @@ class ExprAttnLink : public Expr { return 3; } - else if ("UNIT_CS" == *attn) // @jl02 Add UNIT_CS check. + else if ("UNIT_CS" == *attn) { - return 3; // @jl02 + return 3; + } + else if ("HOST_ATTN" == *attn) + { + return 4; } else { diff --git a/src/usr/diag/prdf/common/rule/prdrLoadChip.C b/src/usr/diag/prdf/common/rule/prdrLoadChip.C index 48b942a1a..3cf3e22c5 100644 --- a/src/usr/diag/prdf/common/rule/prdrLoadChip.C +++ b/src/usr/diag/prdf/common/rule/prdrLoadChip.C @@ -223,7 +223,7 @@ errlHndl_t LoadChip(UtilStream & i_stream, Chip & o_chip) // read groups. i_stream >> o_chip.cv_groupCount; - for (int i = 0; i < NUM_GROUP_ATTN; i++) // @jl02 JL Added this enum type for the number of Attention types. + for (int i = 0; i < MAX_NUM_ATTN_TYPES; i++) i_stream >> o_chip.cv_groupAttn[i]; if (o_chip.cv_groupCount != 0) { diff --git a/src/usr/diag/prdf/common/rule/prdrLoadChip.H b/src/usr/diag/prdf/common/rule/prdrLoadChip.H index 8024866cb..fb7ec9dd1 100755 --- a/src/usr/diag/prdf/common/rule/prdrLoadChip.H +++ b/src/usr/diag/prdf/common/rule/prdrLoadChip.H @@ -197,7 +197,7 @@ namespace Prdr uint16_t cv_ruleCount; Expr * cv_rules; uint16_t cv_groupCount; - uint16_t cv_groupAttn[NUM_GROUP_ATTN]; + uint16_t cv_groupAttn[MAX_NUM_ATTN_TYPES]; uint16_t * cv_groupSize; uint8_t * cv_groupFlags; Expr ** cv_groupPriorityBits; diff --git a/src/usr/diag/prdf/rule/makefile b/src/usr/diag/prdf/rule/makefile index 679c674ab..6a4896654 100755 --- a/src/usr/diag/prdf/rule/makefile +++ b/src/usr/diag/prdf/rule/makefile @@ -91,6 +91,7 @@ SOURCE_PLUGIN_FILES += ${SRC_USR}/common/util/UtilHash.H SOURCE_PLUGIN_FILES += ${SRC_USR}/common/iipconst.h SOURCE_PLUGIN_FILES += ${SRC_USR}/common/prdf_types.h SOURCE_PLUGIN_FILES += ${SRC_INC}/common/prdf_service_codes.H +SOURCE_PLUGIN_FILES += ${SRC_INC}/common/prdfAttnTypes.H SOURCE_PLUGIN_FILES += $(foreach d, ${SOURCE_PLUGIN_DIRS}, $(addprefix $(d)/, $(notdir $(wildcard ${ROOTPATH}/$(d)/*)))) LINK_PLUGIN_FILES += $(addprefix ${OBJ_PLUG_DIR}/,$(notdir ${SOURCE_PLUGIN_FILES})) |