aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-07 11:50:06 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-13 17:12:09 +1000
commit6b216257d3945653352f06f713f019cd6fa88f8c (patch)
tree1ff395e7f96991063853117d3ce214fb62337b89 /hw
parent24cd81df5b0bf584a0d382b84f45099db46aa727 (diff)
downloadskiboot-6b216257d3945653352f06f713f019cd6fa88f8c.zip
skiboot-6b216257d3945653352f06f713f019cd6fa88f8c.tar.gz
skiboot-6b216257d3945653352f06f713f019cd6fa88f8c.tar.bz2
xscom: Log error on invalid partid
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Michael Neuling <mikey@neuling.org> [stewart@linux.vnet.ibm.com: added FWTS annotation] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xscom.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/xscom.c b/hw/xscom.c
index 7c249c3..9e9dcee 100644
--- a/hw/xscom.c
+++ b/hw/xscom.c
@@ -413,6 +413,14 @@ int xscom_read(uint32_t partid, uint64_t pcb_addr, uint64_t *val)
return OPAL_UNSUPPORTED;
break;
default:
+ /**
+ * @fwts-label XSCOMReadInvalidPartID
+ * @fwts-advice xscom_read was called with an invalid partid.
+ * There's likely a bug somewhere in the stack that's causing
+ * someone to try an xscom_read on something that isn't a
+ * processor, Centaur or EX chiplet.
+ */
+ prerror("%s: invalid XSCOM partid 0x%x\n", __func__, partid);
return OPAL_PARAMETER;
}
@@ -448,6 +456,14 @@ int xscom_write(uint32_t partid, uint64_t pcb_addr, uint64_t val)
gcid = xscom_decode_chiplet(partid, &pcb_addr);
break;
default:
+ /**
+ * @fwts-label XSCOMWriteInvalidPartID
+ * @fwts-advice xscom_write was called with an invalid partid.
+ * There's likely a bug somewhere in the stack that's causing
+ * someone to try an xscom_write on something that isn't a
+ * processor, Centaur or EX chiplet.
+ */
+ prerror("%s: invalid XSCOM partid 0x%x\n", __func__, partid);
return OPAL_PARAMETER;
}