[Pdbg] [PATCH 09/14] libpdbg/p9chip.c: have start clear maint

Nicholas Piggin npiggin at gmail.com
Mon Apr 9 17:35:17 AEST 2018


The workbook indicates that sibling threads stopped as part of a ram
operation need to have their maintainence bit cleared. It seems to be
harmless to just clear them at start.

Signed-off-by: Nicholas Piggin <npiggin at mgail.com>
---
 libpdbg/p9chip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index a45ea5d..684975a 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -83,8 +83,12 @@ static int p9_thread_probe(struct pdbg_target *target)
 
 static int p9_thread_start(struct thread *thread)
 {
+	/* Start */
 	thread_write(thread, P9_DIRECT_CONTROL, PPC_BIT(6 + 8*thread->id));
 
+	/* Clear MAINT */
+	thread_write(thread, P9_DIRECT_CONTROL, PPC_BIT(3 + 8*thread->id));
+
 	return 0;
 }
 
-- 
2.17.0



More information about the Pdbg mailing list