blob: 1dffed9a983e9e8f4948554d939a147b340a905c [file] [log] [blame]
Ben Tynerbcf65a82020-12-01 08:46:36 -06001#include <attn/attn_common.hpp>
Ben Tyner5c5db652021-02-22 18:22:35 -06002#include <attn/attn_dbus.hpp>
Ben Tyner0f481a42021-10-19 11:23:43 -05003#include <attn/attn_dump.hpp>
Ben Tynerb797b3e2020-06-29 10:12:05 -05004#include <attn/attn_logging.hpp>
Ben Tynerf5210bb2021-01-05 12:58:10 -06005#include <attn/pel/pel_common.hpp>
Ben Tynerb797b3e2020-06-29 10:12:05 -05006#include <attn/ti_handler.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -06007#include <sdbusplus/bus.hpp>
Ben Tynerff17f962020-09-23 08:21:19 -05008#include <sdbusplus/exception.hpp>
Ben Tyner93067162021-07-23 10:39:30 -05009#include <util/dbus.hpp>
austinfcuibfa831a2022-01-26 15:37:07 -060010#include <util/trace.hpp>
Ben Tyner9ae5ca42020-02-28 13:13:50 -060011
Ben Tyner40717722020-09-23 09:43:20 -050012#include <iomanip>
13#include <iostream>
14
Ben Tyner9ae5ca42020-02-28 13:13:50 -060015namespace attn
16{
17
Ben Tyner8c5e4f42020-10-28 11:11:55 -050018/**
19 * @brief Determine if this is a HB or PHYP TI event
20 *
21 * Use the TI info data area to determine if this is either a HB or a PHYP
22 * TI event then handle the event.
23 *
Ben Tynerf5210bb2021-01-05 12:58:10 -060024 * @param i_tiDataArea pointer to the TI info data
Ben Tyner8c5e4f42020-10-28 11:11:55 -050025 */
Ben Tyner792f32f2020-06-02 08:50:47 -050026int tiHandler(TiDataArea* i_tiDataArea)
Ben Tyner9ae5ca42020-02-28 13:13:50 -060027{
Ben Tynere4f5dbe2020-10-19 07:19:33 -050028 int rc = RC_SUCCESS;
Ben Tyner9ae5ca42020-02-28 13:13:50 -060029
Ben Tynerb8335562021-07-16 12:43:52 -050030 // capture some additional data for logs/traces
31 addHbStatusRegs();
32
Ben Tyner8c5e4f42020-10-28 11:11:55 -050033 // check TI data area if it is available
Ben Tynere4f5dbe2020-10-19 07:19:33 -050034 if (nullptr != i_tiDataArea)
Ben Tyner792f32f2020-06-02 08:50:47 -050035 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050036 // HB v. PHYP TI logic: Only hosboot will fill in hbTerminateType
Ben Tyner8882c322021-02-05 12:13:21 -060037 // and it will be non-zero. Only hostboot will fill out source and
38 // it it will be non-zero. Only PHYP will fill in srcFormat and it
39 // will be non-zero.
Ben Tyner8c5e4f42020-10-28 11:11:55 -050040 if ((0 == i_tiDataArea->hbTerminateType) &&
41 (0 == i_tiDataArea->source) && (0 != i_tiDataArea->srcFormat))
Ben Tynere4f5dbe2020-10-19 07:19:33 -050042 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050043 handlePhypTi(i_tiDataArea);
Ben Tynere4f5dbe2020-10-19 07:19:33 -050044 }
45 else
46 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050047 handleHbTi(i_tiDataArea);
Ben Tynere4f5dbe2020-10-19 07:19:33 -050048 }
Ben Tyner8c5e4f42020-10-28 11:11:55 -050049 }
50 else
51 {
Ben Tyner29651ef2021-02-08 10:51:03 -060052 // TI data was not available This should not happen since we provide
53 // a default TI info in the case where get TI info was not successful.
Ben Tyner7a0dd542021-02-12 09:33:44 -060054 eventAttentionFail((int)AttnSection::tiHandler | ATTN_INFO_NULL);
Ben Tyner29651ef2021-02-08 10:51:03 -060055 rc = RC_NOT_HANDLED;
Ben Tynere4f5dbe2020-10-19 07:19:33 -050056 }
Ben Tyner40717722020-09-23 09:43:20 -050057
Ben Tyner8c5e4f42020-10-28 11:11:55 -050058 return rc;
59}
Ben Tynere4f5dbe2020-10-19 07:19:33 -050060
Ben Tyner8c5e4f42020-10-28 11:11:55 -050061/**
Ben Tyner8c5e4f42020-10-28 11:11:55 -050062 * @brief Handle a PHYP terminate immediate special attention
63 *
64 * The TI info data area will contain information pertaining to the TI
65 * condition. We will wither quiesce the host or initiate a MPIPL depending
66 * depending on the auto reboot configuration. We will also create a PEL which
67 * will contain the TI info data and FFDC data captured in the system journal.
68 *
69 * @param i_tiDataArea pointer to TI information filled in by hostboot
70 */
71void handlePhypTi(TiDataArea* i_tiDataArea)
72{
austinfcuibfa831a2022-01-26 15:37:07 -060073 trace::inf("PHYP TI");
Ben Tyner8c5e4f42020-10-28 11:11:55 -050074
Ben Tyner8c5e4f42020-10-28 11:11:55 -050075 // gather additional data for PEL
76 std::map<std::string, std::string> tiAdditionalData;
Ben Tynere4f5dbe2020-10-19 07:19:33 -050077
Ben Tyner135793a2021-10-27 09:18:41 -050078 // make note of recoverable errors present
79 tiAdditionalData["recoverables"] = recoverableErrors() ? "true" : "false";
80
Ben Tyner8c5e4f42020-10-28 11:11:55 -050081 if (nullptr != i_tiDataArea)
82 {
83 parsePhypOpalTiInfo(tiAdditionalData, i_tiDataArea);
Ben Tyner29651ef2021-02-08 10:51:03 -060084
85 tiAdditionalData["Subsystem"] =
86 std::to_string(static_cast<uint8_t>(pel::SubsystemID::hypervisor));
87
Ben Tyner9d4f91c2021-02-09 08:27:58 -060088 // Copy all ascii src chars to additional data
89 char srcChar[33]; // 32 ascii chars + null term
90 memcpy(srcChar, &(i_tiDataArea->asciiData0), 32);
91 srcChar[32] = 0;
Ben Tyner29651ef2021-02-08 10:51:03 -060092 tiAdditionalData["SrcAscii"] = std::string{srcChar};
93
94 // TI event
95 eventTerminate(tiAdditionalData, (char*)i_tiDataArea);
Ben Tyner8c5e4f42020-10-28 11:11:55 -050096 }
Ben Tyner29651ef2021-02-08 10:51:03 -060097 else
98 {
99 // TI data was not available This should not happen since we provide
100 // a default TI info in the case where get TI info was not successful.
Ben Tyner7a0dd542021-02-12 09:33:44 -0600101 eventAttentionFail((int)AttnSection::handlePhypTi | ATTN_INFO_NULL);
Ben Tyner29651ef2021-02-08 10:51:03 -0600102 }
Ben Tyner063f6bd2021-03-26 07:45:56 -0500103
104 // We are finished creating the event log entries so transition host to
105 // the required state.
Ben Tyner39fcf652021-10-19 20:38:29 -0500106 if (true == util::dbus::dumpPolicyEnabled())
Ben Tyner063f6bd2021-03-26 07:45:56 -0500107 {
Ben Tyner39fcf652021-10-19 20:38:29 -0500108 // MPIPL is considered a "dump" so we will qualify this transition with
109 // the dumpPolicyEnabled property. MPIPL is triggered by by starting
110 // the host "crash" target.
Ben Tyner93067162021-07-23 10:39:30 -0500111 util::dbus::transitionHost(util::dbus::HostState::Crash);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500112 }
113 else
114 {
Ben Tyner39fcf652021-10-19 20:38:29 -0500115 // If dumpPolicyEnabled property is disabled we will quiesce the host
Ben Tyner93067162021-07-23 10:39:30 -0500116 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500117 }
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500118}
119
120/**
Ben Tyner0f481a42021-10-19 11:23:43 -0500121 * @brief Handle a hostboot terminate immediate with SRC provided
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500122 *
Ben Tyner0f481a42021-10-19 11:23:43 -0500123 * The TI info will contain the log ID of the event log that has already been
124 * submitted by hostboot. In this case the attention handler does not need to
125 * create a PEL. A hostboot dump may be requested and the host will be
126 * transitioned.
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500127 *
128 * @param i_tiDataArea pointer to TI information filled in by hostboot
129 */
Ben Tyner0f481a42021-10-19 11:23:43 -0500130void handleHbTiWithEid(TiDataArea* i_tiDataArea)
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500131{
austinfcuibfa831a2022-01-26 15:37:07 -0600132 trace::inf("HB TI with PLID/EID");
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500133
Ben Tyner0f481a42021-10-19 11:23:43 -0500134 if (nullptr != i_tiDataArea)
135 {
136 // see if HB dump is requested
137 if (0 != i_tiDataArea->hbDumpFlag)
138 {
139 // retrieve log ID from TI info data
140 uint32_t logId = be32toh(i_tiDataArea->asciiData1);
Zane Shelley611b3442021-11-19 16:02:01 -0600141 requestDump(logId, DumpParameters{0, DumpType::Hostboot});
Ben Tyner0f481a42021-10-19 11:23:43 -0500142 }
143 }
144
145 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
146}
147
148/**
149 * @brief Handle a hostboot terminate immediate with SRC provided
150 *
151 * The TI info will contain the reason code and additional data necessary
152 * to create a PEL on behalf of hostboot. A hostboot dump may be created
153 * (after generating the PEL) and the host may be transitioned depending
154 * on the reason code.
155 *
156 * @param i_tiDataArea pointer to TI information filled in by hostboot
157 */
158void handleHbTiWithSrc(TiDataArea* i_tiDataArea)
159{
austinfcuibfa831a2022-01-26 15:37:07 -0600160 trace::inf("HB TI with SRC");
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500161
162 // handle specific hostboot reason codes
163 if (nullptr != i_tiDataArea)
164 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500165 // Reason code is byte 2 and 3 of 4 byte srcWord12HbWord0
166 uint16_t reasonCode = be32toh(i_tiDataArea->srcWord12HbWord0);
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500167
austinfcuibfa831a2022-01-26 15:37:07 -0600168 trace::inf("reason code %04x", reasonCode);
Ben Tyner86aa97a2021-12-12 21:29:16 -0600169
170 // for clean shutdown (reason code 050B) no PEL and no dump
Ben Tyner0f481a42021-10-19 11:23:43 -0500171 if (reasonCode != HB_SRC_SHUTDOWN_REQUEST)
Ben Tyner29651ef2021-02-08 10:51:03 -0600172 {
Ben Tyner5c5db652021-02-22 18:22:35 -0600173 // gather additional data for PEL
174 std::map<std::string, std::string> tiAdditionalData;
175
Ben Tyner135793a2021-10-27 09:18:41 -0500176 // make note of recoverable errors present
177 tiAdditionalData["recoverables"] =
178 recoverableErrors() ? "true" : "false";
179
Ben Tyner5c5db652021-02-22 18:22:35 -0600180 parseHbTiInfo(tiAdditionalData, i_tiDataArea);
181
Ben Tyner29651ef2021-02-08 10:51:03 -0600182 tiAdditionalData["Subsystem"] = std::to_string(
183 static_cast<uint8_t>(pel::SubsystemID::hostboot));
184
austinfcuibfa831a2022-01-26 15:37:07 -0600185 // TODO: will update as part of other story.
Ben Tyner5c5db652021-02-22 18:22:35 -0600186 // Translate hex src value to ascii. This results in an 8
187 // character SRC (hostboot SRC is 32 bits)
Ben Tyner9d4f91c2021-02-09 08:27:58 -0600188 std::stringstream src;
Ben Tyner4bbcb382021-02-22 09:29:00 -0600189 src << std::setw(8) << std::setfill('0') << std::uppercase
190 << std::hex << be32toh(i_tiDataArea->srcWord12HbWord0);
Ben Tyner9d4f91c2021-02-09 08:27:58 -0600191 tiAdditionalData["SrcAscii"] = src.str();
Ben Tyner29651ef2021-02-08 10:51:03 -0600192
Ben Tyner86aa97a2021-12-12 21:29:16 -0600193 // dump flag is only valid for TI with EID (not TI with SRC)
austinfcuibfa831a2022-01-26 15:37:07 -0600194 trace::inf("Ignoring TI info dump flag for HB TI with SRC");
Ben Tyner86aa97a2021-12-12 21:29:16 -0600195 tiAdditionalData["Dump"] = "true";
Ben Tyner5c5db652021-02-22 18:22:35 -0600196
197 // Generate event log
Ben Tyner29651ef2021-02-08 10:51:03 -0600198 eventTerminate(tiAdditionalData, (char*)i_tiDataArea);
199 }
Ben Tyner0f481a42021-10-19 11:23:43 -0500200
201 if (HB_SRC_KEY_TRANSITION != reasonCode)
Ben Tyner5c5db652021-02-22 18:22:35 -0600202 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500203 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
Ben Tyner5c5db652021-02-22 18:22:35 -0600204 }
Ben Tyner40717722020-09-23 09:43:20 -0500205 }
Ben Tyner0f481a42021-10-19 11:23:43 -0500206 else
Ben Tyner063f6bd2021-03-26 07:45:56 -0500207 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500208 // TI data was not available, this should not happen
209 eventAttentionFail((int)AttnSection::handleHbTi | ATTN_INFO_NULL);
210 }
211}
212
213/**
214 * @brief Handle a hostboot terminate immediate special attention
215 *
216 * The TI info data area will contain information pertaining to the TI
217 * condition. The course of action to take regarding the host state will
218 * depend on the contents of the TI info data area. We will also create a
219 * PEL containing the TI info data and FFDC data captured in the system
220 * journal.
221 *
222 * @param i_tiDataArea pointer to TI information filled in by hostboot
223 */
224void handleHbTi(TiDataArea* i_tiDataArea)
225{
austinfcuibfa831a2022-01-26 15:37:07 -0600226 trace::inf("HB TI");
Ben Tyner0f481a42021-10-19 11:23:43 -0500227
228 // handle specific hostboot reason codes
229 if (nullptr != i_tiDataArea)
230 {
231 uint8_t terminateType = i_tiDataArea->hbTerminateType;
232
233 if (TI_WITH_SRC == terminateType)
234 {
235 handleHbTiWithSrc(i_tiDataArea);
236 }
237 else
238 {
239 handleHbTiWithEid(i_tiDataArea);
240 }
241 }
242 else
243 {
244 // TI data was not available, this should not happen
245 eventAttentionFail((int)AttnSection::handleHbTi | ATTN_INFO_NULL);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500246 }
Ben Tyner40717722020-09-23 09:43:20 -0500247}
248
249/** @brief Parse the TI info data area into map as PHYP/OPAL data */
250void parsePhypOpalTiInfo(std::map<std::string, std::string>& i_map,
251 TiDataArea* i_tiDataArea)
252{
Ben Tyner1c4b02e2020-11-09 14:00:29 -0600253 if (nullptr == i_tiDataArea)
254 {
255 return;
256 }
257
austinfcuibfa831a2022-01-26 15:37:07 -0600258 // TODO: will update as part of other story.
Ben Tyner40717722020-09-23 09:43:20 -0500259 std::stringstream ss;
260
Ben Tynerfeeea832021-04-06 10:08:11 -0500261 ss << "0x00 TI Area Valid:" << std::setw(2) << std::setfill('0') << std::hex
262 << (int)i_tiDataArea->tiAreaValid << ":";
263 ss << "0x01 Command:" << std::setw(2) << std::setfill('0') << std::hex
264 << (int)i_tiDataArea->command << ":";
265 ss << "0x02 Num. Data Bytes:" << std::setw(4) << std::setfill('0')
266 << std::hex << be16toh(i_tiDataArea->numDataBytes) << ":";
267 ss << "0x04 Reserved:" << std::setw(2) << std::setfill('0') << std::hex
268 << (int)i_tiDataArea->reserved1 << ":";
269 ss << "0x06 HWDump Type:" << std::setw(4) << std::setfill('0') << std::hex
270 << be16toh(i_tiDataArea->hardwareDumpType) << ":";
271 ss << "0x08 SRC Format:" << std::setw(2) << std::setfill('0') << std::hex
272 << (int)i_tiDataArea->srcFormat << ":";
273 ss << "0x09 SRC Flags:" << std::setw(2) << std::setfill('0') << std::hex
274 << (int)i_tiDataArea->srcFlags << ":";
275 ss << "0x0a Num. ASCII Words:" << std::setw(2) << std::setfill('0')
276 << std::hex << (int)i_tiDataArea->numAsciiWords << ":";
277 ss << "0x0b Num. Hex Words:" << std::setw(2) << std::setfill('0')
278 << std::hex << (int)i_tiDataArea->numHexWords << ":";
279 ss << "0x0e Length of SRC:" << std::setw(4) << std::setfill('0') << std::hex
280 << be16toh(i_tiDataArea->lenSrc) << ":";
281 ss << "0x10 SRC Word 12:" << std::setw(8) << std::setfill('0') << std::hex
282 << be32toh(i_tiDataArea->srcWord12HbWord0) << ":";
283 ss << "0x14 SRC Word 13:" << std::setw(8) << std::setfill('0') << std::hex
284 << be32toh(i_tiDataArea->srcWord13HbWord2) << ":";
285 ss << "0x18 SRC Word 14:" << std::setw(8) << std::setfill('0') << std::hex
286 << be32toh(i_tiDataArea->srcWord14HbWord3) << ":";
287 ss << "0x1c SRC Word 15:" << std::setw(8) << std::setfill('0') << std::hex
288 << be32toh(i_tiDataArea->srcWord15HbWord4) << ":";
289 ss << "0x20 SRC Word 16:" << std::setw(8) << std::setfill('0') << std::hex
290 << be32toh(i_tiDataArea->srcWord16HbWord5) << ":";
291 ss << "0x24 SRC Word 17:" << std::setw(8) << std::setfill('0') << std::hex
292 << be32toh(i_tiDataArea->srcWord17HbWord6) << ":";
293 ss << "0x28 SRC Word 18:" << std::setw(8) << std::setfill('0') << std::hex
294 << be32toh(i_tiDataArea->srcWord18HbWord7) << ":";
295 ss << "0x2c SRC Word 19:" << std::setw(8) << std::setfill('0') << std::hex
296 << be32toh(i_tiDataArea->srcWord19HbWord8) << ":";
297 ss << "0x30 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
298 << be32toh(i_tiDataArea->asciiData0) << ":";
299 ss << "0x34 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
300 << be32toh(i_tiDataArea->asciiData1) << ":";
301 ss << "0x38 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
302 << be32toh(i_tiDataArea->asciiData2) << ":";
303 ss << "0x3c ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
304 << be32toh(i_tiDataArea->asciiData3) << ":";
305 ss << "0x40 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
306 << be32toh(i_tiDataArea->asciiData4) << ":";
307 ss << "0x44 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
308 << be32toh(i_tiDataArea->asciiData5) << ":";
309 ss << "0x48 ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
310 << be32toh(i_tiDataArea->asciiData6) << ":";
311 ss << "0x4c ASCII Data:" << std::setw(8) << std::setfill('0') << std::hex
312 << be32toh(i_tiDataArea->asciiData7) << ":";
313 ss << "0x50 Location:" << std::setw(2) << std::setfill('0') << std::hex
314 << (int)i_tiDataArea->location << ":";
315 ss << "0x51 Code Sections:" << std::setw(2) << std::setfill('0') << std::hex
316 << (int)i_tiDataArea->codeSection << ":";
317 ss << "0x52 Additional Size:" << std::setw(2) << std::setfill('0')
318 << std::hex << (int)i_tiDataArea->additionalSize << ":";
319 ss << "0x53 Additional Data:" << std::setw(2) << std::setfill('0')
320 << std::hex << (int)i_tiDataArea->andData;
Ben Tyner40717722020-09-23 09:43:20 -0500321
322 std::string key, value;
323 char delim = ':';
324
325 while (std::getline(ss, key, delim))
326 {
327 std::getline(ss, value, delim);
328 i_map[key] = value;
329 }
330}
331
332/** @brief Parse the TI info data area into map as hostboot data */
333void parseHbTiInfo(std::map<std::string, std::string>& i_map,
334 TiDataArea* i_tiDataArea)
335{
Ben Tyner1c4b02e2020-11-09 14:00:29 -0600336 if (nullptr == i_tiDataArea)
337 {
338 return;
339 }
340
austinfcuibfa831a2022-01-26 15:37:07 -0600341 // TODO: will update as part of other story.
Ben Tyner40717722020-09-23 09:43:20 -0500342 std::stringstream ss;
343
Ben Tynerfeeea832021-04-06 10:08:11 -0500344 ss << "0x00 TI Area Valid:" << std::setw(2) << std::setfill('0') << std::hex
345 << (int)i_tiDataArea->tiAreaValid << ":";
346 ss << "0x04 Reserved:" << std::setw(2) << std::setfill('0') << std::hex
347 << (int)i_tiDataArea->reserved1 << ":";
348 ss << "0x05 HB_Term. Type:" << std::setw(2) << std::setfill('0') << std::hex
349 << (int)i_tiDataArea->hbTerminateType << ":";
350 ss << "0x0c HB Dump Flag:" << std::setw(2) << std::setfill('0') << std::hex
351 << (int)i_tiDataArea->hbDumpFlag << ":";
352 ss << "0x0d Source:" << std::setw(2) << std::setfill('0') << std::hex
353 << (int)i_tiDataArea->source << ":";
354 ss << "0x10 HB Word 0:" << std::setw(8) << std::setfill('0') << std::hex
355 << be32toh(i_tiDataArea->srcWord12HbWord0) << ":";
356 ss << "0x14 HB Word 2:" << std::setw(8) << std::setfill('0') << std::hex
357 << be32toh(i_tiDataArea->srcWord13HbWord2) << ":";
358 ss << "0x18 HB Word 3:" << std::setw(8) << std::setfill('0') << std::hex
359 << be32toh(i_tiDataArea->srcWord14HbWord3) << ":";
360 ss << "0x1c HB Word 4:" << std::setw(8) << std::setfill('0') << std::hex
361 << be32toh(i_tiDataArea->srcWord15HbWord4) << ":";
362 ss << "0x20 HB Word 5:" << std::setw(8) << std::setfill('0') << std::hex
363 << be32toh(i_tiDataArea->srcWord16HbWord5) << ":";
364 ss << "0x24 HB Word 6:" << std::setw(8) << std::setfill('0') << std::hex
365 << be32toh(i_tiDataArea->srcWord17HbWord6) << ":";
366 ss << "0x28 HB Word 7:" << std::setw(8) << std::setfill('0') << std::hex
367 << be32toh(i_tiDataArea->srcWord18HbWord7) << ":";
368 ss << "0x2c HB Word 8:" << std::setw(8) << std::setfill('0') << std::hex
369 << be32toh(i_tiDataArea->srcWord19HbWord8) << ":";
370 ss << "0x30 error_data:" << std::setw(8) << std::setfill('0') << std::hex
371 << be32toh(i_tiDataArea->asciiData0) << ":";
372 ss << "0x34 EID:" << std::setw(8) << std::setfill('0') << std::hex
373 << be32toh(i_tiDataArea->asciiData1);
Ben Tyner40717722020-09-23 09:43:20 -0500374
375 std::string key, value;
376 char delim = ':';
377
378 while (std::getline(ss, key, delim))
379 {
380 std::getline(ss, value, delim);
381 i_map[key] = value;
382 }
383}
384
Ben Tyner9ae5ca42020-02-28 13:13:50 -0600385} // namespace attn