From patchwork Tue Apr 7 06:15:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1267233 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 48xHHb3y8Hz9sRR for ; Tue, 7 Apr 2020 16:16:59 +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=mfjubAyg; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48xHHZ75KRzDqZP for ; Tue, 7 Apr 2020 16:16:58 +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 48xHHB4QZNzDqTw for ; Tue, 7 Apr 2020 16:16:38 +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=mfjubAyg; 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 48xHH94ZQJz9sRR; Tue, 7 Apr 2020 16:16:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1586240197; bh=559FyC+7zYIESzzt30916MdjMHcSKDEe0ME1cO72MgA=; h=From:To:Cc:Subject:Date:From; b=mfjubAygJW/Rf2QSmba5DndLko+ivOCiGqh1w4syZrkW1wFbIEWLGofswnyM796Ns UpkihlUxTL1id+DIITllSEGwT0XRz12BXm06ZSS/Wv+g2zUJZ6BS7oZZ4RHC9xisOq jSD/LS1+Ly/eWmN2KZcuWqLLWMz8vrbNq2FycV1MLcJzbOlfVmnjGzgs68g8Ox+r6e 4AarjI8n39Eh2WnI2bbyX463LxHqeFbyYk2Qqr4vOC/AxQSiM5TUPNGESpNaNXcUll tXRGudXsIZmONAzGLSfPuUBkZGkUM4yiABLKSWk6ZjvE89nTefQhmLrxC2rEV22pjX EPJECJq0UwEjw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Tue, 7 Apr 2020 16:15:54 +1000 Message-Id: <20200407061613.21325-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 Subject: [Pdbg] [PATCH v2 00/19] 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" For openbmc, all the hardware access is required to go via sbefifo. Currently some of the operations are hacked in to go via sbefifo. This patchset removes temporary hacks and adds infrastructure to create sbefifo backend. Also fix couple of bugs in libsbefifo. V2 changes: - Rebased on top of latest master (resolved conflicts and add missing code due to upstream changes) Amitay Isaacs (19): libsbefifo: Fix compilation error for undefined variable libsbefifo: Use the correct sized pointer libpdbg: Add an api to get current backend libpdbg: Register hwunit drivers per backend libpdbg: Register fsi drivers with fsi backend libpdbg: Register i2c driver with i2c backend libpdbg: Register fake drivers with fake backend libpdbg: Register host drivers with host backend libpdbg: Register cronus drivers with cronus backend libpdbg: Add pib driver using sbefifo libpdbg: Add chiplet driver using sbefifo libpdbg: Add core driver using sbefifo libpdbg: Add thread driver using sbefifo libpdbg: Add all thread procedures to pib target libpdbg: Implement all thread procedures using sbefifo libpdbg: Remove special case thread procedures using sbefifo libpdbg: Drop thread procedures from chipop target libpdbg: Add sbefifo backend main: Add sbefifo backend Makefile.am | 1 + libpdbg/adu.c | 4 +- libpdbg/bmcfsi.c | 2 +- libpdbg/cfam.c | 8 +- libpdbg/chip.c | 62 ++-- libpdbg/cronus.c | 6 +- libpdbg/dtb.c | 24 ++ libpdbg/fake.c | 8 +- libpdbg/host.c | 2 +- libpdbg/htm.c | 6 +- libpdbg/hwunit.c | 31 +- libpdbg/hwunit.h | 10 +- libpdbg/i2c.c | 2 +- libpdbg/kernel.c | 4 +- libpdbg/libpdbg.h | 7 +- libpdbg/p8chip.c | 4 +- libpdbg/p9_fapi_targets.c | 52 +-- libpdbg/p9chip.c | 4 +- libpdbg/sbefifo.c | 181 +++++++++-- libpdbg/target.h | 1 + libsbefifo/cmd_scom.c | 4 +- libsbefifo/operation.c | 5 +- p9-sbefifo.dts.m4 | 86 +++++ p9.dts | 652 +++++++++++++++++++------------------- src/main.c | 3 + 25 files changed, 706 insertions(+), 463 deletions(-) create mode 100644 p9-sbefifo.dts.m4