From nobody Tue Dec 3 17:29:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1731080791173323.14078798147443; Fri, 8 Nov 2024 07:46:31 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 020C1181A; Fri, 8 Nov 2024 10:46:29 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 78CED1765; Fri, 8 Nov 2024 10:44:04 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9592A1648; Fri, 8 Nov 2024 10:43:57 -0500 (EST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BF71B1648 for ; Fri, 8 Nov 2024 10:43:45 -0500 (EST) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-37d4fd00574so1320334f8f.0 for ; Fri, 08 Nov 2024 07:43:45 -0800 (PST) Received: from localhost.localdomain ([89.101.134.25]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381eda04ad0sm5235518f8f.100.2024.11.08.07.43.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 08 Nov 2024 07:43:44 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731080624; x=1731685424; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uljKpTWKHfIbJ0MtlmY9PWC2nyD8V11sN9kOWSbXIe4=; b=LX5DOnUCFCB12J/Rpb5TTkb7lbDtZZaFo1GNkbdjWuEpilrLCkGXmk7w6Lj9fZpelc TtwMln35MpWJCIoOGTBcexYmJ7OnAdYChY4m7gYuZTwBPhLk2GRVYLhyZU9jo0eYGExT J2b+IXRJIKBTarGUtAWvq6MLNC8Nau2GheqKgJW/73OqAGx4lqUaxGi8n+FuBShTiRTV tHfJBH0NRm2ow5UPxLjZ431T0YWCTM/EzEtqCDJw6cq5n8vEUj7ymbh8h1RuXHzuWVpg 6YFsvrIKHzgGxUwX2DupqpH06L5KGL/mi35kGvC7L5Dxc0/9bR43OJQhnTtRJWARomJG lBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731080624; x=1731685424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uljKpTWKHfIbJ0MtlmY9PWC2nyD8V11sN9kOWSbXIe4=; b=YFP+Mk2W9MWTQQwlefxGiQQQS9zsIieFgkuxF6TWeaeX7idtmHl6lqKiYfU82IKyDA 3G+LOUK0eZ2Fq2zfZ2x5LW0LnCldtoiHRjsv3+ODnNoArIYdeyiIFTcvyovTTnlEw0Tp AuWMekyyRzKL5M7XxmSLSBbKiNQNWRn1hTdFR8qtUHPGzILL3kysWqZ1iwgaIh6X/9i/ 3Epq1KRwR29R/7OroHnsZPWl3s7gMUYK8fRIZeRvpurf2KGkPaz1iz/e67CGGCXrYbO8 86MXjmDb2Oq9OUcXzJ/W4OMF/cbvFwUY2mllEZ6b5z/u8xGPMo93cNhcPA9VoVjsD0Az laZA== X-Forwarded-Encrypted: i=1; AJvYcCWvyQBYSHhv6d56SJvuDm5x0kOpxSRdJLAVRO1UgjwaUfgLSWrN5W6ntK06uads2h/PYz5h2w==@lists.libvirt.org X-Gm-Message-State: AOJu0YzjDHijjeJDaOc4wKm2FkmaMb3zhL0Id+tDYo7HrRT0rk2pTUfi c86u/EEJQOkDqAwbHmZHHto3CTGrzWK5wP1YRblGiBKC0K4GuTIZq+xAprmMQFM= X-Google-Smtp-Source: AGHT+IGGEfF/rUyqe5DFJJORPox6p+y0DDitfZCJPKPsvIOyG37YnM05K5XRC0GsGdbfvvWeW/M6oQ== X-Received: by 2002:a5d:59a7:0:b0:37d:2d6f:3284 with SMTP id ffacd0b85a97d-381f1a6ca9bmr2971832f8f.9.1731080624624; Fri, 08 Nov 2024 07:43:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Anton Johansson Subject: [RFC PATCH v3 05/17] hw/timer/xilinx_timer: Allow down to 8-bit memory access Date: Fri, 8 Nov 2024 15:43:05 +0000 Message-ID: <20241108154317.12129-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241108154317.12129-1-philmd@linaro.org> References: <20241108154317.12129-1-philmd@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3KYKWBBROTTLYJZK2CH5RZGMCKRZZBAE X-Message-ID-Hash: 3KYKWBBROTTLYJZK2CH5RZGMCKRZZBAE X-MailFrom: philmd@linaro.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: Jason Wang , Paolo Bonzini , Richard Henderson , devel@lists.libvirt.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Edgar E. Iglesias" , Thomas Huth , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Peter Maydell , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis , "Edgar E . Iglesias" X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1731080793080116600 Content-Type: text/plain; charset="utf-8" Allow down to 8-bit access, per the datasheet (reference added in previous commit): "Timer Counter registers are accessed as one of the following types: =E2=80=A2 Byte (8 bits) =E2=80=A2 Half word (2 bytes) =E2=80=A2 Word (4 bytes)" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Anton Johansson Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- RFC: This breaks the UART qtest, instead of having TX register receiving 'T' =3D 0x54, it receives 0x54000000, converted to '\0' char. It works if we use SWI instead of SBI (storing 32-bit). --- hw/timer/xilinx_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/xilinx_timer.c b/hw/timer/xilinx_timer.c index 383fc8b3c8..c117bff225 100644 --- a/hw/timer/xilinx_timer.c +++ b/hw/timer/xilinx_timer.c @@ -198,7 +198,7 @@ static const MemoryRegionOps timer_ops =3D { .max_access_size =3D 4, }, .valid =3D { - .min_access_size =3D 4, + .min_access_size =3D 1, .max_access_size =3D 4 } }; --=20 2.45.2