blob: 693e4c828186057005da5e55026681a5526a9e6b [file] [log] [blame]
Ben Tyner792f32f2020-06-02 08:50:47 -05001#include <libpdbg.h>
2
Ben Tyner0205f3b2020-02-24 10:24:47 -06003#include <analyzer/analyzer_main.hpp>
Ben Tynerb797b3e2020-06-29 10:12:05 -05004#include <attn/attention.hpp>
Ben Tynerbcf65a82020-12-01 08:46:36 -06005#include <attn/attn_common.hpp>
Ben Tynerb797b3e2020-06-29 10:12:05 -05006#include <attn/attn_config.hpp>
7#include <attn/attn_handler.hpp>
8#include <attn/attn_logging.hpp>
9#include <attn/bp_handler.hpp>
10#include <attn/ti_handler.hpp>
Ben Tynerbcf65a82020-12-01 08:46:36 -060011#include <attn/vital_handler.hpp>
Ben Tyneref320152020-01-09 10:31:23 -060012
Ben Tynerb481d902020-03-05 10:24:23 -060013#include <algorithm>
Ben Tyneref320152020-01-09 10:31:23 -060014#include <iomanip>
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050015#include <map>
Ben Tyner9ae5ca42020-02-28 13:13:50 -060016#include <sstream>
Ben Tynerb481d902020-03-05 10:24:23 -060017#include <vector>
Ben Tyneref320152020-01-09 10:31:23 -060018
19namespace attn
20{
21
22/**
Ben Tyneref320152020-01-09 10:31:23 -060023 * @brief Handle checkstop attention
24 *
Ben Tynerb481d902020-03-05 10:24:23 -060025 * @param i_attention Attention object
Ben Tyner3fb52e52020-03-31 10:10:07 -050026 * @return 0 indicates that the checkstop attention was successfully handled
27 * 1 indicates that the checkstop attention was NOT successfully
28 * handled.
Ben Tyneref320152020-01-09 10:31:23 -060029 */
Ben Tynerb481d902020-03-05 10:24:23 -060030int handleCheckstop(Attention* i_attention);
Ben Tyneref320152020-01-09 10:31:23 -060031
32/**
33 * @brief Handle special attention
34 *
Ben Tynerb481d902020-03-05 10:24:23 -060035 * @param i_attention Attention object
Ben Tyner3fb52e52020-03-31 10:10:07 -050036 * @return 0 indicates that the special attention was successfully handled
37 * 1 indicates that the special attention was NOT successfully handled
Ben Tyneref320152020-01-09 10:31:23 -060038 */
Ben Tynerb481d902020-03-05 10:24:23 -060039int handleSpecial(Attention* i_attention);
Ben Tyneref320152020-01-09 10:31:23 -060040
Ben Tynerfb190542020-11-06 09:27:56 -060041/** @brief Determine if attention is active and not masked */
Ben Tyner1965e502020-11-20 10:32:24 -060042bool activeAttn(uint32_t i_val, uint32_t i_mask, uint32_t i_attn);
Ben Tynerfb190542020-11-06 09:27:56 -060043
Ben Tyneref320152020-01-09 10:31:23 -060044/**
Ben Tyneref320152020-01-09 10:31:23 -060045 * @brief The main attention handler logic
Ben Tyner970fd4f2020-02-19 13:46:42 -060046 *
47 * @param i_breakpoints true = breakpoint special attn handling enabled
Ben Tyneref320152020-01-09 10:31:23 -060048 */
Ben Tyner3fb52e52020-03-31 10:10:07 -050049void attnHandler(Config* i_config)
Ben Tyneref320152020-01-09 10:31:23 -060050{
Ben Tynerb481d902020-03-05 10:24:23 -060051 // Vector of active attentions to be handled
52 std::vector<Attention> active_attentions;
53
Ben Tyneref320152020-01-09 10:31:23 -060054 uint32_t isr_val, isr_mask;
Ben Tyneref320152020-01-09 10:31:23 -060055
56 // loop through processors looking for active attentions
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050057 trace<level::INFO>("Attention handler started");
Ben Tyner117af992020-05-22 13:32:11 -050058
Ben Tyneref320152020-01-09 10:31:23 -060059 pdbg_target* target;
Ben Tyner5e622d82020-09-11 10:10:24 -050060 pdbg_for_each_class_target("proc", target)
Ben Tyneref320152020-01-09 10:31:23 -060061 {
62 if (PDBG_TARGET_ENABLED == pdbg_target_probe(target))
63 {
Zane Shelleya79f6c82021-01-12 16:38:49 -060064 auto proc = pdbg_target_index(target); // get processor number
Ben Tyneref320152020-01-09 10:31:23 -060065
Ben Tynerb83c8522020-11-20 10:45:26 -060066 // Use PIB target to determine if a processor is enabled
Ben Tyner5e622d82020-09-11 10:10:24 -050067 char path[16];
Ben Tynerb83c8522020-11-20 10:45:26 -060068 sprintf(path, "/proc%d/pib", proc);
Ben Tyner8882c322021-02-05 12:13:21 -060069 pdbg_target* pibTarget = pdbg_target_from_path(nullptr, path);
Ben Tynerb1ebfcb2020-05-08 18:52:48 -050070
Ben Tynerb83c8522020-11-20 10:45:26 -060071 // sanity check
Ben Tyner8882c322021-02-05 12:13:21 -060072 if (nullptr == pibTarget)
Ben Tynerb83c8522020-11-20 10:45:26 -060073 {
74 trace<level::INFO>("pib path or target not found");
75 continue;
76 }
77
Ben Tyner8882c322021-02-05 12:13:21 -060078 // check if pib target is enabled
79 if (PDBG_TARGET_ENABLED == pdbg_target_probe(pibTarget))
Ben Tyneref320152020-01-09 10:31:23 -060080 {
Ben Tynerb83c8522020-11-20 10:45:26 -060081 // The processor FSI target is required for CFAM read
82 sprintf(path, "/proc%d/fsi", proc);
Ben Tyner8882c322021-02-05 12:13:21 -060083 pdbg_target* fsiTarget = pdbg_target_from_path(nullptr, path);
Ben Tynerb83c8522020-11-20 10:45:26 -060084
85 // sanity check
Ben Tyner8882c322021-02-05 12:13:21 -060086 if (nullptr == fsiTarget)
Ben Tynerb83c8522020-11-20 10:45:26 -060087 {
88 trace<level::INFO>("fsi path or target not found");
89 continue;
90 }
91
Ben Tyner8882c322021-02-05 12:13:21 -060092 // trace the proc number
93 std::string traceMsg = "proc: " + std::to_string(proc);
94 trace<level::INFO>(traceMsg.c_str());
Ben Tyner1965e502020-11-20 10:32:24 -060095
Ben Tyner5adc96e2020-11-20 10:54:12 -060096 isr_val = 0xffffffff; // invalid isr value
97
Ben Tyner5e622d82020-09-11 10:10:24 -050098 // get active attentions on processor
Ben Tyner8882c322021-02-05 12:13:21 -060099 if (RC_SUCCESS != fsi_read(fsiTarget, 0x1007, &isr_val))
Ben Tyneref320152020-01-09 10:31:23 -0600100 {
Ben Tynerfb190542020-11-06 09:27:56 -0600101 // log cfam read error
Ben Tyner5e622d82020-09-11 10:10:24 -0500102 trace<level::INFO>("Error! cfam read 0x1007 FAILED");
Ben Tyner7a0dd542021-02-12 09:33:44 -0600103 eventAttentionFail((int)AttnSection::attnHandler |
104 ATTN_PDBG_CFAM);
Ben Tyneref320152020-01-09 10:31:23 -0600105 }
Ben Tyner5adc96e2020-11-20 10:54:12 -0600106 else if (0xffffffff == isr_val)
107 {
108 trace<level::INFO>("Error! cfam read 0x1007 INVALID");
109 continue;
110 }
Ben Tyneref320152020-01-09 10:31:23 -0600111 else
112 {
Ben Tyner8882c322021-02-05 12:13:21 -0600113 // trace isr value
114 std::stringstream ssIsr;
115 ssIsr << "cfam 0x1007 = 0x" << std::setw(8)
116 << std::setfill('0') << std::hex << isr_val;
117 std::string strobjIsr = ssIsr.str();
118 trace<level::INFO>(strobjIsr.c_str());
Ben Tyner1965e502020-11-20 10:32:24 -0600119
Ben Tyner5adc96e2020-11-20 10:54:12 -0600120 isr_mask = 0xffffffff; // invalid isr mask
121
Ben Tyner5e622d82020-09-11 10:10:24 -0500122 // get interrupt enabled special attentions mask
Ben Tyner8882c322021-02-05 12:13:21 -0600123 if (RC_SUCCESS != fsi_read(fsiTarget, 0x100d, &isr_mask))
Ben Tyneref320152020-01-09 10:31:23 -0600124 {
Ben Tynerfb190542020-11-06 09:27:56 -0600125 // log cfam read error
Ben Tyner5e622d82020-09-11 10:10:24 -0500126 trace<level::INFO>("Error! cfam read 0x100d FAILED");
Ben Tyner7a0dd542021-02-12 09:33:44 -0600127 eventAttentionFail((int)AttnSection::attnHandler |
128 ATTN_PDBG_CFAM);
Ben Tyneref320152020-01-09 10:31:23 -0600129 }
Ben Tyner5adc96e2020-11-20 10:54:12 -0600130 else if (0xffffffff == isr_mask)
131 {
132 trace<level::INFO>("Error! cfam read 0x100d INVALID");
133 continue;
134 }
Ben Tyner5e622d82020-09-11 10:10:24 -0500135 else
136 {
Ben Tyner8882c322021-02-05 12:13:21 -0600137 // trace true mask
138 std::stringstream ssMask;
139 ssMask << "cfam 0x100d = 0x" << std::setw(8)
140 << std::setfill('0') << std::hex << isr_mask;
141 std::string strobjMask = ssMask.str();
142 trace<level::INFO>(strobjMask.c_str());
Ben Tyner1965e502020-11-20 10:32:24 -0600143
Ben Tynerfb190542020-11-06 09:27:56 -0600144 // SBE vital attention active and not masked?
Ben Tyner1965e502020-11-20 10:32:24 -0600145 if (true == activeAttn(isr_val, isr_mask, SBE_ATTN))
Ben Tyner5e622d82020-09-11 10:10:24 -0500146 {
147 active_attentions.emplace_back(Attention::Vital,
148 handleVital, target,
149 i_config);
150 }
151
Ben Tynerfb190542020-11-06 09:27:56 -0600152 // Checkstop attention active and not masked?
153 if (true ==
Ben Tyner1965e502020-11-20 10:32:24 -0600154 activeAttn(isr_val, isr_mask, CHECKSTOP_ATTN))
Ben Tyner5e622d82020-09-11 10:10:24 -0500155 {
156 active_attentions.emplace_back(Attention::Checkstop,
157 handleCheckstop,
158 target, i_config);
159 }
160
Ben Tynerfb190542020-11-06 09:27:56 -0600161 // Special attention active and not masked?
Ben Tyner1965e502020-11-20 10:32:24 -0600162 if (true == activeAttn(isr_val, isr_mask, SPECIAL_ATTN))
Ben Tyner5e622d82020-09-11 10:10:24 -0500163 {
164 active_attentions.emplace_back(Attention::Special,
165 handleSpecial,
166 target, i_config);
167 }
168 } // cfam 0x100d valid
169 } // cfam 0x1007 valid
Ben Tyner8882c322021-02-05 12:13:21 -0600170 } // fsi target enabled
171 } // pib target enabled
Ben Tyner5e622d82020-09-11 10:10:24 -0500172 } // next processor
Ben Tyneref320152020-01-09 10:31:23 -0600173
Ben Tynerb481d902020-03-05 10:24:23 -0600174 // convert to heap, highest priority is at front
175 if (!std::is_heap(active_attentions.begin(), active_attentions.end()))
176 {
177 std::make_heap(active_attentions.begin(), active_attentions.end());
178 }
179
180 // call the attention handler until one is handled or all were attempted
181 while (false == active_attentions.empty())
182 {
183 // handle highest priority attention, done if successful
184 if (RC_SUCCESS == active_attentions.front().handle())
185 {
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500186 // an attention was handled so we are done
Ben Tynerb481d902020-03-05 10:24:23 -0600187 break;
188 }
189
190 // move attention to back of vector
191 std::pop_heap(active_attentions.begin(), active_attentions.end());
192
193 // remove attention from vector
194 active_attentions.pop_back();
195 }
Ben Tyneref320152020-01-09 10:31:23 -0600196}
197
198/**
Ben Tyneref320152020-01-09 10:31:23 -0600199 * @brief Handle checkstop attention
Ben Tyner3fb52e52020-03-31 10:10:07 -0500200 *
201 * @param i_attention Attention object
202 * @return 0 indicates that the checkstop attention was successfully handled
203 * 1 indicates that the checkstop attention was NOT successfully
204 * handled.
Ben Tyneref320152020-01-09 10:31:23 -0600205 */
Ben Tynerb481d902020-03-05 10:24:23 -0600206int handleCheckstop(Attention* i_attention)
Ben Tyneref320152020-01-09 10:31:23 -0600207{
Ben Tyner3fb52e52020-03-31 10:10:07 -0500208 int rc = RC_SUCCESS; // assume checkstop handled
Ben Tyneref320152020-01-09 10:31:23 -0600209
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500210 trace<level::INFO>("checkstop handler started");
211
Ben Tyner3fb52e52020-03-31 10:10:07 -0500212 // if checkstop handling enabled, handle checkstop attention
213 if (false == (i_attention->getConfig()->getFlag(enCheckstop)))
214 {
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500215 trace<level::INFO>("Checkstop handling disabled");
Ben Tyner3fb52e52020-03-31 10:10:07 -0500216 }
217 else
218 {
Zane Shelley9fb73932020-09-15 13:34:57 -0500219 // Look for any attentions found in hardware. This will generate and
Zane Shelley7ae9c8c2020-12-02 20:10:31 -0600220 // commit a PEL if any errors are found.
Zane Shelley9fb73932020-09-15 13:34:57 -0500221 if (true != analyzer::analyzeHardware())
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500222 {
223 rc = RC_ANALYZER_ERROR;
224 }
Ben Tyner3fb52e52020-03-31 10:10:07 -0500225 }
Ben Tyneref320152020-01-09 10:31:23 -0600226
Ben Tyneref320152020-01-09 10:31:23 -0600227 return rc;
228}
229
230/**
231 * @brief Handle special attention
Ben Tyner3fb52e52020-03-31 10:10:07 -0500232 *
233 * @param i_attention Attention object
234 * @return 0 indicates that the special attention was successfully handled
235 * 1 indicates that the special attention was NOT successfully handled
Ben Tyneref320152020-01-09 10:31:23 -0600236 */
Ben Tynerb481d902020-03-05 10:24:23 -0600237int handleSpecial(Attention* i_attention)
Ben Tyneref320152020-01-09 10:31:23 -0600238{
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500239 int rc = RC_SUCCESS; // assume special attention handled
Ben Tyneref320152020-01-09 10:31:23 -0600240
Ben Tynerfb190542020-11-06 09:27:56 -0600241 // The TI info chipop will give us a pointer to the TI info data
Ben Tyner98430b32020-08-19 19:14:02 -0500242 uint8_t* tiInfo = nullptr; // ptr to TI info data
243 uint32_t tiInfoLen = 0; // length of TI info data
244 pdbg_target* attnProc = i_attention->getTarget(); // proc with attention
Ben Tynerb1ebfcb2020-05-08 18:52:48 -0500245
Ben Tyner29651ef2021-02-08 10:51:03 -0600246 bool tiInfoStatic = false; // assume TI info was provided (not created)
247
Ben Tyner98430b32020-08-19 19:14:02 -0500248 if (attnProc != nullptr)
Ben Tyner89c0a7a2020-08-07 12:07:35 -0500249 {
Ben Tyner98430b32020-08-19 19:14:02 -0500250 // The processor PIB target is required for get TI info chipop
251 char path[16];
252 sprintf(path, "/proc%d/pib", pdbg_target_index(attnProc));
253 pdbg_target* tiInfoTarget = pdbg_target_from_path(nullptr, path);
254
255 if (nullptr != tiInfoTarget)
Ben Tyner89c0a7a2020-08-07 12:07:35 -0500256 {
Ben Tyner98430b32020-08-19 19:14:02 -0500257 if (PDBG_TARGET_ENABLED == pdbg_target_probe(tiInfoTarget))
258 {
Ben Tyner98430b32020-08-19 19:14:02 -0500259 sbe_mpipl_get_ti_info(tiInfoTarget, &tiInfo, &tiInfoLen);
260 if (tiInfo == nullptr)
261 {
262 trace<level::INFO>("TI info data ptr is null after call");
Ben Tyner29651ef2021-02-08 10:51:03 -0600263 tiInfo = (uint8_t*)defaultPhypTiInfo;
264 tiInfoStatic = true; // using our TI info
Ben Tyner98430b32020-08-19 19:14:02 -0500265 }
266 }
Ben Tyner89c0a7a2020-08-07 12:07:35 -0500267 }
268 }
Ben Tyneref320152020-01-09 10:31:23 -0600269
Ben Tyner0fe5df42020-12-03 08:57:17 -0600270 bool tiInfoValid = false; // TI area data not valid or not available
271
Ben Tyner792f32f2020-06-02 08:50:47 -0500272 // If TI area exists and is marked valid we can assume TI occurred
273 if ((nullptr != tiInfo) && (0 != tiInfo[0]))
Ben Tyner970fd4f2020-02-19 13:46:42 -0600274 {
Ben Tyner792f32f2020-06-02 08:50:47 -0500275 TiDataArea* tiDataArea = (TiDataArea*)tiInfo;
Ben Tyner7e6611f2020-02-13 16:42:56 -0600276
Ben Tyner8882c322021-02-05 12:13:21 -0600277 std::stringstream ss; // string stream object for tracing
278 std::string strobj; // string object for tracing
Ben Tyner40717722020-09-23 09:43:20 -0500279
Ben Tyner8882c322021-02-05 12:13:21 -0600280 // trace a few known TI data area values
281 ss.str(std::string()); // empty the stream
282 ss.clear(); // clear the stream
283 ss << "TI data command = 0x" << std::setw(2) << std::setfill('0')
284 << std::hex << (int)tiDataArea->command;
285 strobj = ss.str();
286 trace<level::INFO>(strobj.c_str());
Ben Tyner40717722020-09-23 09:43:20 -0500287
Ben Tyner0fe5df42020-12-03 08:57:17 -0600288 // Another check for valid TI Info since it has been seen that
289 // tiInfo[0] != 0 but TI info is not valid
290 if (0xa1 == tiDataArea->command)
Ben Tyner792f32f2020-06-02 08:50:47 -0500291 {
Ben Tyner0fe5df42020-12-03 08:57:17 -0600292 tiInfoValid = true;
293
294 // trace some more data since TI info appears valid
Ben Tyner8882c322021-02-05 12:13:21 -0600295 ss.str(std::string()); // empty the stream
296 ss.clear(); // clear the stream
Ben Tyner7a0dd542021-02-12 09:33:44 -0600297 ss << "TI data term-type = 0x" << std::setw(2) << std::setfill('0')
298 << std::hex << (int)tiDataArea->hbTerminateType;
Ben Tyner8882c322021-02-05 12:13:21 -0600299 strobj = ss.str();
300 trace<level::INFO>(strobj.c_str());
Ben Tyner0fe5df42020-12-03 08:57:17 -0600301
Ben Tyner8882c322021-02-05 12:13:21 -0600302 ss.str(std::string()); // empty the stream
303 ss.clear(); // clear the stream
304 ss << "TI data SRC format = 0x" << std::setw(2) << std::setfill('0')
305 << std::hex << (int)tiDataArea->srcFormat;
306 strobj = ss.str();
307 trace<level::INFO>(strobj.c_str());
Ben Tyner0fe5df42020-12-03 08:57:17 -0600308
Ben Tyner8882c322021-02-05 12:13:21 -0600309 ss.str(std::string()); // empty the stream
310 ss.clear(); // clear the stream
311 ss << "TI data source = 0x" << std::setw(2) << std::setfill('0')
312 << std::hex << (int)tiDataArea->source;
313 strobj = ss.str();
314 trace<level::INFO>(strobj.c_str());
Ben Tyner0fe5df42020-12-03 08:57:17 -0600315
316 if (true == (i_attention->getConfig()->getFlag(enTerminate)))
317 {
318 // Call TI special attention handler
319 rc = tiHandler(tiDataArea);
320 }
Ben Tyner792f32f2020-06-02 08:50:47 -0500321 }
Ben Tyner3fb52e52020-03-31 10:10:07 -0500322 }
Ben Tyner0fe5df42020-12-03 08:57:17 -0600323
324 // If TI area not valid or not available
325 if (false == tiInfoValid)
Ben Tyner3fb52e52020-03-31 10:10:07 -0500326 {
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500327 trace<level::INFO>("TI info NOT available");
Ben Tyner98430b32020-08-19 19:14:02 -0500328
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500329 // if configured to handle breakpoint as default special attention
330 if (i_attention->getConfig()->getFlag(dfltBreakpoint))
Ben Tyner3fb52e52020-03-31 10:10:07 -0500331 {
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500332 if (true == (i_attention->getConfig()->getFlag(enBreakpoints)))
333 {
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500334 // Call the breakpoint special attention handler
335 bpHandler();
336 }
337 }
338 // if configured to handle TI as default special attention
339 else
340 {
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500341 if (true == (i_attention->getConfig()->getFlag(enTerminate)))
342 {
Ben Tynere4f5dbe2020-10-19 07:19:33 -0500343 // Call TI special attention handler
344 rc = tiHandler(nullptr);
345 }
Ben Tyner3fb52e52020-03-31 10:10:07 -0500346 }
Ben Tyner970fd4f2020-02-19 13:46:42 -0600347 }
Ben Tyneref320152020-01-09 10:31:23 -0600348
Ben Tyner792f32f2020-06-02 08:50:47 -0500349 // release TI data buffer
Ben Tyner29651ef2021-02-08 10:51:03 -0600350 if ((nullptr != tiInfo) && (false == tiInfoStatic))
Ben Tyner792f32f2020-06-02 08:50:47 -0500351 {
352 free(tiInfo);
353 }
354
Ben Tyner3fb52e52020-03-31 10:10:07 -0500355 if (RC_SUCCESS != rc)
356 {
Ben Tyner792f32f2020-06-02 08:50:47 -0500357 trace<level::INFO>("Special attn not handled");
Ben Tyner3fb52e52020-03-31 10:10:07 -0500358 }
Ben Tyneref320152020-01-09 10:31:23 -0600359
360 return rc;
361}
362
Ben Tynerfb190542020-11-06 09:27:56 -0600363/**
364 * @brief Determine if attention is active and not masked
365 *
366 * Determine whether an attention needs to be handled and trace details of
367 * attention type and whether it is masked or not.
368 *
369 * @param i_val attention status register
370 * @param i_mask attention true mask register
371 * @param i_attn attention type
372 * @param i_proc processor associated with registers
373 *
374 * @return true if attention is active and not masked, otherwise false
375 */
Ben Tyner1965e502020-11-20 10:32:24 -0600376bool activeAttn(uint32_t i_val, uint32_t i_mask, uint32_t i_attn)
Ben Tynerfb190542020-11-06 09:27:56 -0600377{
Zane Shelley9fb657f2021-01-12 15:30:58 -0600378 bool rc = false; // assume attn masked and/or inactive
Ben Tynerfb190542020-11-06 09:27:56 -0600379
380 // if attention active
381 if (0 != (i_val & i_attn))
382 {
Ben Tynerfb190542020-11-06 09:27:56 -0600383 std::stringstream ss;
Ben Tynerfb190542020-11-06 09:27:56 -0600384
Zane Shelley9fb657f2021-01-12 15:30:58 -0600385 bool validAttn = true; // known attention type
386
Ben Tynerfb190542020-11-06 09:27:56 -0600387 switch (i_attn)
388 {
389 case SBE_ATTN:
390 ss << "SBE attn";
391 break;
392 case CHECKSTOP_ATTN:
393 ss << "Checkstop attn";
394 break;
395 case SPECIAL_ATTN:
396 ss << "Special attn";
397 break;
398 default:
399 ss << "Unknown attn";
400 validAttn = false;
401 }
402
403 // see if attention is masked
404 if (true == validAttn)
405 {
406 if (0 != (i_mask & i_attn))
407 {
408 rc = true; // attention active and not masked
409 }
410 else
411 {
412 ss << " masked";
413 }
414 }
415
Ben Tyner8882c322021-02-05 12:13:21 -0600416 std::string strobj = ss.str(); // ss.str() is temporary
417 trace<level::INFO>(strobj.c_str()); // commit trace stream
Ben Tynerfb190542020-11-06 09:27:56 -0600418 }
419
420 return rc;
421}
422
Ben Tyneref320152020-01-09 10:31:23 -0600423} // namespace attn