[Pdbg] [PATCH 05/13] libpdbg: Add an api to get system device tree
Amitay Isaacs
amitay at ozlabs.org
Wed Jan 15 16:18:53 AEDT 2020
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);
--
2.21.1
More information about the Pdbg
mailing list