From patchwork Mon Jan 7 04:30:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1021172 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 (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Y2Wb1Jnxz9sDB for ; Mon, 7 Jan 2019 15:30:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (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="pfmfZaeb"; 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 43Y2WZ71K9zDqDy for ; Mon, 7 Jan 2019 15:30:50 +1100 (AEDT) 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 43Y2W85CmFzDqDp for ; Mon, 7 Jan 2019 15:30:28 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (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="pfmfZaeb"; 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 (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 43Y2W82XHQz9s7h; Mon, 7 Jan 2019 15:30:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1546835428; bh=T5jdSCZvuiYff2fD2z+c/GrA9r5zOmLPgYGiTRywjqg=; h=From:To:Cc:Subject:Date:From; b=pfmfZaebB9vS1WnOmN7qE2eLhod+Ogn6ja5Cc0j+VsC2ETqSfjDmjEN7OdmNheDRE E0aoCe+ekPUT9FN8VCpVWPvTYzNU3tHxv7jgKcjctLufXbdbx4jOnXomt+/4azYti6 0EURLHtWqMwjozZfRohPqQscYmCaRoVitLbEp5XCp73WucMhBDJ8ueoa1oBZwpI4Dk BgrecQ1o0yigYWIXp6iCS5e7w5CGIYzaWYstke7vH6yC0Y4Iu2klZlG9KsuJ+ZUUrj MXyEgXtyzYF7II/a0Vt6XpQtblj9D+7Wh8gz4CkClU9DpN4B1gM/pcgo5sxMB3XoZ4 782Kuhmxn5yyQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Mon, 7 Jan 2019 15:30:15 +1100 Message-Id: <20190107043020.145107-1-amitay@ozlabs.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH 0/5] Introduce new api mem_read/mem_write 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" The current api for reading/writing memory is adu specific with functions prefixed with adu_. Introduce a new api for memory read/write similar to the other read/write functions for consistency. This will make adding other hardware units capable of reading memory (e.g. sbefifo) easier. Amitay Isaacs (5): adu: Convert __adu_{get,put}mem_blocksize to adu functions adu: Add read/write methods for adu target adu: Set default blocksize for adu adu: Add new api for memory read/write main: Use new api to read/write memory libpdbg/adu.c | 84 ++++++++++++++++++++++++++++++++++------------- libpdbg/libpdbg.h | 3 ++ libpdbg/target.c | 20 +++++++++++ libpdbg/target.h | 2 ++ src/mem.c | 28 ++++++---------- src/pdbgproxy.c | 6 ++-- src/thread.c | 2 +- 7 files changed, 101 insertions(+), 44 deletions(-)