summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Albert <albertj@us.ibm.com>2017-10-20 12:40:44 -0500
committerAlistair Popple <alistair@popple.id.au>2017-12-11 15:08:18 +1100
commitabf61b33793a8e01fbc07e4f30f7c50e40906a4f (patch)
tree5fcbe2ac40aa39b9a3d8431dd7a7afdb86284dff
parent0380305521d8832f5ed6348fadc0c6ecec5b83ba (diff)
downloadpdbg-abf61b33793a8e01fbc07e4f30f7c50e40906a4f.tar.gz
pdbg-abf61b33793a8e01fbc07e4f30f7c50e40906a4f.zip
libpdbg: Added new generic P9 chiplet type
Add support for detection of generic POWER9 chiplets. Unlike cores they do not support special wakeup. Signed-off-by: Jason Albert <albertj@us.ibm.com> Signed-off-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r--libpdbg/p9chip.c23
-rw-r--r--libpdbg/target.h4
2 files changed, 27 insertions, 0 deletions
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index 720c166..8f7a86c 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -250,3 +250,26 @@ struct core p9_core = {
},
};
DECLARE_HW_UNIT(p9_core);
+
+static int p9_chiplet_probe(struct pdbg_target *target)
+{
+ uint64_t value;
+
+ if (pib_read(target, NET_CTRL0, &value))
+ return -1;
+
+ if (!(value & NET_CTRL0_CHIPLET_ENABLE))
+ return -1;
+
+ return 0;
+}
+
+struct chiplet p9_chiplet = {
+ .target = {
+ .name = "POWER9 Chiplet",
+ .compatible = "ibm,power9-chiplet",
+ .class = "chiplet",
+ .probe = p9_chiplet_probe,
+ },
+};
+DECLARE_HW_UNIT(p9_chiplet);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index 857d23c..2ae0106 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -135,4 +135,8 @@ struct thread {
};
#define target_to_thread(x) container_of(x, struct thread, target)
+/* Place holder for chiplets which we just want translation for */
+struct chiplet {
+ struct pdbg_target target;
+};
#endif
OpenPOWER on IntegriCloud