summaryrefslogtreecommitdiffstats
path: root/src/usr/xscom
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-08-31 15:53:08 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-08 10:44:11 -0400
commit4795940579240c074c9cd486a957b4c61a04367c (patch)
treea1877319ea8b5fb43fc47c0508c3095c797de1e4 /src/usr/xscom
parent16eddb5c87697e40d41ef842e6b6ad87cc17623e (diff)
downloadtalos-hostboot-4795940579240c074c9cd486a957b4c61a04367c.tar.gz
talos-hostboot-4795940579240c074c9cd486a957b4c61a04367c.zip
Apply multicast offline workaround to hbrt path under opal
Multicast operations to non-pcbslave registers will return a piberr of 'chiplet offline' if any chiplets (e.g. cores) are offline. To handle this we already ignore this scenario during IPL. This change adds some decode logic to convert opal return codes into their equivalent piberr values. With this logic the workaround should trigger and avoid scom errors. Resolves open-power/boston-openpower/#463 RTC: 86782 Change-Id: I5f587ff9bd1db08e3a5ad5131f8053e8495f45a2 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45526 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/xscom')
-rw-r--r--src/usr/xscom/runtime/rt_xscom.C61
1 files changed, 54 insertions, 7 deletions
diff --git a/src/usr/xscom/runtime/rt_xscom.C b/src/usr/xscom/runtime/rt_xscom.C
index 185185d46..64e0192f2 100644
--- a/src/usr/xscom/runtime/rt_xscom.C
+++ b/src/usr/xscom/runtime/rt_xscom.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,6 +35,7 @@
#include <runtime/interface.h>
#include <errl/errludtarget.H>
#include <runtime/rt_targeting.H>
+#include <xscom/piberror.H>
// Trace definition
trace_desc_t* g_trac_xscom = NULL;
@@ -211,12 +212,58 @@ errlHndl_t xScomDoOp(DeviceFW::OperationType i_ioType,
rc,
i_scomAddr);
- // TODO - RTC 86782 need to know what kind of errors Sapphire can
- // return - could effect callout.
- l_err->addHwCallout(i_target,
- HWAS::SRCI_PRIORITY_LOW,
- HWAS::NO_DECONFIG,
- HWAS::GARD_NULL);
+ // translate the rc into a pib error when possible
+ uint32_t l_piberr = PIB::PIB_NO_ERROR;
+
+ if( TARGETING::is_sapphire_load() )
+ {
+ // values taken from opal-api.h
+ switch( rc )
+ {
+ case(-12 /*OPAL_XSCOM_BUSY*/):
+ l_piberr = PIB::PIB_RESOURCE_OCCUPIED;
+ break;
+ case(-14 /*OPAL_XSCOM_CHIPLET_OFF*/):
+ l_piberr = PIB::PIB_CHIPLET_OFFLINE;
+ break;
+ case(-25 /*OPAL_XSCOM_PARTIAL_GOOD*/):
+ l_piberr = PIB::PIB_PARTIAL_GOOD;
+ break;
+ case(-26 /*OPAL_XSCOM_ADDR_ERROR*/):
+ l_piberr = PIB::PIB_INVALID_ADDRESS;
+ break;
+ case(-27 /*OPAL_XSCOM_CLOCK_ERROR*/):
+ l_piberr = PIB::PIB_CLOCK_ERROR;
+ break;
+ case(-28 /*OPAL_XSCOM_PARITY_ERROR*/):
+ l_piberr = PIB::PIB_PARITY_ERROR;
+ break;
+ case(-29 /*OPAL_XSCOM_TIMEOUT*/):
+ l_piberr = PIB::PIB_TIMEOUT;
+ break;
+ }
+ }
+ else if( TARGETING::is_phyp_load() )
+ {
+ //@todo-RTC:86782-Add PHYP support
+ // default to OFFLINE for now to trigger
+ // the multicast workaround in scom.C
+ l_piberr = PIB::PIB_CHIPLET_OFFLINE;
+ }
+ else
+ {
+ // our testcases respond back with the
+ // pib error directly
+ if( rc > 0 )
+ {
+ l_piberr = rc;
+ }
+ }
+
+ PIB::addFruCallouts(i_target,
+ l_piberr,
+ i_scomAddr,
+ l_err);
// Note: no trace buffer available at runtime
}
OpenPOWER on IntegriCloud