From patchwork Wed Aug 21 06:08: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: 1150580 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 46Cxzv5Bcfz9sML for ; Wed, 21 Aug 2019 16:08:27 +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="cc1MBQRR"; 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 46Cxzv3jbZzDqWc for ; Wed, 21 Aug 2019 16:08:27 +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) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46Cxzp3z74zDqdh for ; Wed, 21 Aug 2019 16:08:22 +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="cc1MBQRR"; 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 46Cxzn5k78z9sML; Wed, 21 Aug 2019 16:08:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1566367701; bh=fN8tPgpKnrOI8lCq9K6Oe3XnvRbqzB4q2xa4BGfq9hY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cc1MBQRRxSZtjlY20nnzfJn0ySP+hVYAq8c+tsq8GTbTTbxGQ8I7pT+IDH+Hh8Hy6 1BJV19cr29vsv/jV2Vrk0RRbt6ONYu3N1Tav9OetBkqkZFdMeXNQcd9WWZkBzC87DD IRrGolcsD2ASfAEG2iudMSIiSY7podKxrNhHlSVWGNYJoNrgbB0hLLX+ipHJk0FWZG mKzOvm4zw+J2D5gyzx56zVOm+Nf/bqI0XTaocjXoauyO4m8aksnBuVOtBCBo0OReRo WjxugTS/RSvnUYxkqva7JbFHAe3gZkx6LaqITO8zoEA58x2a+CN5CR/FCPAxzrooUK 46AFu2XmnR+mQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 21 Aug 2019 16:08:15 +1000 Message-Id: <20190821060817.31012-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190821060817.31012-1-amitay@ozlabs.org> References: <20190821060817.31012-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v2 2/4] libpdbg: Drop sbe_chipop api for generic chip-op 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/libpdbg.h | 1 - libpdbg/sbefifo.c | 33 --------------------------------- libpdbg/target.c | 11 ----------- 4 files changed, 46 deletions(-) diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h index a359af0..ad3795a 100644 --- a/libpdbg/hwunit.h +++ b/libpdbg/hwunit.h @@ -72,7 +72,6 @@ struct sbefifo { int (*thread_stop)(struct sbefifo *, uint32_t core_id, uint32_t thread_id); int (*thread_step)(struct sbefifo *, uint32_t core_id, uint32_t thread_id); int (*thread_sreset)(struct sbefifo *, uint32_t core_id, uint32_t thread_id); - int (*chipop)(struct sbefifo *, uint32_t *, uint32_t, uint8_t **, uint32_t *, uint32_t *); uint32_t (*ffdc_get)(struct sbefifo *, const uint8_t **, uint32_t *); int fd; uint32_t status; diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h index e752681..235ff85 100644 --- a/libpdbg/libpdbg.h +++ b/libpdbg/libpdbg.h @@ -244,7 +244,6 @@ int opb_read(struct pdbg_target *target, uint32_t addr, uint32_t *data); int opb_write(struct pdbg_target *target, uint32_t addr, uint32_t data); int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor); -int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status); uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len); typedef void (*pdbg_progress_tick_t)(uint64_t cur, uint64_t end); diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 5c63512..fb3203f 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -447,38 +447,6 @@ static int sbefifo_op_thread_sreset(struct sbefifo *sbefifo, return sbefifo_op_control(sbefifo, core_id, thread_id, SBEFIFO_INSN_OP_SRESET); } -static int sbefifo_op_chipop(struct sbefifo *sbefifo, - uint32_t *msg, uint32_t msg_len, - uint8_t **out, uint32_t *out_len, uint32_t *status) -{ - uint32_t len, cmd, op; - int rc; - - assert(msg_len > 3); - - len = be32toh(msg[0]); - cmd = be32toh(msg[1]); - op = be32toh(msg[2]); - - PR_NOTICE("sbefifo: chipop command=%u, op=%u\n", cmd, op); - - if (len != msg_len) { - PR_ERROR("sbefifo: chipop: Invalid msg length, expected %u, got %u\n", - len, msg_len); - return -1; - } - - /* Limit the expected data to 64K */ - if (*out_len > 0x10000) - *out_len = 0x10000; - - rc = sbefifo_op(sbefifo, msg, msg_len, cmd, out, out_len, status); - if (rc) - return rc; - - return 0; -} - static int sbefifo_probe(struct pdbg_target *target) { struct sbefifo *sf = target_to_sbefifo(target); @@ -519,7 +487,6 @@ struct sbefifo kernel_sbefifo = { .thread_stop = sbefifo_op_thread_stop, .thread_step = sbefifo_op_thread_step, .thread_sreset = sbefifo_op_thread_sreset, - .chipop = sbefifo_op_chipop, .ffdc_get = sbefifo_ffdc_get, .fd = -1, }; diff --git a/libpdbg/target.c b/libpdbg/target.c index 5808d02..da24ba0 100644 --- a/libpdbg/target.c +++ b/libpdbg/target.c @@ -301,17 +301,6 @@ int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor) return sbefifo->istep(sbefifo, major, minor); } -int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status) -{ - struct sbefifo *sbefifo; - - sbefifo = pib_to_sbefifo(target); - if (!sbefifo) - return -1; - - return sbefifo->chipop(sbefifo, msg, msg_len, out, out_len, status); -} - uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len) { struct sbefifo *sbefifo;