aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhavan Srinivasan <maddy@linux.ibm.com>2020-03-19 14:09:15 +0530
committerOliver O'Halloran <oohall@gmail.com>2020-03-30 18:17:49 +1100
commit3794167200e7169afc240516254ed0e601e76e72 (patch)
treec9f526ff11753bc2d230322a464751d3afb67837
parent3a4daeca76431d557a7c1b8eed82eb788b7ec5c7 (diff)
downloadskiboot-3794167200e7169afc240516254ed0e601e76e72.zip
skiboot-3794167200e7169afc240516254ed0e601e76e72.tar.gz
skiboot-3794167200e7169afc240516254ed0e601e76e72.tar.bz2
hw/imc: Add error message on failing cases for imc_init
Add couple of more debug messages to understand possible fail in imc_init(). Currently the only message printed is "IMC Devices not added" which is not very helpful when debugging. Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r--hw/imc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hw/imc.c b/hw/imc.c
index 08d9401..927fba0 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -544,8 +544,10 @@ void imc_init(void)
return;
wait_xz_decompress(imc_xz);
- if (imc_xz->status != OPAL_SUCCESS)
+ if (imc_xz->status != OPAL_SUCCESS) {
+ prerror("IMC: xz_decompress failed\n");
goto err;
+ }
/*
* Flow of the data from PNOR to main device tree:
@@ -559,8 +561,10 @@ void imc_init(void)
/* Create a device tree entry for imc counters */
dev = dt_new_root("imc-counters");
- if (!dev)
+ if (!dev) {
+ prerror("IMC: Failed to add an imc-counters root node\n");
goto err;
+ }
/*
* Attach the new decompress_buf to the imc-counters node.
@@ -568,6 +572,7 @@ void imc_init(void)
*/
if (dt_expand_node(dev, imc_xz->dst, 0) < 0) {
dt_free(dev);
+ prerror("IMC: dt_expand_node failed\n");
goto err;
}
@@ -600,8 +605,10 @@ imc_mambo:
* then out to band tools will race with ucode and end up getting
* undesirable values. Hence pause the ucode if it is already running.
*/
- if (pause_microcode_at_boot())
+ if (pause_microcode_at_boot()) {
+ prerror("IMC: Pausing ucode failed\n");
goto err;
+ }
/*
* If the dt_attach_root() fails, "imc-counters" node will not be
@@ -610,6 +617,7 @@ imc_mambo:
*/
if (!dt_attach_root(dt_root, dev)) {
dt_free(dev);
+ prerror("IMC: Failed to attach imc-counter node to dt root\n");
goto err;
}