From nobody Tue Nov 26 06:35:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) ARC-Seal: i=3; a=rsa-sha256; t=1709151401; cv=pass; d=zohomail.com; s=zohoarc; b=PV9MmO9iyWeKGkYjkJINdIQCTz5UwkgN3PB4l3x2YjnxsxzMfysn4UOdjSMZzWRDb8GE8MY6PsmntUikjoESxJoWkvpcwG2WfkuicyODk2sQ1TT7Ikpg/gLM+EKKqnr7zrXNe+WzNLSx8TUEoNPtiPXkIfUyf9aOXlqOLlvWvTg= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709151401; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=n9n/4tMA5BmITW5tYeWDz9kz8BfkhS3xpa9AgUx064jB0uUO59tGbPhOm8TJHX8kMpPlv+qfj6AXjMQTYgtNpPCaiat10WSyZYmfa09HPNns4Gm61XbcitNF9uWjUBW7vqbMoORjyl918YUEVQ3BzL8KW5TEfHdLtrmKErOLXv4= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709151401624967.2040424752352; Wed, 28 Feb 2024 12:16:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfQKc-0008Kb-SD; Wed, 28 Feb 2024 15:15:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKT-0008JM-PI for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:15:01 -0500 Received: from ivory.cherry.relay.mailchannels.net ([23.83.223.94]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKG-00042b-89 for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:15:01 -0500 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 553367618C9 for ; Wed, 28 Feb 2024 20:14:45 +0000 (UTC) Received: from outbound3.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 96991761612 for ; Wed, 28 Feb 2024 20:14:44 +0000 (UTC) Received: from outbound3.eu.mailhop.org (outbound3.eu.mailhop.org [52.29.21.168]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.111.52.242 (trex/6.9.2); Wed, 28 Feb 2024 20:14:45 +0000 Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id f2dc8941-d675-11ee-af94-eda7e384987e; Wed, 28 Feb 2024 20:14:17 +0000 (UTC) Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rfQK8-000Dka-1e; Wed, 28 Feb 2024 21:14:40 +0100 X-Sender-Id: _forwarded-from|134.3.94.10 ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1709151284; a=rsa-sha256; cv=pass; b=DRDRtOzSGm51A9j9xLJCP3Dz0G202TKYRROP/YSZga6imP/mDl8Jx8MF/3xzzLJ/1qmIC9 vTEEV6hfU7OPdCiGz9BA3Rftk8YjueS2r78AjLPQyLFN5XZJ6y85EYkoGbn6cO/RpVYtFb IpznkysQd/qekkVOz4wncaa7Fy/FAccfgAv5u9Ka+YLs9JQVpgYj9qIUm6qAZBaPXkvHQC UBZFzh4idQJfBM9Lc+KNQs0uIvMCG7BwWlWxs40IFycFdMFfl+Fz7+x5+FSIFxW9PF0kYR C+JYNJR047Bu+kY+lIoBvujd7XSre8zUeCJby1ZkwODD7KZCAVUvy7kpbkgqWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1709151284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=0hSdSAJIhVm+WcfDAiGskjFi1p9BFezdOf70qrCwq1pwWVZUfpwqRcLP2QlCzV3N/+VYwI Srg4HAjyjjq0kL0qrM/7OtmXUwEJtMYHnoJX4/cClEdifCH9i9fiC0EZSWsR/dcB/1gpwx wp9LMirscqQusbiT4vY9xfmgYorpcuOKZTj+pg166gsFOynKEonZ/6cm/KL7MXBqDJJ4NX tEWLFTiqHZBaypPjvGt/KdM2/uwXk+u2OUj9ChZJQ6Xq1xzJJ/eQQj215YuRJADwPXMbEv WB/V6848Y+JK5+kUA2KV3YLL/EspgvwE79/v1Ho/bewcd8TTSjTSmP4C/IIk9w== ARC-Authentication-Results: i=2; rspamd-55b4bfd7cb-zt5xj; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Exultant-Spot: 23d525697bc9aef4_1709151285115_3841980850 X-MC-Loop-Signature: 1709151285115:3089150733 X-MC-Ingress-Time: 1709151285115 ARC-Seal: i=1; a=rsa-sha256; t=1709151259; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=pfT9lXHwnlK+oMMTZluAF8/dR51APZLlB8cA6Bp2zQ1LQ/K5uA9CguNn5z9cIf7Oy9SYn8OkblOA5 RHOHe6Bi8PX+zIjblmPOow+jBQUrEcIekk2qoZqCkI0zxunWLHYB57XGxms4aB5QP8YcyLrScjW8Ex JQky4P88YylmmEu+HKDzJCwXLFAJRir866SDV1fLQyliqIdCItVWXy9WzyIVryNj5GeQqrS/WnHQaB 12VOuyMaLBylYkvx0lSutmJESl47Z05vtSp4isk6pnsWD+pPo0u/RnCYF+HDIFrqhacwETdcDyuVb7 H1MI0JXWtsem4udvnwLTdxFsQv6DaUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=VigtCmJhajFJz6oftuSv2uik6QttQ1M+4wR5sBA8S+04D4Cm748q80b2mChl65dx4rwsAwkHtizXr qnb0FM3QK6yId97ZfArD4PchRG6yah+rF5CcVONilAOoy2kVRxwUgwe6hsyID46xlnthTBoUhx10Wb j47GO5kHP/LmWqfMxIQjtv73uRNgIuCcrBgQSvV01gDJBKPfVKFmSYBFs8hdUxg259m/SYl+K+CrWn gfSCzdGwmg7Q9wco7txva/6JggIihgsOdR9hULN+UE4MkU38azPJomr+4ZKJYo08WChIzBmCIlXgaJ 694h7RGFFWZMr/gJ25lFGdXsFay476w== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=NUAYNP4s; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=aySMMOH38G8mXyRmkuj3n0p6LycpZmpvdwyaIm0Fen+Fs7Y4YxVjyOQlB9oM1AZOBzCUqvImH7KMu E87TXvr0+OdufNZ2p4OlZDmMJAhDXMfBD1vQgdQsr6m+bHdepwV60pCQvq10Oq1Ra00a5Veg37W9gZ Uao9aj9axcKxtwQQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=g75t2ICe0WIPCqqlkC4HjszlvJ599aGghDrQGjbDNkilo6YsnDQeWZafV4phvQWH0XN8px6znOBaA s+4G9D54FvfHwvEq2/VUXoc52WnLtuvYz/DtyM14sHO/dIuj4p7wJTUFaQPFZt41SwqgjPFinvjaPC N53sVwcCpmeD7CehoRF9OJvKKY6uDYk0kFvDhgExCNEoeXMqbuKsBfFyLFI5+4X5AktgUPm99VoEiy eisq3dP38FJWFcveXSDx37fIf8rynWRjXZzC9kn/Z4Jb5WdxEYqgHcFc96l5l2E3opWwhWEIbXDDzq mNdJIZMJPBgBUzZdooG7N8296x4Q4Og== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: f2dc8941-d675-11ee-af94-eda7e384987e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=M6peY1jFuDHnQiDlFtFqQy92UFHBGjRAatq+vL9PT70=; b=NUAYNP4sMImJTQ6PYtLD15ALdz GWurLnDZ47EC5OTysUD0nqVcePHMTvo0Pfd3PbtTPj/z+y+/BwIE0PyKf2LsA7n1zAS8B2ezkdd8i 83KceYoHMQlHD+MWKeeSGP4NR1vzpwKB/Fz4rDaiEi+texxQGS/qZMQFemEXUZVe0XpK7YD9AWCMV Gl927O20x9440J5jzpOkHt6CPBY6aSdOjcvlXkyzutEx+ZERHYnl2OYf72A16Qyw51H6d30neJ4P/ gno9RamuKv9bzOPzbdpcmzpgH3PEEng8qjBWsTsRuVBLfr7dNOnF+cG84Q3rGzc4NJuqrru/FAbkA 75esJpJw==; From: Sven Schnelle To: Richard Henderson , Helge Deller Cc: qemu-devel@nongnu.org, Sven Schnelle Subject: [PATCH 1/3] Revert "target/hppa: Drop attempted gdbstub support for hppa64" Date: Wed, 28 Feb 2024 21:14:31 +0100 Message-ID: <20240228201434.1515893-2-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228201434.1515893-1-svens@stackframe.org> References: <20240228201434.1515893-1-svens@stackframe.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=23.83.223.94; envelope-from=svens@stackframe.org; helo=ivory.cherry.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stackframe.org) X-ZM-MESSAGEID: 1709151402052100001 Content-Type: text/plain; charset="utf-8" Despite commit e207b4aa718e ("target/hppa: Drop attempted gdbstub support for hppa64") saying that hppa-linux-gdb doesn't support 64 bit mode via remote protocol, it is actually working with a small add-on patch which enables gdb to guess the size from the g protocol: $ hppa64-linux-gnu-gdb ~/seabios-hppa/out-64/hppa-firmware64.img [..] Reading symbols from /home/svens/seabios-hppa/out-64/hppa-firmware64.img... (gdb) target remote :1234 Remote debugging using :1234 warning: remote target does not support file transfer, attempting to access= files from local filesystem. warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. startup () at src/parisc/head.S:144 144 rsm PSW_I, %r0 /* disable local irqs */ (gdb) Signed-off-by: Sven Schnelle --- target/hppa/gdbstub.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index 4a965b38d7..48a514384f 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -21,16 +21,11 @@ #include "cpu.h" #include "gdbstub/helpers.h" =20 -/* - * GDB 15 only supports PA1.0 via the remote protocol, and ignores - * any provided xml. Which means that any attempt to provide more - * data results in "Remote 'g' packet reply is too long". - */ - int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { - CPUHPPAState *env =3D cpu_env(cs); - uint32_t val; + HPPACPU *cpu =3D HPPA_CPU(cs); + CPUHPPAState *env =3D &cpu->env; + target_ureg val; =20 switch (n) { case 0: @@ -144,13 +139,24 @@ int hppa_cpu_gdb_read_register(CPUState *cs, GByteArr= ay *mem_buf, int n) break; } =20 - return gdb_get_reg32(mem_buf, val); + if (TARGET_REGISTER_BITS =3D=3D 64) { + return gdb_get_reg64(mem_buf, val); + } else { + return gdb_get_reg32(mem_buf, val); + } } =20 int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { - CPUHPPAState *env =3D cpu_env(cs); - uint32_t val =3D ldl_p(mem_buf); + HPPACPU *cpu =3D HPPA_CPU(cs); + CPUHPPAState *env =3D &cpu->env; + target_ureg val; + + if (TARGET_REGISTER_BITS =3D=3D 64) { + val =3D ldq_p(mem_buf); + } else { + val =3D ldl_p(mem_buf); + } =20 switch (n) { case 0: @@ -160,7 +166,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) env->gr[n] =3D val; break; case 32: - env->cr[CR_SAR] =3D val & (hppa_is_pa20(env) ? 63 : 31); + env->cr[CR_SAR] =3D val; break; case 33: env->iaoq_f =3D val; @@ -272,5 +278,5 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) } break; } - return 4; + return sizeof(target_ureg); } --=20 2.43.2 From nobody Tue Nov 26 06:35:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) ARC-Seal: i=3; a=rsa-sha256; t=1709151380; cv=pass; d=zohomail.com; s=zohoarc; b=nvz2SfPIxI9moXIzPA35/pxgpjtNX82656cspyKYNcSehqoED79//rLjCHchrbt0HtHdkxGqbNSr1l6LQ9LJwVJdZYibWuTJmaQDr47zSkkBdaDB0RQlZr9PM3lDuNC5uWSIQK/DnnJHkndrJk1wQl6fZ2/VGDDnYLKKxAr7Z78= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709151380; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=WoBQpjCPq2a1AQVECjHBopKjWsOVxqFey7tIdlvVzyS4l7/9vICAe+BH5W2Q5abolufJP/1nOK043zA4brAnRLyJemrFzIka/527Z5C3vfuRnaDLjWyEAvlGaN0VwgC6odG5XSk6OpcQf1m7KrvXAvJfakih122kpWegPW2+kLY= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709151380311698.7862935998843; Wed, 28 Feb 2024 12:16:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfQKP-0008HT-Gi; Wed, 28 Feb 2024 15:15:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKJ-0008FJ-Rz for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:14:51 -0500 Received: from bactrian.maple.relay.mailchannels.net ([23.83.214.9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKG-00042c-9R for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:14:51 -0500 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C7C6AC1612 for ; Wed, 28 Feb 2024 20:14:45 +0000 (UTC) Received: from outbound5a.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id F2E73C299D for ; Wed, 28 Feb 2024 20:14:44 +0000 (UTC) Received: from outbound5a.eu.mailhop.org (outbound5a.eu.mailhop.org [3.124.88.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.124.220.170 (trex/6.9.2); Wed, 28 Feb 2024 20:14:45 +0000 Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id f31b9285-d675-11ee-af94-eda7e384987e; Wed, 28 Feb 2024 20:14:17 +0000 (UTC) Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rfQK9-000Dka-01; Wed, 28 Feb 2024 21:14:41 +0100 X-Sender-Id: _forwarded-from|134.3.94.10 ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1709151285; a=rsa-sha256; cv=pass; b=To36q/XZw2dc0c93Vd8KnXs9D9Zfxv1+qsH7LMuAukZqkucAn2QvYOgzUtfJ2jWpe0jr8g jPsux+9MehRFXNwp7TdoWdUs/xkKr55REU5zLnzyqpuzVXeafSVm4SzKYP5qQ/Hw/DXK2e Smk6AINAhCGAy17J/bNxPKdHYxFXfe0n+n+mnRTBTQF98HKC9DcZIaZ9lAsDNSw7h6dyZy BYC2ylDWm3hCQkV7ASFMclVFYFMlcgP+1gAOxHgkcdsAs/X2nOViJQj4CgBX8pIbd/3YRD lRJijz42ziMVI9Zg60lLNToMsYJJxnhxqT0FrXRr8AKye/76OcyqRrpOsrzXuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1709151285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=ltxJI3DRE2I53Kmh6hnZ9ILyxM4aHg5301mbgaYy9BY6sURzln+mhaolQkLTw/lbaMMUci XhHJKukFDiz6NSFPh8MkwScgwSxInFlsWcwPs6srVlIkKqARUkY7uLwmtBleRh58gQq/ZO UjmQAqnkKAMjqRBwQ8dCxq5QYX32Am/WIKbvRg+7VqcINWVGKDflB1+27zWXimMf8owshs uPdTed9RcQs1r2mqS8q36ng4cTh1EwT/KpusmsxOVt6B90rROQwWYCtZAIvjlhrs2dnPS1 nnfG9cwdPVdfiCHI549bY2NliY/RJ/r3AFqPv4OxZXjaEYCp3kYyWDpxO/Teiw== ARC-Authentication-Results: i=2; rspamd-55b4bfd7cb-tc9hf; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Whispering-Abortive: 788949d90a4fbb1f_1709151285489_3456905678 X-MC-Loop-Signature: 1709151285488:2571048425 X-MC-Ingress-Time: 1709151285488 ARC-Seal: i=1; a=rsa-sha256; t=1709151260; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=nLRUXW6Vn9WJ1qgK3olnVZzOAjB5bayJNGsOm6JToPrGBCukbSZlLahnffOn5JNingf04eixw/GRH goUEwycFPGpBTlXmhVwwE7ApfojlVmVFstsggf2dNFfecJlDMYjkJJxluZdntry9ho7PByjGbg0IWm nCIxYQNUFFu40AVb7O7LbByE9CcFtRogv038CnfmybdqUJ03zSLDmx5VBYigvuEpOMD9dcT5n6efsF CglOOGBTZgVNycpmlSeFTXZ74H3p7UUmY1wVzP178vJqf/bg3dRLIQCa3zFZQp5RI5k7wY8n3ceIrU x55vz/z0tYGlSa37gpuxOWQo1ZNqRWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=bJu4I/Ov9ea+PgvmowCfUm9H6q20i9ahyQyTOJwfW8DLcgihMMQLl9u72ni9jX/v2pFQK8b7HWlXg jVVNy56b2PVRaoF03aJ1cf6si8ymwXB5yQZ84fE8MxkRcXM40bDE9mb8fTLwfLwj8lgfAqSK/BrcKR XX8CNqo8Qizfh/pv59vBVL0bN0KyRhedHVxzcV+oEk7qXzsd5uWXNpbIkkteRZgnxz8rerqEwnkmZL Q2zfWRejGC6eLGYNMw21lrvqMp3q9xiG+bxci15chay2JvBbB136Vq8QgcT+LPxzzP87pD2J7wtWF8 XohxwxY3iZ3n4+MrISliZlOolrKWfBQ== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=R0sht6P9; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=sfG17wNNY+JywPu1A9E2HNcROfijEZBF8Ub5qSUE5az9BU7gCO1VUvZI0gQIavLHMbP+QWpt4M1mb 1yzkaybIFl/yGwuV1w0A3SSyfsIVwfeQupeAu0VkCaPw8zvyiwx9oYfC1oNegWvsUWRTw9AQWpAWR9 hWhuxZ8NR6cFEYes= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=YC7sBcHN6nd28B+dLDJveYT0liSlN8SEZQ8dyjTQDJUhyUuR8E0Jo1iUHW9a54pnLuCSEN5oqq0iw zlAuKEEHvnNAebIHy5F8B4k9W+F0dSRXnDwTwz6Zjxpc6nDCt07kdV9QyBtamsMnedPsLurBArhipt C9d1XmzI6SuLCNoTRvukjI2fE4ql6fx+VRRJztY+3oGzlo4gHtjNsmkIc9LhzmHhQr9VKySs7wbxCY LnyKarLFGRrLZdi1WpOkNPLNKEl4Ruxph6Aod0oYSIG1SSU5yTs7eWfyHtGFPcfA2Csh8wPVmT/4jD 5fnX2QmNEuXwEKydXjfdnktUN8mMySg== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: f31b9285-d675-11ee-af94-eda7e384987e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tGqoTKg7uGmsAnU6stPR+zkpAgXqaQsmACDLXuTnCYs=; b=R0sht6P95XIhPUBzd7A/cqubHE q1iBCmKLQUvAQfR0fPgcKB/JKiPo/W2fo3dXE7+oypCkpesAj0X21lWVIYI3RHt7y42b1gOUqbEi+ Opp8bNFxKDX+/7pP4deVC2q5vhs6Q6s35JwSYaWGPquSD6jx7joPsIzQ+0pPOP/fe0xU6aejyvDKn SXX7K157N+Ta8RZf+iLG2mZSUUmF9svCzQnnPshHOTxOc3906A/cX1yZhkX82Lqeaz3SubVLgwITl ZDuBoxAzEnJ7lv0VylJUragIW74Cslf+inIskNrQp/WX2DNuoUaaG8oLm7LaMTv9iEEZWsoW+ND00 mcuYXz2g==; From: Sven Schnelle To: Richard Henderson , Helge Deller Cc: qemu-devel@nongnu.org, Sven Schnelle Subject: [PATCH 2/3] target/hppa: add 64 bit support to gdbstub Date: Wed, 28 Feb 2024 21:14:32 +0100 Message-ID: <20240228201434.1515893-3-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228201434.1515893-1-svens@stackframe.org> References: <20240228201434.1515893-1-svens@stackframe.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=23.83.214.9; envelope-from=svens@stackframe.org; helo=bactrian.maple.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stackframe.org) X-ZM-MESSAGEID: 1709151382235100004 Content-Type: text/plain; charset="utf-8" Signed-off-by: Sven Schnelle --- target/hppa/gdbstub.c | 48 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index 48a514384f..a5b2c80c07 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -21,11 +21,25 @@ #include "cpu.h" #include "gdbstub/helpers.h" =20 +static int hppa_num_regs(CPUHPPAState *env) +{ + return hppa_is_pa20(env) ? 96 : 128; +} + +static int hppa_reg_size(CPUHPPAState *env) +{ + return hppa_is_pa20(env) ? 8 : 4; +} + int hppa_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { HPPACPU *cpu =3D HPPA_CPU(cs); CPUHPPAState *env =3D &cpu->env; - target_ureg val; + target_ulong val; + + if (n >=3D hppa_num_regs(env)) { + return 0; + } =20 switch (n) { case 0: @@ -128,18 +142,18 @@ int hppa_cpu_gdb_read_register(CPUState *cs, GByteArr= ay *mem_buf, int n) val =3D env->cr[30]; break; case 64 ... 127: - val =3D extract64(env->fr[(n - 64) / 2], (n & 1 ? 0 : 32), 32); - break; - default: - if (n < 128) { - val =3D 0; + if (hppa_is_pa20(env)) { + val =3D env->fr[n - 64]; } else { - return 0; + val =3D extract64(env->fr[(n - 64) / 2], (n & 1 ? 0 : 32), 32); } break; + default: + val =3D 0; + break; } =20 - if (TARGET_REGISTER_BITS =3D=3D 64) { + if (hppa_is_pa20(env)) { return gdb_get_reg64(mem_buf, val); } else { return gdb_get_reg32(mem_buf, val); @@ -150,9 +164,13 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t = *mem_buf, int n) { HPPACPU *cpu =3D HPPA_CPU(cs); CPUHPPAState *env =3D &cpu->env; - target_ureg val; + target_ulong val; + + if (n >=3D hppa_num_regs(env)) { + return 0; + } =20 - if (TARGET_REGISTER_BITS =3D=3D 64) { + if (hppa_is_pa20(env)) { val =3D ldq_p(mem_buf); } else { val =3D ldl_p(mem_buf); @@ -267,16 +285,16 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t= *mem_buf, int n) cpu_hppa_loaded_fr0(env); break; case 65 ... 127: - { + if (hppa_is_pa20(env)) { + env->fr[n - 64] =3D val; + } else { uint64_t *fr =3D &env->fr[(n - 64) / 2]; *fr =3D deposit64(*fr, (n & 1 ? 0 : 32), 32, val); } break; default: - if (n >=3D 128) { - return 0; - } break; } - return sizeof(target_ureg); + + return hppa_reg_size(env); } --=20 2.43.2 From nobody Tue Nov 26 06:35:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) ARC-Seal: i=3; a=rsa-sha256; t=1709151417; cv=pass; d=zohomail.com; s=zohoarc; b=VF0KhOoeG869DvglKE7dbdxFZNk6kmaS/gr/ZcllkwUjBxt3SM5pcBefgFBPRysEtjnqZTLezG7FcSriS85LFzK72lIuZnyy9KpDMuQ5YhvG2/p8VpM7S3v0e765G2ZFz57QPb2gTwqjL5eFxUt7odspIySVv+rDcO3J8gZJwuY= ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709151417; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=OR6QqZHBCU2C1FEGpQFtFQwOQ0mg+iI8d8UVZnL6wjjL0KjcVVmjxN1V0bIBjgSRAZIPHvR0WtmHLHsxFh/3xgYjfvz3oFaqaAWmr5AyNhWNzni8GFaqsrJwIR9eWEwKUnobTfedM3qdF49TUH95YwRZfRcTlGA+wVhe0QhUNZ0= ARC-Authentication-Results: i=3; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; arc=pass (i=2 dmarc=pass fromdomain=stackframe.org) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709151417682638.770948737596; Wed, 28 Feb 2024 12:16:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfQKW-0008Ja-1D; Wed, 28 Feb 2024 15:15:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKR-0008IM-4k for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:15:00 -0500 Received: from catfish.pear.relay.mailchannels.net ([23.83.216.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfQKP-00043l-Bc for qemu-devel@nongnu.org; Wed, 28 Feb 2024 15:14:58 -0500 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 71F41102332 for ; Wed, 28 Feb 2024 20:14:54 +0000 (UTC) Received: from outbound1g.eu.mailhop.org (unknown [127.0.0.6]) (Authenticated sender: duocircle) by relay.mailchannels.net (Postfix) with ESMTPA id 2A11C103929 for ; Wed, 28 Feb 2024 20:14:53 +0000 (UTC) Received: from outbound1g.eu.mailhop.org (outbound1g.eu.mailhop.org [52.28.6.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.124.220.170 (trex/6.9.2); Wed, 28 Feb 2024 20:14:53 +0000 Received: from mail.duncanthrax.net (mail.duncanthrax.net [130.180.31.158]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id f375ea31-d675-11ee-af94-eda7e384987e; Wed, 28 Feb 2024 20:14:18 +0000 (UTC) Received: from ip-134-003-094-010.um41.pools.vodafone-ip.de ([134.3.94.10] helo=t14.stackframe.org) by mail.duncanthrax.net with esmtpa (Exim 4.96) (envelope-from ) id 1rfQK9-000Dka-1M; Wed, 28 Feb 2024 21:14:41 +0100 X-Sender-Id: _forwarded-from|134.3.94.10 ARC-Seal: i=2; s=arc-2022; d=mailchannels.net; t=1709151293; a=rsa-sha256; cv=pass; b=4GY9VhxMnnkZeQvh38rMtcJUdd9iQaYFh88xx2iKKlljKd7XHIxNBMKX8FCNO2gTeRNDGM teueqmSkAqJ5igNpfPrAH+BAenvJP+UO+eucb6O/c5VqEZuSz81aKwxe5YX0jbMf57OmDw /3bvrCWEOinpZDGRtMbUo3F+FWyKZ5I2N5dYc1J8oBwOGPt5A1rHGdBN5pKHCa6FUAMkuX 7u8HUBrQUdNzz3oby3OmT2GA+XVdA6Ijp9I3F7fizMJbumLHQu5z/AzFBvHVp5x0s7dcrF vuaDS7OUV+sGwhNWtmiu4UHDdGvErNWBJrklY222wtsyt28h7p1+Mes791sd7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1709151293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=TKUVNnR6CspJ4WARZCa7+/SUKTxsrrjlaH/Zv3OoVPsN7M9QQlpQ/zTtSsv6i+bUwI97dj VhTK8jjygJrJGhURvCAqs/wGwrfMq7SY22zkvd+CwY7/q2IDuIiHbrT7m+p+0OJVvUCb/b VrVB/+pSoojG++HMo/s2ExGrKAP9wBuHj6x7w9FK8xPAXte8DOuzi9YuPAxNDuGEQLAnmF wV7eyTck3YmFthG8uu3m8Bk5dpJmign+HsUwmZ3pF0wmxYS8/KUb4iNo0lL+8LIdoaGSQh h+6f7wB15G/kaYx53dsgwP6lLzEEIEhmcByi61x2io3TGIdkQyqAHoRPtgKOXQ== ARC-Authentication-Results: i=2; rspamd-55b4bfd7cb-9jm27; arc=pass ("outbound.mailhop.org:s=arc-outbound20181012:i=1"); auth=pass smtp.auth=duocircle smtp.mailfrom=svens@stackframe.org X-Sender-Id: _forwarded-from|134.3.94.10 X-MC-Relay: Forwarding X-MailChannels-SenderId: _forwarded-from|134.3.94.10 X-MailChannels-Auth-Id: duocircle X-Trade-Daffy: 72f2d43534c47cef_1709151293664_3455485355 X-MC-Loop-Signature: 1709151293663:2340965779 X-MC-Ingress-Time: 1709151293663 ARC-Seal: i=1; a=rsa-sha256; t=1709151260; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=vdSGX5ST1qyJ3eMYQ0ulK+lu9QrpW8Y1cozowTlcQbr6PukyLyA7Gwrte0Holy4E4ZV8LbG3skp6T qKZCNk3wj9LmO6cKkbkAi7J6QMDMtnlMSy824rCA0w4r3EzH+yC00Jvu6QIzlzNF4H6+fF2MRXFFY9 CNjFbCJFIm/th3KB6Gw+xxl0X8s13VcjBVU5V2+H5AP9/s21IXAWbOH5ZoCv9hNC8fkpD/7u/A222p yNqyj7GNQ/9x33vZA6lUqSZc+BJNiS99Q+B3a6V0ZCzpkXIpkc374glFXp5b/GhuRUk1IchGGDrOVZ DQ8hMCQ6vep9BpVE2KDTGR6fdlIglkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:dkim-signature:dkim-signature:dkim-signature:from; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=Fta0ziPK0wTeQwmzIVvFhjsNQWuYUKLiOw7k46WtXdDsLM4xtKO7D/T0DA1xWcNJqCVx86aZ3ZDjB XGVVANB5twqjFdzN+bPCSHdnTKtDKeu1ygHDNOaYkN/7M+E9f6HU8t47rf1mpJX0zrK+YknTupeoHa 6S8zZAaZzi174q4q8KQm+QlwBcOelhlMnUw1X9LXig8fcgnfS4yw/ARhDFOCB+5cvD1z6xblkiMhM9 IBzpOOrKFw/6CA+8KMf7mB4gUMKDzf+SYVfbNEOVZqT8xHxl3RN1LMmm+X2uWJe17X0u2PNYv6OEbZ uwjPY2xB/O9/WozLo4C98W+58GRReqg== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=pass smtp.mailfrom=stackframe.org smtp.remote-ip=130.180.31.158; dkim=pass header.d=stackframe.org header.s=dkim1 header.a=rsa-sha256 header.b=agzFYBJh; dmarc=none header.from=stackframe.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stackframe.org; s=duo-1634547266507-560c42ae; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=oOM5D8A+AuMJIpBeolL+ZpQLU30FFkf6y4VInYSt2hdbNNB6pg+MyGftjXqkYAhMkmLkviRsPi+sO BG43k6ljLkFo+3BEjN8zAgTHgQrR5kxSO2RURQPUbYi97o+qN4HjMyCce17+eHvMOXyRIQK3UrG4NV ETToNpSCITZetLaQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=NpYaSbyPsJhSGaljMwBz9TSzrbUyxE/8Oxqj8lLdXfjh49PburElxbW3Emweke7B4cV15yYYKcM6N WI+M7xdWOk6fxHMrQlV9iQq+bdZkqBMWtjxh4LmF2xFbY/ly+TsiVYNLUu6SttKHrNsdwZtbXQIXLc AXhO2/WOkBtViMhmD+pBTOfVuAN0Hv+nYtgiSEdx66TUdzXtg0T1wXbaRa3YRLTHzHUWQd9qqnt4TI K5e8eXQKaSzpL6sqwkVlF4IhcQG7Rj822wACdC1BicH2J36DMSJJZFxozMaxEiu77hnIgsdQvpp6rE K5Bv+k0XK57njuBeFPCS57NKDJUYMVQ== X-Originating-IP: 130.180.31.158 X-MHO-RoutePath: dG9ta2lzdG5lcm51 X-MHO-User: f375ea31-d675-11ee-af94-eda7e384987e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stackframe.org; s=dkim1; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3CP0t1jAVlJaaOZZCK2N/4bcEOd7i4ad9ifS1boh0DQ=; b=agzFYBJh749KwH22QYkQATt3m8 qB1mf0htxSnryFxfR4r1+vYWj5855JiaGJ7dmoKrdqXmC6TGxOrCpDr3XYeu3H00Na/oHD0EDF3MM t75FxtX2AyyFAmryiOb8CqY8c5BmlAQP0UsDyT0ec9csJLoytLNOTiKwmjYU5BErKxH+g0vUHxBhI amEwLm70JayzwJCeAEWQHgus55CSzysNnMlhJzRrKcOfFwWW23QWSbxOO1RJjggW3tZ/MLfNW+hO0 Eaw+CrweNtojAXqm7o6xQeulX/do3reoBnOTseCFFNnnHbbaatQZwwckPTrTAZ2noGx3BosStiSks vWv0RgeA==; From: Sven Schnelle To: Richard Henderson , Helge Deller Cc: qemu-devel@nongnu.org, Sven Schnelle Subject: [PATCH 3/3] target/hppa: mask CR_SAR register writes to 5/6 bit in gdbstub Date: Wed, 28 Feb 2024 21:14:33 +0100 Message-ID: <20240228201434.1515893-4-svens@stackframe.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228201434.1515893-1-svens@stackframe.org> References: <20240228201434.1515893-1-svens@stackframe.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=23.83.216.32; envelope-from=svens@stackframe.org; helo=catfish.pear.relay.mailchannels.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stackframe.org) X-ZM-MESSAGEID: 1709151418078100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Sven Schnelle Reviewed-by: Richard Henderson --- target/hppa/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c index a5b2c80c07..049b2d6381 100644 --- a/target/hppa/gdbstub.c +++ b/target/hppa/gdbstub.c @@ -184,7 +184,7 @@ int hppa_cpu_gdb_write_register(CPUState *cs, uint8_t *= mem_buf, int n) env->gr[n] =3D val; break; case 32: - env->cr[CR_SAR] =3D val; + env->cr[CR_SAR] =3D val & (hppa_is_pa20(env) ? 63 : 31); break; case 33: env->iaoq_f =3D val; --=20 2.43.2