[Skiboot] [PATCH 1/5] xscom: Abstract error recovery registers

Michael Neuling mikey at neuling.org
Thu Mar 23 16:14:11 AEDT 2017


On Wed, 2017-03-22 at 12:00 +0100, Cédric Le Goater wrote:
> On 03/22/2017 03:59 AM, Michael Neuling wrote:
> > Abstract error recovery registers to get ready for POWER9.
> > 
> > Signed-off-by: Michael Neuling <mikey at neuling.org>
> > ---
> >  hw/xscom.c | 12 +++++++++---
> >  1 file changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/xscom.c b/hw/xscom.c
> > index d7b8627d8b..4a5f0f2d73 100644
> > --- a/hw/xscom.c
> > +++ b/hw/xscom.c
> > @@ -95,22 +95,28 @@ static uint64_t xscom_wait_done(void)
> >  static void xscom_reset(uint32_t gcid)
> >  {
> >  	u64 hmer;
> > +	uint32_t local, target1, target2;
> > 
> >  	/* Clear errors in HMER */
> >  	mtspr(SPR_HMER, HMER_CLR_MASK);
> > 
> > +	/* Setup local and target scom addresses */
> > +	local = 0x202000f;
> > +	target1 = 0x2020007;
> > +	target2 = 0x2020009;
> > +
> 
> maybe we could use some real names for :
> 
> 	0x2020007 - XSCOM Error Log Register
> 	0x2020009 - XSCOM Error Register
> 	0x202000F - XSCOM Command Received Status and Source Register
> 
> P9 is nearly the same :
> 
> 	0x90012 - XSCOM Status Log Register
> 	0x90013 - XSCOM Error Register
> 	0x90018 - XSCOM Received Remote Status pMisc and Source Register
> 
> local, target[12] are a bit obscure.

ok, I've called them log_reg, err_reg and recv_status_reg.

> It might be interesting to read and dump these registers in case
> of failure also.

yes, yes it would be :-)

Mikey


More information about the Skiboot mailing list