[Pdbg] [PATCH v3 0/4] Fix handling of attributes for virtual targets

Amitay Isaacs amitay at ozlabs.org
Wed Mar 4 14:40:07 AEDT 2020


On Wed, 2020-03-04 at 14:35 +1100, Alistair Popple wrote:
> If the same property is in both system and backend device-tree which
> takes 
> precedence? From what I could see it looked like the real target
> would. We 
> should probably document that somewhere, but I guess step one is
> writing some 
> documentation for the different device-trees and how they fit
> together.
> 

In the current case, it would be the real target would be looked up
first and then the virtual target.  

The only properties that may be replicated would be things like
#address-cells, #size-cells, etc.  They may be required for avoiding
warnings from dtc.

As far as attributes are concerned, they cannot be duplicated since we
allow only system device tree to be specified and not the backend
device tree.  And we don't have any attributes in backend device tree.

> - Alistair
> 
> On Wednesday, 4 March 2020 2:19:09 PM AEDT Amitay Isaacs wrote:
> > The system level attributes are assigned to the root (/) of the
> > tree. So
> > make sure that the pdbg_root is associated with root of the system
> > tree.
> > Since system tree includes few virtual targets (e.g. /proc0/pib),
> > any
> > attributes defined for such targets need to be found for the
> > corresponding
> > real targets.
> > 
> > V2 changes:
> >  - Fix a bug in checking if fdt is writeable
> >  - Improve the check if fdt is writeable, takes care of readonly
> > mmaps
> > 
> > V3 changes:
> >  - Change pdbg_fdt_is_writeable() to pdbg_fdt_is_readonly()
> >    This avoids unnecessary logic negation
> > 
> > Amitay Isaacs (4):
> >   libpdbg: Properties for / in system tree are attached to root
> > node
> >   libpdbg: Handle properties defined on virtual targets correctly
> >   tests: Assign attributes to virtual nodes to test property api
> >   libpdbg: Improve the logic to check if fdt is writable
> > 
> >  fake.dts.m4      |  4 ++--
> >  libpdbg/device.c | 51 +++++++++++++++++++++++++++++++-------------
> > ----
> >  libpdbg/dtb.c    | 24 +++++++++--------------
> >  libpdbg/target.h |  3 ++-
> >  4 files changed, 46 insertions(+), 36 deletions(-)
> 
> 
> 

Amitay.
-- 

I haven't lost my mind - it's backed up to tape somewhere.



More information about the Pdbg mailing list