[Pdbg] [PATCH 2/3] p9_fapi_targets: Make P9 chiplet address translation match FAPI

Alistair Popple alistair at popple.id.au
Thu Mar 12 12:42:11 AEDT 2020


On Thursday, 12 March 2020 12:37:57 PM AEDT Amitay Isaacs wrote:
> On Thu, 2020-03-12 at 12:25 +1100, Alistair Popple wrote:
> > This patch makes the P9 chiplet address translation match the rest of
> > the translation for FAPI targets.
> > 
> > Signed-off-by: Alistair Popple <alistair at popple.id.au>
> > ---
> > 
> >  libpdbg/p9_fapi_targets.c | 6 +++---
> >  p9.dts                    | 4 +++-
> >  2 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c
> > index 9ff35d9..d38ecdb 100644
> > --- a/libpdbg/p9_fapi_targets.c
> > +++ b/libpdbg/p9_fapi_targets.c
> > @@ -690,9 +690,9 @@ static int p9_chiplet_probe(struct pdbg_target
> > *target)
> > 
> >          return 0;
> >  
> >  }
> > 
> > -static uint64_t p9_chiplet_translate(struct pdbg_target *target,
> > uint64_t addr)
> > +static uint64_t p9_chiplet_translate(struct chiplet *chiplet,
> > uint64_t addr)
> > 
> >  {
> > 
> > -	return (addr & 0xffffffffc0ffffffULL) +
> > pdbg_target_address(target, NULL);
> > +	return set_chiplet_id(addr, pdbg_target_index(t(chiplet)));
> > 
> >  }
> >  
> >  static struct chiplet p9_chiplet = {
> > 
> > @@ -701,7 +701,7 @@ static struct chiplet p9_chiplet = {
> > 
> >                  .compatible = "ibm,power9-chiplet",
> >                  .class = "chiplet",
> >                  .probe = p9_chiplet_probe,
> > 
> > -		.translate = p9_chiplet_translate,
> > +		.translate = translate_cast(p9_chiplet_translate),
> > 
> >          },
> >  	
> >  	.getring = p9_chiplet_getring,
> >  
> >  };
> > 
> > diff --git a/p9.dts b/p9.dts
> > index 8a35d75..1051e3e 100644
> > --- a/p9.dts
> > +++ b/p9.dts
> > @@ -281,7 +281,7 @@
> > 
> >  							index = < 0x20
> > >
> > >;
> > >
> >  							reg = < 0x00
> > 
> > 0x20000000 0xfffff >;
> > 
> > -							core at 0 {
> > +							s0_n0_p0_eq0_ex
> > 0_c0: core at 0 {
> > 
> >  								#addres
> > 
> > s-cells = < 0x01 >;
> > 
> >  								#size-
> > 
> > cells = < 0x00 >;
> > 
> >  								compati
> > 
> > ble = "ibm,power9-core";
> > @@ -3004,3 +3004,5 @@
> > 
> >  		};
> >  	
> >  	};
> >  
> >  };
> > 
> > +
> > +/include/ "p9-attributes.dts"
> 
> Both the dts changes are not meant for this patch, right?

Correct. That's what I get for rushing to push things out before yet another 
meeting. Will fix.

- Alistair

> Amitay.






More information about the Pdbg mailing list