summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plugins/prdfParserEnums.H
blob: 9c4313cbc6384a5b2ae1698c3929052363142e44 (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/plugins/prdfParserEnums.H $          */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2013,2015                        */
/* [+] 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                                                     */

/** @file  prdfParserEnums.H
 *  @brief Common enums used for building and parsing capture data.
 */

#ifndef __prdfParserEnums_H
#define __prdfParserEnums_H

#include <prdfCenConst.H>

namespace PRDF
{
#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
namespace HOSTBOOT
{
#endif

#ifdef PRDF_FSP_ERRL_PLUGIN
namespace FSP
{
#endif

enum PositionBounds
{
    MAX_NODE_PER_SYS    = 8,

    MAX_PROC_PER_NODE   = 8,

    MAX_EX_PER_PROC     = 16,
    MAX_CORE_PER_PROC   = MAX_EX_PER_PROC,
    MAX_L2_PER_PROC     = MAX_EX_PER_PROC,
    MAX_L3_PER_PROC     = MAX_EX_PER_PROC,

    MAX_XBUS_PER_PROC   = 4,
    MAX_ABUS_PER_PROC   = 3,
    MAX_PHB_PER_PROC    = 3,

    MAX_MCS_PER_PROC    = 8,
    MAX_MEMBUF_PER_PROC = MAX_MCS_PER_PROC,

    MAX_MBA_PER_MEMBUF  = 2,
    MAX_PORT_PER_MBA    = 2,
    MAX_DIMM_PER_PORT   = 2,
    MAX_L4_PER_MEMBUF   = 1,

    MAX_PCIE_OSC_PER_NODE = 2,
    MAX_TOD_OSC_PER_NODE  = 2,

    INVALID_POSITION_BOUND = 0xffffffff,
};

namespace PARSER
{
    enum
    {
        // i_parser.PrintString() has two parts: header and data. These are the
        // maximum string lengths for one line in the error log. Note that the
        // header has a hard stop of one line, however, the data can wrap onto
        // multiple lines (not sure of the line limit).
        HEADER_SIZE  = 25,
        DATA_SIZE    = 50,
    };

} // namespace PARSER

namespace UE_TABLE
{
    enum
    {
        MAX_ENTRIES = 16, ///< Maximum number of entries allow in table.
        ENTRY_SIZE  =  7, ///< Number of bytes per entry.

        MAX_SIZE = MAX_ENTRIES * ENTRY_SIZE, ///< Maximum table size.
    };

    /**
     * @brief Represents the several different types of UEs stored in the table.
     */
    enum Type
    {
        SCRUB_MPE = 1, ///< Chip mark placed by scrub
        FETCH_MPE,     ///< Chip mark placed by fetch
        SCRUB_UE,      ///< Scrub UE
        FETCH_UE,      ///< Fetch UE
    };

} // namespace UE_TABLE

namespace CE_TABLE
{
    enum
    {
        MAX_ENTRIES = 32, ///< Maximum number of entries allow in table.
        ENTRY_SIZE  =  9, ///< Number of bytes per entry.

        MAX_SIZE = MAX_ENTRIES * ENTRY_SIZE, ///< Maximum table size.
    };

} // namespace CE_TABLE

namespace RCE_TABLE
{
    enum
    {
        ENTRY_SIZE  =  2, ///< Number of bytes per entry.
    };

} // namespace RCE_TABLE

namespace DQ_BITMAP
{
    enum
    {
        BITMAP_SIZE = 10, // 80-bit bitmap
        ENTRY_SIZE  = sizeof(uint8_t) + PORT_SLCT_PER_MBA * BITMAP_SIZE,
    };

} // namespace DQ_BITMAP

namespace CEN_SYMBOL
{

    /** Used as a 2-bit mask to display which of the DQs on this symbol are
     *  failing. */
    enum DqMask
    {
        NO_SYMBOL_DQS   = 0x0,
        ODD_SYMBOL_DQ   = 0x1,
        EVEN_SYMBOL_DQ  = 0x2,
        BOTH_SYMBOL_DQS = EVEN_SYMBOL_DQ | ODD_SYMBOL_DQ,
    };

    /** A three bit field in memory MRU. It describes the raw card type for
     *  buffered DIMMs or the DIMM plug card type for IS DIMMs. These types are
     *  used for error log parsing which must be supported independent of the
     *  drivers (i.e. eblis tool) so enums can be added, but the values of the
     *  enums cannot be changed */
    enum WiringType
    {
        CEN_TYPE_A          = 0,
        CEN_TYPE_B          = 1,
        CEN_TYPE_D          = 2,
        CEN_TYPE_C          = 3,
        WIRING_INVALID      = 7, // An invalid card type
    };

}//namespace CEN_SYMBOL ends

namespace SLW_FFDC_DATA
{
    static const char * const title = "SLW_FFDC_DATA";

    enum
    {
        MAX_ENTRIES = 39, ///< Maximum number of entries allowed.
        ENTRY_SIZE  = 12, ///< Number of bytes per entry.

        MAX_SIZE = MAX_ENTRIES * ENTRY_SIZE, ///< Maximum table size.
    };

} // namespace SLW_FFDC_DATA

// LineDelete/ColumnRepair FFDC
namespace LD_CR_FFDC
{
    static const char * const L2TITLE = "L2_LD_COLRPR_FFDC";
    static const char * const L3TITLE = "L3_LD_COLRPR_FFDC";

    struct L2LdCrFfdc
    {
#if __BYTE_ORDER == __LITTLE_ENDIAN
        uint32_t L2LDcnt        : 4;
        uint32_t L2LDallowed    : 1;
        uint32_t L2LDMaxAllowed : 4;
        uint32_t L2CRMaxAllowed : 4;
        uint32_t L2CRPresent    : 4;
        uint32_t L2reserved1    :15;

        uint32_t L2errMember    : 3;
        uint32_t L2errDW        : 3;
        uint32_t L2errMacro     : 2;
        uint32_t L2errBank      : 1;
        uint32_t L2errOWSelect  : 1;
        uint32_t L2errBitLine   : 4;
        uint32_t L2errIsTopSA   : 1;
        uint32_t L2errAddress   :10;
        uint32_t L2reserved2    : 7;

        L2LdCrFfdc():
           L2LDcnt(0), L2LDallowed(0), L2LDMaxAllowed(0),
           L2CRMaxAllowed(0), L2CRPresent(0), L2reserved1(0),
           L2errMember(0), L2errDW(0), L2errMacro(0),
           L2errBank(0), L2errOWSelect(0), L2errBitLine(0),
           L2errIsTopSA(0), L2errAddress(0), L2reserved2(0)
        {}
#else
        uint32_t L2reserved1    :15;
        uint32_t L2CRPresent    : 4;
        uint32_t L2CRMaxAllowed : 4;
        uint32_t L2LDMaxAllowed : 4;
        uint32_t L2LDallowed    : 1;
        uint32_t L2LDcnt        : 4;

        uint32_t L2reserved2    : 7;
        uint32_t L2errAddress   :10;
        uint32_t L2errIsTopSA   : 1;
        uint32_t L2errBitLine   : 4;
        uint32_t L2errOWSelect  : 1;
        uint32_t L2errBank      : 1;
        uint32_t L2errMacro     : 2;
        uint32_t L2errDW        : 3;
        uint32_t L2errMember    : 3;

        L2LdCrFfdc():
           L2reserved1(0), L2CRPresent(0), L2CRMaxAllowed(0),
           L2LDMaxAllowed(0), L2LDallowed(0), L2LDcnt(0),
           L2reserved2(0),L2errAddress(0), L2errIsTopSA(0),
           L2errBitLine(0), L2errOWSelect(0), L2errBank(0),
           L2errMacro(0), L2errDW(0), L2errMember(0)
        {}
#endif

    };

    struct L3LdCrFfdc
    {
#if __BYTE_ORDER == __LITTLE_ENDIAN
        uint32_t L3LDcnt        : 4;
        uint32_t L3LDallowed    : 1;
        uint32_t L3LDMaxAllowed : 4;
        uint32_t L3CRMaxAllowed : 4;
        uint32_t L3CRPresent    : 4;
        uint32_t L3reserved1    :15;

        uint32_t L3errMember    : 3;
        uint32_t L3errDW        : 3;
        uint32_t L3errBank      : 1;
        uint32_t L3errDataOut   : 1;
        uint32_t L3errAddress   : 4;
        uint32_t L3errIO        : 1;
        uint32_t L3errRow       :10;
        uint32_t L3reserved2    : 9;

        L3LdCrFfdc():
           L3LDcnt(0), L3LDallowed(0), L3LDMaxAllowed(0),
           L3CRMaxAllowed(0), L3CRPresent(0),
           L3reserved1(0), L3errMember(0), L3errDW(0),
           L3errBank(0), L3errDataOut(0), L3errAddress(0),
           L3errIO(0), L3errRow(0), L3reserved2(0)
        {}
#else
        uint32_t L3reserved1    :15;
        uint32_t L3CRPresent    : 4;
        uint32_t L3CRMaxAllowed : 4;
        uint32_t L3LDMaxAllowed : 4;
        uint32_t L3LDallowed    : 1;
        uint32_t L3LDcnt        : 4;

        uint32_t L3reserved2    : 9;
        uint32_t L3errRow       :10;
        uint32_t L3errIO        : 1;
        uint32_t L3errAddress   : 4;
        uint32_t L3errDataOut   : 1;
        uint32_t L3errBank      : 1;
        uint32_t L3errDW        : 3;
        uint32_t L3errMember    : 3;

        L3LdCrFfdc():
           L3reserved1(0), L3CRPresent(0), L3CRMaxAllowed(0),
           L3LDMaxAllowed(0), L3LDallowed(0), L3LDcnt(0),
           L3reserved2(0), L3errRow(0), L3errIO(0),
           L3errAddress(0), L3errDataOut(0), L3errBank(0),
           L3errDW(0), L3errMember(0)
        {}
#endif

    };


} // namespace LD_CR_FFDC

#ifdef PRDF_HOSTBOOT_ERRL_PLUGIN
} // end namespace HOSTBOOT
#endif

#ifdef PRDF_FSP_ERRL_PLUGIN
} // end namespace FSP
#endif

} // end namespace PRDF

#endif // __prdfParserEnums_H

OpenPOWER on IntegriCloud