[Pdbg] [PATCH v2 04/22] libpdbg: Add virtual node target

Amitay Isaacs amitay at ozlabs.org
Fri Sep 20 15:16:32 AEST 2019


This is used to construct system device tree representation.

Currently there are multiple device trees for a system (e.g. P9) based
on the backend where it's used.  This means one cannot refer to a hwunit
by specific path which is independent of backend.

System device tree is a system representation that allows to identify
hwunits uniquely by device tree path.  However, the backend device
trees are still separate.  To avoid keeping two different device trees
(system device tree and backend device tree) in memory, a system device
tree view is created on top of the backend device tree.  This system
device tree view is created using virtual nodes.  A virtual nodes
denotes the attachment point for a hw-unit in a system device tree view.
With multiple virtual nodes a system device tree view is overlaid on
top of the backend device tree.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
Reviewed-by: Alistair Popple <alistair at popple.id.au>
---
 libpdbg/target.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libpdbg/target.h b/libpdbg/target.h
index 2ecbf98..7e08ac3 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -50,6 +50,7 @@ struct pdbg_target {
 	bool probed;
 	struct list_node class_link;
 	void *priv;
+	struct pdbg_target *vnode;
 };
 
 struct pdbg_target *require_target_parent(struct pdbg_target *target);
-- 
2.21.0



More information about the Pdbg mailing list