From patchwork Wed Apr 22 02:17:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1274643 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 496PGp4SFVz9sSs for ; Wed, 22 Apr 2020 12:17:54 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=cxeUHy6t; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 496PGp2wrLzDqyk for ; Wed, 22 Apr 2020 12:17:54 +1000 (AEST) 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 496PGb6qCXzDqtY for ; Wed, 22 Apr 2020 12:17:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=cxeUHy6t; dkim-atps=neutral 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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 496PGZ6xtDz9sSh; Wed, 22 Apr 2020 12:17:42 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587521863; bh=alcBMXOIWN1Nuc7e3fJKpp74LQGFr9cgvstOSq1W4Vo=; h=From:To:Cc:Subject:Date:From; b=cxeUHy6tTNYBbMRGKLJpCG7ClhITG9zOWH1audSqata9De0ANpFjK6p23ShVL7A11 McHkUNJJRarqeyKiqqV4eb6esC8GRlLJZLOnTWd4rcVd8h/GOtNDncdtKXBJbOQVFT 291d3lVLIlUJLd2eRaJPcwDa9oXmd3RnqIrDjZ19O9FIwfY7frocnpqJ4OUAgNU4nT ozfuyXpf7WPv9A1Bsp5OJt2fqDpciRtNCB0jSeSoKDYia1ttBExqkI5x+sEeprCBcE Me9s4pqIgRFhvaRUM2e995rdIxO3wEbD/z94lx4CY0W/d7YfxX830mk3+6gXeS9vPV yzxihDTFnkaCw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 22 Apr 2020 12:17:30 +1000 Message-Id: <20200422021731.112666-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.3 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 1/2] libpdbg: Update documentation for pdbg_targets_init() 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: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- libpdbg/libpdbg.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..3078bc5 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -490,11 +490,9 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option); * Must be called prior to using any other libpdbg functions. * * Device tree can also be specified using PDBG_DTB environment variable - * pointing to system device tree. - * - * If the argument is NULL, then PDBG_DTB will override the default device - * tree. If the argument is not NULL, then that will override the default - * device tree and device tree pointed by PDBG_DTB. + * pointing to system device tree. If system device tree is specified using + * PDBG_DTB, then it will override the default device tree or the specified + * device tree. * * @note This function can only be called once. */ From patchwork Wed Apr 22 02:17:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1274642 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 496PGl5D9zz9sSq for ; Wed, 22 Apr 2020 12:17:51 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=WzLqwVmJ; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 496PGl0nrZzDr0P for ; Wed, 22 Apr 2020 12:17:51 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 496PGb6wNVzDqwH for ; Wed, 22 Apr 2020 12:17:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=WzLqwVmJ; dkim-atps=neutral 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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 496PGb468Yz9sSm; Wed, 22 Apr 2020 12:17:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587521863; bh=p0HZfWqWYNkY2PGDfivb0POvckr+VXv5wpDykxZMrtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WzLqwVmJdajfunqAb0nMYdtoCf4N9t24Znb6z732QfDVz4SbnUSUB7rctoi8aAis2 elP/oB6c7df11LUzcKHLBRyNFN2V6Jd91QugSSLJBQFjSG+/Hz3UsG1l6nIs4ngjKu jjcgfWSYFrDe7q9c2FKNZ3R0ZjWUrpuCRTvvI45RTvhjIrP7m76mZn8QsuaYRiRdhX bK6swAiKs6Rcz8nMRWzZQmI+t33YqjKMkDxYJx6GmG3sJVubfmiFGGnXqzhz6ojtqt qmu8o0gbnlCUKgEeR9tPzVAEmEzVMahHwJFzCV9So4XFdzcGSkZLqJP/AzVWJp9KGT YM9KVYWwcfo0g== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 22 Apr 2020 12:17:31 +1000 Message-Id: <20200422021731.112666-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200422021731.112666-1-amitay@ozlabs.org> References: <20200422021731.112666-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/2] libpdbg: Add explicit check for library initialisation 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: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs --- libpdbg/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libpdbg/device.c b/libpdbg/device.c index 219569e..80a8287 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -709,6 +709,11 @@ bool pdbg_targets_init(void *fdt) { struct pdbg_dtb *dtb; + if (pdbg_dt_root) { + pdbg_log(PDBG_ERROR, "pdbg_targets_init() must be called only once\n"); + return false; + } + dtb = pdbg_default_dtb(fdt); if (!dtb) {