From patchwork Wed Apr 10 08:08:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1083241 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 44fGyZ6Tqhz9s7T for ; Wed, 10 Apr 2019 18:09:10 +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.b="P10mUkU/"; 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 44fGyZ3w1qzDqN3 for ; Wed, 10 Apr 2019 18:09:10 +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 44fGyP4sdhzDqJc for ; Wed, 10 Apr 2019 18:09:01 +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.b="P10mUkU/"; 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 44fGyP3Vyzz9s70; Wed, 10 Apr 2019 18:09:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1554883741; bh=ca9JVEEO4sbcc/F/MQfTLQqqiOi8xBxqUrvoRLa+uHY=; h=From:To:Cc:Subject:Date:From; b=P10mUkU/4QYZunUy4P3tTkQ8GpNOafgd85UEH5X9DfDvRVHr4RxNazWmb8mCIbHNi GwasjJUJU7eSe3iRsM+Rdk76vbhr3vBFQnUzEBoK9Zb6OmmVNer6WRGDFwpVkfJ/xa cl49+A/z2NZOX5xzpDYy9wa7qFPRIzu3MYPNNO9X4CdGEOr6QyjJ9K7pMJe+27xVPX lveXLev7FPn2KbuyrFrQOIsVhjrgbavfqC/V+KdPTMSpe75hZXbq1D3YQuyxgBA6MX k9fguAQ8fmQpaJRS6Yv+JAg/yIuygP3vfAE3PqJ0FGLQ9AHc2at/0eUhHwuaw+cVcP hLj31MdDdGAKw== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 10 Apr 2019 18:08:47 +1000 Message-Id: <20190410080854.430335-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 0/7] Implement sbe fifo 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" These patches introduce sbe fifo driver for getmem/putmem. It's based on Ben's original incomplete patches. The sbe fifo driver also parses ffdc in case of any errors and dumps the ffdc data. It should be easy to add other chip-ops using the infrastructure in sbefifo.c Other related changes include: - Convert kernel pib backend to use /dev/scom* - Fixing bug in putmem Do a single read of data from stdin and then do a single memory write. This avoids the address offset error. - Reorganize code in _putmem to be similar to _getmem This means if we fail to write memory using one target, we can try again with another target. Amitay Isaacs (5): mem: Read all the memory before call mem_write mem: Make _putmem consistent with _getmem libpdbg: Replace warn/err with PR_WARNING/PR_ERROR libpdbg: Add interface to BMC kernel sbefifo driver main: Use sbefifo first before adu for memory read/write Benjamin Herrenschmidt (2): target: Store "fd" for struct pib libpdbg: Add bmc /dev/scom* backend Makefile.am | 1 + libpdbg/cfam.c | 1 + libpdbg/fake.c | 1 + libpdbg/host.c | 24 ++-- libpdbg/i2c.c | 1 + libpdbg/kernel.c | 87 +++++++++-- libpdbg/sbefifo.c | 358 ++++++++++++++++++++++++++++++++++++++++++++++ libpdbg/target.c | 44 ++++-- libpdbg/target.h | 9 ++ p9-kernel.dts.m4 | 13 +- src/mem.c | 118 +++++++++++---- 11 files changed, 591 insertions(+), 66 deletions(-) create mode 100644 libpdbg/sbefifo.c