summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-06-20 17:18:42 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-20 17:18:42 +1000
commitbe430d881285f72df6dd932c06811d62463dfe88 (patch)
treea6dbb9348b70f1ef305542ccfecb12641a4fc45a
parent45942736aae0d7c3ca7264686e70f549046be340 (diff)
downloadtalos-skiboot-be430d881285f72df6dd932c06811d62463dfe88.tar.gz
talos-skiboot-be430d881285f72df6dd932c06811d62463dfe88.zip
Add fwts annotations for critical errors
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/hostservices.c8
-rw-r--r--core/opal.c5
-rw-r--r--core/utils.c7
3 files changed, 20 insertions, 0 deletions
diff --git a/core/hostservices.c b/core/hostservices.c
index 672b57f8..6aea6709 100644
--- a/core/hostservices.c
+++ b/core/hostservices.c
@@ -238,6 +238,10 @@ static void hservice_mark(void)
static void hservice_assert(void)
{
+ /**
+ * @fwts-label HBRTassert
+ * @fwts-advice HBRT triggered assert: you need to debug HBRT
+ */
prlog(PR_EMERG, "HBRT: Assertion from hostservices\n");
abort();
}
@@ -488,6 +492,10 @@ static int hservice_lid_load(uint32_t lid, void **buf, size_t *len)
prlog(PR_INFO, "HBRT: Lid load request for 0x%08x\n", lid);
if (list_empty(&hbrt_lid_list)) { /* Should not happen */
+ /**
+ * @fwts-label HBRTlidLoadFail
+ * @fwts-advice Firmware should have aborted boot
+ */
prlog(PR_CRIT, "HBRT: LID Load failed\n");
abort();
}
diff --git a/core/opal.c b/core/opal.c
index b6411f0c..a9d3c41e 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -269,6 +269,11 @@ void opal_del_poller(void (*poller)(void *data))
* if anybody uses it, print a warning and leak the entry, don't
* free it.
*/
+ /**
+ * @fwts-label UnsupportedOPALdelpoller
+ * @fwts-advice Currently removing a poller is DANGEROUS and
+ * MUST NOT be done in production firmware.
+ */
prlog(PR_ALERT, "WARNING: Unsupported opal_del_poller."
" Interesting locking issues, don't call this.\n");
diff --git a/core/utils.c b/core/utils.c
index 4bb89df0..d21881ef 100644
--- a/core/utils.c
+++ b/core/utils.c
@@ -27,6 +27,13 @@ unsigned long __stack_chk_guard = 0xdeadf00dbaad300dULL;
void __noreturn assert_fail(const char *msg)
{
+ /**
+ * @fwts-label FailedAssert
+ * @fwts-advice OPAL hit an assert(). During normal usage (even
+ * testing) we should never hit an assert. There are other code
+ * paths for controlled shutdown/panic in the event of catastrophic
+ * errors.
+ */
prlog(PR_EMERG, "Assert fail: %s\n", msg);
_abort(msg);
}
OpenPOWER on IntegriCloud