From patchwork Thu Sep 24 04:42:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1370271 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 4Bxj8n5Ln4z9sSt for ; Thu, 24 Sep 2020 14:43: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=AXRPAZ4O; 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 4Bxj8n0dZbzDqYk for ; Thu, 24 Sep 2020 14:43:05 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Bxj8S5tsNzDqV8 for ; Thu, 24 Sep 2020 14:42:48 +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=AXRPAZ4O; 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 4Bxj8S1yX7z9sSt; Thu, 24 Sep 2020 14:42:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1600922568; bh=JmqvFAHNhiFHd17bfJlugri71f1eOUuVU0GNUpA8THY=; h=From:To:Cc:Subject:Date:From; b=AXRPAZ4OoSQsx6zpbZAL0HYUOg7cPthY3mrYM4vDXP0nsLLp/4s5QgnBvBp9H0j3h Ut/uuSMo2iCT6e2iA/RiOv+ORK6z3dcjHIG4K5OJjEW/sn514FKfP9hMTnJzWDo/E/ r4BQNw/o6S2YWI9p3DqJHjtcqYZ66Nwz1z+J2zq0LuC/wCYS1ZsWjVpgpIqIAtBaE1 /jtg3QNPQG2hIxduOeLAWt8AZxgmSTIoOJks7gYczMPiPyGdrXPmEtRXa9gTYoGxJF 6gAqzRft5ZvfaKSaNI4IqOv+Bq60WqPC712pYe4j7Q+efhAd99FCxASkautwGGnGp2 xgmzsVryp00kg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 24 Sep 2020 14:42:18 +1000 Message-Id: <20200924044236.130586-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 00/18] Add p10 support to libpdbg 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 patchset adds support for POWER10 (P10) processor to libpdbg. Starting from P10, most of the hardware accesses from BMC go via sbe. This is implemented as a seperate sbefifo backend. On a secure P10 system, raw devices used by kernel driver will not work and all hardware access (except fsi) must go via SBE. SBEFIFO library is updated to deal with slightly different conventions between P9 and P10 when specifying core ids. New chip-ops are added to SBE to read scoms from ocmb. Alistair Popple (3): libpdbg: Introduce p10 FAPI targets and address translation dts: Add p10 targets to device tree tests: Add fapi p10 address translation tests Amitay Isaacs (15): libpdbg: Add p10 dts: Add p10 device tree libpdbg: Enable p10 BMC backend libpdbg: Add processor type to libsbefifo implementation libsbefifo: Add implementation of suspend_io chipop libsbefifo: Add new definitions for P10 sbe libsbefifo: P10 dropped put_ring_from_image chipop libpdbg: Update sbefifo chip-ops as per changes in p10 libsbefifo: Use proper cast libsbefifo: Update sram get/put api libsbefifo: Add new chip-ops for hw register get/put libpdbg: Add ocmb hwunit libpdbg: Add sbefifo based implementation of ocmb getscom/putscom libpdbg: Add ocmb_{getscom/putscom} api dts: Add ocmb targets to p10.dts Makefile.am | 16 +- libpdbg/cfam.c | 2 + libpdbg/cronus.c | 18 +- libpdbg/dtb.c | 45 +- libpdbg/hwunit.h | 22 + libpdbg/libpdbg.h | 23 + libpdbg/ocmb.c | 85 ++ libpdbg/p10_fapi_targets.c | 583 +++++++++++ libpdbg/p10_scom_addr.h | 133 +++ libpdbg/sbefifo.c | 87 +- libpdbg/target.c | 38 + libpdbg/target.h | 3 +- libsbefifo/cmd_control.c | 53 +- libsbefifo/cmd_memory.c | 75 +- libsbefifo/cmd_register.c | 131 +++ libsbefifo/cmd_ring.c | 3 + libsbefifo/cmd_scom.c | 6 +- libsbefifo/connect.c | 26 +- libsbefifo/libsbefifo.h | 61 +- libsbefifo/sbefifo_private.h | 8 +- p10.dts.m4 | 622 ++++++++++++ src/tests/libpdbg_p10_fapi_translation_test.C | 113 +++ src/tests/p10_cu.H | 120 +++ src/tests/p10_scom_addr.C | 934 ++++++++++++++++++ src/tests/p10_scom_addr.H | 718 ++++++++++++++ src/tests/p10_scominfo.C | 856 ++++++++++++++++ src/tests/p10_scominfo.H | 107 ++ tests/test_p10_fapi_translation.sh | 206 ++++ 28 files changed, 5020 insertions(+), 74 deletions(-) create mode 100644 libpdbg/ocmb.c create mode 100644 libpdbg/p10_fapi_targets.c create mode 100644 libpdbg/p10_scom_addr.h create mode 100644 p10.dts.m4 create mode 100644 src/tests/libpdbg_p10_fapi_translation_test.C create mode 100644 src/tests/p10_cu.H create mode 100644 src/tests/p10_scom_addr.C create mode 100644 src/tests/p10_scom_addr.H create mode 100644 src/tests/p10_scominfo.C create mode 100644 src/tests/p10_scominfo.H create mode 100755 tests/test_p10_fapi_translation.sh