summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H
blob: 90f9ad27bcc34ee6573df0bd316ada9ef0565a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/framework/resolution/prdfCalloutMap.H $ */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2012,2014              */
/*                                                                        */
/* p1                                                                     */
/*                                                                        */
/* Object Code Only (OCO) source materials                                */
/* Licensed Internal Code Source Materials                                */
/* IBM HostBoot Licensed Internal Code                                    */
/*                                                                        */
/* The source code for this program is not published or otherwise         */
/* divested of its trade secrets, irrespective of what has been           */
/* deposited with the U.S. Copyright Office.                              */
/*                                                                        */
/* Origin: 30                                                             */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef __prdfCalloutMap_H
#define __prdfCalloutMap_H

/** @file prdfCalloutMap.H */

#include <prdfEnums.H>

//------------------------------------------------------------------------------

#ifndef PRDF_SIM_ENUMS // needed to compile prdfsimEnumMap.C
namespace PRDF
{
#endif

//------------------------------------------------------------------------------

#ifdef PRDF_RULE_COMPILER_ENUMS

    // 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_ALIAS(name1, name2) \
            { #name1 , name1 },

    #define PRDF_SYM_CALLOUT_MAP_END \
            { NULL , (SymbolicFru) 0 } \
        };

#elif defined PRDF_SIM_ENUMS

    // included from prdfsimEnumMap.C, nothing for now

#else

    #define PRDF_SYM_CALLOUT_MAP_BEGIN \
        enum SymbolicFru \
        {

    #define PRDF_SYM_CALLOUT_ALIAS(n1,n2) \
            n1 = n2,

    #define PRDF_SYM_CALLOUT_MAP_END \
        };

#endif

PRDF_SYM_CALLOUT_MAP_BEGIN

PRDF_SYM_CALLOUT_ALIAS( AllProcessors,                EPUB_PRC_ALL_PROCS      )
PRDF_SYM_CALLOUT_ALIAS( SP_CODE,                      EPUB_PRC_SP_CODE        )
PRDF_SYM_CALLOUT_ALIAS( SystemSW_Code_ENUM,           EPUB_PRC_PHYP_CODE      )
PRDF_SYM_CALLOUT_ALIAS( NextLevelSupport_ENUM,        EPUB_PRC_LVL_SUPP       )
PRDF_SYM_CALLOUT_ALIAS( MEMBUS_ERROR_ENUM,            EPUB_PRC_MEMBUS_ERROR   )
PRDF_SYM_CALLOUT_ALIAS( PassiveFabric_OnNode_ENUM,    EPUB_PRC_PROC_XYZ_BUS   )
PRDF_SYM_CALLOUT_ALIAS( PassiveFabric_OffNode_ENUM,   EPUB_PRC_PROC_AB_BUS    )
PRDF_SYM_CALLOUT_ALIAS( ErrorCausedByMemUE_ENUM,      EPUB_PRC_MEMORY_UE      )

PRDF_SYM_CALLOUT_MAP_END

#undef PRDF_SYM_CALLOUT_MAP_BEGIN
#undef PRDF_SYM_CALLOUT_ALIAS
#undef PRDF_SYM_CALLOUT_MAP_END

//------------------------------------------------------------------------------

#ifdef PRDF_RULE_COMPILER_ENUMS

    // 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_ALIAS(name1, name2) \
            { #name1 , name1 },

    #define PRDF_CALLOUT_PRIORITY_MAP_END \
            { NULL , (CalloutPriorityEnum) 0 } \
        };

#elif defined PRDF_SIM_ENUMS

    // included from prdfsimEnumMap.C, nothing for now

#else

    #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \
        enum CalloutPriorityEnum \
        {

    #define PRDF_CALLOUT_PRIORITY_ALIAS(n1,n2) \
            n1 = n2,

    #define PRDF_CALLOUT_PRIORITY_MAP_END \
        };

#endif

PRDF_CALLOUT_PRIORITY_MAP_BEGIN

PRDF_CALLOUT_PRIORITY_ALIAS( MRU_HIGH, SRCI_PRIORITY_HIGH )
PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MED,  SRCI_PRIORITY_MED  )
PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDA, SRCI_PRIORITY_MEDA )
PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDB, SRCI_PRIORITY_MEDB )
PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDC, SRCI_PRIORITY_MEDC )
PRDF_CALLOUT_PRIORITY_ALIAS( MRU_LOW,  SRCI_PRIORITY_LOW  )

PRDF_CALLOUT_PRIORITY_MAP_END

#undef PRDF_CALLOUT_PRIORITY_MAP_BEGIN
#undef PRDF_CALLOUT_PRIORITY_ALIAS
#undef PRDF_CALLOUT_PRIORITY_MAP_END

//------------------------------------------------------------------------------

#ifndef PRDF_SIM_ENUMS
} // end namespace PRDF
#endif

#endif // __prdfCalloutMap_H

OpenPOWER on IntegriCloud