blob: 8870d17ff958949257831ed05d5372b34065f765 (
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
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/sbefw/sbeFFDCType.H $ */
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] 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 */
#ifndef __SBE_FFDC_TYPE_H
#define __SBE_FFDC_TYPE_H
//Bit mapped identifiers
#define SBE_FFDC_ATTR_DUMP 0x0001
#define SBE_FFDC_TRACE_DUMP 0x0002
#define SBE_FFDC_ALL_DUMP 0xFFFF
/* Structure indicating the contents of FFDC package
* value 'true' - field present;value 'false' - field not present
* bit_0 - attribute dump
* bit_1 - trace buffer dump
* bit 2-31 - reserved
*/
typedef struct
{
uint32_t attrField:1;
uint32_t traceField:1;
uint32_t reserved:30;
/* @breif - set dump fields
*
* @param[in] - uint32_t value to be updated
*/
void set(uint32_t val)
{
if(val & SBE_FFDC_ATTR_DUMP)
{
attrField = true;
}
if(val & SBE_FFDC_TRACE_DUMP)
{
traceField = true;
}
}
/* @brief - get dump fields as uint32_t
*
* @return - uint32_t value
*/
uint32_t get()
{
uint32_t l_val = 0;
if(attrField)
{
l_val |= SBE_FFDC_ATTR_DUMP;
}
if(traceField)
{
l_val |= SBE_FFDC_TRACE_DUMP;
}
return l_val;
}
} sbeFFDCDumpFields_t;
//Sturcture indicating the type of ffdc user data blob
//and its length in bytes
typedef struct
{
uint32_t fieldId:16;
uint32_t fieldLen:16;
} sbeFFDCUserDataIdentifier_t;
//Structure of ffdc user data blob
typedef struct
{
sbeFFDCUserDataIdentifier_t userDataId;
const void *userDataPtr;
} sbeFFDCUserData_t;
//keep it packed to 4byte boundary to avoid packing bytes
typedef struct
{
uint32_t primaryStatus:16;//Chip Op Primary status
uint32_t secondaryStatus:16;//Chip Op Secondary status
uint32_t fwCommitID;// FW commit ID
sbeFFDCDumpFields_t dumpFields;//bitmapped dumpFields
} sbeFFDCDataHeader_t;
#endif //__SBE_FFDC_TYPE_H
|