[Pdbg] [PATCH 6/7] libpdbg/htm: Enable NCU and set single dispatch/instruction mode
Alistair Popple
alistair at popple.id.au
Fri Mar 16 14:18:04 AEDT 2018
On Friday, 16 March 2018 2:03:34 PM AEDT Cyril Bur wrote:
> On Fri, 2018-03-16 at 13:38 +1100, Alistair Popple wrote:
> > > + /* Not great to assume the core is the parent of the htm. */
> >
> > What are the chances of you having time to fix this TODO? Eg. something like
> > pdbg_get_parent(child, class) that would just walk up the tree until the write
> > target was found would be much nicer.
> >
>
> Absolutely. I cut this corner here because I know about my struct
> pdbg_target merge with the device tree node code will require these
> lines to change anyway.
>
> More than happy to include a pdbg_get_parent(child, class) call at the
> end of the rebase of the other series.
Ok, I will take this as is for the moment but would be nice if you could include
that in the rebase.
> > > + if (HTM_ERR(pib_write(htm->target.dn->parent->target, HID0_REGISTER, hid0)))
> > > + return -1;
> > > +
> > > + /* Not great to assume the core is the parent of the htm. */
> > > + if (HTM_ERR(pib_read(htm->target.dn->parent->target, NCU_MODE_REGISTER, &ncu)))
> > > + return -1;
> > > +
> > > + ncu |= NCU_MODE_HTM_ENABLE;
> > > +
> > > + /* Not great to assume the core is the parent of the htm. */
> > > + if (HTM_ERR(pib_write(htm->target.dn->parent->target, NCU_MODE_REGISTER, ncu)))
> > > return -1;
> > >
> > > return 0;
> > >
> >
> >
>
More information about the Pdbg
mailing list