blob: 2ef0cc01b892388cc2893f631ffa13b7837c0b9b [file] [log] [blame]
Brad Bishop5e5d4452020-10-27 19:46:13 -04001extern "C"
2{
Brad Bishopf6783cd2020-10-27 19:25:09 -04003#include <libpdbg.h>
4}
5
6#include "create_pel.hpp"
Jayanth Othayoth006641e2021-10-07 06:56:24 -05007#include "dump_utils.hpp"
Jayanth Othayoth4079f092021-09-20 07:36:54 -05008#include "extensions/phal/common_utils.hpp"
Brad Bishopf6783cd2020-10-27 19:25:09 -04009#include "phal_error.hpp"
10
11#include <attributes_info.H>
12#include <fmt/format.h>
13#include <libekb.H>
Jayanth Othayoth4079f092021-09-20 07:36:54 -050014#include <libphal.H>
Brad Bishopf6783cd2020-10-27 19:25:09 -040015
Brad Bishop5e5d4452020-10-27 19:46:13 -040016#include <nlohmann/json.hpp>
17#include <phosphor-logging/elog.hpp>
18
Brad Bishopf6783cd2020-10-27 19:25:09 -040019#include <algorithm>
20#include <cstdlib>
21#include <cstring>
22#include <iomanip>
23#include <list>
24#include <map>
Brad Bishopf6783cd2020-10-27 19:25:09 -040025#include <sstream>
26#include <string>
27
28namespace openpower
29{
30namespace phal
31{
32using namespace phosphor::logging;
33
34/**
35 * Used to pass buffer to pdbg callback api to get required target
36 * data (attributes) based on given data (attribute).
37 */
38struct TargetInfo
39{
40 ATTR_PHYS_BIN_PATH_Type physBinPath;
41 ATTR_LOCATION_CODE_Type locationCode;
42 ATTR_PHYS_DEV_PATH_Type physDevPath;
43 ATTR_MRU_ID_Type mruId;
44
45 bool deconfigure;
46
47 TargetInfo()
48 {
49 memset(&physBinPath, '\0', sizeof(physBinPath));
50 memset(&locationCode, '\0', sizeof(locationCode));
51 memset(&physDevPath, '\0', sizeof(physDevPath));
52 mruId = 0;
53 deconfigure = false;
54 }
55};
56
57/**
58 * Used to return in callback function which are used to get
59 * physical path value and it binary format value.
60 *
61 * The value for constexpr defined based on pdbg_target_traverse function usage.
62 */
63constexpr int continueTgtTraversal = 0;
64constexpr int requireAttrFound = 1;
65constexpr int requireAttrNotFound = 2;
66
67/**
68 * @brief Used to get target location code from phal device tree
69 *
70 * @param[in] target current device tree target
71 * @param[out] appPrivData used for accessing|storing from|to application
72 *
73 * @return 0 to continue traverse, non-zero to stop traverse
74 */
75int pdbgCallbackToGetTgtReqAttrsVal(struct pdbg_target* target,
76 void* appPrivData)
77{
78 TargetInfo* targetInfo = static_cast<TargetInfo*>(appPrivData);
79
80 ATTR_PHYS_BIN_PATH_Type physBinPath;
81 /**
82 * TODO: Issue: phal/pdata#16
83 * Should not use direct pdbg api to read attribute. Need to use DT_GET_PROP
84 * macro for bmc app's and this will call libdt-api api but, it will print
85 * "pdbg_target_get_attribute failed" trace if attribute is not found and
86 * this callback will call recursively by using pdbg_target_traverse() until
87 * find expected attribute based on return code from this callback. Because,
88 * need to do target iteration to get actual attribute (ATTR_PHYS_BIN_PATH)
89 * value when device tree target info doesn't know to read attribute from
90 * device tree. So, Due to this error trace user will get confusion while
91 * looking traces. Hence using pdbg api to avoid trace until libdt-api
92 * provides log level setup.
93 */
94 if (!pdbg_target_get_attribute(
95 target, "ATTR_PHYS_BIN_PATH",
96 std::stoi(dtAttr::fapi2::ATTR_PHYS_BIN_PATH_Spec),
97 dtAttr::fapi2::ATTR_PHYS_BIN_PATH_ElementCount, physBinPath))
98 {
99 return continueTgtTraversal;
100 }
101
102 if (std::memcmp(physBinPath, targetInfo->physBinPath,
103 sizeof(physBinPath)) != 0)
104 {
105 return continueTgtTraversal;
106 }
107
108 if (DT_GET_PROP(ATTR_LOCATION_CODE, target, targetInfo->locationCode))
109 {
110 log<level::ERR>("Could not read LOCATION_CODE attribute");
111 return requireAttrNotFound;
112 }
113
114 if (DT_GET_PROP(ATTR_PHYS_DEV_PATH, target, targetInfo->physDevPath))
115 {
116 log<level::ERR>("Could not read PHYS_DEV_PATH attribute");
117 return requireAttrNotFound;
118 }
119
120 if (DT_GET_PROP(ATTR_MRU_ID, target, targetInfo->mruId))
121 {
122 log<level::ERR>("Could not read MRU_ID attribute");
123 return requireAttrNotFound;
124 }
125
126 if (targetInfo->deconfigure)
127 {
128 ATTR_HWAS_STATE_Type hwasState;
129 if (DT_GET_PROP(ATTR_HWAS_STATE, target, hwasState))
130 {
131 log<level::ERR>("Could not read HWAS_STATE attribute");
132 return requireAttrNotFound;
133 }
134
135 log<level::INFO>(fmt::format("Marking target({}) as Non-Functional",
136 targetInfo->physDevPath)
137 .c_str());
138 hwasState.functional = 0;
139
140 if (DT_SET_PROP(ATTR_HWAS_STATE, target, hwasState))
141 {
142 log<level::ERR>("Could not write HWAS_STATE attribute");
143 return requireAttrNotFound;
144 }
145 }
146
147 return requireAttrFound;
148}
149
150/**
151 * @brief Used to get target info (attributes data)
152 *
153 * To get target required attributes value using another attribute value
154 * ("PHYS_BIN_PATH" which is present in same target attributes list) by using
155 * "ipdbg_target_traverse" api because, here we have attribute value only and
156 * doesn't have respective device tree target info to get required attributes
157 * values from it attributes list.
158 *
159 * @param[in] physBinPath to pass PHYS_BIN_PATH value
160 * @param[out] targetInfo to pas buufer to fill with required attributes
161 *
162 * @return true on success otherwise false
163 */
164bool getTgtReqAttrsVal(const std::vector<uint8_t>& physBinPath,
165 TargetInfo& targetInfo)
166{
167 std::memcpy(&targetInfo.physBinPath, physBinPath.data(),
168 sizeof(targetInfo.physBinPath));
169
170 int ret = pdbg_target_traverse(NULL, pdbgCallbackToGetTgtReqAttrsVal,
171 &targetInfo);
172 if (ret == 0)
173 {
174 log<level::ERR>(fmt::format("Given ATTR_PHYS_BIN_PATH value({}) "
175 "not found in phal device tree",
176 targetInfo.physBinPath)
177 .c_str());
178 return false;
179 }
180 else if (ret == requireAttrNotFound)
181 {
182 return false;
183 }
184
185 return true;
186}
187} // namespace phal
188
189namespace pel
190{
191using namespace phosphor::logging;
192
193namespace detail
194{
195using json = nlohmann::json;
196
197// keys need to be unique so using counter value to generate unique key
198static int counter = 0;
199
200// list of debug traces
201static std::vector<std::pair<std::string, std::string>> traceLog;
202
Brad Bishop63508a72020-10-27 18:55:01 -0400203void processLogTraceCallback(void*, const char* fmt, va_list ap)
Brad Bishopf6783cd2020-10-27 19:25:09 -0400204{
205 va_list vap;
206 va_copy(vap, ap);
207 std::vector<char> logData(1 + std::vsnprintf(nullptr, 0, fmt, ap));
208 std::vsnprintf(logData.data(), logData.size(), fmt, vap);
209 va_end(vap);
210 std::string logstr(logData.begin(), logData.end());
211
212 log<level::INFO>(logstr.c_str());
213
214 char timeBuf[80];
215 time_t t = time(0);
216 tm myTm{};
217 gmtime_r(&t, &myTm);
218 strftime(timeBuf, 80, "%Y-%m-%d %H:%M:%S", &myTm);
219
220 // key values need to be unique for PEL
221 // TODO #openbmc/dev/issues/1563
222 // If written to Json no need to worry about unique KEY
223 std::stringstream str;
224 str << std::setfill('0');
225 str << "LOG" << std::setw(3) << counter;
226 str << " " << timeBuf;
227 traceLog.emplace_back(std::make_pair(str.str(), std::move(logstr)));
228 counter++;
229}
230
231/**
232 * @brief GET PEL priority from pHAL priority
233 *
234 * The pHAL callout priority is in different format than PEL format
235 * so, this api is used to return current phal supported priority into
236 * PEL expected format.
237 *
238 * @param[in] phalPriority used to pass phal priority format string
239 *
240 * @return pel priority format string else empty if failure
241 *
242 * @note For "NONE" returning "L" (LOW)
243 */
244static std::string getPelPriority(const std::string& phalPriority)
245{
246 const std::map<std::string, std::string> priorityMap = {
247 {"HIGH", "H"}, {"MEDIUM", "M"}, {"LOW", "L"}, {"NONE", "L"}};
248
249 auto it = priorityMap.find(phalPriority);
250 if (it == priorityMap.end())
251 {
252 log<level::ERR>(fmt::format("Unsupported phal priority({}) is given "
253 "to get pel priority format",
254 phalPriority)
255 .c_str());
256 return "H";
257 }
258
259 return it->second;
260}
261
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500262void processIplErrorCallback(const ipl_error_info& errInfo)
Brad Bishopf6783cd2020-10-27 19:25:09 -0400263{
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500264 log<level::INFO>(
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500265 fmt::format("processIplErrorCallback: Error type({})", errInfo.type)
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500266 .c_str());
267
Jayanth Othayothee56c552021-09-10 01:44:05 -0500268 if (errInfo.type == IPL_ERR_OK)
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500269 {
270 // reset trace log and exit
271 reset();
272 return;
273 }
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500274
275 if (errInfo.type == IPL_ERR_SBE_BOOT)
276 {
277 processSbeBootError();
278 return;
279 }
280
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500281 // TODO: Keeping the existing behaviour now
282 // Handle errors based on special reason codes once support is available
283 processBootError(false);
284}
285
286void processBootError(bool status)
287{
288 log<level::INFO>("processBootError ", entry("STATUS=%d", status));
Brad Bishopf6783cd2020-10-27 19:25:09 -0400289 try
290 {
291 // return If no failure during hwp execution
292 if (status)
293 return;
294
295 // Collecting ffdc details from phal
296 FFDC ffdc;
297 libekb_get_ffdc(ffdc);
298
Ramesh Iyyar3af83eb2020-11-19 23:11:38 -0600299 log<level::INFO>(
300 fmt::format("PHAL FFDC: Return Message[{}]", ffdc.message).c_str());
Brad Bishopf6783cd2020-10-27 19:25:09 -0400301
302 // To store callouts details in json format as per pel expectation.
303 json jsonCalloutDataList;
304 jsonCalloutDataList = json::array();
305
306 // To store phal trace and other additional data about ffdc.
307 FFDCData pelAdditionalData;
308
309 if (ffdc.ffdc_type == FFDC_TYPE_HWP)
310 {
311 // Adding hardware procedures return code details
312 pelAdditionalData.emplace_back("HWP_RC", ffdc.hwp_errorinfo.rc);
313 pelAdditionalData.emplace_back("HWP_RC_DESC",
314 ffdc.hwp_errorinfo.rc_desc);
315
316 // Adding hardware procedures required ffdc data for debug
317 for_each(ffdc.hwp_errorinfo.ffdcs_data.begin(),
318 ffdc.hwp_errorinfo.ffdcs_data.end(),
319 [&pelAdditionalData](
320 std::pair<std::string, std::string>& ele) -> void {
321 std::string keyWithPrefix("HWP_FFDC_");
322 keyWithPrefix.append(ele.first);
323
324 pelAdditionalData.emplace_back(keyWithPrefix,
325 ele.second);
326 });
327
328 // Adding hardware callout details
329 int calloutCount = 0;
330 for_each(ffdc.hwp_errorinfo.hwcallouts.begin(),
331 ffdc.hwp_errorinfo.hwcallouts.end(),
332 [&pelAdditionalData, &calloutCount, &jsonCalloutDataList](
333 const HWCallout& hwCallout) -> void {
334 calloutCount++;
335 std::stringstream keyPrefix;
336 keyPrefix << "HWP_HW_CO_" << std::setfill('0')
337 << std::setw(2) << calloutCount << "_";
338
339 pelAdditionalData.emplace_back(
340 std::string(keyPrefix.str()).append("HW_ID"),
341 hwCallout.hwid);
342
343 pelAdditionalData.emplace_back(
344 std::string(keyPrefix.str()).append("PRIORITY"),
345 hwCallout.callout_priority);
346
347 phal::TargetInfo targetInfo;
348 phal::getTgtReqAttrsVal(hwCallout.target_entity_path,
349 targetInfo);
350
351 std::string locationCode =
352 std::string(targetInfo.locationCode);
353 pelAdditionalData.emplace_back(
354 std::string(keyPrefix.str()).append("LOC_CODE"),
355 locationCode);
356
357 std::string physPath =
358 std::string(targetInfo.physDevPath);
359 pelAdditionalData.emplace_back(
360 std::string(keyPrefix.str()).append("PHYS_PATH"),
361 physPath);
362
363 pelAdditionalData.emplace_back(
364 std::string(keyPrefix.str()).append("CLK_POS"),
365 std::to_string(hwCallout.clkPos));
366
367 json jsonCalloutData;
368 jsonCalloutData["LocationCode"] = locationCode;
369 std::string pelPriority =
370 getPelPriority(hwCallout.callout_priority);
371 jsonCalloutData["Priority"] = pelPriority;
372
373 if (targetInfo.mruId != 0)
374 {
375 jsonCalloutData["MRUs"] = json::array({
376 {{"ID", targetInfo.mruId},
377 {"Priority", pelPriority}},
378 });
379 }
380
381 jsonCalloutDataList.emplace_back(jsonCalloutData);
382 });
383
384 // Adding CDG (callout, deconfigure and guard) targets details
385 calloutCount = 0;
386 for_each(ffdc.hwp_errorinfo.cdg_targets.begin(),
387 ffdc.hwp_errorinfo.cdg_targets.end(),
388 [&pelAdditionalData, &calloutCount,
389 &jsonCalloutDataList](const CDG_Target& cdg_tgt) -> void {
390 calloutCount++;
391 std::stringstream keyPrefix;
392 keyPrefix << "HWP_CDG_TGT_" << std::setfill('0')
393 << std::setw(2) << calloutCount << "_";
394
395 phal::TargetInfo targetInfo;
396 targetInfo.deconfigure = cdg_tgt.deconfigure;
397
398 phal::getTgtReqAttrsVal(cdg_tgt.target_entity_path,
399 targetInfo);
400
401 std::string locationCode =
402 std::string(targetInfo.locationCode);
403 pelAdditionalData.emplace_back(
404 std::string(keyPrefix.str()).append("LOC_CODE"),
405 locationCode);
406 std::string physPath =
407 std::string(targetInfo.physDevPath);
408 pelAdditionalData.emplace_back(
409 std::string(keyPrefix.str()).append("PHYS_PATH"),
410 physPath);
411
412 pelAdditionalData.emplace_back(
413 std::string(keyPrefix.str()).append("CO_REQ"),
414 (cdg_tgt.callout == true ? "true" : "false"));
415
416 pelAdditionalData.emplace_back(
417 std::string(keyPrefix.str()).append("CO_PRIORITY"),
418 cdg_tgt.callout_priority);
419
420 pelAdditionalData.emplace_back(
421 std::string(keyPrefix.str()).append("DECONF_REQ"),
422 (cdg_tgt.deconfigure == true ? "true" : "false"));
423
424 pelAdditionalData.emplace_back(
425 std::string(keyPrefix.str()).append("GUARD_REQ"),
426 (cdg_tgt.guard == true ? "true" : "false"));
427
428 pelAdditionalData.emplace_back(
429 std::string(keyPrefix.str()).append("GUARD_TYPE"),
430 cdg_tgt.guard_type);
431
432 json jsonCalloutData;
433 jsonCalloutData["LocationCode"] = locationCode;
434 std::string pelPriority =
435 getPelPriority(cdg_tgt.callout_priority);
436 jsonCalloutData["Priority"] = pelPriority;
437
438 if (targetInfo.mruId != 0)
439 {
440 jsonCalloutData["MRUs"] = json::array({
441 {{"ID", targetInfo.mruId},
442 {"Priority", pelPriority}},
443 });
444 }
445 jsonCalloutData["Deconfigured"] = cdg_tgt.deconfigure;
446 jsonCalloutData["Guarded"] = cdg_tgt.guard;
447
448 jsonCalloutDataList.emplace_back(jsonCalloutData);
449 });
450 }
Ramesh Iyyar3af83eb2020-11-19 23:11:38 -0600451 else if ((ffdc.ffdc_type != FFDC_TYPE_NONE) &&
Brad Bishopf6783cd2020-10-27 19:25:09 -0400452 (ffdc.ffdc_type != FFDC_TYPE_UNSUPPORTED))
453 {
454 log<level::ERR>(
455 fmt::format("Unsupported phal FFDC type to create PEL. "
456 "MSG: {}",
457 ffdc.message)
458 .c_str());
459 }
460
461 // Adding collected phal logs into PEL additional data
462 for_each(traceLog.begin(), traceLog.end(),
463 [&pelAdditionalData](
464 std::pair<std::string, std::string>& ele) -> void {
465 pelAdditionalData.emplace_back(ele.first, ele.second);
466 });
467
468 // TODO: #ibm-openbmc/dev/issues/2595 : Once enabled this support,
469 // callout details is not required to sort in H,M and L orders which
470 // are expected by pel because, pel will take care for sorting callouts
471 // based on priority so, now adding support to send callout in order
472 // i.e High -> Medium -> Low.
473 std::sort(
474 jsonCalloutDataList.begin(), jsonCalloutDataList.end(),
475 [](const json& aEle, const json& bEle) -> bool {
476 // Considering b element having higher priority than a element
477 // or Both element will be same priorty (to keep same order
478 // which are given by phal when two callouts are having same
479 // priority)
480 if (((aEle["Priority"] == "M") && (bEle["Priority"] == "H")) ||
481 ((aEle["Priority"] == "L") &&
482 ((bEle["Priority"] == "H") ||
483 (bEle["Priority"] == "M"))) ||
484 (aEle["Priority"] == bEle["Priority"]))
485 {
486 return false;
487 }
488
489 // Considering a element having higher priority than b element
490 return true;
491 });
492
493 openpower::pel::createBootErrorPEL(pelAdditionalData,
494 jsonCalloutDataList);
495 }
Patrick Williams1a9a5a62021-10-06 13:05:06 -0500496 catch (const std::exception& ex)
Brad Bishopf6783cd2020-10-27 19:25:09 -0400497 {
498 reset();
499 throw ex;
500 }
501 reset();
502}
503
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500504void processSbeBootError()
505{
506 log<level::INFO>("processSbeBootError : Entered ");
507
508 using namespace openpower::phal::sbe;
509 using namespace openpower::phal::exception;
510
511 // To store phal trace and other additional data about ffdc.
512 FFDCData pelAdditionalData;
513
514 // Adding collected phal logs into PEL additional data
515 for_each(
516 traceLog.begin(), traceLog.end(),
517 [&pelAdditionalData](std::pair<std::string, std::string>& ele) -> void {
518 pelAdditionalData.emplace_back(ele.first, ele.second);
519 });
520
521 // reset the trace log and counter
522 reset();
523
524 // get primary processor to collect FFDC/Dump information.
525 struct pdbg_target* procTarget;
526 pdbg_for_each_class_target("proc", procTarget)
527 {
528 if (openpower::phal::isPrimaryProc(procTarget))
529 break;
530 procTarget = nullptr;
531 }
532 // check valid primary processor is available
533 if (procTarget == nullptr)
534 {
535 log<level::ERR>("processSbeBootError: fail to get primary processor");
536 // Initialise the SRC6 with default data, not used in this use case.
537 pelAdditionalData.emplace_back("SRC6", "00000000");
538 openpower::pel::createPEL(
539 "org.open_power.Processor.Error.SbeBootFailure", pelAdditionalData);
540 return;
541 }
542 // SBE error object.
543 sbeError_t sbeError;
544 bool dumpIsRequired = false;
545
546 try
547 {
548 // Capture FFDC information on primary processor
549 sbeError = captureFFDC(procTarget);
550 }
551 catch (const std::exception& e)
552 {
553 // Fail to collect FFDC information , trigger Dump
554 log<level::ERR>(
555 fmt::format("captureFFDC: Exception{}", e.what()).c_str());
556 dumpIsRequired = true;
557 }
558
Jayanth Othayoth006641e2021-10-07 06:56:24 -0500559 std::string event;
560
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500561 if ((sbeError.errType() == SBE_FFDC_NO_DATA) ||
562 (sbeError.errType() == SBE_CMD_TIMEOUT) || (dumpIsRequired))
563 {
Jayanth Othayoth006641e2021-10-07 06:56:24 -0500564 event = "org.open_power.Processor.Error.SbeBootTimeout";
565 dumpIsRequired = true;
566 }
567 else
568 {
569 event = "org.open_power.Processor.Error.SbeBootFailure";
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500570 }
571 // SRC6 : [0:15] chip position
Jayanth Othayoth006641e2021-10-07 06:56:24 -0500572 uint32_t index = pdbg_target_index(procTarget);
573 pelAdditionalData.emplace_back("SRC6", std::to_string(index << 16));
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500574 // Create SBE Error with FFDC data.
Jayanth Othayoth006641e2021-10-07 06:56:24 -0500575 auto logId = createSbeErrorPEL(event, sbeError, pelAdditionalData);
576
577 if (dumpIsRequired)
578 {
579 using namespace openpower::phal::dump;
580 DumpParameters dumpParameters = {logId, index, SBE_DUMP_TIMEOUT,
581 DumpType::SBE};
582 try
583 {
584 requestDump(dumpParameters);
585 }
586 catch (const std::runtime_error& e)
587 {
588 // Allowing call back to handle the error gracefully.
589 log<level::ERR>("Dump collection failed");
590 // TODO revist error handling.
591 }
592 }
Jayanth Othayoth4079f092021-09-20 07:36:54 -0500593}
594
Brad Bishopf6783cd2020-10-27 19:25:09 -0400595void reset()
596{
597 // reset the trace log and counter
598 traceLog.clear();
599 counter = 0;
600}
601
Brad Bishop63508a72020-10-27 18:55:01 -0400602void pDBGLogTraceCallbackHelper(int, const char* fmt, va_list ap)
Brad Bishopf6783cd2020-10-27 19:25:09 -0400603{
604 processLogTraceCallback(NULL, fmt, ap);
605}
606} // namespace detail
607
608static inline uint8_t getLogLevelFromEnv(const char* env, const uint8_t dValue)
609{
610 auto logLevel = dValue;
611 try
612 {
613 if (const char* env_p = std::getenv(env))
614 {
615 logLevel = std::stoi(env_p);
616 }
617 }
Patrick Williams1a9a5a62021-10-06 13:05:06 -0500618 catch (const std::exception& e)
Brad Bishopf6783cd2020-10-27 19:25:09 -0400619 {
620 log<level::ERR>(("Conversion Failure"), entry("ENVIRONMENT=%s", env),
621 entry("EXCEPTION=%s", e.what()));
622 }
623 return logLevel;
624}
625
626void addBootErrorCallbacks()
627{
628 // Get individual phal repos log level from environment variable
629 // and update the log level.
630 pdbg_set_loglevel(getLogLevelFromEnv("PDBG_LOG", PDBG_INFO));
631 libekb_set_loglevel(getLogLevelFromEnv("LIBEKB_LOG", LIBEKB_LOG_IMP));
632 ipl_set_loglevel(getLogLevelFromEnv("IPL_LOG", IPL_INFO));
633
634 // add callback for debug traces
635 pdbg_set_logfunc(detail::pDBGLogTraceCallbackHelper);
636 libekb_set_logfunc(detail::processLogTraceCallback, NULL);
637 ipl_set_logfunc(detail::processLogTraceCallback, NULL);
638
639 // add callback for ipl failures
Jayanth Othayoth2b211702021-09-06 05:14:23 -0500640 ipl_set_error_callback_func(detail::processIplErrorCallback);
Brad Bishopf6783cd2020-10-27 19:25:09 -0400641}
642
643} // namespace pel
644} // namespace openpower