From patchwork Mon Jun 22 00:45:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1314034 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 49qrLP0bdmz9sRR for ; Mon, 22 Jun 2020 10:45:49 +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=ZcQeo2uZ; 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 49qrLN51R2zDqbm for ; Mon, 22 Jun 2020 10:45:48 +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 49qrKj5vJCzDqWf for ; Mon, 22 Jun 2020 10:45:13 +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=ZcQeo2uZ; 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 49qrKj48N2z9sRN; Mon, 22 Jun 2020 10:45:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1592786713; bh=eyZIZlesfSHrNRvC1oZOGRCwdjRUl8aJJTTf/BcDM5o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZcQeo2uZJPS0YRjrHnXavwcAvhIwppqRyTsVrvE0+jH84jnxwNVXrZYC+r9Z+h1Ng DsCsWK0nA1abVvby8biINGm8Gb8gvMFo0H98d7LsL66LaGaCk2LH7qhHg3g/os3EdM pVyuf6ZhMv3MhfTYO2UnnZgg89/hpPqVAme+AzB19OWj0QybRGFpmO+b8uGRF2ZvYE owQEd4/xw5zg8RmViqjCKKCzHIZkP6s3hhAPqkp9gerKL4fPmqZJyx50NsmlOPX61Q OUcT8/LBg0g+EtWItpb0A6uOPHEpzTCs1XXvR7hIXHy2yOTcPh1l+f2jFVsE7H91SZ tQ/aI0zxgcBdQ== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Mon, 22 Jun 2020 10:45:00 +1000 Message-Id: <20200622004501.12889-9-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622004501.12889-1-amitay@ozlabs.org> References: <20200622004501.12889-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 8/9] libsbefifo: Fix register access chip-ops 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 --- libsbefifo/cmd_register.c | 12 ++++++------ libsbefifo/libsbefifo.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libsbefifo/cmd_register.c b/libsbefifo/cmd_register.c index 8737e7f..060d3dc 100644 --- a/libsbefifo/cmd_register.c +++ b/libsbefifo/cmd_register.c @@ -22,7 +22,7 @@ #include "libsbefifo.h" #include "sbefifo_private.h" -static int sbefifo_register_get_push(uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint8_t *reg_id, uint8_t reg_count, uint8_t **buf, uint32_t *buflen) +static int sbefifo_register_get_push(uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint32_t *reg_id, uint8_t reg_count, uint8_t **buf, uint32_t *buflen) { uint32_t *msg; uint32_t nwords, cmd; @@ -48,7 +48,7 @@ static int sbefifo_register_get_push(uint8_t core_id, uint8_t thread_id, uint8_t msg[1] = htobe32(cmd); msg[2] = htobe32(r); for (i=0; i> 32); msg[3+i*3+2] = htobe32(value[i] & 0xffffffff); } @@ -143,7 +143,7 @@ static int sbefifo_register_put_pull(uint8_t *buf, uint32_t buflen) return 0; } -int sbefifo_register_put(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint8_t *reg_id, uint8_t reg_count, uint64_t *value) +int sbefifo_register_put(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint32_t *reg_id, uint8_t reg_count, uint64_t *value) { uint8_t *msg, *out; uint32_t msg_len, out_len; diff --git a/libsbefifo/libsbefifo.h b/libsbefifo/libsbefifo.h index 2efb25c..cbfb76d 100644 --- a/libsbefifo/libsbefifo.h +++ b/libsbefifo/libsbefifo.h @@ -104,8 +104,8 @@ int sbefifo_occsram_put(struct sbefifo_context *sctx, uint32_t addr, uint8_t *da #define SBEFIFO_REGISTER_TYPE_SPR 0x1 #define SBEFIFO_REGISTER_TYPE_FPR 0x2 -int sbefifo_register_get(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint8_t *reg_id, uint8_t reg_count, uint64_t **value); -int sbefifo_register_put(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint8_t *reg_id, uint8_t reg_count, uint64_t *value); +int sbefifo_register_get(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint32_t *reg_id, uint8_t reg_count, uint64_t **value); +int sbefifo_register_put(struct sbefifo_context *sctx, uint8_t core_id, uint8_t thread_id, uint8_t reg_type, uint32_t *reg_id, uint8_t reg_count, uint64_t *value); int sbefifo_control_fast_array(struct sbefifo_context *sctx, uint16_t target_type, uint8_t chiplet_id, uint8_t mode, uint64_t clock_cycle); int sbefifo_control_trace_array(struct sbefifo_context *sctx, uint16_t target_type, uint8_t chiplet_id, uint16_t array_id, uint16_t operation, uint8_t **trace_data, uint32_t *trace_data_len);