summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/rule/prdrExpr.H
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2016-04-08 10:33:15 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-05-02 12:00:12 -0400
commit7057ace0dd090782177982d9dcda3532286e33ab (patch)
treedc02b69d733a12eb37802661d2a758fce307b01f /src/usr/diag/prdf/common/rule/prdrExpr.H
parentbd81810ed1cb2a9559fd14ae8babb63415b596e7 (diff)
downloadtalos-hostboot-7057ace0dd090782177982d9dcda3532286e33ab.tar.gz
talos-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/usr/diag/prdf/common/rule/prdrExpr.H')
-rwxr-xr-xsrc/usr/diag/prdf/common/rule/prdrExpr.H24
1 files changed, 15 insertions, 9 deletions
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
{
OpenPOWER on IntegriCloud