Skip to content

Commit

Permalink
Apply multicast offline workaround to hbrt path under opal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dcrowell77 committed Sep 8, 2017
1 parent 16eddb5 commit 4795940
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/usr/testcore/rtloader/loader.H
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
if( addr == 0x11223344 ||
addr == 0x22334455 )
{
rc = 1;
rc = 4; //invalid address pib code
}

return rc;
Expand Down
61 changes: 54 additions & 7 deletions src/usr/xscom/runtime/rt_xscom.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2016 */
/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 4795940

Please sign in to comment.