[Pdbg] [PATCH v3 18/25] libpdbg: Add thread driver using sbefifo

Amitay Isaacs amitay at ozlabs.org
Mon Apr 20 14:32:51 AEST 2020


On Mon, 2020-04-20 at 13:14 +1000, Alistair Popple wrote:
> On Friday, 17 April 2020 5:07:42 PM AEST Amitay Isaacs wrote:
> > +static int sbefifo_thread_op(struct thread *thread, uint32_t oper)
> > +{
> > +       struct pdbg_target *chiplet =
> > +               pdbg_target_require_parent("chiplet", &thread-
> > >target);
> > +       struct sbefifo *sbefifo = target_to_sbefifo(
> > +               pdbg_target_require_parent("sbefifo", &thread-
> > >target));
> 
> How does this work? I'm guessing because you're assuming that because
> the 
> SBEFIFO backend is selected you must have the SBEFIFO PIB driver
> (and 
> therefore the SBEFIFO) as a parent of the thread target?


Correct.  We do make such assumptions elsewhere also.  I am open to
suggestions if you prefer some alternate way.

> 
> - Alistair
> 
> > +       struct sbefifo_context *sctx =
> > sbefifo->get_sbefifo_context(sbefifo); +       uint8_t mode = 0;
> > +
> 
> 
> 

Amitay.
-- 

In theory there is no difference between theory and practise. In 
practice, there is.  - Yogi Berra



More information about the Pdbg mailing list