summaryrefslogtreecommitdiffstats
path: root/libpdbg/libpdbg.h
diff options
context:
space:
mode:
Diffstat (limited to 'libpdbg/libpdbg.h')
-rw-r--r--libpdbg/libpdbg.h28
1 files changed, 11 insertions, 17 deletions
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 51e1523..3b82154 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -146,27 +146,21 @@ int ram_step_thread(struct pdbg_target *target, int steps);
int ram_stop_thread(struct pdbg_target *target);
int ram_sreset_thread(struct pdbg_target *target);
int ram_state_thread(struct pdbg_target *target, struct thread_regs *regs);
-uint64_t thread_status(struct pdbg_target *target);
+struct thread_state thread_status(struct pdbg_target *target);
int getring(struct pdbg_target *chiplet_target, uint64_t ring_addr, uint64_t ring_len, uint32_t result[]);
-#define THREAD_STATUS_DISABLED PPC_BIT(0)
-#define THREAD_STATUS_ACTIVE PPC_BIT(63)
+enum pdbg_sleep_state {PDBG_THREAD_STATE_RUN, PDBG_THREAD_STATE_DOZE,
+ PDBG_THREAD_STATE_NAP, PDBG_THREAD_STATE_SLEEP,
+ PDBG_THREAD_STATE_STOP};
-#define THREAD_STATUS_STATE PPC_BITMASK(61, 62)
-#define THREAD_STATUS_DOZE PPC_BIT(62)
-#define THREAD_STATUS_NAP PPC_BIT(61)
-#define THREAD_STATUS_SLEEP PPC_BITMASK(61, 62)
+enum pdbg_smt_state {PDBG_SMT_UNKNOWN, PDBG_SMT_1, PDBG_SMT_2, PDBG_SMT_4, PDBG_SMT_8};
-#define THREAD_STATUS_QUIESCE PPC_BIT(60)
-
-#define THREAD_STATUS_SMT PPC_BITMASK(57, 59)
-#define THREAD_STATUS_SMT_1 PPC_BIT(59)
-#define THREAD_STATUS_SMT_2SH PPC_BIT(58)
-#define THREAD_STATUS_SMT_2SP (PPC_BIT(58) | PPC_BIT(59))
-#define THREAD_STATUS_SMT_4 PPC_BIT(57)
-#define THREAD_STATUS_SMT_8 (PPC_BIT(57) | PPC_BIT(59))
-
-#define THREAD_STATUS_STOP PPC_BIT(56)
+struct thread_state {
+ bool active;
+ bool quiesced;
+ enum pdbg_sleep_state sleep_state;
+ enum pdbg_smt_state smt_state;
+};
int htm_start(struct pdbg_target *target);
int htm_stop(struct pdbg_target *target);
OpenPOWER on IntegriCloud