From patchwork Fri Mar 27 01:30:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 1262496 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48pPS42vQcz9sSN for ; Fri, 27 Mar 2020 12:30:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48pPS35hX7zDqyb for ; Fri, 27 Mar 2020 12:30:27 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48pPRz6l88zDqwL for ; Fri, 27 Mar 2020 12:30:23 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48pPRy5B9Yz9sRR; Fri, 27 Mar 2020 12:30:22 +1100 (AEDT) From: Alistair Popple To: pdbg@lists.ozlabs.org Date: Fri, 27 Mar 2020 12:30:15 +1100 Message-Id: <20200327013016.31197-1-alistair@popple.id.au> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 1/2] libpdbg: Improve diagnostic traces for PIB access X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Alistair Popple --- libpdbg/target.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libpdbg/target.c b/libpdbg/target.c index 164d571..8cc6f7f 100644 --- a/libpdbg/target.c +++ b/libpdbg/target.c @@ -138,8 +138,10 @@ int pib_read(struct pdbg_target *pib_dt, uint64_t addr, uint64_t *data) rc = pib_indirect_read(pib, target_addr, data); else rc = pib->read(pib, target_addr, data); - PR_DEBUG("addr:0x%08" PRIx64 " data:0x%016" PRIx64 "\n", - target_addr, *data); + + PR_DEBUG("rc = %d, addr = 0x%016" PRIx64 ", data = 0x%016" PRIx64 ", target = %s\n", + rc, target_addr, *data, pdbg_target_path(&pib->target)); + return rc; } @@ -157,6 +159,10 @@ int pib_write(struct pdbg_target *pib_dt, uint64_t addr, uint64_t data) rc = pib_indirect_write(pib, target_addr, data); else rc = pib->write(pib, target_addr, data); + + PR_DEBUG("rc = %d, addr = 0x%016" PRIx64 ", data = 0x%016" PRIx64 ", target = %s\n", + rc, target_addr, data, pdbg_target_path(&pib->target)); + return rc; } From patchwork Fri Mar 27 01:30:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 1262497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48pPS80NMbz9sSN for ; Fri, 27 Mar 2020 12:30:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48pPS708whzDqyb for ; Fri, 27 Mar 2020 12:30:31 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48pPS02QjDzDqwP for ; Fri, 27 Mar 2020 12:30:24 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48pPRz6xcxz9sSN; Fri, 27 Mar 2020 12:30:23 +1100 (AEDT) From: Alistair Popple To: pdbg@lists.ozlabs.org Date: Fri, 27 Mar 2020 12:30:16 +1100 Message-Id: <20200327013016.31197-2-alistair@popple.id.au> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200327013016.31197-1-alistair@popple.id.au> References: <20200327013016.31197-1-alistair@popple.id.au> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/2] libpdbg: Add diagnostic trace information for FSI X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Alistair Popple --- libpdbg/target.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libpdbg/target.c b/libpdbg/target.c index 8cc6f7f..501e019 100644 --- a/libpdbg/target.c +++ b/libpdbg/target.c @@ -226,22 +226,31 @@ int opb_write(struct pdbg_target *opb_dt, uint32_t addr, uint32_t data) int fsi_read(struct pdbg_target *fsi_dt, uint32_t addr, uint32_t *data) { struct fsi *fsi; + int rc; uint64_t addr64 = addr; fsi_dt = get_class_target_addr(fsi_dt, "fsi", &addr64); fsi = target_to_fsi(fsi_dt); - return fsi->read(fsi, addr64, data); + + rc = fsi->read(fsi, addr64, data); + PR_DEBUG("rc = %d, addr = 0x%05" PRIx64 ", data = 0x%08" PRIx32 ", target = %s\n", + rc, addr64, *data, pdbg_target_path(&fsi->target)); + return rc; } int fsi_write(struct pdbg_target *fsi_dt, uint32_t addr, uint32_t data) { struct fsi *fsi; + int rc; uint64_t addr64 = addr; fsi_dt = get_class_target_addr(fsi_dt, "fsi", &addr64); fsi = target_to_fsi(fsi_dt); - return fsi->write(fsi, addr64, data); + rc = fsi->write(fsi, addr64, data); + PR_DEBUG("rc = %d, addr = 0x%05" PRIx64 ", data = 0x%08" PRIx32 ", target = %s\n", + rc, addr64, data, pdbg_target_path(&fsi->target)); + return rc; } int fsi_write_mask(struct pdbg_target *fsi_dt, uint32_t addr, uint32_t data, uint32_t mask)