From patchwork Fri Apr 17 07:07:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272043 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 493RyG1LsZz9sSv for ; Fri, 17 Apr 2020 17:08:22 +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=MZdLYf+F; 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 493RyD6Gk1zDrG3 for ; Fri, 17 Apr 2020 17:08:20 +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 493Rxr4ht3zDqWn for ; Fri, 17 Apr 2020 17:08:00 +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=MZdLYf+F; 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 493Rxr1jxfz9sSv; Fri, 17 Apr 2020 17:08:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107280; bh=hQ0VmCC46GLBqknYhpABftCbmc2FTUKd5YhMbmufJcY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MZdLYf+FPwpyniJXid8LindL27P4l7nK1QtK6s+3m2Pca1ky93KMEbxfVrwsc+KSG ytnNZCAHCUc8mI1xdmDWZ43JUPO9q7jwf3A+prUEw/OES8MiuCOSvsjJ4cqgYsxccU C+ej9gmKLDDHLHbmWPtndCSoSUNxXm3WyUfFMFS2Napr2KpQPLwEVKGG/1RuAM4gdQ EfJpgxOzIVHfgA5WO+qjppYbC/LMT4mxnwYMXPoWC+89lkmM22nrQASZV3EFKNJJrr ulyGsUCV+FYBXnRfMs9caftXGUMEE3v31MoB59eCu6xVVokHG9JZYpmYLkSAuhLVqu JFv+w0/Q9sYgA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:25 +1000 Message-Id: <20200417070749.276754-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 01/25] libsbefifo: Fix compilation error for undefined variable 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" We didn't hit this because of the LOG() macro which is only enabled with -DLIBSBEFIFO_DEBUG=1. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libsbefifo/operation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsbefifo/operation.c b/libsbefifo/operation.c index 07d9f64..8717f15 100644 --- a/libsbefifo/operation.c +++ b/libsbefifo/operation.c @@ -60,17 +60,18 @@ static int sbefifo_transport(struct sbefifo_context *sctx, uint8_t *msg, uint32_ int rc; size_t buflen; + buflen = msg_len; rc = sbefifo_write(sctx, msg, buflen); if (rc) { - LOG("write: cmd=%08x, rc=%d\n", cmd, rc); + LOG("write: cmd=%08x, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), rc); return rc; } buflen = *out_len; rc = sbefifo_read(sctx, out, &buflen); if (rc) { - LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", cmd, buflen, rc); + LOG("read: cmd=%08x, buflen=%zu, rc=%d\n", be32toh(*(uint32_t *)(msg+4)), buflen, rc); return rc; } From patchwork Fri Apr 17 07:07:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272045 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 493RyV6pMvz9sT0 for ; Fri, 17 Apr 2020 17:08:34 +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=FuFi+6n4; 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 493RyV487czDq77 for ; Fri, 17 Apr 2020 17:08:34 +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 493Rxt6jQTzDq77 for ; Fri, 17 Apr 2020 17:08:02 +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=FuFi+6n4; 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 493Rxr4zNmz9sSx; Fri, 17 Apr 2020 17:08:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107280; bh=KTRiVd+Edp67SZlS68VgrLoSAVCLvX8d/f7x+wtH5mc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FuFi+6n4CRrO+zU8eFyYJEl9fQpNq31vsJx0H7jrP6U1LqL2O5qUsqCKK4TkOgWrp UGkcQiVCL8oX9i5w10RhTurZmboKNFkoIqOn/dT/RZt/FzMt79A1raMtdUNl8CkYNs z1Iz1agLDLM/2dC6k1o0k9mLxnVEF7v19KThoyqLu6B5EmcSHvslvIZpsVoH7pt5K0 EzUC8cskvBbo/Ng8Qwq1P5mhhZMXKqI6FFqk70WlRMvv2pBglKFzCcbFCPo04SBCUi qvwD04QBtGWP4vD6cywy2Q/zqLGSOYiWwnfj83C4Hs09FJ0cY01zRMzryw/8S2jHeg jstlVoTn2afUg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:26 +1000 Message-Id: <20200417070749.276754-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 02/25] libsbefifo: Use the correct sized pointer 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 Reviewed-by: Alistair Popple --- libsbefifo/cmd_scom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsbefifo/cmd_scom.c b/libsbefifo/cmd_scom.c index bc9b5f9..bb44e5e 100644 --- a/libsbefifo/cmd_scom.c +++ b/libsbefifo/cmd_scom.c @@ -24,7 +24,7 @@ static int sbefifo_scom_get_push(uint64_t addr, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 4; @@ -83,7 +83,7 @@ int sbefifo_scom_get(struct sbefifo_context *sctx, uint64_t addr, uint64_t *valu static int sbefifo_scom_put_push(uint64_t addr, uint64_t value, uint8_t **buf, uint32_t *buflen) { - uint8_t *msg; + uint32_t *msg; uint32_t nwords, cmd; nwords = 6; From patchwork Fri Apr 17 07:07:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272044 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 493RyP4X59z9sT0 for ; Fri, 17 Apr 2020 17:08:29 +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=SmbKF/me; 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 493RyM1rrvzDrSF for ; Fri, 17 Apr 2020 17:08:27 +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 493Rxt6jvNzDqWn for ; Fri, 17 Apr 2020 17:08:02 +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=SmbKF/me; 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 493Rxt0XYfz9sT3; Fri, 17 Apr 2020 17:08:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107282; bh=kLfqOhOnG/PGv9Tf6rtC6WZROaMWirPNRWnwWDJA2k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmbKF/medUcxbUucahLYT6Oii6niyd+L7SlTOIbd2jEO1VlYhiURYMVb2DeXyoeS7 cH4V7cme/sZtCy2J7N9rUI0/zZpvU0ZZu/nYpR9+JxlcjuZfVprbcRLyyinTLjJejN CJd6pmn9Ak5WjqRnkjqzyWHM6y0Fg0PL5tC8qDoacWcKPfa7PfLWKg1UGIaqTtMFyp gXPb3i5DyMxZhP8gw4rSZ81Mvmv324D0Dza/t5C9+ryQK/gUbUy4cxlSCDzQZxyJT0 OAt1tUBxTxzHAELPP1RYay9YPdkPCZDfKZc/V/oWFE/z2sLOfyTClFy0HcICDuSEfo ucGXJun4FBk7A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:27 +1000 Message-Id: <20200417070749.276754-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 03/25] libpdbg: Add a private api to get current backend 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 Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 5 +++++ libpdbg/target.h | 1 + 2 files changed, 6 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index b094e34..70b7962 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option) return true; } +enum pdbg_backend pdbg_get_backend(void) +{ + return pdbg_backend; +} + const char *pdbg_get_backend_option(void) { return pdbg_backend_option; diff --git a/libpdbg/target.h b/libpdbg/target.h index 3b74844..7094b51 100644 --- a/libpdbg/target.h +++ b/libpdbg/target.h @@ -80,6 +80,7 @@ extern struct list_head empty_list; extern struct list_head target_classes; struct pdbg_dtb *pdbg_default_dtb(void *system_fdt); +enum pdbg_backend pdbg_get_backend(void); const char *pdbg_get_backend_option(void); bool pdbg_fdt_is_readonly(void *fdt); From patchwork Fri Apr 17 07:07:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272048 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 493Ryh1zgsz9sSh for ; Fri, 17 Apr 2020 17:08:44 +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=RZr41d3n; 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 493Ryh0MxFzDq77 for ; Fri, 17 Apr 2020 17:08:44 +1000 (AEST) 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 493Rxv3m8VzDqWn for ; Fri, 17 Apr 2020 17:08:03 +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=RZr41d3n; 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 493Rxt56Gyz9sT4; Fri, 17 Apr 2020 17:08:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107282; bh=bPQTDCpqNnWNqpLlR7u6TzLXijur7jTKxUlTK+wK1oE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZr41d3n56vyOq/UT9qzDi+uwB6C/KMiVOv6iDxF9/6bU741TmuWkivGv4OdOY6SP 8w4eAZYOIljF5BEreXNCAr5YCOQILXX5+jubMOJfZ2F6cxSOU1iWMFdQcSeKLLpOJi JrscmB0FqZ4FhQ5qUH/1LbG7JtxuJg056W5xEy3cIKPs5gSMGVXIBWbjH+edwqdT/+ DJXhxeVK/bW0cC+SrKwO7kxMCKn9yHnj6QIt38tFVtEscwuvqlf2Rh24eJP7rXFYOA XD7uBLINAik9DYvwRLMdXHeFxSJ9F5hzFv5kVb3R7vK3gLrLRmAML53j0CjSp1kCke IxrMRLPKqGBuA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:28 +1000 Message-Id: <20200417070749.276754-5-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 04/25] libpdbg: Register hwunit drivers per backend 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" This will allow to load backend specific drivers first. All the drivers are registered with the default backend, so this patch does not change libpdbg behaviour. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/adu.c | 4 +-- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +++--- libpdbg/chip.c | 2 +- libpdbg/cronus.c | 6 ++--- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 31 ++++++++++++++++------- libpdbg/hwunit.h | 2 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +-- libpdbg/p8chip.c | 4 +-- libpdbg/p9_fapi_targets.c | 52 +++++++++++++++++++-------------------- libpdbg/p9chip.c | 4 +-- libpdbg/sbefifo.c | 8 +++--- 16 files changed, 79 insertions(+), 66 deletions(-) diff --git a/libpdbg/adu.c b/libpdbg/adu.c index df610a7..fe60118 100644 --- a/libpdbg/adu.c +++ b/libpdbg/adu.c @@ -597,6 +597,6 @@ DECLARE_HW_UNIT(p9_adu); __attribute__((constructor)) static void register_adu(void) { - pdbg_hwunit_register(&p8_adu_hw_unit); - pdbg_hwunit_register(&p9_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_adu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_adu_hw_unit); } diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 1d2e304..2639595 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(&bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); } diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c index da4c5fc..0b0b6f0 100644 --- a/libpdbg/cfam.c +++ b/libpdbg/cfam.c @@ -353,8 +353,8 @@ DECLARE_HW_UNIT(cfam_hmfsi); __attribute__((constructor)) static void register_cfam(void) { - pdbg_hwunit_register(&fsi_pib_hw_unit); - pdbg_hwunit_register(&p8_opb_hw_unit); - pdbg_hwunit_register(&p8_opb_hmfsi_hw_unit); - pdbg_hwunit_register(&cfam_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fsi_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_opb_hmfsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cfam_hmfsi_hw_unit); } diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b45cffa..b961e87 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -679,5 +679,5 @@ DECLARE_HW_UNIT(proc); __attribute__((constructor)) static void register_proc(void) { - pdbg_hwunit_register(&proc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &proc_hw_unit); } diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index ff8af4c..23d555b 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(&cronus_pib_hw_unit); - pdbg_hwunit_register(&cronus_fsi_hw_unit); - pdbg_hwunit_register(&cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); } diff --git a/libpdbg/fake.c b/libpdbg/fake.c index 82415db..ae02463 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(&fake_fsi_hw_unit); - pdbg_hwunit_register(&fake_pib_hw_unit); - pdbg_hwunit_register(&fake_core_hw_unit); - pdbg_hwunit_register(&fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); } diff --git a/libpdbg/host.c b/libpdbg/host.c index 428c18b..d02b53d 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(&host_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); } diff --git a/libpdbg/htm.c b/libpdbg/htm.c index 4d23e82..a259478 100644 --- a/libpdbg/htm.c +++ b/libpdbg/htm.c @@ -1158,7 +1158,7 @@ DECLARE_HW_UNIT(p8_chtm); __attribute__((constructor)) static void register_htm(void) { - pdbg_hwunit_register(&p8_nhtm_hw_unit); - pdbg_hwunit_register(&p9_nhtm_hw_unit); - pdbg_hwunit_register(&p8_chtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nhtm_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_chtm_hw_unit); } diff --git a/libpdbg/hwunit.c b/libpdbg/hwunit.c index c7ec63d..710c78a 100644 --- a/libpdbg/hwunit.c +++ b/libpdbg/hwunit.c @@ -20,26 +20,28 @@ #include "hwunit.h" #define MAX_HW_UNITS 1024 +#define MAX_BACKENDS 16 -static const struct hw_unit_info *g_hw_unit[MAX_HW_UNITS]; -static int g_hw_unit_count; +static const struct hw_unit_info *g_hw_unit[MAX_BACKENDS][MAX_HW_UNITS]; +static int g_hw_unit_count[MAX_BACKENDS]; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit) +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit) { - assert(g_hw_unit_count < MAX_HW_UNITS); + assert(g_hw_unit_count[backend] < MAX_HW_UNITS); - g_hw_unit[g_hw_unit_count] = hw_unit; - g_hw_unit_count++; + g_hw_unit[backend][g_hw_unit_count[backend]] = hw_unit; + g_hw_unit_count[backend]++; } -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat) { const struct hw_unit_info *p; struct pdbg_target *target; int i; - for (i = 0; i < g_hw_unit_count; i++) { - p = g_hw_unit[i]; + for (i = 0; i < g_hw_unit_count[backend]; i++) { + p = g_hw_unit[backend][i]; target = p->hw_unit; if (!strcmp(target->compatible, compat)) @@ -48,3 +50,14 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..5bca088 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,7 +31,7 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); +void pdbg_hwunit_register(enum pdbg_backend backend, const struct hw_unit_info *hw_unit); const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); /* diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 1a5d089..3d0b80a 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(&p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); } diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index dbd3586..c4637a7 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(&kernel_fsi_hw_unit); - pdbg_hwunit_register(&kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); } diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 1bf71e8..484d77c 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -738,6 +738,6 @@ DECLARE_HW_UNIT(p8_core); __attribute__((constructor)) static void register_p8chip(void) { - pdbg_hwunit_register(&p8_thread_hw_unit); - pdbg_hwunit_register(&p8_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_core_hw_unit); } diff --git a/libpdbg/p9_fapi_targets.c b/libpdbg/p9_fapi_targets.c index 1dc7af8..97680d5 100644 --- a/libpdbg/p9_fapi_targets.c +++ b/libpdbg/p9_fapi_targets.c @@ -720,30 +720,30 @@ DECLARE_HW_UNIT(p9_capp); __attribute__((constructor)) static void register_p9_fapi_targets(void) { - pdbg_hwunit_register(&p9_ex_hw_unit); - pdbg_hwunit_register(&p9_mba_hw_unit); - pdbg_hwunit_register(&p9_mcs_hw_unit); - pdbg_hwunit_register(&p9_xbus_hw_unit); - pdbg_hwunit_register(&p9_abus_hw_unit); - pdbg_hwunit_register(&p9_l4_hw_unit); - pdbg_hwunit_register(&p9_eq_hw_unit); - pdbg_hwunit_register(&p9_mca_hw_unit); - pdbg_hwunit_register(&p9_mcbist_hw_unit); - pdbg_hwunit_register(&p9_mi_hw_unit); - pdbg_hwunit_register(&p9_dmi_hw_unit); - pdbg_hwunit_register(&p9_obus_hw_unit); - pdbg_hwunit_register(&p9_obus_brick_hw_unit); - pdbg_hwunit_register(&p9_sbe_hw_unit); - pdbg_hwunit_register(&p9_ppe_hw_unit); - pdbg_hwunit_register(&p9_pec_hw_unit); - pdbg_hwunit_register(&p9_phb_hw_unit); - pdbg_hwunit_register(&p9_mc_hw_unit); - pdbg_hwunit_register(&p9_mem_port_hw_unit); - pdbg_hwunit_register(&p9_nmmu_hw_unit); - pdbg_hwunit_register(&p9_pau_hw_unit); - pdbg_hwunit_register(&p9_iohs_hw_unit); - pdbg_hwunit_register(&p9_fc_hw_unit); - pdbg_hwunit_register(&p9_pauc_hw_unit); - pdbg_hwunit_register(&p9_chiplet_hw_unit); - pdbg_hwunit_register(&p9_capp_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ex_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_xbus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_abus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_l4_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_eq_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mca_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mcbist_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_dmi_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_obus_brick_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_sbe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_ppe_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pec_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_phb_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_mem_port_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_nmmu_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pau_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_iohs_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_fc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_pauc_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_chiplet_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_capp_hw_unit); } diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index 63434ee..6222dc3 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -510,6 +510,6 @@ DECLARE_HW_UNIT(p9_core); __attribute__((constructor)) static void register_p9chip(void) { - pdbg_hwunit_register(&p9_thread_hw_unit); - pdbg_hwunit_register(&p9_core_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_thread_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p9_core_hw_unit); } diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 41e68e9..22f11f1 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -321,8 +321,8 @@ DECLARE_HW_UNIT(kernel_sbefifo); __attribute__((constructor)) static void register_sbefifo(void) { - pdbg_hwunit_register(&kernel_sbefifo_hw_unit); - pdbg_hwunit_register(&sbefifo_chipop_hw_unit); - pdbg_hwunit_register(&sbefifo_mem_hw_unit); - pdbg_hwunit_register(&sbefifo_pba_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); + pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } From patchwork Fri Apr 17 07:07:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272046 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 493Ryc1PBSz9sSh for ; Fri, 17 Apr 2020 17:08:40 +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=DPwLswEj; 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 493Ryb31jkzDq77 for ; Fri, 17 Apr 2020 17:08:39 +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 493Rxv4YDzzDqw0 for ; Fri, 17 Apr 2020 17:08:03 +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=DPwLswEj; 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 493Rxv1cWNz9sSx; Fri, 17 Apr 2020 17:08:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107283; bh=ZfNeuLNlO4u30uL5KJ99cTj8n4VeNLSWOuohJ9HFIxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DPwLswEjsuyhdL8VhMfrUuS5TSm5CwV/6XSpgTLtl6NmFmCCJBoDI0SEznLlNzw2Q zSiQA26+3JF/q1mzorN6QfjdhUu2R79yjP5NudZGAt8+2/DHQZC6RLZAm9whEWyhWn Qf2mWP0VHyP5H+4KiufzA9R2QXpbT6ETjoNiVuhuLni5mqOSySq8c0S6HN591y1gtJ ceb0JT8Yt0Auf9/iAVX4sgjfwgB57t+O5MO1ALbMmK+ipHrVOQg5l14ER5DEderjUj +wDHjOX9G7fJuRYDFbCQcBPyzEWwq2MsIQanc52EyQDDcRWoZaFQdsYkUoCqbs0a/w HoBqrQapUbIJg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:29 +1000 Message-Id: <20200417070749.276754-6-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 05/25] libpdbg: Use const char * for filenames 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 Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..ef51718 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -234,7 +234,7 @@ static void bmc_target(struct pdbg_dtb *dtb) } /* Opens a dtb at the given path */ -static void mmap_dtb(char *file, bool readonly, struct pdbg_mfile *mfile) +static void mmap_dtb(const char *file, bool readonly, struct pdbg_mfile *mfile) { int fd; void *dtb; @@ -308,7 +308,7 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - char *fdt; + const char *fdt; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; From patchwork Fri Apr 17 07:07: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: 1272049 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493Ryn4bTtz9sT0 for ; Fri, 17 Apr 2020 17:08:49 +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=pQneLnma; 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 493Ryn3DCnzDq77 for ; Fri, 17 Apr 2020 17:08:49 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Rxw0VrHzDq77 for ; Fri, 17 Apr 2020 17:08:04 +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=pQneLnma; 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 493Rxv4f01z9sSh; Fri, 17 Apr 2020 17:08:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107283; bh=iJ1RSkjm8CZEKrUt+W2onmOXWjO+vowJk+w0k+9FSjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pQneLnmafkPjmUlBllol16qoFE1mRi7Q58rCoxDirzAPRuirBo5uaOsOdQAeBffDr hMZ58L9SsleZSuZVHKLI1YgT4YHvZskLcEtowjrIasT55QV8KKGaakbeGTz4vMX+BV XXE5LZxZkCybvosNEWhuC6ZwItEAhmbNcd2eo7YFMOjtIda7nB4NvXsvey7pOTwnx1 VM69H+pIa6KM5ajToelAePS9K5jw/0ZPPbTTyNAowg/SJunpRMDepWlJKt2G+sIP7n yxR6ALoxH0JVR1QJn9SxBqPrBeTj2raDFhnJvCpCvbiArKU4+ctiv3sg3yvZm/JTyF jpgRnzmR/PQbw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:30 +1000 Message-Id: <20200417070749.276754-7-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 06/25] libpdbg: Backend device tree cannot be overriden 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" With drivers getting registered per backend, backend needs to be initialised before any device tree can be parsed. PDBG_BACKEND_DTB allowed to override backend device tree without specifying backend, which cannot work any more. To be able to dynamically update backend introduce PDBG_BACKEND and PDBG_BACKEND_OPTION variables instead of PDBG_BACKEND_DTB. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 30 ++++++++++++++++++++++-------- tests/test_p9_fapi_translation.sh | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index ef51718..077bc62 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -308,21 +308,36 @@ const char *pdbg_get_backend_option(void) struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) { struct pdbg_dtb *dtb = &pdbg_dtb; - const char *fdt; + const char *fdt, *backend; dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; - fdt = getenv("PDBG_BACKEND_DTB"); - if (fdt) - mmap_dtb(fdt, false, &dtb->backend); - fdt = getenv("PDBG_DTB"); if (fdt) mmap_dtb(fdt, false, &dtb->system); - if (dtb->backend.fdt && dtb->system.fdt) - goto done; + backend = getenv("PDBG_BACKEND"); + if (backend) { + const char *arg; + + arg = getenv("PDBG_BACKEND_OPTION"); + + if (!strcmp(backend, "fsi")) + pdbg_set_backend(PDBG_BACKEND_FSI, arg); + else if (!strcmp(backend, "i2c")) + pdbg_set_backend(PDBG_BACKEND_I2C, arg); + else if (!strcmp(backend, "kernel")) + pdbg_set_backend(PDBG_BACKEND_KERNEL, arg); + else if (!strcmp(backend, "fake")) + pdbg_set_backend(PDBG_BACKEND_FAKE, arg); + else if (!strcmp(backend, "host")) + pdbg_set_backend(PDBG_BACKEND_HOST, arg); + else if (!strcmp(backend, "cronus")) + pdbg_set_backend(PDBG_BACKEND_CRONUS, arg); + else + pdbg_log(PDBG_ERROR, "Invalid backend '%s', ignoring\n", backend); + } if (!pdbg_backend) pdbg_backend = default_backend(); @@ -412,7 +427,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) break; } -done: return dtb; } diff --git a/tests/test_p9_fapi_translation.sh b/tests/test_p9_fapi_translation.sh index a5a09b1..9891d39 100755 --- a/tests/test_p9_fapi_translation.sh +++ b/tests/test_p9_fapi_translation.sh @@ -4,7 +4,7 @@ test_group "p9 fapi translation tests" -export PDBG_BACKEND_DTB=p9-kernel.dtb +export PDBG_BACKEND=kernel export PDBG_DTB=p9.dtb test_result 0 < X-Patchwork-Id: 1272050 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493Ryx0x29z9sSh for ; Fri, 17 Apr 2020 17:08:57 +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=ZPJzm5gQ; 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 493Ryv75B3zDqC3 for ; Fri, 17 Apr 2020 17:08:55 +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 493Rxw3DrSzDq77 for ; Fri, 17 Apr 2020 17:08:04 +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=ZPJzm5gQ; 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 493Rxw0jqmz9sSs; Fri, 17 Apr 2020 17:08:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107284; bh=h2IHlSYEmpytMji5a3NxmOT8URCTJ24nyk59OPTfNMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZPJzm5gQl9ZymhdiOT+QUrSBHXjJ/OoQ7mDahhxgwzAZzGoZIZmpoqKC9y51L3hpA Z6WZexn16bihg24P98M/axb+XHQzuOiWy5+JvaSK+DccSnfYXkbLLQgy93q27MSLt+ Mqohzsw8Wq1E4IjgrM5chX5lyhtStsWjW4CZonTjOO2gdO0aKCg6PItmG8aINE/5Iq X0em3a+FEC4mbEKn4pVVeYnrxZgI9DHqYnmK+ZJVLwXaQeKeFabK0eNIuzxgoqJyYB HJnEFtNDjsRQ/6egVbHZW3N2qu0Vc9ZEy5vKSHXNrLpCXM/5k02fv6ScFeGVjxZKYV cHWMDLnRsTBdg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:31 +1000 Message-Id: <20200417070749.276754-8-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 07/25] libpdbg: Register fsi drivers with fsi backend 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 Reviewed-by: Alistair Popple --- libpdbg/bmcfsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c index 2639595..2f199fa 100644 --- a/libpdbg/bmcfsi.c +++ b/libpdbg/bmcfsi.c @@ -519,5 +519,5 @@ DECLARE_HW_UNIT(bmcfsi); __attribute__((constructor)) static void register_bmcfsi(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &bmcfsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FSI, &bmcfsi_hw_unit); } From patchwork Fri Apr 17 07:07:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272052 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 493Rz5383Rz9sSv for ; Fri, 17 Apr 2020 17:09:05 +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=Pp2aUQcr; 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 493Rz50wZZzDqWn for ; Fri, 17 Apr 2020 17:09:05 +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 493Rxx1df5zDq77 for ; Fri, 17 Apr 2020 17:08:05 +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=Pp2aUQcr; 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 493Rxw3h37z9sSh; Fri, 17 Apr 2020 17:08:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107285; bh=OZg3f4cBR1Ig2yW/XIBgzNpF98tXPewpSTwz2I9P0Qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pp2aUQcr2iAtRnNpDhwyafxFfcoLCcgfIVnAQIx5lsFJoBb01eRAKUxorWktHfSe6 eowLMZTGptz5KE5vw4wDgiRl58Ff8x2HdxXcFg7hPVurkEqC4cMJOS5Atw+q9Z2r4z pxp8sjYQVBSjXkuFIr3CMJrrrlx2Aew1mPq2wG/L7Q8W2E8hC4ftTEXCvEGDfY+yNL e2nOE4PjG4nlZ8cXKfAZZvJTRRhSRaHRMcI0mtNmrOQ7pxKXdMv1J81TOH0yVtQO7+ 2PW7ijk1zl38Gn6WAEZ8cF6buNzTfiBXpnqwnwVMkcwd8Gb5dNd2NHR1aOAhEAjosM nxVAPnKqOBe9w== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:32 +1000 Message-Id: <20200417070749.276754-9-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 08/25] libpdbg: Register i2c driver with i2c backend 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 Reviewed-by: Alistair Popple --- libpdbg/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c index 3d0b80a..e3d508b 100644 --- a/libpdbg/i2c.c +++ b/libpdbg/i2c.c @@ -177,5 +177,5 @@ DECLARE_HW_UNIT(p8_i2c_pib); __attribute__((constructor)) static void register_i2c(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &p8_i2c_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_I2C, &p8_i2c_pib_hw_unit); } From patchwork Fri Apr 17 07:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272053 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493Rz83P02z9sSh for ; Fri, 17 Apr 2020 17:09:08 +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=FVO14r5y; 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 493Rz82HR8zDq77 for ; Fri, 17 Apr 2020 17:09:08 +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 493Rxx5Gn3zDq77 for ; Fri, 17 Apr 2020 17:08:05 +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=FVO14r5y; 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 493Rxx23Vbz9sTH; Fri, 17 Apr 2020 17:08:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107285; bh=X/kE1rU4RuQwjmcXj+Wg/ZQlhAjuz95BZ1a90H6OamU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FVO14r5yc75XfMqMgxj7UWXg0q2c0OpLTYtc9huyiWlO/M+bq6QenmT/aOKgNf9VE 25QZVIl7jMp73hj9o35DSDiuG4G0QvDVKT9IIl0r32n97WaOhqLU/uM8DDYMv+HA9w xYRSGcmWq8f3Bc7fEAYLxJ4qihpisoWxz8dwapLD4aQq/klTV60gI4utT8QGbEm+El I9hyaZ9fAoUdXkhD2tTdBgUD/TJlIwse4O7ZJz6J6c+vzPovH2zY+a8/1JZuZcjmH2 PF/HkP2P0H3oEjd1OYx5WL+6+0ZXv4DtRRdqWChjS9tBJAz3AsG/SIWjNUmkXq2sh2 I+Dq+/zWF4fAg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:33 +1000 Message-Id: <20200417070749.276754-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 09/25] libpdbg: Register kernel drivers with kernel backend 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/kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index c4637a7..3024736 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -264,6 +264,6 @@ DECLARE_HW_UNIT(kernel_pib); __attribute__((constructor)) static void register_kernel(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_KERNEL, &kernel_pib_hw_unit); } From patchwork Fri Apr 17 07:07:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272054 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 493RzH1LG4z9sSx for ; Fri, 17 Apr 2020 17:09:15 +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=BLPwteqq; 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 493RzG5bwhzDrJD for ; Fri, 17 Apr 2020 17:09:14 +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 493Rxy2XJgzDqC3 for ; Fri, 17 Apr 2020 17:08:06 +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=BLPwteqq; 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 493Rxx6Srjz9sTL; Fri, 17 Apr 2020 17:08:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107286; bh=UBS06fApK52t91PUmr+hcHyAL/W1DGvrmDe9D4bwej8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BLPwteqq9yXZ4iXujPK8DYfJ4G+YrkVAuCSZREZeN/s19rO3h7CuEGRv2xx4y2LGE TFmokZvmiACixMP6kCPJcvWqMGyDVMWB0rQtEYlJZ/J7GYkelb22kwbu1hvQQLMosS xlZus0W7lqQZQfUMF0A3UBpZh3gWigTUwc5RAGNCI/fQb56F0fYW7Fvtrd3mxTpaIn MBVJcSQ75ACOhoPOgrumfwa0TOAy/M1JPNb/dWay9CX1i4qUvKJmfzvBb3awTWivur QOHoNngtZElAx8eToeMv9iZ8A8S4N+ljH9QQrsxIc+FybnWjdq28DuBORouNmlfA4D JBmLYjc9wbsyg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:34 +1000 Message-Id: <20200417070749.276754-11-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 10/25] libpdbg: Register fake drivers with fake backend 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 Reviewed-by: Alistair Popple --- libpdbg/fake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/fake.c b/libpdbg/fake.c index ae02463..64925d4 100644 --- a/libpdbg/fake.c +++ b/libpdbg/fake.c @@ -90,8 +90,8 @@ DECLARE_HW_UNIT(fake_thread); __attribute__((constructor)) static void register_fake(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_core_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &fake_thread_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_core_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_FAKE, &fake_thread_hw_unit); } From patchwork Fri Apr 17 07:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272055 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 493RzQ3pX6z9sSx for ; Fri, 17 Apr 2020 17:09:22 +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=U8YSvZtQ; 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 493RzQ1YkkzDrJD for ; Fri, 17 Apr 2020 17:09:22 +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 493Rxz0XKWzDq77 for ; Fri, 17 Apr 2020 17:08:07 +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=U8YSvZtQ; 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 493Rxy42cvz9sTN; Fri, 17 Apr 2020 17:08:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107286; bh=kNuSEFWfyjD13+tdccrQB3CggSngVOc3SeursUK5qRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8YSvZtQbxLQwa/87c3Y0dZuRCXkgM4u87llsL9L9INzhBjOQl8YKgeq9jw/YBtJa rweS/WL9GLityht+atakSBJXtCWq9dJCkYsXITNFEyJ2jpXYiD9A8zkhQTLj0Cu8BD 0FYgy1Meetz735s9PleYK9FB6Y1dCzNI4aOjv4Ug/J1OX6qPLA+aZgizSKa8NZ1BBL oilbi1Z7OxSLwCe1pPElYCBbupI2Ky28G1WJPKR5+A5yeksOXAb6TCvqxiX3eCAK/p ncavwGwTx2eapuyZx8BAJ6qEEL+iCWZYioNrOGNhk5NI2uwzVkdSYse3NUQXFNYbGd zf41XH7gQqBxw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:35 +1000 Message-Id: <20200417070749.276754-12-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 11/25] libpdbg: Register host drivers with host backend 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 Reviewed-by: Alistair Popple --- libpdbg/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/host.c b/libpdbg/host.c index d02b53d..63a0d5b 100644 --- a/libpdbg/host.c +++ b/libpdbg/host.c @@ -127,5 +127,5 @@ DECLARE_HW_UNIT(host_pib); __attribute__((constructor)) static void register_host(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &host_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_HOST, &host_pib_hw_unit); } From patchwork Fri Apr 17 07:07:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272056 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493RzV0hGrz9sSh for ; Fri, 17 Apr 2020 17:09:26 +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=kkxFdfeG; 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 493RzT5x1rzDrTy for ; Fri, 17 Apr 2020 17:09:25 +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 493Rxz3xRSzDqC3 for ; Fri, 17 Apr 2020 17:08:07 +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=kkxFdfeG; 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 493Rxz0wLjz9sTH; Fri, 17 Apr 2020 17:08:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107287; bh=9tQSGmPUjDUOEBnbkJXxhkQYjz5zKh9uO7+HGgrBmyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkxFdfeGcK3SMpd3zpzf++PwHvjjt69cOa30cUypdS3QmgouDWTsC2u/gHMCJFpzt IgYbcWfeemjAbOOWj2TCc/giHF+cUspyss3IKcAvs1r9oQhrvaQpQT1dwgMQOoT4SZ bpFZKB8Wd7uQa/xZUTN1wN1KdhM6n0/lW2KRkhii9nfSBK8hrqQQnMy3PTte876ciJ vpby8g2ZGkXm8m/3CJUzEUPhVZcXoxv3Tv63ocIR161syXGdimNM47sdtLJSbs8Hg0 sVLzVfk1BLIDt1Dojg4gtKu392aa4SCo9j9TD4zuIqmYgLlclk95WQc6Nn2fXThoKK NpovTqj+ZF5vg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:36 +1000 Message-Id: <20200417070749.276754-13-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 12/25] libpdbg: Register cronus drivers with cronus backend 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 Reviewed-by: Alistair Popple --- libpdbg/cronus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/cronus.c b/libpdbg/cronus.c index 23d555b..eeaedc5 100644 --- a/libpdbg/cronus.c +++ b/libpdbg/cronus.c @@ -219,7 +219,7 @@ DECLARE_HW_UNIT(cronus_sbefifo); __attribute__((constructor)) static void register_cronus(void) { - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_pib_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_fsi_hw_unit); - pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &cronus_sbefifo_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_fsi_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_CRONUS, &cronus_sbefifo_hw_unit); } From patchwork Fri Apr 17 07:07:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272057 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 493Rzd0YrBz9sSs for ; Fri, 17 Apr 2020 17:09:33 +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=U6oYz1cl; 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 493Rzc6V87zDq77 for ; Fri, 17 Apr 2020 17:09:32 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry01bHRzDq77 for ; Fri, 17 Apr 2020 17:08:08 +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=U6oYz1cl; 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 493Rxz50rWz9sTL; Fri, 17 Apr 2020 17:08:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107287; bh=I0KEES2q0bh4YbJcSJBLnxoSxUfb+852Q/Hk5HpivKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6oYz1clH2g6Jkk19OE7NL0DouOOc7iXMOMU1+0eTIKd3lS28KyqgGiNlCYWTtHF2 IG9KUYiZI/dX9OxbITUzoVgQ1WI3UYLxv8hnM1jQs8mq50K9XYbzyIsJUgu0TkGw4o hKJJ/szBeV17Sa657OQ0uKveZmMZhmYs7jmGHfjxGsKkudi/19/QstVwCtnNnuD7sw ObKOLvAnw+GiqG2Gp/8prr2O8ay1M2C5x93hLm5S9oz2NGg5NKU0DcgUIf0OMVgIMs neklJd7Y8Am77jW16NO1uXb+vJe776tuXxAdtjoNWGT5hkMhRcGA4eGMBwbHPQaOS0 ZSiEw18FBsOUg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:37 +1000 Message-Id: <20200417070749.276754-14-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 13/25] dts: Backend device trees must use specific driver 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" Specific backend must always use specific drivers for backend specific devices. All other devices which appear in system device tree can potentially match multiple drivers depending on the backend. Signed-off-by: Amitay Isaacs --- p8-fsi.dts.m4 | 6 +++--- p8-i2c.dts.m4 | 4 ++-- p8-kernel.dts.m4 | 4 ++-- p9-fsi.dtsi.m4 | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/p8-fsi.dts.m4 b/p8-fsi.dts.m4 index 70fdb14..8d10966 100644 --- a/p8-fsi.dts.m4 +++ b/p8-fsi.dts.m4 @@ -26,7 +26,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x0>; system-path = "/proc0/pib"; }; @@ -44,7 +44,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -64,7 +64,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-i2c.dts.m4 b/p8-i2c.dts.m4 index 3ea4b59..a7a18a2 100644 --- a/p8-i2c.dts.m4 +++ b/p8-i2c.dts.m4 @@ -34,7 +34,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; @@ -53,7 +53,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x2>; system-path = "/proc2/pib"; }; diff --git a/p8-kernel.dts.m4 b/p8-kernel.dts.m4 index 6eacb92..b00ed54 100644 --- a/p8-kernel.dts.m4 +++ b/p8-kernel.dts.m4 @@ -18,7 +18,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #address-cells = <0x2>; #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; - compatible = "ibm,fsi-pib", "ibm,power8-fsi-pib"; + compatible = "ibm,fsi-pib"; index = <0x1>; system-path = "/proc1/pib"; }; diff --git a/p9-fsi.dtsi.m4 b/p9-fsi.dtsi.m4 index 3bbe43d..ab3c2e1 100644 --- a/p9-fsi.dtsi.m4 +++ b/p9-fsi.dtsi.m4 @@ -17,7 +17,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x0>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc0/pib"; }; @@ -35,7 +35,7 @@ #size-cells = <0x1>; reg = <0x0 0x1000 0x7>; index = <0x1>; - compatible = "ibm,fsi-pib", "ibm,power9-fsi-pib"; + compatible = "ibm,fsi-pib"; system-path = "/proc1/pib"; }; }; From patchwork Fri Apr 17 07:07:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272058 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493Rzh3hbDz9sSv for ; Fri, 17 Apr 2020 17:09:36 +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=jyFaFGaJ; 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 493Rzh2cKmzDrVP for ; Fri, 17 Apr 2020 17:09:36 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry04M3LzDq77 for ; Fri, 17 Apr 2020 17:08:08 +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=jyFaFGaJ; 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 493Ry01yv5z9sT9; Fri, 17 Apr 2020 17:08:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107288; bh=vfPcymzGIpLFi7ACe/4GGTVHrjor8xhlKyLXgnyp6Us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jyFaFGaJ+KQtvJwfgmcjkxPNIL3xJqaF7P+IxMXOFvraCXdOlqIUkp6QXHbyJKOzF eykzddWJeAl/wEyatg8RQXL7clRi8ONtHBZbatxY6sc9xvrkrdgLMg33eOWKbzUjP6 6Z9IpH8WS6JZI5xoaAx1168AGqJyTjESd9mZ2o8LftdJosFMOJ1MLfMRReFRADIuvm RBzYm9eRq57TuXnExS5n1CZt2um3h0kIYBmnE2I4QS6blVjn+y0QTJojZnlcwJXmVB RT1VMgRLjP/zNTE8IOz9wh5f/kTuCraqd3oTgTyuNiSaXUq+ADbIkQK/1MLjFZS12w +tHQcQKC9756g== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:38 +1000 Message-Id: <20200417070749.276754-15-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 14/25] libpdbg: Rename ibm, processor -> ibm, power-proc 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/chip.c | 2 +- p8.dts.m4 | 2 +- p9.dts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index b961e87..848a831 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -670,7 +670,7 @@ int thread_getregs(struct pdbg_target *thread, struct thread_regs *regs) static struct proc proc = { .target = { .name = "Processor Module", - .compatible = "ibm,processor", + .compatible = "ibm,power-proc", .class = "proc", }, }; diff --git a/p8.dts.m4 b/p8.dts.m4 index a508e02..42e1167 100644 --- a/p8.dts.m4 +++ b/p8.dts.m4 @@ -1,7 +1,7 @@ define(`PROC',` define(`PROC_ID',`$1')dnl proc$1 { - compatible = "ibm,power8-proc", "ibm,processor"; + compatible = "ibm,power8-proc", "ibm,power-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..4eb910b 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power9-proc", "ibm,power-proc"; index = < 0x01 >; fsi { From patchwork Fri Apr 17 07:07:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272060 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 493Rzm74bbz9sSh for ; Fri, 17 Apr 2020 17:09:40 +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=Pzo6Lp9z; 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 493Rzm0CWfzDq77 for ; Fri, 17 Apr 2020 17:09:40 +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 493Ry13Cs7zDq77 for ; Fri, 17 Apr 2020 17:08:09 +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=Pzo6Lp9z; 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 493Ry05TsKz9sTH; Fri, 17 Apr 2020 17:08:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107289; bh=9RVX2KM0lBbVj6iu/laUpHmQhSow6wiuFNezSrU0Pkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pzo6Lp9znhWhtacNC5wV9x/CHQQIeW8Go5eTDoYXAA8chRJzlgvEs1d0AbNX8Yjsc kFHz0D6cJmQ2qJ4byYo7IB5P4504lQWaoRD3z/8+7z8zKUXRX9VC2L5OANt47KTzN/ 8R8JyF8Pcm8vdx1F8pbe2Q8WrYTTKwmXLksXg8yxO7AsLLimnCX1V66thcUpU0mvRx erSXXhYha34MtWrYTAxjRQCSpOtXN/f40sUjQhMzUM7CV/lXD6BmltVzNXFsbytdNg K8HO/e7Dgu74yPZCrpsrSxRSrIkZKx2sSvyzKMIG4Ci7wO7CVrMaf0CmfQcvLa/1Wl cM84zuv0A6Wmw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:39 +1000 Message-Id: <20200417070749.276754-16-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 15/25] dts: Add a generic compatible property for core and thread 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" This allows different drivers to be loaded automatically depending on the specified backend. Signed-off-by: Amitay Isaacs --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 4eb910b..968c0f2 100644 --- a/p9.dts +++ b/p9.dts @@ -379,33 +379,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -423,33 +423,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -475,33 +475,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -519,33 +519,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -587,33 +587,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -631,33 +631,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -683,33 +683,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -727,33 +727,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -795,33 +795,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -839,33 +839,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -891,33 +891,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -935,33 +935,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1003,33 +1003,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1047,33 +1047,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1099,33 +1099,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1143,33 +1143,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1211,33 +1211,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1255,33 +1255,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1307,33 +1307,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1351,33 +1351,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1419,33 +1419,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1463,33 +1463,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1515,33 +1515,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -1559,33 +1559,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2095,33 +2095,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2139,33 +2139,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2191,33 +2191,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2235,33 +2235,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2303,33 +2303,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2347,33 +2347,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2399,33 +2399,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2443,33 +2443,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2511,33 +2511,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2555,33 +2555,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2607,33 +2607,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2651,33 +2651,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2719,33 +2719,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2763,33 +2763,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2815,33 +2815,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2859,33 +2859,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2927,33 +2927,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -2971,33 +2971,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3023,33 +3023,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3067,33 +3067,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3135,33 +3135,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3179,33 +3179,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3231,33 +3231,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; @@ -3275,33 +3275,33 @@ core@0 { #address-cells = < 0x01 >; #size-cells = < 0x00 >; - compatible = "ibm,power9-core"; + compatible = "ibm,power9-core", "ibm,power-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power9-thread", "ibm,power-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; From patchwork Fri Apr 17 07:07:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272061 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493Rzs5y6Hz9sSh for ; Fri, 17 Apr 2020 17:09:45 +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=r7zv+RtT; 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 493Rzr3g3TzDqWn for ; Fri, 17 Apr 2020 17:09:44 +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 493Ry16FV3zDq77 for ; Fri, 17 Apr 2020 17:08:09 +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=r7zv+RtT; 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 493Ry13SbNz9sT6; Fri, 17 Apr 2020 17:08:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107289; bh=9pB3oeO98+ITack7FUFZ8jzBZdeU/jhfQEnqlqrwMYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r7zv+RtTMrFP/ZmhHW+koMWjGxJrmLDU/Hin1F6/lpWaMmpfgmCHE8HszvRS8mjEO mbXi8GgO+SmmydRNwumyTF8wxbb+yJY4IWvf/UbCc9CF42XQugwBcSIN6u6xrpBJmz jQFKB2nOehrwCWbqs7nZyspDYXUQ3Y5b3+LcJd1zcbNGRTV3FwS/ojNtbggQKWsaFi d3Pyiuuw2SlyQ+Vpf7B1GfZdeJG2KLRK6Flb55dHGtqzjQ05Cwlf/FT5kOmTGUylmg vpbiEfklk/rit1j+kh3/eo0CHx84xRVIpwaIN1ljs/tdjXJLmCLul1Y7KhzaSvOZsb dgPlzT+N+8vuw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:40 +1000 Message-Id: <20200417070749.276754-17-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 16/25] libpdbg: Add sbefifo backend 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index 1c974f5..bdc6cea 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -142,7 +142,6 @@ enum pdbg_target_status { PDBG_TARGET_RELEASED, }; - /** * @brief Describes the various methods (referred to as backends) for * accessing hardware depending on where the code is executed. @@ -197,6 +196,12 @@ enum pdbg_backend { * the BMC network address / hostname. For example p9@spoon2-bmc. */ PDBG_BACKEND_CRONUS, + + /** + * This backend uses sbefifo kernel driver on BMC to access hardware + * via SBE. + */ + PDBG_BACKEND_SBEFIFO, }; /** From patchwork Fri Apr 17 07:07:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272062 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 493Rzx5XB6z9sSs for ; Fri, 17 Apr 2020 17:09:49 +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=en7uGcxv; 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 493Rzx4fyDzDqC3 for ; Fri, 17 Apr 2020 17:09:49 +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 493Ry22DyjzDqw0 for ; Fri, 17 Apr 2020 17:08:10 +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=en7uGcxv; 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 493Ry16gyjz9sT9; Fri, 17 Apr 2020 17:08:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107290; bh=F113eQAC90AT9Icq+o2s35a6gQ4mTMstHVT+MW7HA5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=en7uGcxv13FkZudhq4U0hvd69ghJH6rtnkE8+jFaxLiaGX8mJ9L1M1ELFXV/SKwPH R/avpxOQMCPH0nm+w4ZfGeQn89S2iw0USladKcyHp3EiER9XpDcrEDVYpdugdYRmJk ucNjJW4x3PCu6qVa3hkV8lAL0l+kScyqqIdmxwZgZVxczw9R5YLNcLQ/yxyxLWOMz8 uavCEaZsrSFnj7Xmh0I3DiWOdfWvSBVJ6w6zevNyX0lFYpz8D9a+xtPHYZ4/UQG2Wi GFBR2fgZBhvznHyXkNvUUeXkZG1n6kOgppMGKMs40p6BJyQXBFuBd1I9hlGAVE/2f/ IRkbIglU0nU0g== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:41 +1000 Message-Id: <20200417070749.276754-18-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 17/25] libpdbg: Add pib driver using sbefifo 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/sbefifo.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..63b5b9c 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,22 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_get(sctx, addr, val); +} + +static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_scom_put(sctx, addr, val); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -306,6 +322,18 @@ static struct chipop sbefifo_chipop = { }; DECLARE_HW_UNIT(sbefifo_chipop); +static struct pib sbefifo_pib = { + .target = { + .name = "SBE FIFO Chip-op based PIB", + .compatible = "ibm,sbefifo-pib", + .class = "pib", + }, + .read = sbefifo_pib_read, + .write = sbefifo_pib_write, + .fd = -1, +}; +DECLARE_HW_UNIT(sbefifo_pib); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -323,6 +351,7 @@ static void register_sbefifo(void) { pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_pib_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } From patchwork Fri Apr 17 07:07:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272064 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493S0904tcz9sT0 for ; Fri, 17 Apr 2020 17:10:00 +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=UbuqMMZ9; 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 493S08419JzDrTQ for ; Fri, 17 Apr 2020 17:10:00 +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 493Ry45s0nzDqw0 for ; Fri, 17 Apr 2020 17:08:12 +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=UbuqMMZ9; 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 493Ry22dw1z9sSx; Fri, 17 Apr 2020 17:08:10 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107290; bh=UGFpF5nF0BO8DMG2AZ+utEV1hR2UsKVTkiujWaJn0c4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UbuqMMZ9y5zgAEwZOboIF3cIu1FymXEMKMs2nJit/YQ8tOiCPfRSgHcsDli36Uo3P qKjujSeD48LcVbH4BPPbDof4Qi9iITyirD60bKK+iW8pfwvRJUJppIMJhWZFSlJWPV Hqr0GQtTjcmhz5ya+U7uhtGG0K9Dt5qbzWvRgCYUNQpI5B1uHa8eCmwo+CmWmwI6+x 0WMHpjNlzQBgtO6sNHjdKwueuQwJIWQj8Cp+kGnWu/lb0R89Y/cPGlpQoUpctcadpu wict7VNJtt4ifhdFzK0EwazF9QYVZd143w9mMx6DD3s3KrfHsE8/2EP5b/wsfBWZcB um5OB+LXI81EA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:42 +1000 Message-Id: <20200417070749.276754-19-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 18/25] libpdbg: Add thread driver using sbefifo 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/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 63b5b9c..7baade8 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,67 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_thread_probe(struct pdbg_target *target) +{ + struct thread *thread = target_to_thread(target); + uint32_t tid; + + assert(!pdbg_target_u32_property(target, "tid", &tid)); + thread->id = tid; + + return 0; +} + +static void sbefifo_thread_release(struct pdbg_target *target) +{ +} + +static int sbefifo_thread_op(struct thread *thread, uint32_t oper) +{ + struct pdbg_target *chiplet = + pdbg_target_require_parent("chiplet", &thread->target); + struct sbefifo *sbefifo = target_to_sbefifo( + pdbg_target_require_parent("sbefifo", &thread->target)); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint8_t mode = 0; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + /* This chip-op requires core-id as pervasive (chiplet) id */ + return sbefifo_control_insn(sctx, + pdbg_target_index(chiplet), + thread->id, + oper, + mode); +} +static int sbefifo_thread_start(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_thread_stop(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_thread_step(struct thread *thread, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_thread_op(thread, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_thread_sreset(struct thread *thread) +{ + return sbefifo_thread_op(thread, SBEFIFO_INSN_OP_SRESET); +} + static struct sbefifo_context *sbefifo_op_get_context(struct sbefifo *sbefifo) { return sbefifo->sf_ctx; @@ -334,6 +395,21 @@ static struct pib sbefifo_pib = { }; DECLARE_HW_UNIT(sbefifo_pib); +static struct thread sbefifo_thread = { + .target = { + .name = "SBE FFIO Chip-op based Thread", + .compatible = "ibm,power-thread", + .class = "thread", + .probe = sbefifo_thread_probe, + .release = sbefifo_thread_release, + }, + .start = sbefifo_thread_start, + .stop = sbefifo_thread_stop, + .step = sbefifo_thread_step, + .sreset = sbefifo_thread_sreset, +}; +DECLARE_HW_UNIT(sbefifo_thread); + static struct sbefifo kernel_sbefifo = { .target = { .name = "Kernel based FSI SBE FIFO", @@ -352,6 +428,7 @@ static void register_sbefifo(void) pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &kernel_sbefifo_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_chipop_hw_unit); pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_pib_hw_unit); + pdbg_hwunit_register(PDBG_BACKEND_SBEFIFO, &sbefifo_thread_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_mem_hw_unit); pdbg_hwunit_register(PDBG_DEFAULT_BACKEND, &sbefifo_pba_hw_unit); } From patchwork Fri Apr 17 07:07:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272063 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493S032kyjz9sSx for ; Fri, 17 Apr 2020 17:09:55 +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=tMUCTc/d; 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 493S025ZZwzDrJD for ; Fri, 17 Apr 2020 17:09: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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry503NzzDrG3 for ; Fri, 17 Apr 2020 17:08:13 +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=tMUCTc/d; 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 493Ry33lpQz9sT6; Fri, 17 Apr 2020 17:08:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107291; bh=qvptJxn2cGRXB3ZQbpBuQgUE/tnVbJycIyTyVeKMqeI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMUCTc/dY8tAerJ08aJTirR+vMgTrSBQLujK3N1cxn1iUwMl/A9/HX5EEgV6lb3da D8ZTKh5Qe4QMz6muBuEiAppnM1ReT1RcKMLCY3KXWDX2/PCzOHiJronXMLbV1A4Uej gvlygQJe4lCGYiLFiWUFUDbHXDt6td7BJOy/88jdcKMAfi2TubtsyCXlDbLIwCF9Yp a/SyilRNRY2cWE+53yEw3oaVcx3Ry/dCvZjm+dVaWOVp17nT0j+6iikYl5sbNwBKBU wnvZ9gpap/OagBR1b7c4mRUmVh5tihQu6oJGIYwak8cs3UKZStEau5/o/pWwAoZ9nI OfTUrjT1wtkjQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:43 +1000 Message-Id: <20200417070749.276754-20-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 19/25] libpdbg: Add all thread procedures to pib target 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/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 5bca088..318a611 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -93,6 +93,10 @@ struct pib { struct pdbg_target target; int (*read)(struct pib *, uint64_t, uint64_t *); int (*write)(struct pib *, uint64_t, uint64_t); + int (*thread_start_all)(struct pib *); + int (*thread_stop_all)(struct pib *); + int (*thread_step_all)(struct pib *, int); + int (*thread_sreset_all)(struct pib *); void *priv; int fd; }; From patchwork Fri Apr 17 07:07:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272065 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 493S0H4gsfz9sT4 for ; Fri, 17 Apr 2020 17:10:07 +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=QrShidOa; 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 493S0H2LW7zDrF4 for ; Fri, 17 Apr 2020 17:10:07 +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 493Ry51wx4zDrRh for ; Fri, 17 Apr 2020 17:08:13 +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=QrShidOa; 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 493Ry44YS6z9sT0; Fri, 17 Apr 2020 17:08:12 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107292; bh=PTJJs0rfV1rJCQkqXOGAB0Mu/h+T0JVfZCv931nkT5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QrShidOa/jyiHgehB3drauRRFCMWrxkLwiTlAhkOus65Zl0JhLRwr73FznDGHGPaO a73j186ZnOf0M7qgI9G6l31Zq7EFfJyjdpCJaeGgM0zpxCU7waa5JREQbtb1KFmECE U1n3qZGsvtjlLZu6FIi0HBVIuTDCJKr7qSVBZCl5Ttj2gA8+rnefPLOuOXADb+bk19 +rU9tVmOJ+9bVW37wRi1zmSRGHNASpzaCRBbGcQh8PN3te9P7Rjv9OaEYpRvVjV6aJ XiMQw55p1DukPKjef35l0WXEL98SD5um0kWEhiHLpE/cL0YzhKicO1oX+2ndHGpSfk K8okrrIm2w6Lw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:44 +1000 Message-Id: <20200417070749.276754-21-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 20/25] libpdbg: Implement all thread procedures using sbefifo 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/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 7baade8..2d903e7 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -253,6 +253,53 @@ static int sbefifo_pib_write(struct pib *pib, uint64_t addr, uint64_t val) return sbefifo_scom_put(sctx, addr, val); } +static int sbefifo_pib_thread_op(struct pib *pib, uint32_t oper) +{ + struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + uint32_t core_id, thread_id; + uint8_t mode = 0; + + /* + * core_id = 0xff (all SMT4 cores) + * thread_id = 0xf (all 4 threads in the SMT4 core) + */ + core_id = 0xff; + thread_id = 0xf; + + /* Enforce special-wakeup for thread stop and sreset */ + if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || + (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) + mode = 0x2; + + return sbefifo_control_insn(sctx, core_id, thread_id, oper, mode); +} + +static int sbefifo_pib_thread_start(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_START); +} + +static int sbefifo_pib_thread_stop(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STOP); +} + +static int sbefifo_pib_thread_step(struct pib *pib, int count) +{ + int i, rc = 0; + + for (i = 0; i < count; i++) + rc |= sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_STEP); + + return rc; +} + +static int sbefifo_pib_thread_sreset(struct pib *pib) +{ + return sbefifo_pib_thread_op(pib, SBEFIFO_INSN_OP_SRESET); +} + static int sbefifo_thread_probe(struct pdbg_target *target) { struct thread *thread = target_to_thread(target); @@ -391,6 +438,10 @@ static struct pib sbefifo_pib = { }, .read = sbefifo_pib_read, .write = sbefifo_pib_write, + .thread_start_all = sbefifo_pib_thread_start, + .thread_stop_all = sbefifo_pib_thread_stop, + .thread_step_all = sbefifo_pib_thread_step, + .thread_sreset_all = sbefifo_pib_thread_sreset, .fd = -1, }; DECLARE_HW_UNIT(sbefifo_pib); From patchwork Fri Apr 17 07:07:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272066 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 493S0N0jjtz9sT4 for ; Fri, 17 Apr 2020 17:10:12 +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=rlyQTyUq; 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 493S0M6lHvzDqWn for ; Fri, 17 Apr 2020 17:10:11 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry55tB0zDqw0 for ; Fri, 17 Apr 2020 17:08:13 +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=rlyQTyUq; 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 493Ry52JBJz9sT9; Fri, 17 Apr 2020 17:08:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107293; bh=j40cQ5AHAin7EXr6SGF4ENM6d54snr5vCohIdMgf/DU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rlyQTyUqMOGOTm005/FpBHailEriit2dGWQAJHd7oBZRlkc/N7fqC0jvPB3jGU/f4 WBpd8JrljpWw6StWuVIrztE6Ow9X7ixEPYNFdmXAi0JiKRsT6B32ilKTe7hYSrJcEu DllJZxyL+DG/abgbIweBYjtHVdKQxviS2a++KJHqazJgy59zMH6B39OLLOiLn6nsUo SIq7LvPapp5xPSPfqdW+MqAcfoJeA4hrNBcHK1O3guc1ZZhy7hSW4MdJusXZthkajI hVt2dlEWDqXcPU/X2YaiS2Zkm8AkLJRvMRxeDIwEdodKh1IPNC/vjBDmvsWyMdDpwY XIXh4+tAhAKbw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:45 +1000 Message-Id: <20200417070749.276754-22-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 21/25] libpdbg: Remove special case thread procedures using sbefifo 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" Always check if the all thread procedures are provided by pib. If not, use individual thread operations. Signed-off-by: Amitay Isaacs --- libpdbg/chip.c | 60 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/libpdbg/chip.c b/libpdbg/chip.c index 848a831..86e91bd 100644 --- a/libpdbg/chip.c +++ b/libpdbg/chip.c @@ -156,21 +156,16 @@ int thread_sreset(struct pdbg_target *thread_target) int thread_step_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_step_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_step(chipop, 0xff, 0xf); + rc |= pib->thread_step_all(pib, 1); count++; } @@ -189,21 +184,16 @@ int thread_step_all(void) int thread_start_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_start_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_start(chipop, 0xff, 0xf); + rc |= pib->thread_start_all(pib); count++; } @@ -222,21 +212,16 @@ int thread_start_all(void) int thread_stop_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_stop_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_stop(chipop, 0xff, 0xf); + rc |= pib->thread_stop_all(pib); count++; } @@ -255,21 +240,16 @@ int thread_stop_all(void) int thread_sreset_all(void) { - struct pdbg_target *pib, *thread; + struct pdbg_target *target, *thread; int rc = 0, count = 0; - pdbg_for_each_class_target("pib", pib) { - struct chipop *chipop; + pdbg_for_each_class_target("pib", target) { + struct pib *pib = target_to_pib(target); - chipop = pib_to_chipop(pib); - if (!chipop) + if (!pib->thread_sreset_all) break; - /* - * core_id = 0xff (all SMT4 cores) - * thread_id = 0xf (all 4 threads in the SMT4 core) - */ - rc |= chipop->thread_sreset(chipop, 0xff, 0xf); + rc |= pib->thread_sreset_all(pib); count++; } From patchwork Fri Apr 17 07:07:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272067 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493S0R5Bwjz9sSv for ; Fri, 17 Apr 2020 17:10:15 +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=nVSBttNe; 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 493S0R466tzDrG3 for ; Fri, 17 Apr 2020 17:10:15 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry628KczDrRh for ; Fri, 17 Apr 2020 17:08:14 +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=nVSBttNe; 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 493Ry55xwqz9sT6; Fri, 17 Apr 2020 17:08:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107293; bh=rh1CGX54e6DrmAXHhIOwt5+iXJrwpywJaPYcH0Urr60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nVSBttNeKM+v9qJqrHnEqPxHduQV+MiH7kU0/skI1nvVaD82T6w4Br29P6+/PKLAe rjfeSN93RjZBVRp4MI11W5Hm0y/6Kmfu3av8ZTmsEnOVTsigPNvLjfrq5gTcNQUumo lkZ3x6lF+gBa2pznVG8HbwrbYfRQ/164o0ITP2D5v0HuF3Fs2Lyb1XzyzfCdrEpwsZ oJih4cMH0AqDsw6DEr7kMq01IfFJbPjN4J8na2l3M5WyKGyI5+JLEBp+Bf057ViO+0 /DToB8Y/sTwuz1U62nQX/3GqrAJ+S4ghGBSgemibzLxA/7tGKUK2XoCZJTBc+mde+t 9h/+JeWS0QT8w== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:46 +1000 Message-Id: <20200417070749.276754-23-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 22/25] libpdbg: Drop thread procedures from chipop target 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/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 318a611..de929da 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -75,10 +75,6 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); - int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id); - int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 2d903e7..77a0f26 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,48 +195,6 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } -static int sbefifo_op_control(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id, - uint32_t oper) -{ - struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); - struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); - uint8_t mode = 0; - - /* Enforce special-wakeup for thread stop and sreset */ - if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP || - (oper & 0xf) == SBEFIFO_INSN_OP_SRESET) - mode = 0x2; - - PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode); - - return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode); -} - -static int sbefifo_op_thread_start(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START); -} - -static int sbefifo_op_thread_stop(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP); -} - -static int sbefifo_op_thread_step(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP); -} - -static int sbefifo_op_thread_sreset(struct chipop *chipop, - uint32_t core_id, uint32_t thread_id) -{ - return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); -} - static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) { struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent); @@ -423,10 +381,6 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, - .thread_start = sbefifo_op_thread_start, - .thread_stop = sbefifo_op_thread_stop, - .thread_step = sbefifo_op_thread_step, - .thread_sreset = sbefifo_op_thread_sreset, }; DECLARE_HW_UNIT(sbefifo_chipop); From patchwork Fri Apr 17 07:07:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272068 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493S0W5K0Zz9sT6 for ; Fri, 17 Apr 2020 17:10:19 +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=yi5yQTwa; 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 493S0W4HKszDrG3 for ; Fri, 17 Apr 2020 17:10:19 +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 493Ry65rmnzDrTf for ; Fri, 17 Apr 2020 17:08:14 +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=yi5yQTwa; 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 493Ry62QtYz9sTL; Fri, 17 Apr 2020 17:08:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107294; bh=BLjFYV37eVSI82JCUh+mL48hd5lwA6QxPcHIfBL3/+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yi5yQTwaYZcQI4TPCJtkkQMPpzlt6nFuboacSKS9YOdED8YXpupTz9KR8Xi3VLJuA /0rQaWra2lEKy/5OdmBc66upJgOuXA3Gdnmz3SDn+ZviaTzfPPpK5luiYJ2MNBfaYm 16LGmlA05YtL2YUMSuiU0MjW+0lUOlhvnMLDeCpNYA74ixOBgl0gbir/YNNKk5lh5x huV/aHSJ6PAu9W+a6hqqnR5c21Xii8+otoZFnBzglmMsZwEFfen2wUnga27ton7B2f a5qBVaPoMlfTvtaYlAgc2dfI0YHua28MUhtzGWERA90FO+vZh2hZNKcLsos6YyP7Bg MzeH5MYutliVg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:47 +1000 Message-Id: <20200417070749.276754-24-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 23/25] dts: Add sbefifo backend device tree 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 --- Makefile.am | 1 + p9-sbefifo.dts.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 p9-sbefifo.dts.m4 diff --git a/Makefile.am b/Makefile.am index 10306dc..74ad99f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ endif DT = fake.dts fake2.dts p8-cronus.dts p9-cronus.dts \ p8-fsi.dts p8-i2c.dts p8-kernel.dts \ p9w-fsi.dts p9r-fsi.dts p9z-fsi.dts p9-kernel.dts \ + p9-sbefifo.dts \ p8-host.dts p9-host.dts p8.dts DT_sources = $(DT:.dts=.dtb.S) p9.dtb.S diff --git a/p9-sbefifo.dts.m4 b/p9-sbefifo.dts.m4 new file mode 100644 index 0000000..48b3051 --- /dev/null +++ b/p9-sbefifo.dts.m4 @@ -0,0 +1,86 @@ +/dts-v1/; + +/ { + #address-cells = <0x1>; + #size-cells = <0x0>; + + fsi0: kernelfsi@0 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,kernel-fsi"; + reg = <0x0 0x0 0x0>; + index = <0x0>; + status = "mustexist"; + system-path = "/proc0/fsi"; + + sbefifo@2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x0>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo1"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x0>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc0/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem0"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba0"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x0>; + }; + }; + + hmfsi@100000 { + #address-cells = <0x2>; + #size-cells = <0x1>; + compatible = "ibm,fsi-hmfsi"; + reg = <0x0 0x100000 0x8000>; + port = <0x1>; + index = <0x1>; + system-path = "/proc1/fsi"; + + sbefifo@2400 { /* Bogus address */ + reg = <0x0 0x2400 0x7>; + index = <0x1>; + compatible = "ibm,kernel-sbefifo"; + device-path = "/dev/sbefifo2"; + + sbefifo-pib { + #address-cells = <0x2>; + #size-cells = <0x1>; + index = <0x1>; + compatible = "ibm,sbefifo-pib"; + system-path = "/proc1/pib"; + }; + + sbefifo-mem { + compatible = "ibm,sbefifo-mem"; + system-path = "/mem1"; + }; + + sbefifo-pba { + compatible = "ibm,sbefifo-mem-pba"; + system-path = "/mempba1"; + }; + + sbefifo-chipop { + compatible = "ibm,sbefifo-chipop"; + index = <0x1>; + }; + }; + }; + }; +}; From patchwork Fri Apr 17 07:07:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272069 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493S0b4696z9sT6 for ; Fri, 17 Apr 2020 17:10:23 +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=YfN/lbP7; 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 493S0b1fVVzDrTs for ; Fri, 17 Apr 2020 17:10:23 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry72x5HzDrF4 for ; Fri, 17 Apr 2020 17:08:15 +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=YfN/lbP7; 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 493Ry66Fpvz9sSv; Fri, 17 Apr 2020 17:08:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107295; bh=JdPj1w+Ow7zMmwXM9gZ7O68DBuSc55PY+2qsYevIkTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YfN/lbP72R8DeWXhtlu877fjsqlCYH9fTa28hl67UK6ddaMD8RtpFHI2Nt1DSIbdI MdSAb5gXAujEov+XfvsLmg49HNzwbiGpJe20yi1ArSNwhrhAp4Jn+7aCb+XuiO9cm3 nxrahFhdZhYsNd1JSRuwL7NWvYdHhTEvI4g5QKHFkF2zggobk71z+P4wdTKG0d0IPV DkbrNXW3oeQPgJ4llpAbyM1Jh7GLXBHJ0YtJGp2MGRl5/Tb6SvYsD5+YnQJ6Nfn1HR 2Yjr7TN7LFvR3ih9wpGCFBcJ3yMf1LfxVe6X1Q4343Yx5CWLMpLs/HfO70CArBm1eD MRxYNGWKzkfcA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:48 +1000 Message-Id: <20200417070749.276754-25-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 24/25] libpdbg: Enable sbefifo backend 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/dtb.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 077bc62..65d93eb 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -43,6 +43,7 @@ #include "p9-host.dt.h" #include "p8-cronus.dt.h" #include "p9-cronus.dt.h" +#include "p9-sbefifo.dt.h" #include "p8.dt.h" #include "p9.dt.h" @@ -417,6 +418,24 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) } break; + case PDBG_BACKEND_SBEFIFO: + if (!pdbg_backend_option) { + pdbg_log(PDBG_ERROR, "No system type specified\n"); + pdbg_log(PDBG_ERROR, "Use p9\n"); + return NULL; + } + + if (!strcmp(pdbg_backend_option, "p9")) { + if (!dtb->backend.fdt) + dtb->backend.fdt = &_binary_p9_sbefifo_dtb_o_start; + if (!dtb->system.fdt) + dtb->system.fdt = &_binary_p9_dtb_o_start; + } else { + pdbg_log(PDBG_ERROR, "Invalid system type %s\n", pdbg_backend_option); + pdbg_log(PDBG_ERROR, "Use p9\n"); + } + break; + default: pdbg_log(PDBG_WARNING, "Unable to determine a valid default backend, using fake backend for testing purposes\n"); /* Fall through */ From patchwork Fri Apr 17 07:07:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272070 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 493S0h1r4Tz9sT0 for ; Fri, 17 Apr 2020 17:10:28 +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=TNmrTh/0; 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 493S0g6pmvzDrTs for ; Fri, 17 Apr 2020 17:10:27 +1000 (AEST) 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)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Ry76sjWzDrF4 for ; Fri, 17 Apr 2020 17:08:15 +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=TNmrTh/0; 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 493Ry73Nm2z9sT0; Fri, 17 Apr 2020 17:08:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107295; bh=J5qcieSyIsWpmGYlR0cQffPTNREiLPvtypca8prznp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNmrTh/0nY+2lwtfXZFdk67Ce1iD/ey2OeucrfOVSeB/Gye9mDn+0uoV3vCJAOtJP SxhkT8LFnZ4URdl4hjq3RMAgOus7P1gf1W/44tGQ5/4B1oM1WNI2kg7etzTK3oNpcD fCu3XGdgHsILdqFfG8ikMdLwRaw5P3iQsR9t1oXK61nNq8NvMgc04NGok5ZsqvtADd vzrGGzCLh/FHXN8DDMOE+hHsI836OmRSXjABAIjqsK1wqACc83to0HlQ2K+1GGP8QX 8SSD5qxsM7CWgBNs1S4Ni5Akoiqoz/oWhccVALw/t7PPMt4Y/A1kSvcN4qsmBVFkA3 ljfotRSiJmovA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:49 +1000 Message-Id: <20200417070749.276754-26-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 25/25] main: Add sbefifo backend 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 --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 785dc26..5a5616d 100644 --- a/src/main.c +++ b/src/main.c @@ -149,6 +149,7 @@ static void print_usage(void) printf("\t\tRun command on all possible processors/chips/threads (default)\n"); printf("\t-b, --backend=backend\n"); printf("\t\tcronus:\tA backend based on cronus server\n"); + printf("\t\tsbefifo:\tA backend using sbefifo kernel driver\n"); printf("\t\tfsi:\tAn experimental backend that uses\n"); printf("\t\t\tbit-banging to access the host processor\n"); printf("\t\t\tvia the FSI bus.\n"); @@ -392,6 +393,8 @@ static bool parse_options(int argc, char *argv[]) backend = PDBG_BACKEND_HOST; } else if (strcmp(optarg, "cronus") == 0) { backend = PDBG_BACKEND_CRONUS; + } else if (strcmp(optarg, "sbefifo") == 0) { + backend = PDBG_BACKEND_SBEFIFO; } else { fprintf(stderr, "Invalid backend '%s'\n", optarg); opt_error = true;