libpdbg/chip: add HEIR and HID register to ram_state_thread

Message ID 20181005034645.1597-1-rashmica.g@gmail.com
State Accepted
Headers show
Series
  • libpdbg/chip: add HEIR and HID register to ram_state_thread
Related show

Checks

Context Check Description
snowpatch_ozlabs/build-multiarch fail Test build-multiarch on branch master
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied

Commit Message

Rashmica Gupta Oct. 5, 2018, 3:46 a.m.
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
---
 libpdbg/chip.c    | 7 +++++++
 libpdbg/libpdbg.h | 2 ++
 2 files changed, 9 insertions(+)

Patch

diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 93eb3f0..5b67c7b 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -471,6 +471,13 @@  int ram_state_thread(struct pdbg_target *thread, struct thread_regs *regs)
 	ram_getspr(thread, 307, &regs->hdar);
 	printf("HDAR  : 0x%016" PRIx64 "\n", regs->hdar);
 
+	ram_getspr(thread, 339, &value);
+	regs->heir = value;
+	printf("HEIR : 0x%016" PRIx32 "\n", regs->heir);
+
+	ram_getspr(thread, 1008, &regs->hid);
+	printf("HID0 : 0x%016" PRIx64 "\n", regs->hid);
+
 	ram_getspr(thread, 314, &regs->hsrr0);
 	printf("HSRR0 : 0x%016" PRIx64 "\n", regs->hsrr0);
 
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index c802020..1977c75 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -120,6 +120,8 @@  struct thread_regs {
 	uint64_t hsrr0;
 	uint64_t hsrr1;
 	uint64_t hdec;
+	uint32_t heir;
+	uint64_t hid;
 	uint64_t hsprg0;
 	uint64_t hsprg1;
 	uint64_t fscr;