blob: 33d6322730db7976f95ba5806e83fb82954e037e [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
Patrick Williams710101c2024-02-13 21:37:47 -060012#include <format>
Ben Tyner40717722020-09-23 09:43:20 -050013#include <iomanip>
14#include <iostream>
15
Ben Tyner9ae5ca42020-02-28 13:13:50 -060016namespace attn
17{
18
Ben Tyner8c5e4f42020-10-28 11:11:55 -050019/**
20 * @brief Determine if this is a HB or PHYP TI event
21 *
22 * Use the TI info data area to determine if this is either a HB or a PHYP
23 * TI event then handle the event.
24 *
Ben Tynerf5210bb2021-01-05 12:58:10 -060025 * @param i_tiDataArea pointer to the TI info data
Ben Tyner8c5e4f42020-10-28 11:11:55 -050026 */
Ben Tyner792f32f2020-06-02 08:50:47 -050027int tiHandler(TiDataArea* i_tiDataArea)
Ben Tyner9ae5ca42020-02-28 13:13:50 -060028{
Ben Tynere4f5dbe2020-10-19 07:19:33 -050029 int rc = RC_SUCCESS;
Ben Tyner9ae5ca42020-02-28 13:13:50 -060030
Ben Tynerb8335562021-07-16 12:43:52 -050031 // capture some additional data for logs/traces
32 addHbStatusRegs();
33
Ben Tyner8c5e4f42020-10-28 11:11:55 -050034 // check TI data area if it is available
Ben Tynere4f5dbe2020-10-19 07:19:33 -050035 if (nullptr != i_tiDataArea)
Ben Tyner792f32f2020-06-02 08:50:47 -050036 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050037 // HB v. PHYP TI logic: Only hosboot will fill in hbTerminateType
Ben Tyner8882c322021-02-05 12:13:21 -060038 // and it will be non-zero. Only hostboot will fill out source and
39 // it it will be non-zero. Only PHYP will fill in srcFormat and it
40 // will be non-zero.
Ben Tyner8c5e4f42020-10-28 11:11:55 -050041 if ((0 == i_tiDataArea->hbTerminateType) &&
42 (0 == i_tiDataArea->source) && (0 != i_tiDataArea->srcFormat))
Ben Tynere4f5dbe2020-10-19 07:19:33 -050043 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050044 handlePhypTi(i_tiDataArea);
Ben Tynere4f5dbe2020-10-19 07:19:33 -050045 }
46 else
47 {
Ben Tyner8c5e4f42020-10-28 11:11:55 -050048 handleHbTi(i_tiDataArea);
Ben Tynere4f5dbe2020-10-19 07:19:33 -050049 }
Ben Tyner8c5e4f42020-10-28 11:11:55 -050050 }
51 else
52 {
Ben Tyner29651ef2021-02-08 10:51:03 -060053 // TI data was not available This should not happen since we provide
54 // a default TI info in the case where get TI info was not successful.
Ben Tyner7a0dd542021-02-12 09:33:44 -060055 eventAttentionFail((int)AttnSection::tiHandler | ATTN_INFO_NULL);
Ben Tyner29651ef2021-02-08 10:51:03 -060056 rc = RC_NOT_HANDLED;
Ben Tynere4f5dbe2020-10-19 07:19:33 -050057 }
Ben Tyner40717722020-09-23 09:43:20 -050058
Ben Tyner8c5e4f42020-10-28 11:11:55 -050059 return rc;
60}
Ben Tynere4f5dbe2020-10-19 07:19:33 -050061
Ben Tyner8c5e4f42020-10-28 11:11:55 -050062/**
Ben Tyner8c5e4f42020-10-28 11:11:55 -050063 * @brief Handle a PHYP terminate immediate special attention
64 *
65 * The TI info data area will contain information pertaining to the TI
66 * condition. We will wither quiesce the host or initiate a MPIPL depending
67 * depending on the auto reboot configuration. We will also create a PEL which
68 * will contain the TI info data and FFDC data captured in the system journal.
69 *
70 * @param i_tiDataArea pointer to TI information filled in by hostboot
71 */
72void handlePhypTi(TiDataArea* i_tiDataArea)
73{
austinfcuibfa831a2022-01-26 15:37:07 -060074 trace::inf("PHYP TI");
Ben Tyner8c5e4f42020-10-28 11:11:55 -050075
Ben Tyner8c5e4f42020-10-28 11:11:55 -050076 // gather additional data for PEL
77 std::map<std::string, std::string> tiAdditionalData;
Ben Tynere4f5dbe2020-10-19 07:19:33 -050078
Ben Tyner135793a2021-10-27 09:18:41 -050079 // make note of recoverable errors present
80 tiAdditionalData["recoverables"] = recoverableErrors() ? "true" : "false";
81
Ben Tyner8c5e4f42020-10-28 11:11:55 -050082 if (nullptr != i_tiDataArea)
83 {
84 parsePhypOpalTiInfo(tiAdditionalData, i_tiDataArea);
Ben Tyner29651ef2021-02-08 10:51:03 -060085
86 tiAdditionalData["Subsystem"] =
87 std::to_string(static_cast<uint8_t>(pel::SubsystemID::hypervisor));
88
Ben Tyner9d4f91c2021-02-09 08:27:58 -060089 // Copy all ascii src chars to additional data
90 char srcChar[33]; // 32 ascii chars + null term
91 memcpy(srcChar, &(i_tiDataArea->asciiData0), 32);
Patrick Williams27dd6362023-05-10 07:51:20 -050092 srcChar[32] = 0;
Ben Tyner29651ef2021-02-08 10:51:03 -060093 tiAdditionalData["SrcAscii"] = std::string{srcChar};
94
95 // TI event
96 eventTerminate(tiAdditionalData, (char*)i_tiDataArea);
Ben Tyner8c5e4f42020-10-28 11:11:55 -050097 }
Ben Tyner29651ef2021-02-08 10:51:03 -060098 else
99 {
100 // TI data was not available This should not happen since we provide
101 // a default TI info in the case where get TI info was not successful.
Ben Tyner7a0dd542021-02-12 09:33:44 -0600102 eventAttentionFail((int)AttnSection::handlePhypTi | ATTN_INFO_NULL);
Ben Tyner29651ef2021-02-08 10:51:03 -0600103 }
Ben Tyner063f6bd2021-03-26 07:45:56 -0500104
105 // We are finished creating the event log entries so transition host to
106 // the required state.
Ben Tyner39fcf652021-10-19 20:38:29 -0500107 if (true == util::dbus::dumpPolicyEnabled())
Ben Tyner063f6bd2021-03-26 07:45:56 -0500108 {
Ben Tyner39fcf652021-10-19 20:38:29 -0500109 // MPIPL is considered a "dump" so we will qualify this transition with
110 // the dumpPolicyEnabled property. MPIPL is triggered by by starting
111 // the host "crash" target.
Ben Tyner93067162021-07-23 10:39:30 -0500112 util::dbus::transitionHost(util::dbus::HostState::Crash);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500113 }
114 else
115 {
Ben Tyner39fcf652021-10-19 20:38:29 -0500116 // If dumpPolicyEnabled property is disabled we will quiesce the host
Ben Tyner93067162021-07-23 10:39:30 -0500117 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500118 }
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500119}
120
121/**
Ben Tyner0f481a42021-10-19 11:23:43 -0500122 * @brief Handle a hostboot terminate immediate with SRC provided
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500123 *
Ben Tyner0f481a42021-10-19 11:23:43 -0500124 * The TI info will contain the log ID of the event log that has already been
125 * submitted by hostboot. In this case the attention handler does not need to
126 * create a PEL. A hostboot dump may be requested and the host will be
127 * transitioned.
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500128 *
129 * @param i_tiDataArea pointer to TI information filled in by hostboot
130 */
Ben Tyner0f481a42021-10-19 11:23:43 -0500131void handleHbTiWithEid(TiDataArea* i_tiDataArea)
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500132{
austinfcuibfa831a2022-01-26 15:37:07 -0600133 trace::inf("HB TI with PLID/EID");
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500134
Ben Tyner0f481a42021-10-19 11:23:43 -0500135 if (nullptr != i_tiDataArea)
136 {
Zane Shelley44d6f252024-10-18 15:12:19 -0500137 // Trace relevant TI data.
138 trace::inf("TI data HB Flags = 0x%02x", i_tiDataArea->hbFlags);
139 trace::inf("TI data HB Word 0 = 0x%08x",
140 be32toh(i_tiDataArea->srcWord12HbWord0));
141 trace::inf("TI data HB Word 2 = 0x%08x",
142 be32toh(i_tiDataArea->srcWord13HbWord2));
143 trace::inf("TI data HB Word 3 = 0x%08x",
144 be32toh(i_tiDataArea->srcWord14HbWord3));
145 trace::inf("TI data HB Word 4 = 0x%08x",
146 be32toh(i_tiDataArea->srcWord15HbWord4));
147 trace::inf("TI data HB Word 5 = 0x%08x",
148 be32toh(i_tiDataArea->srcWord16HbWord5));
149 trace::inf("TI data HB Word 6 = 0x%08x",
150 be32toh(i_tiDataArea->srcWord17HbWord6));
151 trace::inf("TI data HB Word 7 = 0x%08x",
152 be32toh(i_tiDataArea->srcWord18HbWord7));
153 trace::inf("TI data HB Word 8 = 0x%08x",
154 be32toh(i_tiDataArea->srcWord19HbWord8));
155 trace::inf("TI data Error Data = 0x%08x",
156 be32toh(i_tiDataArea->asciiData0));
157 trace::inf("TI data EID = 0x%08x", be32toh(i_tiDataArea->asciiData1));
158
Ben Tyner0f481a42021-10-19 11:23:43 -0500159 // see if HB dump is requested
Ben Tynerac5bd052022-03-03 14:09:13 -0600160 if (i_tiDataArea->hbFlags & hbDumpFlag)
Ben Tyner0f481a42021-10-19 11:23:43 -0500161 {
162 // retrieve log ID from TI info data
163 uint32_t logId = be32toh(i_tiDataArea->asciiData1);
Zane Shelley611b3442021-11-19 16:02:01 -0600164 requestDump(logId, DumpParameters{0, DumpType::Hostboot});
Ben Tyner0f481a42021-10-19 11:23:43 -0500165 }
166 }
167
168 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
169}
170
171/**
172 * @brief Handle a hostboot terminate immediate with SRC provided
173 *
174 * The TI info will contain the reason code and additional data necessary
175 * to create a PEL on behalf of hostboot. A hostboot dump may be created
176 * (after generating the PEL) and the host may be transitioned depending
177 * on the reason code.
178 *
179 * @param i_tiDataArea pointer to TI information filled in by hostboot
180 */
181void handleHbTiWithSrc(TiDataArea* i_tiDataArea)
182{
austinfcuibfa831a2022-01-26 15:37:07 -0600183 trace::inf("HB TI with SRC");
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500184
185 // handle specific hostboot reason codes
186 if (nullptr != i_tiDataArea)
187 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500188 // Reason code is byte 2 and 3 of 4 byte srcWord12HbWord0
189 uint16_t reasonCode = be32toh(i_tiDataArea->srcWord12HbWord0);
Ben Tyner8c5e4f42020-10-28 11:11:55 -0500190
austinfcuibfa831a2022-01-26 15:37:07 -0600191 trace::inf("reason code %04x", reasonCode);
Ben Tyner86aa97a2021-12-12 21:29:16 -0600192
193 // for clean shutdown (reason code 050B) no PEL and no dump
Ben Tyner0f481a42021-10-19 11:23:43 -0500194 if (reasonCode != HB_SRC_SHUTDOWN_REQUEST)
Ben Tyner29651ef2021-02-08 10:51:03 -0600195 {
Ben Tyner5c5db652021-02-22 18:22:35 -0600196 // gather additional data for PEL
197 std::map<std::string, std::string> tiAdditionalData;
198
Ben Tyner135793a2021-10-27 09:18:41 -0500199 // make note of recoverable errors present
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400200 tiAdditionalData["recoverables"] =
201 recoverableErrors() ? "true" : "false";
Ben Tyner135793a2021-10-27 09:18:41 -0500202
Ben Tyner5c5db652021-02-22 18:22:35 -0600203 parseHbTiInfo(tiAdditionalData, i_tiDataArea);
204
Ben Tyner29651ef2021-02-08 10:51:03 -0600205 tiAdditionalData["Subsystem"] = std::to_string(
206 static_cast<uint8_t>(pel::SubsystemID::hostboot));
207
Ben Tyner5c5db652021-02-22 18:22:35 -0600208 // Translate hex src value to ascii. This results in an 8
209 // character SRC (hostboot SRC is 32 bits)
austinfcui444fa1c2022-02-08 10:20:37 -0600210 tiAdditionalData["SrcAscii"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600211 std::format("{:08X}", be32toh(i_tiDataArea->srcWord12HbWord0));
Ben Tyner29651ef2021-02-08 10:51:03 -0600212
Ben Tyner86aa97a2021-12-12 21:29:16 -0600213 // dump flag is only valid for TI with EID (not TI with SRC)
austinfcuibfa831a2022-01-26 15:37:07 -0600214 trace::inf("Ignoring TI info dump flag for HB TI with SRC");
Ben Tyner86aa97a2021-12-12 21:29:16 -0600215 tiAdditionalData["Dump"] = "true";
Ben Tyner5c5db652021-02-22 18:22:35 -0600216
Ben Tynerac5bd052022-03-03 14:09:13 -0600217 // TI with SRC will honor hbNotVisibleFlag
218 if (i_tiDataArea->hbFlags & hbNotVisibleFlag)
219 {
220 tiAdditionalData["hidden"] = "true";
221 }
222
Ben Tyner5c5db652021-02-22 18:22:35 -0600223 // Generate event log
Ben Tyner29651ef2021-02-08 10:51:03 -0600224 eventTerminate(tiAdditionalData, (char*)i_tiDataArea);
225 }
Ben Tyner0f481a42021-10-19 11:23:43 -0500226
227 if (HB_SRC_KEY_TRANSITION != reasonCode)
Ben Tyner5c5db652021-02-22 18:22:35 -0600228 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500229 util::dbus::transitionHost(util::dbus::HostState::Quiesce);
Ben Tyner5c5db652021-02-22 18:22:35 -0600230 }
Ben Tyner40717722020-09-23 09:43:20 -0500231 }
Ben Tyner0f481a42021-10-19 11:23:43 -0500232 else
Ben Tyner063f6bd2021-03-26 07:45:56 -0500233 {
Ben Tyner0f481a42021-10-19 11:23:43 -0500234 // TI data was not available, this should not happen
235 eventAttentionFail((int)AttnSection::handleHbTi | ATTN_INFO_NULL);
236 }
237}
238
239/**
240 * @brief Handle a hostboot terminate immediate special attention
241 *
242 * The TI info data area will contain information pertaining to the TI
243 * condition. The course of action to take regarding the host state will
244 * depend on the contents of the TI info data area. We will also create a
245 * PEL containing the TI info data and FFDC data captured in the system
246 * journal.
247 *
248 * @param i_tiDataArea pointer to TI information filled in by hostboot
249 */
250void handleHbTi(TiDataArea* i_tiDataArea)
251{
austinfcuibfa831a2022-01-26 15:37:07 -0600252 trace::inf("HB TI");
Ben Tyner0f481a42021-10-19 11:23:43 -0500253
254 // handle specific hostboot reason codes
255 if (nullptr != i_tiDataArea)
256 {
257 uint8_t terminateType = i_tiDataArea->hbTerminateType;
258
259 if (TI_WITH_SRC == terminateType)
260 {
261 handleHbTiWithSrc(i_tiDataArea);
262 }
263 else
264 {
265 handleHbTiWithEid(i_tiDataArea);
266 }
267 }
268 else
269 {
270 // TI data was not available, this should not happen
271 eventAttentionFail((int)AttnSection::handleHbTi | ATTN_INFO_NULL);
Ben Tyner063f6bd2021-03-26 07:45:56 -0500272 }
Ben Tyner40717722020-09-23 09:43:20 -0500273}
274
275/** @brief Parse the TI info data area into map as PHYP/OPAL data */
276void parsePhypOpalTiInfo(std::map<std::string, std::string>& i_map,
277 TiDataArea* i_tiDataArea)
278{
Ben Tyner1c4b02e2020-11-09 14:00:29 -0600279 if (nullptr == i_tiDataArea)
280 {
281 return;
282 }
283
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400284 i_map["0x00 TI Area Valid"] =
285 std::format("{:02x}", i_tiDataArea->tiAreaValid);
Patrick Williams710101c2024-02-13 21:37:47 -0600286 i_map["0x01 Command"] = std::format("{:02x}", i_tiDataArea->command);
austinfcui444fa1c2022-02-08 10:20:37 -0600287 i_map["0x02 Num. Data Bytes"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600288 std::format("{:04x}", be16toh(i_tiDataArea->numDataBytes));
289 i_map["0x04 Reserved"] = std::format("{:02x}", i_tiDataArea->reserved1);
austinfcui444fa1c2022-02-08 10:20:37 -0600290 i_map["0x06 HWDump Type"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600291 std::format("{:04x}", be16toh(i_tiDataArea->hardwareDumpType));
292 i_map["0x08 SRC Format"] = std::format("{:02x}", i_tiDataArea->srcFormat);
293 i_map["0x09 SRC Flags"] = std::format("{:02x}", i_tiDataArea->srcFlags);
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400294 i_map["0x0a Num. ASCII Words"] =
295 std::format("{:02x}", i_tiDataArea->numAsciiWords);
296 i_map["0x0b Num. Hex Words"] =
297 std::format("{:02x}", i_tiDataArea->numHexWords);
298 i_map["0x0e Length of SRC"] =
299 std::format("{:04x}", be16toh(i_tiDataArea->lenSrc));
austinfcui444fa1c2022-02-08 10:20:37 -0600300 i_map["0x10 SRC Word 12"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600301 std::format("{:08x}", be32toh(i_tiDataArea->srcWord12HbWord0));
austinfcui444fa1c2022-02-08 10:20:37 -0600302 i_map["0x14 SRC Word 13"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600303 std::format("{:08x}", be32toh(i_tiDataArea->srcWord13HbWord2));
austinfcui444fa1c2022-02-08 10:20:37 -0600304 i_map["0x18 SRC Word 14"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600305 std::format("{:08x}", be32toh(i_tiDataArea->srcWord14HbWord3));
austinfcui444fa1c2022-02-08 10:20:37 -0600306 i_map["0x1c SRC Word 15"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600307 std::format("{:08x}", be32toh(i_tiDataArea->srcWord15HbWord4));
austinfcui444fa1c2022-02-08 10:20:37 -0600308 i_map["0x20 SRC Word 16"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600309 std::format("{:08x}", be32toh(i_tiDataArea->srcWord16HbWord5));
austinfcui444fa1c2022-02-08 10:20:37 -0600310 i_map["0x24 SRC Word 17"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600311 std::format("{:08x}", be32toh(i_tiDataArea->srcWord17HbWord6));
austinfcui444fa1c2022-02-08 10:20:37 -0600312 i_map["0x28 SRC Word 18"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600313 std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
austinfcui444fa1c2022-02-08 10:20:37 -0600314 i_map["0x2c SRC Word 19"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600315 std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400316 i_map["0x30 ASCII Data"] =
317 std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
318 i_map["0x34 ASCII Data"] =
319 std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
320 i_map["0x38 ASCII Data"] =
321 std::format("{:08x}", be32toh(i_tiDataArea->asciiData2));
322 i_map["0x3c ASCII Data"] =
323 std::format("{:08x}", be32toh(i_tiDataArea->asciiData3));
324 i_map["0x40 ASCII Data"] =
325 std::format("{:08x}", be32toh(i_tiDataArea->asciiData4));
326 i_map["0x44 ASCII Data"] =
327 std::format("{:08x}", be32toh(i_tiDataArea->asciiData5));
328 i_map["0x48 ASCII Data"] =
329 std::format("{:08x}", be32toh(i_tiDataArea->asciiData6));
330 i_map["0x4c ASCII Data"] =
331 std::format("{:08x}", be32toh(i_tiDataArea->asciiData7));
Patrick Williams710101c2024-02-13 21:37:47 -0600332 i_map["0x50 Location"] = std::format("{:02x}", i_tiDataArea->location);
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400333 i_map["0x51 Code Sections"] =
334 std::format("{:02x}", i_tiDataArea->codeSection);
335 i_map["0x52 Additional Size"] =
336 std::format("{:02x}", i_tiDataArea->additionalSize);
337 i_map["0x53 Additional Data"] =
338 std::format("{:02x}", i_tiDataArea->andData);
Ben Tyner40717722020-09-23 09:43:20 -0500339}
340
341/** @brief Parse the TI info data area into map as hostboot data */
342void parseHbTiInfo(std::map<std::string, std::string>& i_map,
343 TiDataArea* i_tiDataArea)
344{
Ben Tyner1c4b02e2020-11-09 14:00:29 -0600345 if (nullptr == i_tiDataArea)
346 {
347 return;
348 }
349
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400350 i_map["0x00 TI Area Valid"] =
351 std::format("{:02x}", i_tiDataArea->tiAreaValid);
Patrick Williams710101c2024-02-13 21:37:47 -0600352 i_map["0x04 Reserved"] = std::format("{:02x}", i_tiDataArea->reserved1);
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400353 i_map["0x05 HB_Term. Type"] =
354 std::format("{:02x}", i_tiDataArea->hbTerminateType);
Patrick Williams710101c2024-02-13 21:37:47 -0600355 i_map["0x0c HB Flags"] = std::format("{:02x}", i_tiDataArea->hbFlags);
356 i_map["0x0d Source"] = std::format("{:02x}", i_tiDataArea->source);
austinfcui444fa1c2022-02-08 10:20:37 -0600357 i_map["0x10 HB Word 0"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600358 std::format("{:08x}", be32toh(i_tiDataArea->srcWord12HbWord0));
austinfcui444fa1c2022-02-08 10:20:37 -0600359 i_map["0x14 HB Word 2"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600360 std::format("{:08x}", be32toh(i_tiDataArea->srcWord13HbWord2));
austinfcui444fa1c2022-02-08 10:20:37 -0600361 i_map["0x18 HB Word 3"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600362 std::format("{:08x}", be32toh(i_tiDataArea->srcWord14HbWord3));
austinfcui444fa1c2022-02-08 10:20:37 -0600363 i_map["0x1c HB Word 4"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600364 std::format("{:08x}", be32toh(i_tiDataArea->srcWord15HbWord4));
austinfcui444fa1c2022-02-08 10:20:37 -0600365 i_map["0x20 HB Word 5"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600366 std::format("{:08x}", be32toh(i_tiDataArea->srcWord16HbWord5));
austinfcui444fa1c2022-02-08 10:20:37 -0600367 i_map["0x24 HB Word 6"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600368 std::format("{:08x}", be32toh(i_tiDataArea->srcWord17HbWord6));
austinfcui444fa1c2022-02-08 10:20:37 -0600369 i_map["0x28 HB Word 7"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600370 std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
austinfcui444fa1c2022-02-08 10:20:37 -0600371 i_map["0x2c HB Word 8"] =
Patrick Williams710101c2024-02-13 21:37:47 -0600372 std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
Patrick Williamsa0c724d2024-08-16 15:21:54 -0400373 i_map["0x30 error_data"] =
374 std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
375 i_map["0x34 EID"] =
376 std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
Ben Tyner40717722020-09-23 09:43:20 -0500377}
378
Ben Tyner9ae5ca42020-02-28 13:13:50 -0600379} // namespace attn