summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/attn/attnfwd.H
blob: b39eef8d64ad9bc4cd0e274badd8faed5e4291b5 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/attn/attnfwd.H $                                 */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2012,2013              */
/*                                                                        */
/* 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 __ATTN_ATTNFWD_H
#define __ATTN_ATTNFWD_H

/**
 * @file attnfwd.H
 *
 * @brief HBATTN forward declarations.
 */

#include <attn/attn.H>
#include <intr/interrupt.H>
#include <errl/errlentry.H>
#include <diag/prdf/prdfMain.H>
#include <targeting/common/target.H>
#include <vector>
#include <builtins.h>
#include "attnbits.H"

class AttnTraceTest;
class AttnSvcTest;
class AttnListTest;
class AttnOpsTest;
class AttScomTest;
class AttnProcTest;
class AttnMemTest;

namespace ATTN
{

class Attention;
class AttentionList;
class AttentionOps;
class PrdWrapper;
class PrdImpl;
class TargetService;
class TargetServiceImpl;
class ScomWrapper;
class ScomImpl;
class ProcOps;
class MemOps;

enum
{
    /**
     * @brief HOST Represents host attentions,
     *         distinct from the local error attentions.
     */
    HOST = PRDF::END_ATTENTION_TYPE,
};

/**
 * @brief MessageType Attention service message types.
 */
enum MessageType
{
    /**
     * @brief ATTENTION Attention message.
     */
    ATTENTION = 0x1,

    /**
     * @brief SHUTDOWN Shutdown message.
     */
    SHUTDOWN,
};

/**
 * @brief ScomOp ModifyScom operation types.
 */
enum ScomOp
{
    /**
     * @brief SCOM_OR ModifyScom or operation.
     */
    SCOM_OR,

    /**
     * @brief SCOM_AND ModifyScom and operation.
     */
    SCOM_AND,
};

/**
 * @brief getScom Read a register using SCOM.
 *
 * @param[in] i_target Target to read register from.
 * @param[in] i_address Register address to read from.
 * @param[in] i_data Buffer to write register content to.
 *
 * @retval[0] No errors.
 * @retval[!0] Unexpected error occurred.
 */
errlHndl_t getScom(
        TARGETING::TargetHandle_t i_target,
        uint64_t i_address,
        uint64_t & o_data);

/**
 * @brief putScom Write a register using SCOM.
 *
 * @param[in] i_target Target to write register on.
 * @param[in] i_address Register address to write to.
 * @param[in] i_data Data to write to register.
 *
 * @retval[0] No errors.
 * @retval[!0] Unexpected error occurred.
 */
errlHndl_t putScom(
        TARGETING::TargetHandle_t i_target,
        uint64_t i_address,
        uint64_t i_data);

/**
 * @brief modifyScom Read/Modify/Write a register using SCOM.
 *
 * @param[in] i_target Target to write register on.
 * @param[in] i_address Register address to write to.
 * @param[in] i_data Data to write to register.
 * @param[in] i_op And/Or specification.
 *
 * @retval[0] No errors.
 * @retval[!0] Unexpected error occurred.
 */
errlHndl_t modifyScom(
        TARGETING::TargetHandle_t i_target,
        uint64_t i_address,
        uint64_t i_data,
        ScomOp i_op);

/**
 * @brief getScomWrapper ScomWrapper singleton access.
 *
 * @return ScomWrapper Singleton instance.
 */
ScomWrapper & getScomWrapper();

/**
 * @brief getPrdWrapper PrdWrapper singleton access.
 *
 * @return PrdWrapper Singleton instance.
 */
PrdWrapper & getPrdWrapper();

/**
 * @brief getTargetService TargetService singleton access.
 *
 * @return TargetService Singleton instance.
 */
TargetService & getTargetService();

/**
 * @brief getProcOps ProcOps singleton access.
 *
 * @return ProcOps Singleton instance.
 */
ProcOps & getProcOps();

/**
 * @brief getMemOps MemOps singleton access.
 *
 * @return MemOps Singleton instance.
 */
MemOps & getMemOps();

/**
 * @brief compare compare two PRDF::AttnData structures.
 *
 * @param[in] i_l one of two AttnData structures.
 * @param[in] i_r one of two AttnData structures.
 *
 * @raturn int64_t The result of the comparison.
 *
 * @retval[-1] i_l < i_r
 * @retval[1] i_r < i_l
 * @retval[0] equivalent
 */
int64_t compare(const PRDF::AttnData & i_l, const PRDF::AttnData & i_r);

}

#endif
OpenPOWER on IntegriCloud