[Pdbg] [PATCH 05/13] libpdbg: Add an api to get system device tree

Amitay Isaacs amitay at ozlabs.org
Thu Jan 16 13:34:59 AEDT 2020


On Thu, 2020-01-16 at 12:31 +1100, Alistair Popple wrote:
> Actually with the PDBG API to read/write property values do we
> actually need 
> to expose the FDT pointer outside of PDBG at all? libekb can just 
> pdbg_target_property, etc. (I have patches). Are there any other
> users of this 
> that we care about?

Good point.  We can drop this patch.

> 
> - Alistair
> 
> On Wednesday, 15 January 2020 4:18:53 PM AEDT Amitay Isaacs wrote:
> > Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> > ---
> >  libpdbg/dtb.c     | 5 +++++
> >  libpdbg/libpdbg.h | 1 +
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
> > index ab5ef4c..6825055 100644
> > --- a/libpdbg/dtb.c
> > +++ b/libpdbg/dtb.c
> > @@ -388,3 +388,8 @@ struct pdbg_dtb *pdbg_default_dtb(void
> > *system_fdt)
> >  done:
> >  	return dtb;
> >  }
> > +
> > +void *pdbg_system_fdt(void)
> > +{
> > +	return pdbg_dtb.system;
> > +}
> > diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
> > index 4a8f1cf..be0aa09 100644
> > --- a/libpdbg/libpdbg.h
> > +++ b/libpdbg/libpdbg.h
> > @@ -103,6 +103,7 @@ uint64_t pdbg_target_address(struct pdbg_target
> > *target,
> > uint64_t *size);
> > 
> >  /* Misc. */
> >  bool pdbg_targets_init(void *fdt);
> > +void *pdbg_system_fdt(void);
> >  void pdbg_target_probe_all(struct pdbg_target *parent);
> >  enum pdbg_target_status pdbg_target_probe(struct pdbg_target
> > *target);
> >  void pdbg_target_release(struct pdbg_target *target);
> 
> 
> 

Amitay.
-- 

The more you live the less you die.



More information about the Pdbg mailing list