summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-02-28 21:46:27 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2017-03-07 15:37:23 -0500
commit3ea9bd9bf1effe6b5b45938d08ec7975e62b693a (patch)
treebdadf7e37b04171663b9a5b4eaeb17f214c7881c /src/usr/diag/prdf/common/framework
parent24fea601c0c2b04093572a2975b39635429f8dfb (diff)
downloadblackbird-hostboot-3ea9bd9bf1effe6b5b45938d08ec7975e62b693a.tar.gz
blackbird-hostboot-3ea9bd9bf1effe6b5b45938d08ec7975e62b693a.zip
PRD: updates to prdfCalloutMap.H
Change-Id: Ia66755795db6cfc23cff381383640fb5bd9b3bb3 RTC: 137911 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37306 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37600 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/framework')
-rw-r--r--src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H98
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfCallouts.H6
2 files changed, 78 insertions, 26 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H
index de932cac4..d4a68391b 100644
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H
@@ -32,7 +32,7 @@
//------------------------------------------------------------------------------
-#ifndef PRDF_SIM_ENUMS // needed to compile prdfsimEnumMap.C
+#if !defined(PRDF_RULE_COMPILER_ENUMS) && !defined(PRDF_SIM_ENUMS)
namespace PRDF
{
#endif
@@ -44,21 +44,27 @@ namespace PRDF
// Used only in the rule compiler. Sets up a map between string keywords in
// the rule code to the enum name.
- #define PRDF_SYM_CALLOUT_MAP_BEGIN \
- struct SymCallout_t { const char * str; SymbolicFru val; }; \
- SymCallout_t symCalloutArray[] = \
- {
+ #define PRDF_SYM_CALLOUT_MAP_BEGIN
#define PRDF_SYM_CALLOUT_ALIAS(name1, name2) \
- { #name1 , name1 },
+ g_ActionArgMap[ #name1 ] = name2;
+
+ #define PRDF_SYM_CALLOUT_MAP_END
- #define PRDF_SYM_CALLOUT_MAP_END \
- { NULL , (SymbolicFru) 0 } \
- };
#elif defined PRDF_SIM_ENUMS
- // included from prdfsimEnumMap.C, nothing for now
+ #define PRDF_SYM_CALLOUT_MAP_BEGIN \
+ { \
+ ENUMNAMES * l_calloutEnum = new ENUMNAMES(); \
+ ivEnumTypes["calloutNames"] = l_calloutEnum; \
+ std::string s;
+
+ #define PRDF_SYM_CALLOUT_ALIAS(n1,n2) \
+ s = #n1; ToUpper(s); ivEnumValue[s] = n2; (*l_calloutEnum)[n2] = s;
+
+ #define PRDF_SYM_CALLOUT_MAP_END \
+ }
#else
@@ -98,27 +104,31 @@ PRDF_SYM_CALLOUT_MAP_END
// Used only in the rule compiler. Sets up a map between string keywords in
// the rule code to the enum name.
- #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \
- struct CalloutPriority_t \
- { const char * str; CalloutPriorityEnum val; }; \
- CalloutPriority_t calloutPriorityArray[] = \
- {
+ #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN
#define PRDF_CALLOUT_PRIORITY_ALIAS(name1, name2) \
- { #name1 , name1 },
+ g_ActionArgMap[ #name1 ] = name2;
- #define PRDF_CALLOUT_PRIORITY_MAP_END \
- { NULL , (CalloutPriorityEnum) 0 } \
- };
+ #define PRDF_CALLOUT_PRIORITY_MAP_END
#elif defined PRDF_SIM_ENUMS
- // included from prdfsimEnumMap.C, nothing for now
+ #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \
+ { \
+ ENUMNAMES * l_priorityEnum = new ENUMNAMES(); \
+ ivEnumTypes["priorityNames"] = l_priorityEnum; \
+ std::string s;
+
+ #define PRDF_CALLOUT_PRIORITY_ALIAS(n1,n2) \
+ s = #n1; ToUpper(s); ivEnumValue[s] = n2; (*l_priorityEnum)[n2] = s;
+
+ #define PRDF_CALLOUT_PRIORITY_MAP_END \
+ }
#else
#define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \
- enum CalloutPriorityEnum \
+ enum PRDpriority \
{
#define PRDF_CALLOUT_PRIORITY_ALIAS(n1,n2) \
@@ -146,7 +156,51 @@ PRDF_CALLOUT_PRIORITY_MAP_END
//------------------------------------------------------------------------------
-#ifndef PRDF_SIM_ENUMS
+#ifdef PRDF_RULE_COMPILER_ENUMS
+
+ #define PRDF_TARGET_TYPE_ALIAS(n1, n2) \
+ g_ActionArgMap[ #n1 ] = n2;
+
+#elif defined PRDF_SIM_ENUMS
+
+ #define PRDF_TARGET_TYPE_ALIAS(n1, n2) \
+ ivEnumValue[ #n1 ] = n2;
+
+#else
+
+ #define PRDF_TARGET_TYPE_ALIAS(n1, n2)
+
+#endif
+
+PRDF_TARGET_TYPE_ALIAS( TYPE_SYS, TARGETING::TYPE_SYS )
+PRDF_TARGET_TYPE_ALIAS( TYPE_NODE, TARGETING::TYPE_NODE )
+PRDF_TARGET_TYPE_ALIAS( TYPE_PROC, TARGETING::TYPE_PROC )
+PRDF_TARGET_TYPE_ALIAS( TYPE_EQ, TARGETING::TYPE_EQ )
+PRDF_TARGET_TYPE_ALIAS( TYPE_EX, TARGETING::TYPE_EX )
+PRDF_TARGET_TYPE_ALIAS( TYPE_CORE, TARGETING::TYPE_CORE )
+PRDF_TARGET_TYPE_ALIAS( TYPE_CAPP, TARGETING::TYPE_CAPP )
+PRDF_TARGET_TYPE_ALIAS( TYPE_PEC, TARGETING::TYPE_PEC )
+PRDF_TARGET_TYPE_ALIAS( TYPE_PHB, TARGETING::TYPE_PHB )
+PRDF_TARGET_TYPE_ALIAS( TYPE_OBUS, TARGETING::TYPE_OBUS )
+PRDF_TARGET_TYPE_ALIAS( TYPE_XBUS, TARGETING::TYPE_XBUS )
+PRDF_TARGET_TYPE_ALIAS( TYPE_NX, TARGETING::TYPE_NX )
+PRDF_TARGET_TYPE_ALIAS( TYPE_OCC, TARGETING::TYPE_OCC )
+PRDF_TARGET_TYPE_ALIAS( TYPE_PSI, TARGETING::TYPE_PSI )
+PRDF_TARGET_TYPE_ALIAS( TYPE_MCBIST, TARGETING::TYPE_MCBIST )
+PRDF_TARGET_TYPE_ALIAS( TYPE_MCS, TARGETING::TYPE_MCS )
+PRDF_TARGET_TYPE_ALIAS( TYPE_MCA, TARGETING::TYPE_MCA )
+PRDF_TARGET_TYPE_ALIAS( TYPE_MEMBUF, TARGETING::TYPE_MEMBUF )
+PRDF_TARGET_TYPE_ALIAS( TYPE_L4, TARGETING::TYPE_L4 )
+PRDF_TARGET_TYPE_ALIAS( TYPE_MBA, TARGETING::TYPE_MBA )
+PRDF_TARGET_TYPE_ALIAS( TYPE_DIMM, TARGETING::TYPE_DIMM )
+PRDF_TARGET_TYPE_ALIAS( TYPE_OSCREFCLK, TARGETING::TYPE_OSCREFCLK )
+PRDF_TARGET_TYPE_ALIAS( TYPE_NA, TARGETING::TYPE_NA )
+
+#undef PRDF_TARGET_TYPE_ALIAS
+
+//------------------------------------------------------------------------------
+
+#if !defined(PRDF_RULE_COMPILER_ENUMS) && !defined(PRDF_SIM_ENUMS)
} // end namespace PRDF
#endif
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
index eaff2c842..1ee3a2d32 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -30,7 +30,7 @@
// Includes
//------------------------------------------------------------------------------
-#include <prdfCalloutMap.H>
+#include <prdfCalloutMap.H> // for enums
#include <prdfCalloutsData.H>
#include <prdfEnums.H>
#include <prdfMemoryMru.H>
@@ -41,8 +41,6 @@ namespace PRDF
//------------------------------------------------------------------------------
-typedef CalloutPriorityEnum PRDpriority;
-
/**
* @brief Wrapper class for PRD callouts (TargetHandle_t, MemoryMru, and
* SymbolicFru).
OpenPOWER on IntegriCloud