From patchwork Thu Jul 2 03:39:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1320961 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49y3lF5cqzz9sQt for ; Thu, 2 Jul 2020 13:40:25 +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=jWZWP2p0; 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 49y3lF2lYdzDqlP for ; Thu, 2 Jul 2020 13:40:25 +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 49y3kH3wl5zDqlD for ; Thu, 2 Jul 2020 13:39:35 +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=jWZWP2p0; 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 49y3kH1dcxz9sRN; Thu, 2 Jul 2020 13:39:35 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1593661175; bh=bDl5CyPW9R90LREsbZ0W+B2bGv5Nl0G4NvRPetgOrmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWZWP2p0tse1HNA0qtde5gHZaruSQ9HiOJ9RYLMLEv9MpEip7Nri57cUTZw0tnzXA WMWLhXxQbUlNKxYKzN4bLFi1fyAwfp6Ef0g8q8xvNJ6HorC24Z7/Z1GRGYWQtCmSnW Ulg17ulAgyuCrXdY4pJs6iLy1gBDnM1cKDee+9pxwNU9wGz7uQJxJlUwigOJDy5RRM Duzwty14aHgCF+qtdyKLsQ1Jo6eeNO0QlywJvemoLBZ8s+eOIiIileRkvhhEyDPm0L ORR32NcwdrUfoNg22fy/Xsha97M9Qw39h5BL7EyoMO0mIE3sIUxBnOze+LcvHAcvOK 0PGP94/mxSUAg== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Thu, 2 Jul 2020 13:39:08 +1000 Message-Id: <20200702033918.708013-10-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200702033918.708013-1-amitay@ozlabs.org> References: <20200702033918.708013-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 09/19] libpdbg: Add sbefifo implementation of thread getfpr/putgpr 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/sbefifo.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c index 85b6265..e9cb63e 100644 --- a/libpdbg/sbefifo.c +++ b/libpdbg/sbefifo.c @@ -520,6 +520,22 @@ static int sbefifo_thread_putspr(struct thread *thread, int spr, uint64_t value) return sbefifo_thread_put_reg(thread, reg_type, reg_id, value); } +static int sbefifo_thread_getfpr(struct thread *thread, int fpr, uint64_t *value) +{ + uint8_t reg_type = SBEFIFO_REGISTER_TYPE_FPR; + uint32_t reg_id = fpr; + + return sbefifo_thread_get_reg(thread, reg_type, reg_id, value); +} + +static int sbefifo_thread_putfpr(struct thread *thread, int fpr, uint64_t value) +{ + uint8_t reg_type = SBEFIFO_REGISTER_TYPE_FPR; + uint32_t reg_id = fpr; + + return sbefifo_thread_put_reg(thread, reg_type, reg_id, value); +} + static int sbefifo_thread_getmsr(struct thread *thread, uint64_t *value) { uint8_t reg_type = SBEFIFO_REGISTER_TYPE_SPR; @@ -691,6 +707,8 @@ static struct thread sbefifo_thread = { .putgpr = sbefifo_thread_putgpr, .getspr = sbefifo_thread_getspr, .putspr = sbefifo_thread_putspr, + .getfpr = sbefifo_thread_getfpr, + .putfpr = sbefifo_thread_putfpr, .getmsr = sbefifo_thread_getmsr, .putmsr = sbefifo_thread_putmsr, .getnia = sbefifo_thread_getnia,