@@ -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();
}
@@ -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");
@@ -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);
}
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> --- core/hostservices.c | 8 ++++++++ core/opal.c | 5 +++++ core/utils.c | 7 +++++++ 3 files changed, 20 insertions(+)