[Skiboot] [RFC PATCH 3/6] opal/errorlog: Allow generation of Serviceable attention events
Mahesh Salgaonkar
mahesh at linux.vnet.ibm.com
Wed Apr 24 04:12:58 AEST 2019
Add support to mark error log event as Serviceable/Customer attention
events.
Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
core/errorlog.c | 5 +++++
core/pel.c | 3 +++
include/errorlog.h | 2 ++
include/pel.h | 1 +
4 files changed, 11 insertions(+)
diff --git a/core/errorlog.c b/core/errorlog.c
index 522dfcc2e..31e603815 100644
--- a/core/errorlog.c
+++ b/core/errorlog.c
@@ -85,6 +85,11 @@ struct errorlog *opal_elog_create(struct opal_err_info *e_info, uint32_t tag)
return buf;
}
+void log_mark_serviceable(struct errorlog *buf)
+{
+ buf->service_req = true;
+}
+
/* Add a new user data section to an existing error log */
void log_add_section(struct errorlog *buf, uint32_t tag)
{
diff --git a/core/pel.c b/core/pel.c
index d8c4b982d..62cf6b3c9 100644
--- a/core/pel.c
+++ b/core/pel.c
@@ -151,6 +151,9 @@ static void create_user_header_section(struct errorlog *elog_data,
else
usrhdr->action_flags = ERRL_ACTION_NONE;
+ if (elog_data->service_req)
+ usrhdr->action_flags |= ERRL_ACTION_SERVICE;
+
*pel_offset += USER_HEADER_SECTION_SIZE;
}
diff --git a/include/errorlog.h b/include/errorlog.h
index 6da96649e..9ccfb47ec 100644
--- a/include/errorlog.h
+++ b/include/errorlog.h
@@ -137,6 +137,7 @@ struct __attribute__((__packed__)) errorlog {
uint32_t plid;
uint32_t log_size;
uint64_t elog_timeout;
+ bool service_req;
char user_data_dump[OPAL_LOG_MAX_DUMP];
struct list_node link;
@@ -361,6 +362,7 @@ void log_append_data(struct errorlog *buf, unsigned char *data, uint16_t size);
void log_append_msg(struct errorlog *buf,
const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
void log_commit(struct errorlog *elog);
+void log_mark_serviceable(struct errorlog *buf);
/* Called by the backend after an error has been logged by the
* backend. If the error could not be logged successfully success is
diff --git a/include/pel.h b/include/pel.h
index 1213c43eb..0bfaa33c0 100644
--- a/include/pel.h
+++ b/include/pel.h
@@ -50,6 +50,7 @@
/* Error log reporting action */
#define ERRL_ACTION_REPORT 0x2000
+#define ERRL_ACTION_SERVICE 0x8000
#define ERRL_ACTION_NONE 0x0000
enum elogSectionId {
More information about the Skiboot
mailing list