From patchwork Wed May 6 05:49:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1284066 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 49H5KJ0gW1z9sSt for ; Wed, 6 May 2020 15:50:12 +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=w6+7HhjS; 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 49H5KH6rz1zDqlP for ; Wed, 6 May 2020 15:50:11 +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 49H5K15K9dzDqkm for ; Wed, 6 May 2020 15:49:57 +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=w6+7HhjS; 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 49H5K13HYZz9sSw; Wed, 6 May 2020 15:49:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1588744197; bh=7BRdskAMOAI3mqpounhXhabrGpmdP7youn+jzddCfsA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w6+7HhjSC9H4r+e7gWqG9RW9SWSBlZ/KYdQ5MLjrwK2tvQTMBRDgi4onX+9toxRmi uBvgp8wfpMUernu4ooUm7vMiUqO+NfRpsgxaHNGabiTPD8QZ/zqUaLrjzc9jUrZCM+ tLDHKSo96q7v0DeHNHkCKBPj0gGC/Qqe9UA7z4EkK055kSgX/IbcFFIQl34jWznhOC 8S/jRGJ67cXPShfUjHXcCydCV2rYFOsRE064cWrJilhGGb8FjYnzgoCUEwsg5puXqN QCBC0w24zWwZgTVx3aGyN6jNjD9czPadMd8HcjQdFIDJDhFtnjV+bCDyzloob/dyVq YvdqR8V5xmZ5w== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 6 May 2020 15:49:47 +1000 Message-Id: <20200506054948.153723-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200506054948.153723-1-amitay@ozlabs.org> References: <20200506054948.153723-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 2/3] libpdbg: Add mpipl_get_ti_info procedure to chipop 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 --- libpdbg/hwunit.h | 1 + libpdbg/sbefifo.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index c30c048..61aea0f 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -76,6 +76,7 @@ struct chipop { int (*istep)(struct chipop *, uint32_t major, uint32_t minor); int (*mpipl_enter)(struct chipop *); int (*mpipl_continue)(struct chipop *); + int (*mpipl_get_ti_info)(struct chipop *, uint8_t **, uint32_t *); }; #define target_to_chipop(x) container_of(x, struct chipop, target) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 3b2a786..eadce10 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -195,6 +195,14 @@ static int sbefifo_op_mpipl_enter(struct chipop *chipop) return sbefifo_mpipl_enter(sctx); } +static int sbefifo_op_mpipl_get_ti_info(struct chipop *chipop, uint8_t **data, uint32_t *data_len) +{ + struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent); + struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo); + + return sbefifo_mpipl_get_ti_info(sctx, data, data_len); +} + static struct sbefifo *pib_to_sbefifo(struct pdbg_target *pib) { struct pdbg_target *target; @@ -399,6 +407,7 @@ static struct chipop sbefifo_chipop = { .istep = sbefifo_op_istep, .mpipl_enter = sbefifo_op_mpipl_enter, .mpipl_continue = sbefifo_op_mpipl_continue, + .mpipl_get_ti_info = sbefifo_op_mpipl_get_ti_info, }; DECLARE_HW_UNIT(sbefifo_chipop);