From patchwork Thu Apr 30 02:34:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1279864 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 49CKK26mxrz9sRY for ; Thu, 30 Apr 2020 12:36:54 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=SGpdzELq; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKK16Kf9zDrBk for ; Thu, 30 Apr 2020 12:36:53 +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 49CKGk5XxWzDr7d for ; Thu, 30 Apr 2020 12:34:54 +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=SGpdzELq; 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 49CKGh0d0Lz9sSj; Thu, 30 Apr 2020 12:34:52 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214092; bh=siuFMXy+/5hPUFzr9GI6gY4+ZB7a/41VNyJpFih2JWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SGpdzELqKFB562oQ4L0rYPFa0Ua8zJgIsXrwFB1vK5UFRS9o3UoMLY/C+CwX7Yjjg XouMir0QVVk1HPn3tbCzKTXmic/ZEO68pgg0X83cNifHeV1drjQWFszDorBGIWFuRA n9EaErCXvf8hcdXxnfZ+iXIAr26EispuIsmsTAstDSG2aEnIrNfuarauu9kYIcAljp tElOMbgEW936omzvYqzDKgMnO8vFHe7pgAVQHdYS0YFueLQlWYD7RW/DMk2ftLg/77 27siuqkk0IsBG/LR98/2whWQ4rUsFxnBUaEgV885dC65z0zrcv4JKH0Gd/pXjoTRb0 ubAzEDRLjSeHA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:22 +1000 Message-Id: <20200430023440.225504-2-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 01/19] 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 Thu Apr 30 02:34:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1279865 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49CKK655QXz9sRY for ; Thu, 30 Apr 2020 12:36:58 +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=PS26p62g; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKK542nszDr6Y for ; Thu, 30 Apr 2020 12:36:57 +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 49CKGl11G0zDr6Y for ; Thu, 30 Apr 2020 12:34:55 +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=PS26p62g; 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 49CKGh4Kphz9sSk; Thu, 30 Apr 2020 12:34:52 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214092; bh=eLxTMl0mAWo3F3nAAOtkaePZgK90adlXOej+iT7BK18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PS26p62gb0VfAabGFw3G1c0cNiBZpeinc5HhAfaLlsoeMVeCIM9VrORTTAE0rU+aN gr+0IeShswh3MO39Q34D2aqO0GilNSvyWmIqvikLNC0x44viXykP47IjdWGCrAT+xC DjNjGeLcna76bMHnYoXX0MLj5kahADiuZvbEWwoyDfRwfGAxFs4Uc5Saj6DJgcPF9k zckizltSez0JDVmqbFPdwJbWWvDspjq9JxD0xi8mUE1cHU5r/LcOSeXTBQDUfUERNc bkzUb7SA8wgsxuDyG24WC9ACbc02EgTt+WIThy66h18Op5/Irbcv0BcSNS0LRvLnzi CgBM9jyMI/h+g== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:23 +1000 Message-Id: <20200430023440.225504-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 02/19] 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 Thu Apr 30 02:34:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1279866 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 49CKK907nxz9sRY for ; Thu, 30 Apr 2020 12:37:01 +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=MfcHxEUk; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKK83z7tzDrBn for ; Thu, 30 Apr 2020 12:37: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 49CKGl159RzDrBJ for ; Thu, 30 Apr 2020 12:34:55 +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=MfcHxEUk; 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 49CKGj1mDNz9sSh; Thu, 30 Apr 2020 12:34:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214093; bh=0i55XAzUGgKlBdXL7VoTOiP+TvxUNn5QpOBKjwwpkXA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MfcHxEUkfNpUmTlovUT2g/V6i3CrsoCeC8fhDRZa/cpqdfhu7B1702RoY6ecit3is BlpjPc28Buhaj7HwOXa+xl+wjUliaepWD+dggLkmb24BvlxGVU3EgiHm/riVsqJXT+ nFe4qF4u2V/FVow/+07QZ3f0fkXEyuPGAuSI2Um4zYuJ1yTQM3yRgZiynLhGehDU7l 0OcCmSXv1gkgMja84tUHs6+OV79fsDu0tmFUnQhgqjgtKA7GHWiCZbLxRkJY+Shzd7 kGdpAb2bIOd4I609PIBi84euVfK3ruggDvsjOVqm2E5A3ek+Q1qnDHJs9B2QbWMvqI nBlxXcqjkVRpQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:24 +1000 Message-Id: <20200430023440.225504-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 03/19] 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 Thu Apr 30 02:34: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: 1279867 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 49CKKF1mprz9sSg for ; Thu, 30 Apr 2020 12:37: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=ZpJZOgu8; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKF0RYhzDr7d for ; Thu, 30 Apr 2020 12:37: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 49CKGl16kNzDrBl for ; Thu, 30 Apr 2020 12:34:55 +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=ZpJZOgu8; 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 49CKGj6pmnz9sSw; Thu, 30 Apr 2020 12:34:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214094; bh=VOFSf9QVEdYg5FzYqLLnXR+k8DTCHL6/AXKF/POT/tY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZpJZOgu8BCLqh+jZVM2yI7k2/kKMEfliSpR7uh+n/ekvroRyWdgPstHlPBKODkQ8s 1hvfb9G/0C8BVU18967FVw7b644YsD92YEh9YKLMJWqCRWVouo3tOlmr67o+3gWxeP mdxbRzTNaw4X3UNQ14DeE1kgRxtVmJMJwFQA2YQ/YVmnaM+uNJM+n8qbDbpLiRbkLA 11h5ddnnZga/WUwMNQmxijJ1C8h1wcdXMk2zGYyAwEaFWnnprvMlAm/LHRMDsq78Bh O7ivTA9hhIWSsLn11c8rfWaaKuflaqWhBW1MWeXaUldZYTKVxvwOoIAdFFm6bmToLg VK5pJNHl0jFgg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:25 +1000 Message-Id: <20200430023440.225504-5-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 04/19] 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. When searching for drivers, match all compatible strings to backend specific drivers first and then match all compatible strings to default backend. 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/device.c | 15 +++-------- libpdbg/fake.c | 8 +++--- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 ++--- libpdbg/hwunit.c | 51 +++++++++++++++++++++++++++++++------- libpdbg/hwunit.h | 5 ++-- 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 +++--- 17 files changed, 105 insertions(+), 78 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/device.c b/libpdbg/device.c index 219569e..8db6572 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -60,23 +60,16 @@ static struct pdbg_target *dt_pdbg_target_new(const void *fdt, int node_offset) prop = fdt_get_property(fdt, node_offset, "compatible", NULL); if (prop) { - int i, prop_len = fdt32_to_cpu(prop->len); + uint32_t prop_len = fdt32_to_cpu(prop->len); /* * If I understand correctly, the property we have * here can be a stringlist with a few compatible * strings */ - i = 0; - while (i < prop_len) { - hw_info = pdbg_hwunit_find_compatible(&prop->data[i]); - if (hw_info) { - size = hw_info->size; - break; - } - - i += strlen(&prop->data[i]) + 1; - } + hw_info = pdbg_hwunit_find_compatible(prop->data, prop_len); + if (hw_info) + size = hw_info->size; } if (!hw_info) 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..074ddef 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_driver(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,34 @@ const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat) return NULL; } + +static const struct hw_unit_info *find_compatible(enum pdbg_backend backend, + const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + uint32_t i; + + i = 0; + while (i < len) { + p = find_driver(backend, &compat_list[i]); + if (p) + return p; + + i += strlen(&compat_list[i]) + 1; + } + + return NULL; +} + +const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat_list, + uint32_t len) +{ + const struct hw_unit_info *p; + + p = find_compatible(pdbg_get_backend(), compat_list, len); + if (!p) + p = find_compatible(PDBG_DEFAULT_BACKEND, compat_list, len); + + return p; +} diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index 7165a3c..dd41da7 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -31,8 +31,9 @@ struct hw_unit_info { size_t size; }; -void pdbg_hwunit_register(const struct hw_unit_info *hw_unit); -const struct hw_unit_info *pdbg_hwunit_find_compatible(const char *compat); +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_list, + uint32_t len); /* * If this macro fails to compile for you, you've probably not 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 Thu Apr 30 02:34: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: 1279868 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 49CKKK0CT4z9sSg for ; Thu, 30 Apr 2020 12:37:09 +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=oCqUV6Qi; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKJ5qG5zDr6Y for ; Thu, 30 Apr 2020 12:37: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 49CKGl27yNzDr5Z for ; Thu, 30 Apr 2020 12:34:55 +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=oCqUV6Qi; 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 49CKGk5G5bz9sSx; Thu, 30 Apr 2020 12:34:54 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214094; bh=p60Amv4+wKWUkYRJlcu6ViFcfYaQhNEXM992vm2MQSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oCqUV6QiuzYOo5cI9cXjlChUcHCOrEqJye/cap+/c3ezI5ujJ3AHtkk7gNp9iNAwm ZW6Wbmqbpq4nngpYZout7oECtxKJoEkHfCtdtsN8KrUknI3FDQK63931064Anc9C3p 1govpqMBL/Ue+df+Hh2yODnzxhTxmQiC4xVvRZ+dqtaiChQEVzLN0bXEF8jS6HBEn4 xZmd3wu8x3WNrgqzfepK6LJCFUeJnamXO84FgB8u+WGR7LlvL/cGqxpQUK6YIDnLJa 0Lmtt5yXUjCetIxfpwhDG25OYtrte1h+vTmI5aw+SpisSiS7vRlE/5xCai4L6V4fUx 9yDqHLpouZIVQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:26 +1000 Message-Id: <20200430023440.225504-6-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 05/19] libpdbg: Use PDBG_BACKEND_DRIVER to specify drivers to load 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" When PDBG_BACKEND_DTB is specified, backend may not be set. This means only the drivers registered with PDBG_DEFAULT_BACKEND will be loaded. To be able to match backend specific drivers for targets in system tree, use the backend specified in PDBG_BACKEND_DRIVER environment variable. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 70b7962..3b7a597 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -76,8 +76,25 @@ static struct pdbg_dtb pdbg_dtb = { * running on. */ static enum pdbg_backend default_backend(void) { + const char *tmp; int rc; + tmp = getenv("PDBG_BACKEND_DRIVER"); + if (tmp) { + if (!strcmp(tmp, "fsi")) + return PDBG_BACKEND_FSI; + else if (!strcmp(tmp, "i2c")) + return PDBG_BACKEND_I2C; + else if (!strcmp(tmp, "kernel")) + return PDBG_BACKEND_KERNEL; + else if (!strcmp(tmp, "fake")) + return PDBG_BACKEND_FAKE; + else if (!strcmp(tmp, "host")) + return PDBG_BACKEND_HOST; + else if (!strcmp(tmp, "cronus")) + return PDBG_BACKEND_CRONUS; + } + rc = access(XSCOM_BASE_PATH, F_OK); if (rc == 0) /* PowerPC Host System */ return PDBG_BACKEND_HOST; @@ -313,6 +330,9 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) dtb->backend.fdt = NULL; dtb->system.fdt = system_fdt; + if (!pdbg_backend) + pdbg_backend = default_backend(); + fdt = getenv("PDBG_BACKEND_DTB"); if (fdt) mmap_dtb(fdt, false, &dtb->backend); @@ -324,9 +344,6 @@ struct pdbg_dtb *pdbg_default_dtb(void *system_fdt) if (dtb->backend.fdt && dtb->system.fdt) goto done; - if (!pdbg_backend) - pdbg_backend = default_backend(); - switch(pdbg_backend) { case PDBG_BACKEND_HOST: ppc_target(dtb); From patchwork Thu Apr 30 02:34: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: 1279870 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 49CKKR3tmBz9sRY for ; Thu, 30 Apr 2020 12:37: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=rvSyyNRm; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKR1dLVzDrBm for ; Thu, 30 Apr 2020 12:37: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 49CKGp50pNzDr74 for ; Thu, 30 Apr 2020 12:34:58 +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=rvSyyNRm; 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 49CKGl2P5nz9sSj; Thu, 30 Apr 2020 12:34:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214095; bh=1dNhcsUUQhTMfMhSnYUC/SN6MvgHAuJ2LD1mGxnOkBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvSyyNRmIzbiTtfSXnZ/uy2hTzw/u1xEX8EpppYyI4vN7QBjRA08X+ljysC4zC4jD 63/Tcpc2SJfPJ/+5bysEHIKkPooBVuB+8jKS86zoKmCxtDFGs/rLuuXnEgK4v7sMMG 6Opdc15sL3G1dsy6IVsjqzFTtu40O6fzZhh/nrwTmGTbjCQikDADS6SPLq6HseDuKF GPxdlWFFbAQPjnE877buxnS/nvcNrTfsMDQ2jauKdoKArHs8Z4BCGCnMfS70bqzhFP Neb60ijGocdfgxEr+5shaCIPr+SE6Jd4Y5fSXvvrjsx0VIAqM4u/wT0qQETEfW70NG xb5T6sBbdmf3A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:27 +1000 Message-Id: <20200430023440.225504-7-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 06/19] 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 3b7a597..6a75de4 100644 --- a/libpdbg/dtb.c +++ b/libpdbg/dtb.c @@ -251,7 +251,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; @@ -325,7 +325,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 Thu Apr 30 02:34: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: 1279873 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 49CKKZ2FV5z9sSg for ; Thu, 30 Apr 2020 12:37: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=t1yfHQ94; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKZ1CKxzDr74 for ; Thu, 30 Apr 2020 12:37:22 +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 49CKGq020zzDrBJ for ; Thu, 30 Apr 2020 12:34:59 +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=t1yfHQ94; 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 49CKGl6Gtnz9sSh; Thu, 30 Apr 2020 12:34:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214096; bh=WsjGNT8tBTmaOcEvjBYLbxnzITgTsnS8EXkUXApBoLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t1yfHQ94I1pT2uNPkE1yJdVWoOLwF4BMYL1C1ZVwOhiNvDuh1I7l+ZyFr1pItV7Q7 NnGWZJ7qLw3HyXAz+h6u1EIrYs1MmYql/MQUBx51WtTQ1Ewhex90Hn8riYazZcCV2h 0NqwzssPbb0ujvAtOj5rcHZlLi6TybwNQpfwmGL1RzJKYW6Ao2j7zasfTCAjqPvenV Uu84+ds5mcTBHVifSitx/lGvPWaFlme1kNhPmxCikws2YXbQPd2Xc4OJ6FBE5yyFlg i2wo7TLKajl4IeAwqVOOvCwxAunz4mnpKNLL5KMc7zE/1bLHAQcHC34unqSEQ9eXXh N3QCELfG4dYBw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:28 +1000 Message-Id: <20200430023440.225504-8-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 07/19] 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 Reviewed-by: Alistair Popple --- 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 Thu Apr 30 02:34: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: 1279871 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 49CKKV13bNz9sRY for ; Thu, 30 Apr 2020 12:37:18 +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=Qj14NNnA; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKT50SLzDr74 for ; Thu, 30 Apr 2020 12:37:17 +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 49CKGq021yzDr7f for ; Thu, 30 Apr 2020 12:34:59 +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=Qj14NNnA; 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 49CKGm3Bvbz9sSk; Thu, 30 Apr 2020 12:34:56 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214096; bh=5liHEwaOI1Bu9qerDZdqGXyhILK3ILOkMp3GWqz1r5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qj14NNnA2CGyhacl4PiXE4MJR5OHx3GqM6hgVmwEINcD0l+m/+LzuLd8Hos922kIK NJBG7y1hByw8bZGEyENJKK+PsIXDg0dkSvPZJ0cFtRg89TVg4nyiHh+o42+4RuU5nT kbHH9kMDLUO4TEXMex+y0Nw13GYuWnxgrjW85xQN72wGQ2aWkjdJ5knXDlU6N2oMAM OqbpqswPDAbnaHOYbrKjMxnc0mP8s8/vvrvbNACu2smFqmKq8WgcIsz1iU5tEfzGvE Eu1bF3QunO2ydsL5xNg2uFkpVcKLh3T9d7jlfaViDkwV7rEKbAYXKGNjOX5RgRmbTS 0bOS268Gm9n2Q== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:29 +1000 Message-Id: <20200430023440.225504-9-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 08/19] dts: 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" When using multiple compatible strings, use the generic compatible string first and specific later. Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- 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..754987a 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,power-proc", "ibm,power8-proc"; index = <$1>; fsi { diff --git a/p9.dts b/p9.dts index 2d3fed2..6620b54 100644 --- a/p9.dts +++ b/p9.dts @@ -7,7 +7,7 @@ }; proc0 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x00 >; fsi { @@ -1723,7 +1723,7 @@ }; proc1 { - compatible = "ibm,power9-proc", "ibm,processor"; + compatible = "ibm,power-proc", "ibm,power9-proc"; index = < 0x01 >; fsi { From patchwork Thu Apr 30 02:34: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: 1279869 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 49CKKP21vLz9sRY for ; Thu, 30 Apr 2020 12:37:13 +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=uigg4MYG; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKN4XVmzDr69 for ; Thu, 30 Apr 2020 12:37:12 +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 49CKGp5143zDr75 for ; Thu, 30 Apr 2020 12:34:58 +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=uigg4MYG; 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 49CKGn0zKpz9sSw; Thu, 30 Apr 2020 12:34:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214097; bh=zITlULa8/t+W17VdJYhFCUvomkcJg/9JX7EmA1GgyZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uigg4MYGIT7iSHW46oK5XCjtNlTwyTlmTnzgNS6Gfurv76jCm2EMbHQAKnLRFEUCo buovTSjCpE3vOyvziZejgCcBHLyb6jBvniqjPZOno89YlTFnAhKOyyZaWNoML7upkB +tXt9nC5A+HIcyo1LgnAdWH+xqSCWKmlvSr2B+5GG7s3STyLIJUrz0E6UG8+aGjXzx HXm8dWot8LHAteh8Xa+DuBCZ/4yhjC9QeaV5Dn6s70piBEfbP4BOrBWudApo+yZceI 9jevl140eH5uBAIaQBch5/ddoIAkL+qccdg9Smc2Le6XU2E0BjI7N+QnSDqLGTa7xo guj/3qgm8iL+Q== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:30 +1000 Message-Id: <20200430023440.225504-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 09/19] dts: Add a generic compatible string 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 Reviewed-by: Alistair Popple --- p9.dts | 480 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 240 insertions(+), 240 deletions(-) diff --git a/p9.dts b/p9.dts index 6620b54..1e99937 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,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x00 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x01 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x02 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x03 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x04 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x05 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x06 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x07 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x08 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x09 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0a >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0b >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0c >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0d >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0e >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x0f >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x10 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x11 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x12 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x13 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x14 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x15 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x16 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-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,power-core", "ibm,power9-core"; index = < 0x17 >; reg = < 0x00 0x00 0xfffff >; thread@0 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x00 >; index = < 0x00 >; }; thread@1 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x01 >; index = < 0x01 >; }; thread@2 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x02 >; index = < 0x02 >; }; thread@3 { - compatible = "ibm,power9-thread"; + compatible = "ibm,power-thread", "ibm,power9-thread"; reg = < 0x00 >; tid = < 0x03 >; index = < 0x03 >; From patchwork Thu Apr 30 02:34:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1279872 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 49CKKX2RStz9sRY for ; Thu, 30 Apr 2020 12:37:20 +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=hZu2afNq; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKX1JybzDr9T for ; Thu, 30 Apr 2020 12:37: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 49CKGq0B4xzDr7C for ; Thu, 30 Apr 2020 12:34:59 +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=hZu2afNq; 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 49CKGn69jQz9sSx; Thu, 30 Apr 2020 12:34:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214098; bh=lXsbw+CLbQyuwdsUSZPXHgfT0gJ8Xb/rY/wHxUeWD4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hZu2afNqiMUPe1qsTqwU8QBYllisAaY2TDMLprM4nf8fsuGF7VMtOoKjeb7wyjllN Ot5+VW2W6tWhG/TmZohzbfjcHpd1jGmsnwvz4/3ZkdEpgnz0vrGZ9TkeujmnEhVyeC 6ua/VQWUKnsqTD5pqBb4nVBDEQAnzjh/vJTYFua/Nxuh92i6jIyXkwXT+UOMtFWQK/ SMIC9iDIiWX2KihAH+86/s64ro0E+Iy7K66I0RBVh40roXBLGPRXB+mGiWinXVQGXi FsRCH72LSrGOGptEcEGr6eXgdx46qtvziTDiIaYD1VeWBQqq3P7VIXSgn4t5YGh41K Vf4cU93JxIUTQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:31 +1000 Message-Id: <20200430023440.225504-11-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 10/19] 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 Reviewed-by: Alistair Popple --- 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 Thu Apr 30 02:34: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: 1279874 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 49CKKd49zRz9sSg for ; Thu, 30 Apr 2020 12:37:25 +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=pZPv6PkV; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKd2m3jzDr6T for ; Thu, 30 Apr 2020 12:37: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 49CKGq6WjFzDr6T for ; Thu, 30 Apr 2020 12:34:59 +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=pZPv6PkV; 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 49CKGp48ggz9sSy; Thu, 30 Apr 2020 12:34:58 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214098; bh=PgUKlE49fr0xiv+NVzy0xq73k3QeCnMsMD8FqMm0ONk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pZPv6PkVqUyA/DjiMi6zaaVSQJSt5gsU6wWwkmgsPx9QeN3fkP9DBUdkVdOTuEprV /5fameJ+sN8L8AcTaN/T9uoasnBmeiufnnLFEqPVRZuyT2vBaurb10Hjr3VsX27P5H +oB4GqmlrO+lx0U62GbInWRMX6AYKlr41RPVkBlNUYrIizmLVB3V4SfyHTPoF0zvVa LbqkmSEFmP0qYnDbvW+vwWBRlIuIl3ma5MJjs8cumlm4ff8sZqJwoQABe6xSG2pTjN 5wrUvwcykb9b1Rk1otIAkwQCoUeAkXKBU1E1h+B4CjabqYvDyewgSQ8wNqdA8pMmKl VxBNh92sSHbAQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:32 +1000 Message-Id: <20200430023440.225504-12-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 11/19] 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 Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 22f11f1..ca3a43d 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -237,6 +237,40 @@ static int sbefifo_op_thread_sreset(struct chipop *chipop, return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } +static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) +{ + struct pdbg_target *target; + struct sbefifo *sbefifo = NULL; + + pdbg_for_each_class_target("sbefifo", target) { + if (pdbg_target_index(target) == pdbg_target_index(pib)) { + sbefifo = target_to_sbefifo(target); + break; + } + } + + if (sbefifo == NULL) + assert(sbefifo); + + return sbefifo; +} + +static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val) +{ + struct sbefifo *sbefifo = pib_to_sbefifo(&pib->target); + 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 = pib_to_sbefifo(&pib->target); + 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 +340,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 +369,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_DEFAULT_BACKEND, &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 Thu Apr 30 02:34: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: 1279875 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 49CKKg4jlRz9sSg for ; Thu, 30 Apr 2020 12:37:27 +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=Y0mtFD29; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKg3tCBzDr7V for ; Thu, 30 Apr 2020 12:37: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 49CKGt0DcxzDr69 for ; Thu, 30 Apr 2020 12:35: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=Y0mtFD29; 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 49CKGq4Bptz9sSj; Thu, 30 Apr 2020 12:34:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214099; bh=OZ8Aus438w+xKon/OHPIeY5m5d0kyWByeIEkS7QG9BU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y0mtFD29XtsKjBI1umzi+eBvOzMC6kJKqzoBtpMxzJ/IxoXIQlujkxe038kHC8cRE 0sDkFz8wJM6ZCZhdHagGBDMmca0ltHoXso3hxvwym12jQbEd4OCXtrGWs+AhV5klvW H4B8OMQ/zlmP26CcR9FwgYQ+PoFtT90sA576HuIXMDSTuE8YrCgzZgWrCve2I079lz pHHFXkv6WIHplwi/TQqzVsXvTL1GG+ebTQsE/ScSLC7R4oyX0ziI49m8F4gUZAbs/I 2W2xyWjydi0k9a0jj4mPfc9VszG+84kHOd5vzF0wb2AVuYqduQGknBra6rBky92CHf Zz1l2Ylz3dwMw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:33 +1000 Message-Id: <20200430023440.225504-13-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 12/19] 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 Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index ca3a43d..eeb8d5c 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,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 pdbg_target *pib = pdbg_target_require_parent("pib", chiplet); + struct sbefifo *sbefifo = pib_to_sbefifo(pib); + 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; @@ -352,6 +413,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", @@ -370,6 +446,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_DEFAULT_BACKEND, &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 Thu Apr 30 02:34: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: 1279876 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 49CKKk2g4Cz9sSg for ; Thu, 30 Apr 2020 12:37:30 +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=qnKQH/+l; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKk0QGJzDr6T for ; Thu, 30 Apr 2020 12:37:30 +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 49CKGv07LJzDr7V for ; Thu, 30 Apr 2020 12:35: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=qnKQH/+l; 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 49CKGr1mDgz9sSh; Thu, 30 Apr 2020 12:35:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214100; bh=bK9wGRIMt4zIlMSbknXEkJJJfmKVIiRDWYJEwNxOJ3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qnKQH/+lY+YxzdtNv1hYPqH86Cp2utgvJcqo95c5IdSqoDrayzJcHaRPWKskIXj7E tWpgAe0b5QcZkm11YscKzFo4Qbhpsa/XkNveCfJ6ILndFUlucCKu7yTaqVHU25aBL1 sjcxlV0iYNbdqIH1mpLS5N1JFiPj6uZ11XIckgteopULCsgVlZ5/viBbb2loU9AlYd M3/OqE6dLwVfQpC2T414JHFgRjSgOaLuQSNGlckMVhBcshqRMHYeuQiu+whj6tkmk+ 3aAmlftruv//PSOD3QshENKLDq7qznVINqfbmq72ZQpOWqVmpnkvM/k0Q/9ENNfOuH Wj+NClNc0HbBg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:34 +1000 Message-Id: <20200430023440.225504-14-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 13/19] 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 Reviewed-by: Alistair Popple --- libpdbg/hwunit.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index dd41da7..f5a7dff 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -94,6 +94,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 Thu Apr 30 02:34: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: 1279877 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 49CKKm3WbLz9sSg for ; Thu, 30 Apr 2020 12:37:32 +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=SXHyk/uT; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKm2XRGzDr6Y for ; Thu, 30 Apr 2020 12:37: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 49CKGv06vpzDr7C for ; Thu, 30 Apr 2020 12:35: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=SXHyk/uT; 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 49CKGs0K56z9sSw; Thu, 30 Apr 2020 12:35:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214101; bh=5vMwM3qDmvRc9wfPXR0DvhLc/qkFHyJgRwJBiT85xyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SXHyk/uTchSazVqTGNVQAoYbHGuGHCc2JVQ90qPR3LBnfQc5X6Yp7g+JQOAj/th8x bBISIC642oapR/Sf/62YSt3Oln5Iq2bGMy9+RTEojFHU2Zd8CkMHAPjSVF0oRKlPae uKeeJWt1qE6+kyGyfbiNW+m/O4Yt2Zx2sGV2UfT9gN16HDdXCdpGDQvJi9SAmvog2r 4hqtx0aHKIIJUVR/+c48uL9P+Gssyc66+BDpi3BofaGiLpnVWAIlgan509QGmifuwV FW6+5NxNC1SvQkaQlXBvj3aciaEAxrDrfu4bjXxrk86340nWo9E0YCZroalWUOZSoF uSCJmgJETdaPQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:35 +1000 Message-Id: <20200430023440.225504-15-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 14/19] 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 Reviewed-by: Alistair Popple --- libpdbg/sbefifo.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index eeb8d5c..935a891 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -271,6 +271,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); @@ -409,6 +456,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 Thu Apr 30 02:34: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: 1279878 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 49CKKq44Gxz9sRY for ; Thu, 30 Apr 2020 12:37:35 +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=nCijNne1; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKq2Q76zDr75 for ; Thu, 30 Apr 2020 12:37:35 +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 49CKGv5b92zDr69 for ; Thu, 30 Apr 2020 12:35: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=nCijNne1; 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 49CKGs4Qg0z9sSx; Thu, 30 Apr 2020 12:35:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214102; bh=V5ra1rD+/fT9lUDrNHXWe9mgx6pi45vNKK8alodI/iM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nCijNne1ouwul48wKuRsnya9YNIK8fRIxCQNhHNTEFNH+Xv/cXXDPKFXzv5Msx0Of eEye5zNJetNIamcHuIN4vdGuWLDT/GRTyX9rZ08pn/9rn+y9DGb4qVFah603safID+ dYECtdHkLpFlxdnldjsNiccRRYhmD+9hzUfktKbVHNvPrX3s0GX2TdJ99MFEJGEBGS lf/fDD2iJwOB2kWzKEtHUIE9WjqQMBQ9uvLdPTrsPp2hQCDvwlY61LJj8T7R1OFffu a9eZVU14QUmMpoH7Sw7vXGGKd2CKU8HXzvuwvzPznRbquNOJgc3Ro2lyTWNNHuW7gN D/qI2VN9Kmvhw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:36 +1000 Message-Id: <20200430023440.225504-16-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 15/19] 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 Reviewed-by: Alistair Popple --- 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 Thu Apr 30 02:34: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: 1279879 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 49CKKs5zZwz9sSg for ; Thu, 30 Apr 2020 12:37:37 +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=t/h3RHSa; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKs4Gp6zDrB9 for ; Thu, 30 Apr 2020 12:37:37 +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 49CKGv5cNszDr7C for ; Thu, 30 Apr 2020 12:35: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=t/h3RHSa; 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 49CKGv0JzMz9sSy; Thu, 30 Apr 2020 12:35:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214103; bh=lN/zXepz7qsxGbj7mO7LA8lROGdEdK0xZgZh0bWLAX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t/h3RHSa2yBGEJY4ObFAZkiraXTzAoJ5lsdXeH3FudKE1bbIo7EUfrJd8NPpGpoHP sa+Gh2wGIQTrohhA9OeOgB/ZrETV+YWmlPio0osU6tQQJD5p0vHVotOk8DsBAh1nKb BYl7xdHq4O2mQm006i4NhhV9Ri7RqWuAe7N+PqHAdqO+5upPnnb5dVdpEkGUTcW1Oj rsJY2Czcns6mqPzBmOEI5YxOOqeAhyvnZN+RkFjtgSuOFWb7A5qDvyXBB22r3OI+CN TH6e3kKDzJmB0yEkBSjDhstCdx5itfZbDYlPT+hLQbIf05IJ8FMZl4Z/1yyGJeQ6eL i5O82yjGd81ng== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:37 +1000 Message-Id: <20200430023440.225504-17-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 16/19] 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 Reviewed-by: Alistair Popple --- libpdbg/hwunit.h | 4 ---- libpdbg/sbefifo.c | 46 ---------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index f5a7dff..c30c048 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -76,10 +76,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 935a891..3b2a786 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 struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) { struct pdbg_target *target; @@ -441,10 +399,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 Thu Apr 30 02:34: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: 1279880 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 49CKKw2sy5z9sRY for ; Thu, 30 Apr 2020 12:37: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=Wstl6ICr; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKw0GQczDrBH for ; Thu, 30 Apr 2020 12:37: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 49CKH046ZXzDr7b for ; Thu, 30 Apr 2020 12:35: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=Wstl6ICr; 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 49CKGv4g4Pz9sSj; Thu, 30 Apr 2020 12:35:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214103; bh=IzJd+rr2yOUlEfrb6ndGebFGEeUAC9MOTmapT1KOVOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wstl6ICrspTYdsPg3GH1W0XfmLk6u841XYQvDKTHY8LT8tqpuZNuMQ9gKZfdj32We ufklp4v33zPyhMfcSPzuXkxEmo3wuRWwooOLTgkwCoqyMtg5GDMkeHeyR22QwPubeq 5VcvCOHDJWsN15yzPP69EZFU99WQN1NgxSOgNyEZ9ZdmmTr+CYepREE6asoJ/pIygI Y4QbX6aIpKABa92u9bUs9NUQvpIwKGc/o21XT0W8BBwcaj+tlo4IG5+klxeiJx9qkq 8JIzhrGY2mrMladIhDjKOqpTr/0gP5Gzbb/dxb5etdXMPob0vM4OUE3BZIG+4Abs9P KXPHF0D80tUpw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:38 +1000 Message-Id: <20200430023440.225504-18-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 17/19] 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 Reviewed-by: Alistair Popple --- 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 Thu Apr 30 02:34: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: 1279881 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 49CKKy4zrJz9sSg for ; Thu, 30 Apr 2020 12:37:42 +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=qiBI9iqL; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKKy3v82zDr7f for ; Thu, 30 Apr 2020 12:37:42 +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 49CKH0456mzDr72 for ; Thu, 30 Apr 2020 12:35: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=qiBI9iqL; 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 49CKGw3Qckz9sSh; Thu, 30 Apr 2020 12:35:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214104; bh=yH9fsvOxKsFjFQm1JC4WrBLnSQhSx/CM5RIUz9j2094=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qiBI9iqLz9QHrl86e8JfEryV12y4k2QMfi35KK6MuulQI4/KKuEE2soUa6WjzzQOE OplnrXeojXvZNKIWmv8DdRbKTEKRExa/6d1MMB3KBSaeLwER3Apmf9mlClUWxRyLZ7 vColFROGfl+MdlPXBa5ZuZhwLw/VfDas2Kb/zTimYtGkw4ymCOgqnCH+XMVZ9kSNJO pI3Gc6byHu+yK8s7RC/qcw7hETncQtr2WCyrLwEpVIIyiW5s80b9YIEJ7YwtKdWjfs n+JDqaMzgagksc/q2eSySGceX4co33pNvf0SSXNWgXRTgRanOQHwnPqG9iNnUb17LT RaK4vY4ULIvlg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:39 +1000 Message-Id: <20200430023440.225504-19-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 18/19] 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 Reviewed-by: Alistair Popple --- libpdbg/dtb.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c index 6a75de4..a549c2f 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" @@ -93,6 +94,8 @@ static enum pdbg_backend default_backend(void) return PDBG_BACKEND_HOST; else if (!strcmp(tmp, "cronus")) return PDBG_BACKEND_CRONUS; + else if (!strcmp(tmp, "sbefifo")) + return PDBG_BACKEND_SBEFIFO; } rc = access(XSCOM_BASE_PATH, F_OK); @@ -419,6 +422,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 Thu Apr 30 02:34: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: 1279882 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 49CKL110PVz9sRY for ; Thu, 30 Apr 2020 12:37: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=tC2a+SBN; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49CKL102TGzDr9T for ; Thu, 30 Apr 2020 12:37:45 +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 49CKH045T0zDr75 for ; Thu, 30 Apr 2020 12:35: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=tC2a+SBN; 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 49CKGx0lmBz9sSk; Thu, 30 Apr 2020 12:35:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588214105; bh=K2ocyJzHjyNpawTtN6u9T0czU6PqR3YmFSMwvzpcFcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tC2a+SBNtrJ60M6qb0iAXrSQxZ9PBhM6yhOhGTo67GpVQe/s2RucO3Fq7EAd/9UqL 2aQaqKQJkRVYtiGGnsT70Jj0oYnHBVIq3YA0879ykXZflN2qDieepXl57lrhGi5OLf Xy+Rpp8p04JyCBGea+iIo34s6EEryOa4H4jlA2ukgdNnIJtS1QxmGRrNFEvOTIj81r oVEg/TSNxEPy0YtWfVrS9jhlS3i0aUU8ItDDTZTcSHWgAmMtmhTgl64HxrTwRFSEIO o6Uwvq1O9r/6Y/xWDQHGllc6TbuU+weqqWngWLEZ+ZMAfJzrMBXtKzuPUrhVb7tZDA V2bYEgcJ2wZ6Q== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 30 Apr 2020 12:34:40 +1000 Message-Id: <20200430023440.225504-20-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200430023440.225504-1-amitay@ozlabs.org> References: <20200430023440.225504-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v5 19/19] 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 Reviewed-by: Alistair Popple --- 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;