aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-06-24 14:42:38 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-24 15:50:13 +1000
commit31755269b67853f75b8340fa452b562c072c9b5d (patch)
tree5fc5b648d66a4d35d2115b149101cbdbf22cdd33 /hw
parente5b3277fdaae21234195a7dea6e1e2ecf028d0c3 (diff)
downloadskiboot-31755269b67853f75b8340fa452b562c072c9b5d.zip
skiboot-31755269b67853f75b8340fa452b562c072c9b5d.tar.gz
skiboot-31755269b67853f75b8340fa452b562c072c9b5d.tar.bz2
fsp-elog: add FWTS annotations for several errors
These errors are essentially assert()s - something has gone wrong and it's likely because of a bug somewhere. Things we should *never* it regards to inconsistency, so have FWTS throw warnings on them. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-elog-read.c23
-rw-r--r--hw/fsp/fsp-elog-write.c6
2 files changed, 29 insertions, 0 deletions
diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index 16667ae..a8e5c12 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -175,6 +175,12 @@ static void fsp_elog_fetch_failure(uint8_t fsp_status)
/* read top list and delete the node */
log_data = list_top(&elog_read_pending, struct fsp_log_entry, link);
if (!log_data) {
+ /**
+ * @fwts-label ElogFetchFailureInconsistent
+ * @fwts-advice Inconsistent state between OPAL and FSP
+ * in code path for handling failure of fetching error log
+ * from FSP. Likely a bug in interaction between FSP and OPAL.
+ */
prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
__func__);
} else {
@@ -241,6 +247,12 @@ static void fsp_elog_queue_fetch(void)
entry = list_top(&elog_read_pending, struct fsp_log_entry, link);
if (!entry) {
+ /**
+ * @fwts-label ElogQueueInconsistent
+ * @fwts-advice Bug in interaction between FSP and OPAL. We
+ * expected there to be a pending read from FSP but the list
+ * was empty.
+ */
prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
__func__);
fsp_elog_set_head_state(ELOG_STATE_NONE);
@@ -279,6 +291,12 @@ static int64_t fsp_opal_elog_info(uint64_t *opal_elog_id,
}
log_data = list_top(&elog_read_pending, struct fsp_log_entry, link);
if (!log_data) {
+ /**
+ * @fwts-label ElogInfoInconsistentState
+ * @fwts-advice We expected there to be an entry in the list
+ * of error logs for the error log we're fetching information
+ * for. There wasn't. This means there's a bug.
+ */
prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
__func__);
unlock(&elog_read_lock);
@@ -313,6 +331,11 @@ static int64_t fsp_opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size,
log_data = list_top(&elog_read_pending, struct fsp_log_entry, link);
if (!log_data) {
+ /**
+ * @fwts-label ElogReadInconsistentState
+ * @fwts-advice Inconsistent state while reading error log
+ * from FSP. Bug in OPAL and FSP interaction.
+ */
prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
__func__);
unlock(&elog_read_lock);
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c
index 2933b97..5358823 100644
--- a/hw/fsp/fsp-elog-write.c
+++ b/hw/fsp/fsp-elog-write.c
@@ -136,6 +136,12 @@ bool opal_elog_info(uint64_t *opal_elog_id, uint64_t *opal_elog_size)
head = list_top(&elog_write_to_host_pending,
struct errorlog, link);
if (!head) {
+ /**
+ * @fwts-label ElogListInconsistent
+ * @fwts-advice Bug in interaction between FSP and
+ * OPAL. The state maintained by OPAL didn't match
+ * what the FSP sent.
+ */
prlog(PR_ERR,
"%s: Inconsistent internal list state !\n",
__func__);