blob: 734d6f2e7c6bc9bfcd1ac14ca1b236eaeb2be2da [file] [log] [blame]
Brad Bishopf6783cd2020-10-27 19:25:09 -04001#pragma once
2
Jayanth Othayoth2b211702021-09-06 05:14:23 -05003#include <libipl.H>
4
Brad Bishopf6783cd2020-10-27 19:25:09 -04005#include <cstdarg>
Jayanth Othayoth2b211702021-09-06 05:14:23 -05006
Brad Bishopf6783cd2020-10-27 19:25:09 -04007namespace openpower
8{
9namespace pel
10{
11namespace detail
12{
13
14/**
15 * @brief Process debug traces
16 *
17 * Function adds debug traces to the list so that it will be added to the
18 * PEL upon failure
19 *
20 * @param[in] private_data - pointer to private data, unused now
21 * @param[in] fmt - format for variable list arguments
22 * @param[in] ap - object of va_list, holds information needed to retrieve
23 * the additional arguments
24 */
25
26void processLogTraceCallback(void* private_data, const char* fmt, va_list ap);
27
28/**
Jayanth Othayoth2b211702021-09-06 05:14:23 -050029 * @brief Process ipl failure/success status
30 *
31 * If status is success log traces are cleared else used in the
32 * creation of failure
33 *
34 * @param[in] errInfo - Error info structure
35 */
36void processIplErrorCallback(const ipl_error_info& errInfo);
37
38/**
Brad Bishopf6783cd2020-10-27 19:25:09 -040039 * @brief Process boot failure/success status
40 *
41 * If status is success log traces are cleared else used in the
42 * creation of failure
43 *
44 * @param[in] status - Boot execution status
45 */
Jayanth Othayoth2b211702021-09-06 05:14:23 -050046void processBootError(bool status);
Brad Bishopf6783cd2020-10-27 19:25:09 -040047
48/**
Jayanth Othayoth4079f092021-09-20 07:36:54 -050049 * @brief Process SBE boot failure/success status
50 *
51 * This function is used for SBE related failure handling during
52 * boot path. For any SBE related boot failure reason code, collects
53 * the SBE FFDC using libphal api's. Based on the reason code provided
54 * as part of error object collects Dump or PEL.
55 * Also resets the trace buffer.
56 */
57void processSbeBootError();
58
59/**
Brad Bishopf6783cd2020-10-27 19:25:09 -040060 * @brief Reset trace log list
61 */
62void reset();
Jayanth Othayoth2b211702021-09-06 05:14:23 -050063
Brad Bishopf6783cd2020-10-27 19:25:09 -040064} // namespace detail
65
66/**
67 * @brief Add callbacks for debug traces and boot errors
68 *
69 * This function adds callback for debug traces and for boot
70 * errors
71 */
72void addBootErrorCallbacks();
73} // namespace pel
74} // namespace openpower