blob: 59f9d8b28739f9b04f161b28a206fa90cce92bff (
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
|
// IBM_PROLOG_BEGIN_TAG
// This is an automatically generated prolog.
//
// $Source: src/include/usr/hwpf/fapi/fapiErrorInfo.H $
//
// IBM CONFIDENTIAL
//
// COPYRIGHT International Business Machines Corp. 2011
//
// 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 other-
// wise divested of its trade secrets, irrespective of what has
// been deposited with the U.S. Copyright Office.
//
// Origin: 30
//
// IBM_PROLOG_END
/**
* @file fapiErrorInfo.H
*
* @brief Defines the Error Information structures and classes
*/
/*
* Change Log ******************************************************************
* Flag Defect/Feature User Date Description
* ------ -------------- ---------- ----------- ----------------------------
* mjjones 08/09/2011 Created.
* mjjones 08/24/2011 Added ErrorInfoGard.
* mjjones 09/22/2011 Major updates
*/
#ifndef FAPIERRORINFO_H_
#define FAPIERRORINFO_H_
#include <stdint.h>
#include <vector>
#include <fapiTarget.H>
namespace fapi
{
/**
* @class ErrorInfoFfdc
*
* This class contains a copy of some FFDC data
*/
class ErrorInfoFfdc
{
public:
/**
* @brief Constructor
*
* @param[in] i_pFfdc Pointer to the FFDC to copy
* @param[in] i_size Size of the FFDC to copy
*/
ErrorInfoFfdc(const void * i_pFfdc,
const uint32_t i_size);
/**
* @brief Copy Constructor
*
* @param[in] i_right Reference to ErrorInfoFfdc to copy from
*/
ErrorInfoFfdc(const ErrorInfoFfdc & i_right);
/**
* @brief Destructor
*/
~ErrorInfoFfdc();
/**
* @brief Assignment Operator
*
* @param[in] i_right Reference to ErrorInfoFfdc to assign from
*
* @return ErrorInfoFfdc &. Reference to this ErrorInfoFfdc
*/
ErrorInfoFfdc & operator=(const ErrorInfoFfdc & i_right);
/**
* @brief Get a pointer to the FfdcData
*
* @param[out] o_size Reference to uint32_t that is filled in with the FFDC
* size
*
* @return void *. Pointer to the FFDC
*/
const void * getData(uint32_t & o_size) const;
private:
// Pointer to the FFDC
uint8_t * iv_pFfdc;
// Size of the FFDC
uint32_t iv_size;
};
/**
* @enum CalloutPriority
*
* This enumeration defines the possible callout priorities
*/
enum CalloutPriority
{
PRI_HIGH = 1,
PRI_MEDIUM = 2,
PRI_LOW = 3,
};
/**
* @struct ErrorInfoCallout
*
* This struct contains a target to callout
*/
struct ErrorInfoCallout
{
/**
* @brief Constructor.
*
* @param[in] i_target Reference to the target to callout
* @param[in] i_priority The priority of the callout
*/
ErrorInfoCallout(const Target & i_target,
const CalloutPriority i_priority);
// The target to call out
Target iv_target;
// The priority of the callout
CalloutPriority iv_priority;
};
/**
* @struct ErrorInfoDeconfig
*
* This struct contains a target to deconfigure
*/
struct ErrorInfoDeconfig
{
/**
* @brief Constructor.
*
* @param[in] i_target Reference to the target to deconfigure
*/
ErrorInfoDeconfig(const Target & i_target);
// The target to deconfigure
Target iv_target;
};
/**
* @struct ErrorInfoGard
*
* This struct contains a target to create a GARD record for
*/
struct ErrorInfoGard
{
/**
* @brief Constructor.
*
* @param[in] i_target Reference to the target to create a GARD record for
*/
ErrorInfoGard(const Target & i_target);
// The target to create a GARD record for
Target iv_target;
};
/**
* @struct ErrorInfo
*
* This struct defines the error information
*/
struct ErrorInfo
{
/**
* @brief Destructor.
*/
~ErrorInfo();
// Vector of FFDC Data
std::vector<ErrorInfoFfdc *> iv_ffdcs;
typedef std::vector<ErrorInfoFfdc *>::iterator ErrorInfoFfdcItr_t;
typedef std::vector<ErrorInfoFfdc *>::const_iterator ErrorInfoFfdcCItr_t;
// Vector of targets to callout
std::vector<ErrorInfoCallout *> iv_callouts;
typedef std::vector<ErrorInfoCallout *>::iterator ErrorInfoCalloutItr_t;
typedef std::vector<ErrorInfoCallout *>::const_iterator ErrorInfoCalloutCItr_t;
// Vector of targets to deconfigure
std::vector<ErrorInfoDeconfig *> iv_deconfigs;
typedef std::vector<ErrorInfoDeconfig *>::iterator ErrorInfoDeconfigItr_t;
typedef std::vector<ErrorInfoDeconfig *>::const_iterator ErrorInfoDeconfigCItr_t;
// Vector of targets to create a GARD record for
std::vector<ErrorInfoGard *> iv_gards;
typedef std::vector<ErrorInfoGard *>::iterator ErrorInfoGardItr_t;
typedef std::vector<ErrorInfoGard *>::const_iterator ErrorInfoGardCItr_t;
};
}
#endif // FAPIERRORINFO_H_
|