From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088656; cv=none; d=zohomail.com; s=zohoarc; b=PjAtIwyAFT9pxLsvOwcVojmzlx5jJtPfBY2Gv6ZIyRVcqdvmUVYwdYtVynh6QXahVT9GZxo1xdYtHNq9FQtYnZD7r67QsxWlmq3bwfGa7FmIvZ6Uq+wj+xu+k+Fr+RYG9yEd8YVnNxNv7OlAyPiBr4oJ5MxGL0le+cucmGs0bJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088656; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0VFoy/cM3V05uBsBC12Q50YlNd/454IKTpCX5/EFXfo=; b=gyDywX2wVgqMb2M9yNHLGBJB2hf/cqy/FI5M2z8DiZImQ6Y2T/AyMEHthspkGpjxtIxRZtQyNSuxy2H99plh5Wr5jepvtFZyGaF333PwEPOG8y7T42T8lq5/xd9WGKqWOzIcdXEehH1JB3VeM7Sh2ICCiwvKIDM/4sgOe24S398= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088656477873.000242933611; Thu, 21 May 2020 12:17:36 -0700 (PDT) Received: from localhost ([::1]:39302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqhD-0004Dg-27 for importer@patchew.org; Thu, 21 May 2020 15:17:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqfx-0001xR-Nj for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:17 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:37312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqfw-0000OO-Jd for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:17 -0400 Received: by mail-wm1-x333.google.com with SMTP id z72so7561376wmc.2 for ; Thu, 21 May 2020 12:16:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0VFoy/cM3V05uBsBC12Q50YlNd/454IKTpCX5/EFXfo=; b=y8qf+qXKfYIFPHgS9wt+744Ctb5HNDpDI5HJ78JuVawZ8HSrTv8jN6YHP4nls6nBIX dbBltGPiBdgCB+9dhZ5iCHVhIX2ajqjOqu/Z18iFs78DhlcWzdReQ9ZpmT7G3dXpdymw M6BxRX2QlYpMAMG9dfxv0mcMzJgF6ol1yIIs8btdBJgmfmvV5Js74a6l0dAqq3uJfqzP rkifUyTmDBy4JXp4ZSH6DZSQzv0LIA7wTsyLEyh48QOtOiyNdeQJGaRqj/XW7pOWXGlj zuFVKWHFs37MKZGFtMoFE4g1kVK+bEMrX05/o7HssVb6AbgbMIIcarP69NviY63KPaw1 CESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0VFoy/cM3V05uBsBC12Q50YlNd/454IKTpCX5/EFXfo=; b=RIJVzLldc6wZS0mHe/wkwqXyaCP6vIjx1NulTJi481lM+FSbBJ8q1Gi987amkVtDo6 dTplgpr0TI/knxwLBhCI2UB2+3egDIs1wv+jWaoIETf4uZg6RJXqrg5+t+GEwT9J2A4r 4oQlvHw3A39H70C62Vr1tGLDsIcnAV/+WMfa3uz3kxxa5jkB3S2cvX7lf88ukC6lExRL EE6KVczRh0Lo8za5uOs0nlxt8FuwWXOdU803vNGurvbgnAiq7QSs4UD0mY0jXcIJ24EY Pxa62FYLbkjTGQBLuovYOuF9hK5Brx4XUGonGe5ur3vyDTLrN277X5NN7ccK7+4CAqRS a98w== X-Gm-Message-State: AOAM533eE3Jukv6RhrWBBeTZqJOiYWiGDmBB51fFcyt0M8sg1HaMVazc UWgdI+MACxRYm1KwUVK9psaD7hY0SZasGQ== X-Google-Smtp-Source: ABdhPJx/Gira8YoYYZITfiU5Sy7oDhiEn5W0wS09m5SNBEXXaMOLppcw/g+tSUzvsKjrb1b+sdqN6g== X-Received: by 2002:a1c:c386:: with SMTP id t128mr9970909wmf.11.1590088574746; Thu, 21 May 2020 12:16:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/29] tests/acceptance: Add a test for the canon-a1100 machine Date: Thu, 21 May 2020 20:15:42 +0100 Message-Id: <20200521191610.10941-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Thomas Huth The canon-a1100 machine can be used with the Barebox firmware. The QEMU Advent Calendar 2018 features a pre-compiled image which we can use for testing. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200514190422.23645-1-f4bug@amsat.org Message-Id: <20200129090420.13954-1-thuth@redhat.com> [PMD: Rebased MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell --- MAINTAINERS | 1 + tests/acceptance/machine_arm_canona1100.py | 35 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/acceptance/machine_arm_canona1100.py diff --git a/MAINTAINERS b/MAINTAINERS index 87a412c229b..1e006c98fab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -608,6 +608,7 @@ S: Odd Fixes F: include/hw/arm/digic.h F: hw/*/digic* F: include/hw/*/digic* +F: tests/acceptance/machine_arm_canona1100.py =20 Goldfish RTC M: Anup Patel diff --git a/tests/acceptance/machine_arm_canona1100.py b/tests/acceptance/= machine_arm_canona1100.py new file mode 100644 index 00000000000..0e5c43dbcf8 --- /dev/null +++ b/tests/acceptance/machine_arm_canona1100.py @@ -0,0 +1,35 @@ +# Functional test that boots the canon-a1100 machine with firmware +# +# Copyright (c) 2020 Red Hat, Inc. +# +# Author: +# Thomas Huth +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern +from avocado.utils import archive + +class CanonA1100Machine(Test): + """Boots the barebox firmware and checks that the console is operation= al""" + + timeout =3D 90 + + def test_arm_canona1100(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:canon-a1100 + :avocado: tags=3Ddevice:pflash_cfi02 + """ + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day18.tar.xz') + tar_hash =3D '068b5fc4242b29381acee94713509f8a876e9db6' + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + archive.extract(file_path, self.workdir) + self.vm.set_console() + self.vm.add_args('-bios', + self.workdir + '/day18/barebox.canon-a1100.bin') + self.vm.launch() + wait_for_console_pattern(self, 'running /env/bin/init') --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088758; cv=none; d=zohomail.com; s=zohoarc; b=K5yK9a1wh391FhUqDTbPXuWWMnwhxCO6GFBJFNeyWDRWCIW9oCl7BVGpE6anIPyHCT/lE8GrpEAQNhwYHua4On5EzKuqsKEL54cQPWibRd4sx2ongXKjEatVNWmMn6IW/mBeaxvhM5VcXjaS35Wfli3f7iJRNqRN6dElFZWKP18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088758; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ua66Po+S3fTZ1GQQHmrF+D0YxmGxJFJ7sLOjFuo6+sc=; b=hWbZbB2RMSd/EKWkqAfdt4S2Py4jWSJmDifmL/BG4GzfF/ZXqTlOVyIpL6BNGeqWBd1fWZMUA6IdcSdzdNjkQFgTSu+RiUX6iz/y2BBXNfYXyw7zXNQziIzRLekKqPYSv+t528wMY82ao3wHKy3iUmAesHVoe5IjjqqEDva8dhg= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088758923677.82982252122; Thu, 21 May 2020 12:19:18 -0700 (PDT) Received: from localhost ([::1]:47554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqir-0008Ip-G6 for importer@patchew.org; Thu, 21 May 2020 15:19:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqfy-0001xY-AB for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:18 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:34834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqfx-0000Oi-He for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:18 -0400 Received: by mail-wm1-x32b.google.com with SMTP id n5so7564593wmd.0 for ; Thu, 21 May 2020 12:16:17 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Ua66Po+S3fTZ1GQQHmrF+D0YxmGxJFJ7sLOjFuo6+sc=; b=sMJNYReZlzbKibgOo2Z8Lph/UOTxHaVxxJ2/lACoK8SBd+HSqYqp+fAXXoZ6TqU1AI 9NxDcS8CGkYfYJ/OvWPCV5buutAwYGVJyYYzwnTHlkRJO5N/KN18+v55rPQIeWDPlPTS K4L44uzuoxoKNYHm7Bc9bwAyMfUsv0N/OVU3kgb/nClgc5TlpvtrgKxFusCZQBKvdwfV QoOGRR0RRK9vq8Jp9DAtVHKgN/tPd6PmOi/OCEVj971gWHCMsDK/1vOxtNy4PR3k19hU FLDyssr5Fyb9cy59wIDXI96JNwwObG5+e/PsL5EZYs1yXnmbv9RZc684gnZBl6ddkSEw G8bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ua66Po+S3fTZ1GQQHmrF+D0YxmGxJFJ7sLOjFuo6+sc=; b=NjyDNEJIYOjXVYZsaGvZbLvjA/Hb9lokaKEc9oP5H+1Tz5xPXCLHhvBfDsEtEd51pk 4en6VDSqrk3s9aayfK4TYIi3BksnRSXs9t9n1+f9gh9q5G8e1WS3FoSo8tu+SfMTweNg b5GIKZo71OtkaRd40P5599z6Kw0zW1nnDEtFVodP6kcYRbNpJ6BzPKEZ5U4BF8eSNuce eagzrNzhWN3keWjG1wU72WvhLkqP49e1TBkvDa2v7b4IOZsUEjocYhSaVXmcgF2ZMC+m 3EYlKb1jOdjiWaHac4oQegqw9N/lFukPWlcuRF5Qy1Blm+g+ZZrPxL41sFmBlvJxCVfT 93Kw== X-Gm-Message-State: AOAM533o48egFe+kvYQn72V2yZCu+zO2QTvlctOnKQqZ3l/vQFDAZKhk dV2Wycv9MpDYT45AxOQ6q0lafSUCQuV48Q== X-Google-Smtp-Source: ABdhPJyJyFI61x2npqm85JPSCyQELmgJsFseoLdtXx7T0Je1SB7mxE/WWzfPB8hIPSkkiUKvUEhR4g== X-Received: by 2002:a1c:5502:: with SMTP id j2mr10776930wmb.56.1590088575861; Thu, 21 May 2020 12:16:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/29] docs/system: Add 'Arm' to the Integrator/CP document title Date: Thu, 21 May 2020 20:15:43 +0100 Message-Id: <20200521191610.10941-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Add 'Arm' to the Integrator/CP document title, for consistency with the titling of the other documentation of Arm devboard models (versatile, realview). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Benn=C3=A9e Message-id: 20200507151819.28444-2-peter.maydell@linaro.org --- docs/system/arm/integratorcp.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/system/arm/integratorcp.rst b/docs/system/arm/integratorc= p.rst index e6f050f602b..594438008e4 100644 --- a/docs/system/arm/integratorcp.rst +++ b/docs/system/arm/integratorcp.rst @@ -1,5 +1,5 @@ -Integrator/CP (``integratorcp``) -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D +Arm Integrator/CP (``integratorcp``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The Arm Integrator/CP board is emulated with the following devices: =20 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088659; cv=none; d=zohomail.com; s=zohoarc; b=LKCZ8CQkXxdHZPQFupofAcS/T5H2xG/pHcdnGLsqF3ZKoGb6mg1mdMpyNw4AFdODdm/iylnY/czQE6ujOaL1AXGIhngxtNw3OxubzKNpCRS9YXRVEAS/1YkJxejH+ymeHDebm2gPS10FCRHWHatRoY9N1LAAy/rnvxG6c/8KIBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088659; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u7KCiGuOgAZ7UqunOZf69lXCjQ+SrqjjB07ACAIR9HQ=; b=CVy+FskemfsL6FxN5Pb9/+u7bVPZLjgdGWRfa/cqfb1yZZI+eK6MyQunlEddySvLJlLs/zSWktWaZiynLHHVvSS+V5/y6K0GktYHV2kM+6YpsTXPQ4BQn3TY9v5Ajq1YIpbH0D36FBfmnvoCv+A5xLnlM1UFlCpUCmgsaZryctE= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088659367490.62109163978187; Thu, 21 May 2020 12:17:39 -0700 (PDT) Received: from localhost ([::1]:39552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqhF-0004LR-O2 for importer@patchew.org; Thu, 21 May 2020 15:17:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqfz-0001y1-AO for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:19 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:40848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqfy-0000Ou-H2 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:19 -0400 Received: by mail-wm1-x32c.google.com with SMTP id n18so7557819wmj.5 for ; Thu, 21 May 2020 12:16:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=u7KCiGuOgAZ7UqunOZf69lXCjQ+SrqjjB07ACAIR9HQ=; b=Nhp2jQQmmXApv1pE5D9w1AtHZ4YqZL/UHM+CikIQ2a49cZaCvxBLcGJKzNw5qbwaFt +tov3wEl35c4dj/KyVViEh4OzRGhJs4JH8X7Unjg2qii1MOKlb2bYsm3XZM7fj0Z76un cgfh1FNJCN/FDOm5oNpNFOxp3sEd8gGwrZFHtvCjVWt354ktCuah9gnkoS/EaP7YaG14 2LwOH3yMW0ykFDMpRrxKUNjk6lKJUsZYWALNrnOnT3oD5cq+BHl2pa+KLv24Eop3AG9q kcBeyTrCc92zABMzDLFW1U6eoPwYDpkGv01pGV/1dt431U+2vMSxbj6oYUP52KPZyJw7 gfQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u7KCiGuOgAZ7UqunOZf69lXCjQ+SrqjjB07ACAIR9HQ=; b=seAMZXGkJJ7opREsaMg4uqnfz08eaD8GYUcyFYRPuA+s7sX7ln1QnDfOQiYaZGp2+b ru0V4805A4rjFzneCAU1crAE/QPnlSzVCPhaYIzeNfoKchzwuUzVBfTBjqmWKmEg7G2B q7Hz5yjtMMTDaW/FtgCTGH1KSQMCuQcMjuacxtS9vpevZTdHKh6n46qnQqenUKbRMh/e tmol9ChL5+cC5GohSHdH9wBvRTz/PQqbJeH6v2JPaRTTFGLsoeEFj7rMIf2KkLwkUY61 H360WZgLLLNHwq6vGY3kgV17qxBfQiOUv5xO3Rh5nKQaLLLaR0iW0BUn5bCx3zpd1wlk pDOg== X-Gm-Message-State: AOAM530+Yq6au7ZmYJT8O1qvuv+/dM8/QXuXFl+450rXe2at4Y3IsFmP 3lzoy6Jp/RQ5LU3zdrBC/ySTaOJeYTnQtQ== X-Google-Smtp-Source: ABdhPJwdsXEOAxv/+gy5DyrvZCOxJ6gANqcTvUPZMbarEXR3FTNkDRPU2BGDnNGobgX7YKwbhSnoog== X-Received: by 2002:a1c:1b4d:: with SMTP id b74mr10059710wmb.123.1590088576824; Thu, 21 May 2020 12:16:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/29] docs/system: Sort Arm board index into alphabetical order Date: Thu, 21 May 2020 20:15:44 +0100 Message-Id: <20200521191610.10941-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Sort the board index into alphabetical order. (Note that we need to sort alphabetically by the title text of each file, which isn't the same ordering as sorting by the filename.) Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Benn=C3=A9e Message-id: 20200507151819.28444-3-peter.maydell@linaro.org --- docs/system/target-arm.rst | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index 324e2af1cbc..d459efb3d20 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -67,19 +67,24 @@ Unfortunately many of the Arm boards QEMU supports are = currently undocumented; you can get a complete list by running ``qemu-system-aarch64 --machine help``. =20 +.. + This table of contents should be kept sorted alphabetically + by the title text of each file, which isn't the same ordering + as an alphabetical sort by filename. + .. toctree:: :maxdepth: 1 =20 arm/integratorcp - arm/versatile arm/realview - arm/xscale - arm/palm - arm/nseries - arm/stellaris + arm/versatile arm/musicpal - arm/sx1 + arm/nseries arm/orangepi + arm/palm + arm/xscale + arm/sx1 + arm/stellaris =20 Arm CPU features =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088659; cv=none; d=zohomail.com; s=zohoarc; b=hKGg9hmfcUGRn9W3ScPCdcm1PzSteZ/cnwuIwKEAfTBksv+lhSieBqwFzPcV/hjBVKRBVrIexWGefWxRfTn94UmU8wQqy46UHnFXXf2o5ciOC0Bo99gNApPLoeQ3tfSdR1SqYNWiB2sGMqgxY0bomAMknGq6HaGneKEpmlFR/Vc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088659; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CcIe3RQsnYbg8g+NInxK1LG4Wd7si9pCUTbnuZRw2Kg=; b=ksHdNzJdenq7NxH4I1ZW+PU3aO+JSsenAusBegNIdt8pPggmicJrs0DHyGxd5PTK2qjay/Poon1tpiit7yoNzVjBSKaYkCjK4zfk+0Qo1Rgfu1i2UPlIQZHbht01RH59T+j8mH4JqMLEQqNWIn47JP+Q6LMAHXd9SwJB/YLeKeg= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088659993844.60511408821; Thu, 21 May 2020 12:17:39 -0700 (PDT) Received: from localhost ([::1]:39668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqhG-0004PD-QI for importer@patchew.org; Thu, 21 May 2020 15:17:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg1-00021K-Ba for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:21 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:43146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg0-0000P9-89 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:21 -0400 Received: by mail-wr1-x443.google.com with SMTP id i15so7731385wrx.10 for ; Thu, 21 May 2020 12:16:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CcIe3RQsnYbg8g+NInxK1LG4Wd7si9pCUTbnuZRw2Kg=; b=ve643H7V7zDSjRdar8kSOyH7SUt/JzrJN8nfsYVm8H5yIsVCL7xC4jeog31S2bRNqb jBqdMT4qlJ4VY9rga7RP/NTyRTjGwwKGuZ9wQ9w3KzDwKc6ctsF+6rvn4AHrn8EJTcVh 2zXq7DUt3MrgsYMmBdzbcF5htSo9R6s+E56Gx1oRA9GHAMwByqIZSs1TVP8E7nJLP3Sy mRA2nuXxqzd66JtPewzMpuDqcM4UyxS0SZ0idB++7nKDx3qEk4j3hGGzxcg3fqc6jQsl BU48clPzL301O889DYV+DPWvD7eN9+WjuZXZyqNuyTM7F0gQUrVke+6jtUeFqk3EBNvp GO7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CcIe3RQsnYbg8g+NInxK1LG4Wd7si9pCUTbnuZRw2Kg=; b=f8MP36Uy38APvAu7jba8fd6ya46LliHjWhBn4ktNMxbVmzif3zV8Lz2oHOoGo4fyGl vaiQnoQNQJYGJnsJxFi6Qj41oua5j0w972MYdvlWfkJ7uitoX9hl8N01gut8xunO9Ihh wsikk875ABkOiYWGxbmidDKttxPPrNFgBatiEd46iMVNAWn/FLdAYw3eN2Q0gEywAZEL hLEK7csZt4fBYt93yFKL6cKXSHx2Rtrh6yFUyZf4GTvpgaAKL7cL5iKodNgKKwXUz4n7 rRnyO+200nvju0wA8ebAXEccsz1adNfYcVSr721nmzSUtDtBo1PEfqMIBuVjccVbaVtm 9jnw== X-Gm-Message-State: AOAM533WsJhs6nNcjQubBh4+P4qcAfoC4n/dWopzrh+ZdaR/QvIZ1g09 tJSOHJeJss9ydDDAzWA9M3odmfnodWkMwA== X-Google-Smtp-Source: ABdhPJyOxlZbKJ6UhIi86q3LQVZK4qrt0A5FPf7UIhAUWbxjA3JWATjUcfzzbN/8ZEII85FRw94GSg== X-Received: by 2002:adf:f601:: with SMTP id t1mr87334wrp.207.1590088578531; Thu, 21 May 2020 12:16:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/29] docs/system: Document Arm Versatile Express boards Date: Thu, 21 May 2020 20:15:45 +0100 Message-Id: <20200521191610.10941-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::443; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Provide a minimal documentation of the Versatile Express boards (vexpress-a9, vexpress-a15). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Benn=C3=A9e Message-id: 20200507151819.28444-4-peter.maydell@linaro.org --- docs/system/arm/vexpress.rst | 60 ++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 62 insertions(+) create mode 100644 docs/system/arm/vexpress.rst diff --git a/docs/system/arm/vexpress.rst b/docs/system/arm/vexpress.rst new file mode 100644 index 00000000000..7f1bcbef078 --- /dev/null +++ b/docs/system/arm/vexpress.rst @@ -0,0 +1,60 @@ +Arm Versatile Express boards (``vexpress-a9``, ``vexpress-a15``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +QEMU models two variants of the Arm Versatile Express development +board family: + +- ``vexpress-a9`` models the combination of the Versatile Express + motherboard and the CoreTile Express A9x4 daughterboard +- ``vexpress-a15`` models the combination of the Versatile Express + motherboard and the CoreTile Express A15x2 daughterboard + +Note that as this hardware does not have PCI, IDE or SCSI, +the only available storage option is emulated SD card. + +Implemented devices: + +- PL041 audio +- PL181 SD controller +- PL050 keyboard and mouse +- PL011 UARTs +- SP804 timers +- I2C controller +- PL031 RTC +- PL111 LCD display controller +- Flash memory +- LAN9118 ethernet + +Unimplemented devices: + +- SP810 system control block +- PCI-express +- USB controller (Philips ISP1761) +- Local DAP ROM +- CoreSight interfaces +- PL301 AXI interconnect +- SCC +- System counter +- HDLCD controller (``vexpress-a15``) +- SP805 watchdog +- PL341 dynamic memory controller +- DMA330 DMA controller +- PL354 static memory controller +- BP147 TrustZone Protection Controller +- TrustZone Address Space Controller + +Other differences between the hardware and the QEMU model: + +- QEMU will default to creating one CPU unless you pass a different + ``-smp`` argument +- QEMU allows the amount of RAM provided to be specified with the + ``-m`` argument +- QEMU defaults to providing a CPU which does not provide either + TrustZone or the Virtualization Extensions: if you want these you + must enable them with ``-machine secure=3Don`` and ``-machine + virtualization=3Don`` +- QEMU provides 4 virtio-mmio virtio transports; these start at + address ``0x10013000`` for ``vexpress-a9`` and at ``0x1c130000`` for + ``vexpress-a15``, and have IRQs from 40 upwards. If a dtb is + provided on the command line then QEMU will edit it to include + suitable entries describing these transports for the guest. diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index d459efb3d20..1c759aa1a08 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -78,6 +78,7 @@ undocumented; you can get a complete list by running arm/integratorcp arm/realview arm/versatile + arm/vexpress arm/musicpal arm/nseries arm/orangepi diff --git a/MAINTAINERS b/MAINTAINERS index 1e006c98fab..6a9280c1b03 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -828,6 +828,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: hw/arm/vexpress.c +F: docs/system/arm/vexpress.rst =20 Versatile PB M: Peter Maydell --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088901; cv=none; d=zohomail.com; s=zohoarc; b=lc0rcEjLNCky1y9VjYPQsM7getbEoCOjen676C1BZHlXASQjOce1Pzec35lLuUPSkc9YYl1CpendZLAKEKZi+zhgscvZLQE6Dqv4DU7tqg242b8mH1HPgooX65fRH4X4z50N+Lnf1WO1Ox8EA+KSFyOgOtdw+K0uL7KM+0DSF1M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088901; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IaZtb9mzc1u3nnOp3gW0dG4QSP8UXW5anJbY4Gmv+gE=; b=ltIYwKBjpq7cmY1ddjJFRO6LT/ebCFgsBG6usbwao8TZlfSz0ThIKDKSyIX17wpFn/YCMQnKr4lvL81aSEl5JdSepmKcZ5L94he/iASn95zKpIBFnVdPACpbLkVhkpLN01WzG1Tx9p0erTeaN4dM8tCxQVpL+NDiBT85SSMP1qE= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088901495339.0930807052449; Thu, 21 May 2020 12:21:41 -0700 (PDT) Received: from localhost ([::1]:56044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqlA-0003Xs-2L for importer@patchew.org; Thu, 21 May 2020 15:21:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg2-00022j-6O for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:22 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:35787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg1-0000PG-7q for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:21 -0400 Received: by mail-wr1-x42b.google.com with SMTP id x14so2390693wrp.2 for ; Thu, 21 May 2020 12:16:20 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IaZtb9mzc1u3nnOp3gW0dG4QSP8UXW5anJbY4Gmv+gE=; b=mPOd8aCVeIw3BIrA8COwOpbC65xMtDwDGDltpBo+xW+4OzHn6PhYcHTa62esAVAmOC 6xhiLhbk8WcE+Zbwkb+wqk6cJ5TfQ+GL6mJF3P1JELEoj8MCUPNUR7x4Op2wKuMSLCvQ 20afZg4sSmBFeLkh7EOl2eOlk9PBAHtOBJyufkcChjtI/Ovks4PxIRFLKHwKNhwfc3Ey Gf41X2qi6FzKl68gAzU2/giJx1VPM97qCtkV/xywLqZdb1Jh5nz1n+GOyqlRT0LQsXVR brrOA3JT9B3FVSSA4umA3yZcE6hDDBWuZzWJPMWybRRQJX41yavg7fPbf0DlMO5hMZwO 6AZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IaZtb9mzc1u3nnOp3gW0dG4QSP8UXW5anJbY4Gmv+gE=; b=Is/vUCyNdPl7B/91N4Xda00v6/OJKb/hkDixd2cluo3bni9BmAptOj07UlM2/4jN9d oDzKlb3Ewa4OGg6unlpZfvOWBaWRNcOiHq94mlu8KUJ6lNvGXCFyCIkKycCBCbwM/ZBP 2PmF7FF9IR/AvGwsP1f7PbP+3sddyViIk2gakcO6db9TaUpbZ7q+wkBrd4y0kno4Z52f kEq2xdaPAZo41+CyFQ0B2qTvdzcWymgLEFs+8w8NF+aphPVVmFIEXVXIgMy5kaZFSOSm luIuhJgqQhr6+WtKd/VS7wExskHGeVL+qum5MxfaVMk0IX6bTcCp7V6mpvw06eUUdl// v97g== X-Gm-Message-State: AOAM5308i9T/jh6/SuowzTwQnuGZGQ7jOJL/WUrVgueJKctJg/8UhW/8 /SaB3Ho4mKObF0TJq1QcnEzXwV8/SP2vSQ== X-Google-Smtp-Source: ABdhPJyAP96vlXO72zIBHOY96Mn9o7Jq+xx7dCbRbmw8fiwouafysnweMzAC5BB1bxWrCp1JgJ52kA== X-Received: by 2002:adf:e90b:: with SMTP id f11mr95957wrm.364.1590088579534; Thu, 21 May 2020 12:16:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/29] docs/system: Document the various MPS2 models Date: Thu, 21 May 2020 20:15:46 +0100 Message-Id: <20200521191610.10941-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Add basic documentation of the MPS2 board models. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Benn=C3=A9e Message-id: 20200507151819.28444-5-peter.maydell@linaro.org --- docs/system/arm/mps2.rst | 29 +++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 31 insertions(+) create mode 100644 docs/system/arm/mps2.rst diff --git a/docs/system/arm/mps2.rst b/docs/system/arm/mps2.rst new file mode 100644 index 00000000000..3a98cb59b0d --- /dev/null +++ b/docs/system/arm/mps2.rst @@ -0,0 +1,29 @@ +Arm MPS2 boards (``mps2-an385``, ``mps2-an505``, ``mps2-an511``, ``mps2-an= 521``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D + +These board models all use Arm M-profile CPUs. + +The Arm MPS2 and MPS2+ dev boards are FPGA based (the 2+ has a bigger +FPGA but is otherwise the same as the 2). Since the CPU itself +and most of the devices are in the FPGA, the details of the board +as seen by the guest depend significantly on the FPGA image. + +QEMU models the following FPGA images: + +``mps2-an385`` + Cortex-M3 as documented in ARM Application Note AN385 +``mps2-an511`` + Cortex-M3 'DesignStart' as documented in AN511 +``mps2-an505`` + Cortex-M33 as documented in ARM Application Note AN505 +``mps2-an521`` + Dual Cortex-M33 as documented in Application Note AN521 + +Differences between QEMU and real hardware: + +- AN385 remapping of low 16K of memory to either ZBT SSRAM1 or to + block RAM is unimplemented (QEMU always maps this to ZBT SSRAM1, as + if zbt_boot_ctrl is always zero) +- QEMU provides a LAN9118 ethernet rather than LAN9220; the only guest + visible difference is that the LAN9118 doesn't support checksum + offloading diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index 1c759aa1a08..f2d9366e9b4 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -76,6 +76,7 @@ undocumented; you can get a complete list by running :maxdepth: 1 =20 arm/integratorcp + arm/mps2 arm/realview arm/versatile arm/vexpress diff --git a/MAINTAINERS b/MAINTAINERS index 6a9280c1b03..520a7b74f28 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -701,6 +701,7 @@ F: hw/misc/armsse-cpuid.c F: include/hw/misc/armsse-cpuid.h F: hw/misc/armsse-mhu.c F: include/hw/misc/armsse-mhu.h +F: docs/system/arm/mps2.rst =20 Musca M: Peter Maydell --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088823; cv=none; d=zohomail.com; s=zohoarc; b=kCEMqlgpf5LoE2zmhV3WfMYA17D62dw1HrnaZx0Impg+NFj/NaDiRfTOIi/rkBiotU4xH4Qv0F7+JzQ9m2JNnrfKGHeeD8p1J7rKSgjn9yxw48SsW7GNq94woHEyxDM75F/dzwnpVx+CH0W4Z5vWSXkFEHnuwP1uuGMC8WfZWh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088823; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RBS3/dvUvRdquBsGTxU/Sl3WvtmMy3/3XWW/lkBbmEE=; b=Jh8v4oS+PAYRhBNeON6uQAIk5kjSiDxBLEOLSWuX0FOAg+5oJzS5I37cm3Vcayzkh8/eBkEMShHDajreqBSk0lHIvTFkN9UxpWqX6IfsEu4JRPlGx7OuLcwiL5WaSd2SL91cqoUfeLLphtw+nuK1IhqWWGyOpgFCvDytefB3Nec= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088823446779.8678263835083; Thu, 21 May 2020 12:20:23 -0700 (PDT) Received: from localhost ([::1]:51360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqju-0001Qk-36 for importer@patchew.org; Thu, 21 May 2020 15:20:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg3-00025e-HV for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:23 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:41492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg2-0000PS-F0 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:23 -0400 Received: by mail-wr1-x433.google.com with SMTP id h17so7746202wrc.8 for ; Thu, 21 May 2020 12:16:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RBS3/dvUvRdquBsGTxU/Sl3WvtmMy3/3XWW/lkBbmEE=; b=LRBl0Fovz0NCnQsX2tjh08NqP+bjhuTdi3UsTZoNZ03pYdCqWajOKhEtDiG2QHOvD2 Emj/zaBcMz2f9/WloIrMeS/Go6dV+aEmGAHXBuvKCGbMq9GWDbp27c8Rth3QAyafevFc a27J3fXQHV8tjFvTH3IrZry7yoVu7TLLBwxfMGWmYgI34gqzi/KLeuBK7eCylYVBTOHK k4dXSUohPOe9GzNaTwbFC8IaVzPsyWAPJPme9MgqETLWCKBe68aDvHW1gZ9XEknpDVZt 4gRobf1RMQQ6FaA69xNIqibZHI20CObq7S5sNBXO3MoL9nI3jMaw3QI6R+Oa4g5UYdv/ bVgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RBS3/dvUvRdquBsGTxU/Sl3WvtmMy3/3XWW/lkBbmEE=; b=LYXLP1xqIt54CR+qUBdz+OP2TwNyKQFA0Y5AuNv5+WTPKyIxABmxqLUhRrVIeKl/zv fnMl98536r9JGPU/10VZ1WJBXy8gFAfVt8bT81QVR5UCajhpyOhXeqlz9Z7QNn3xHShF 8wic663kSQymoItbxkmXwNACWF8QFAsBlDP/LTn0L62GcwCowfHsRIzqCIRyy2piYDHf lBH7zcUPVZ1ZX98kR84UiewNXbfjHsraNaFXnATF4QGPoEV47rLYevOeDksa1erdbgzO PZt/6z0F57C7QLkP6wIpO/nQ1kP0mocgK/m2dXqVkVTc9e9hHfiwlm1j2SdYFuwEZfp2 lJ9A== X-Gm-Message-State: AOAM531DW7Bm9RW/eYLMTJ1aPmfJTLyh6wh+GroxtdQWeEY6mOXv0mYX a9CHQ7BfulZYDvg7xv5FyGPeEy4Bb0QVcw== X-Google-Smtp-Source: ABdhPJyP17+fSuguiwy8AArUB4jk3M6awWAC3TRkeBguPqIXGr+Q5VXeQOZlTk0gerBLsx5xxkn0hg== X-Received: by 2002:adf:fccd:: with SMTP id f13mr100949wrs.386.1590088580725; Thu, 21 May 2020 12:16:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/29] docs/system: Document Musca boards Date: Thu, 21 May 2020 20:15:47 +0100 Message-Id: <20200521191610.10941-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Provide a minimal documentation of the Musca boards. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Reviewed-by: Alex Benn=C3=A9e Message-id: 20200507151819.28444-6-peter.maydell@linaro.org --- docs/system/arm/musca.rst | 31 +++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 33 insertions(+) create mode 100644 docs/system/arm/musca.rst diff --git a/docs/system/arm/musca.rst b/docs/system/arm/musca.rst new file mode 100644 index 00000000000..81e3dc92194 --- /dev/null +++ b/docs/system/arm/musca.rst @@ -0,0 +1,31 @@ +Arm Musca boards (``musca-a``, ``musca-b1``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The Arm Musca development boards are a reference implementation +of a system using the SSE-200 Subsystem for Embedded. They are +dual Cortex-M33 systems. + +QEMU provides models of the A and B1 variants of this board. + +Unimplemented devices: + +- SPI +- |I2C| +- |I2S| +- PWM +- QSPI +- Timer +- SCC +- GPIO +- eFlash +- MHU +- PVT +- SDIO +- CryptoCell + +Note that (like the real hardware) the Musca-A machine is +asymmetric: CPU 0 does not have the FPU or DSP extensions, +but CPU 1 does. Also like the real hardware, the memory maps +for the A and B1 variants differ significantly, so guest +software must be built for the right variant. + diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index f2d9366e9b4..dce384cb0e3 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -77,6 +77,7 @@ undocumented; you can get a complete list by running =20 arm/integratorcp arm/mps2 + arm/musca arm/realview arm/versatile arm/vexpress diff --git a/MAINTAINERS b/MAINTAINERS index 520a7b74f28..023f48d3eaa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -708,6 +708,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: hw/arm/musca.c +F: docs/system/arm/musca.rst =20 Musicpal M: Jan Kiszka --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088776; cv=none; d=zohomail.com; s=zohoarc; b=GCFRc66pta01cG4qsaiklVRCDdtLnG8UDIihS/75SEnGJbqaYN1jxp/to173Q+sroAp4wZMhXeRRdR0OgfRbH6URx/zqgrDAPkCeFmAwPIgqWnYTxxK57Eu9x/EqjxVZQQ7GGw/51C4bOJ3N3Elq8++Bz7eWvZaySw3ldbJCz+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088776; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Loi0hc4iYGl2SyK0g+pxvj1MN6OhO1THWv4v9RyjhY0=; b=OvEHZu9PFR/U1c+jcGYdwHfU8XEwiMnYt45s3r2Emoo5VytqkmmZlrhVukGt5By6UIL3g2tuSpsWxV9UenNS8oi68JSW2AMKYkJ+4Y0ofC+uCDjjLQt4+0VbpqUOVWsHYLLjHfpKMyZ0GikWpLkC1EObDCvvnslkY3CAN62b9gM= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088776367507.4616927880181; Thu, 21 May 2020 12:19:36 -0700 (PDT) Received: from localhost ([::1]:48082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqj9-0008Vd-39 for importer@patchew.org; Thu, 21 May 2020 15:19:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg4-00028M-JH for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:24 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg3-0000PZ-Bs for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:24 -0400 Received: by mail-wr1-x441.google.com with SMTP id k13so7795130wrx.3 for ; Thu, 21 May 2020 12:16:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Loi0hc4iYGl2SyK0g+pxvj1MN6OhO1THWv4v9RyjhY0=; b=Fc68X0k4EGip3LE+FEvBpbmykkOCQD5j1w2EoV9dJyUwnDrDW4YJdU+CCyTCFT13qz 1cp+deatGIrTOyXBser0iqsht4O/PxJNy5DGUfSWijzagCdk/J4S/hpaRvEU4wI/mgN9 +M8OHmJZvliDyPu8SbhO/qfObw/K9AFjbGQPSN29CrqsHlwfjZ73sNgs4aUDFMMuWMqg /pYu/GwgimiOp7CBvBv/9GdMTg4XG9+fZ2mrrFNeQ7jtYI0/faVfET25BY0tTNYkGYZb z5F9VvpiAknqTl7Mxb0iTp2TX5FflMRHWEUwD9ceiVYZIo7i5VMgvHmLWlewnazoPmEx boAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Loi0hc4iYGl2SyK0g+pxvj1MN6OhO1THWv4v9RyjhY0=; b=kmC1vas30m3Cy10yfntL8CJIYjAGrAR28TNV8KNcW46wHg3XwBbsPM+f4UIYMSD9Kz VTxT66n3TX31PbMoHab21bFIxsfmQfrqmhEkoUqoXwE8ONx2CKmS/jsa16tP+hD7sYfc 00dHIbah9p9fYuqxwbF+D8qBUjX+USEtlO/ooWSRtPkWpVnz7dkjKjAbQ6nmSR/E8OxV RNxoDWFKshRUFMdkFy4zeIec7ZhSlYg7gaP8yJgchub3EX0yB+fjGw6QNjmwtso8Iq/d en4/vgI3jnnP3egBHXhf+b8FZGdjIhbsse4AxHYYbrBBGb3UTBBVQFvf35XDhvL3JVnf Avlg== X-Gm-Message-State: AOAM532My2t2SBM5jIeCffreHntkQQLqgShK0QdcRplVYMnDovsJ1KON AFu9N6JUHxSoMXF+uArrl0TJuJH09Efi9A== X-Google-Smtp-Source: ABdhPJy40mmiW07Zae8LZmTWCuhmUGpMa/4emkoh7Xr8YDMfl2TwdVWSKppk/N32BXeB64jgV/3qmQ== X-Received: by 2002:a5d:6401:: with SMTP id z1mr115794wru.226.1590088581598; Thu, 21 May 2020 12:16:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/29] linux-user/arm: BKPT should cause SIGTRAP, not be a syscall Date: Thu, 21 May 2020 20:15:48 +0100 Message-Id: <20200521191610.10941-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) In linux-user/arm/cpu-loop.c we incorrectly treat EXCP_BKPT similarly to EXCP_SWI, which means that if the guest executes a BKPT insn then QEMU will perform a syscall for it (which syscall depends on what value happens to be in r7...). The correct behaviour is that the guest process should take a SIGTRAP. This code has been like this (more or less) since commit 06c949e62a098f in 2006 which added BKPT in the first place. This is probably because at the time the same code path was used to handle both Linux syscalls and semihosting calls, and (on M profile) BKPT with a suitable magic number is used for semihosting calls. But these days we've moved handling of semihosting out to an entirely different codepath, so we can fix this bug by simply removing this handling of EXCP_BKPT and instead making it deliver a SIGTRAP like EXCP_DEBUG (as we do already on aarch64). Reported-by: Reviewed-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell Message-id: 20200420212206.12776-2-peter.maydell@linaro.org Fixes: https://bugs.launchpad.net/qemu/+bug/1873898 Signed-off-by: Peter Maydell --- linux-user/arm/cpu_loop.c | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index cf618daa1ca..82d0dd3c312 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -295,32 +295,17 @@ void cpu_loop(CPUARMState *env) } break; case EXCP_SWI: - case EXCP_BKPT: { env->eabi =3D 1; /* system call */ - if (trapnr =3D=3D EXCP_BKPT) { - if (env->thumb) { - /* FIXME - what to do if get_user() fails? */ - get_user_code_u16(insn, env->regs[15], env); - n =3D insn & 0xff; - env->regs[15] +=3D 2; - } else { - /* FIXME - what to do if get_user() fails? */ - get_user_code_u32(insn, env->regs[15], env); - n =3D (insn & 0xf) | ((insn >> 4) & 0xff0); - env->regs[15] +=3D 4; - } + if (env->thumb) { + /* FIXME - what to do if get_user() fails? */ + get_user_code_u16(insn, env->regs[15] - 2, env); + n =3D insn & 0xff; } else { - if (env->thumb) { - /* FIXME - what to do if get_user() fails? */ - get_user_code_u16(insn, env->regs[15] - 2, env); - n =3D insn & 0xff; - } else { - /* FIXME - what to do if get_user() fails? */ - get_user_code_u32(insn, env->regs[15] - 4, env); - n =3D insn & 0xffffff; - } + /* FIXME - what to do if get_user() fails? */ + get_user_code_u32(insn, env->regs[15] - 4, env); + n =3D insn & 0xffffff; } =20 if (n =3D=3D ARM_NR_cacheflush) { @@ -396,6 +381,7 @@ void cpu_loop(CPUARMState *env) } break; case EXCP_DEBUG: + case EXCP_BKPT: excp_debug: info.si_signo =3D TARGET_SIGTRAP; info.si_errno =3D 0; --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088945; cv=none; d=zohomail.com; s=zohoarc; b=DS2I+UkrrdLwJJdyGJryQss8NRNwJse/KUU0T4tAyuxHkAQ3BCemu/8FKd3llzEM4F4MK1DSLJEpSJry2drw9ALrz6BCPDcIvSfoNr2QUS93FgiO6WgHU0sVQk0CHLvs0WOsuSUe6f/1Rkz6tYDfbbbLO1n/eE+BoPjfVnxpG4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088945; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+UWd65MNaXy/OQDuLVzrQNt/oF82AvY7dMV37Xy5Rco=; b=c2/KM/EaDaSeWhznxZ9EjJ4tC81PaDMPZ+xn/rUuoFQusPmJMShF9nvUr+l6ggc61rLTslyMOXMQUo7IKCVvvUyoneahMzLr6HfkpqBB2MbxKDTnlOIznhU/wii5C9+8VCJrJlgsPvZvOijk1wqMPEoJxeU9lNvu9LEndP5o6iA= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15900889451341016.3237307571236; Thu, 21 May 2020 12:22:25 -0700 (PDT) Received: from localhost ([::1]:59906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqlr-0005hx-Tn for importer@patchew.org; Thu, 21 May 2020 15:22:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg5-0002AO-EQ for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:25 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg4-0000Pf-DU for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:25 -0400 Received: by mail-wm1-x344.google.com with SMTP id h4so6505528wmb.4 for ; Thu, 21 May 2020 12:16:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+UWd65MNaXy/OQDuLVzrQNt/oF82AvY7dMV37Xy5Rco=; b=mau7wHTlx20GUrMORsDr55dfX3PsdozLoDNwGmuKSpIVgMI6rSKWujLHj8V4If3/pr IXuvCDcShhjCQyTqTLaXr6uU324nwO/Sq+0z2jyop821BRi7Lf1tVYvvRzvStpagy7/T 1a8Vbxa9awEAHDHOEhiEDBcWAEHx3wmC8O24DycyTgBOzygMHhrDZubAiW+GGM0F8rJX oVlAe2vziAftYz0NeFkw5bL3yFxKuW8UHoLuRaCSzQH+ZTxTeep/s9Tv2U0kceg758Mn 72TO9kr1EaLrH4//uHE/v9TObtQBvn+onQWTU5/2sK4ubLIDwcHWy5yA1tf51cgs53TV tISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+UWd65MNaXy/OQDuLVzrQNt/oF82AvY7dMV37Xy5Rco=; b=TwVeLWOHblrnm+o4fMrNHjzKzY3TQTvgWus+wWkhxl/AwoR9l3CuOOQigK+dA4IQCV fOspE/W/nAxk1+GFoajLxcbN12YG7zRKSDT67sip/3Dr14cpSb4WEk1JDBly0f9Z8c0g GFrWJqIYgaeDl3Pq/Ws6Gj6yRLJFprEwHTEAKbh8yhEmdBZF8CBBH1DORBle9mE2FBst sf/5V2ciBhbrejQ+bMwOE+DBWIzvIC+D+WcWy8Wr9JKgNSQKOpwIaRXY8gOVIlP05yHM aTatGlOg2dkAxfbb7Mmddz6CKPckopJYcXh9VRAe2EaXB/+JjsnXgdnXPJVNw5OznlQh ATbA== X-Gm-Message-State: AOAM531vw/1N8oZnRrwNsTMdGnzAOgxY1pgDtgJmkiOhaIANfqWMzh5P okaCXhKQbgX+V9/4N6EeX8gpdqVZGiTkmg== X-Google-Smtp-Source: ABdhPJwBZMV1vohQrSX/qYNWj/lzb5dEOuB2gpZqhnYLi8rJzpomY3lXfpgQxXrGN7MSyzgUHzfROA== X-Received: by 2002:a1c:2dc7:: with SMTP id t190mr9543395wmt.129.1590088582641; Thu, 21 May 2020 12:16:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/29] linux-user/arm: Remove bogus SVC 0xf0002 handling Date: Thu, 21 May 2020 20:15:49 +0100 Message-Id: <20200521191610.10941-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::344; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) We incorrectly treat SVC 0xf0002 as a cacheflush request (which is a NOP for QEMU). This is the wrong syscall number, because in the svc-immediate OABI syscall numbers are all offset by the ARM_SYSCALL_BASE value and so the correct insn is SVC 0x9f0002. (This is handled further down in the code with the other Arm-specific syscalls like NR_breakpoint.) When this code was initially added in commit 6f1f31c069b20611 in 2004, ARM_NR_cacheflush was defined as (ARM_SYSCALL_BASE + 0xf0000 + 2) so the value in the comparison took account of the extra 0x900000 offset. In commit fbb4a2e371f2fa7 in 2008, the ARM_SYSCALL_BASE was removed from the definition of ARM_NR_cacheflush and handling for this group of syscalls was added below the point where we subtract ARM_SYSCALL_BASE from the SVC immediate value. However that commit forgot to remove the now-obsolete earlier handling code. Remove the spurious ARM_NR_cacheflush condition. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Edgar E. Iglesias Message-id: 20200420212206.12776-3-peter.maydell@linaro.org --- linux-user/arm/cpu_loop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 82d0dd3c312..025887d6b86 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -308,9 +308,7 @@ void cpu_loop(CPUARMState *env) n =3D insn & 0xffffff; } =20 - if (n =3D=3D ARM_NR_cacheflush) { - /* nop */ - } else if (n =3D=3D 0 || n >=3D ARM_SYSCALL_BASE || env->t= humb) { + if (n =3D=3D 0 || n >=3D ARM_SYSCALL_BASE || env->thumb) { /* linux syscall */ if (env->thumb || n =3D=3D 0) { n =3D env->regs[7]; --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089003; cv=none; d=zohomail.com; s=zohoarc; b=WeS/sl8nsXwkmhtYHCAFzTZUPgf1gv/zrFDXwlMxcGukZcMzNX6EPHICj2im2I9R7PRAx0n4mVxmaGmrMzTXIEyYGrzzErrXB0hR06OfAspnz9YOlmEh5U1CbgBVAE72sp9Ikrur3PML0UXdmb2gvY0f5duPsz+Tw2Cn4J8k4o0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089003; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SO0tJgJgn/EVNKJE79ekFtYmNOY8AvESSw03LMos9hM=; b=CkZksKE5E6Fv0KdRfSy1v88st1TYstw2mnb3e5zfz/r898twcykE0C8NVSUgssRsNZvkHeGlfo8OH7sa1ajs9DsOkiWNOUOLyx4G9DsPG7/RlQnE6iPk/rEb+4efr6jB4ADyVAAWbSjqfbwggKQa72dVThVPJTGB0+m6Oc75/d0= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089003794289.8713290764058; Thu, 21 May 2020 12:23:23 -0700 (PDT) Received: from localhost ([::1]:36378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqmo-0007bu-9j for importer@patchew.org; Thu, 21 May 2020 15:23:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg6-0002Cq-HF for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:26 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg5-0000Qt-DC for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:26 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so2390848wrp.2 for ; Thu, 21 May 2020 12:16:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=SO0tJgJgn/EVNKJE79ekFtYmNOY8AvESSw03LMos9hM=; b=fzpyOZJLlKmK5Yy561WQO4BU1pOaw0uW4dwrKR88etF5OV4L+0or4c7Y9C/1reZIcQ m8E42WjQ+wtcsVEi5SVPNa0eQMrkVacIGPSWZWGoLrMYss5DxLAmWDUxry0yOdxzhUKJ sAxddE7qPzUTTUINDeccQvk8lxD13mnyxeUeguQkx919rWd5Hljz3g8MAd9TWicmR+a9 6dlXbEMRY52nqPWnlw3FOD/P6KQIDjHQhJGYyJdAntFLZEl5A50X8jeNJ8uJTrAyj3ig BQYFUg86XLeRQnOt++t/w3Is3R2wyFuTnE0MeR8esOJWQ5wMXGsE6rFJmG4wPhBJc02e mm0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SO0tJgJgn/EVNKJE79ekFtYmNOY8AvESSw03LMos9hM=; b=f2Ai+9rq/N1Smto+Hi3FQ2r2m/o99nT+xM28mW1QIu2KizobdZ4S57vX0DDjHtGS70 xtrygQpP0xWaWnS6LM6uvL30UUmVAp3zIyRIWlYhj7sTKERpnwRztpLYsnpJLTEHv0gJ eOc8eDL7bJ1eXMmIE3qxJ4mwQMIN27mCwC9QRE7gChO4gT0i9YyuamIOuHUIbESjlOa3 +gmWS4z9aZEH1uI0xeF8dA/StfOnD+9vg07CSE+gtpH5y5YEXL0cE43OVxNarj4eNL94 c2ulaMyrhFmAT+vPSKJZPs1DOY+Y2uobtcn0x+HjDX5zSa45PxP/dUyU8L7mTL/bzoqz mJAg== X-Gm-Message-State: AOAM532QC8wo9l5eoh16pKp+sTIlQkqiDpT1C3E5nwEA7O/99d4G6eIb q5Uca3iDzQsRQq0frvR1O2oanoOBcUh0dQ== X-Google-Smtp-Source: ABdhPJzr0Qo0h7vJug9tyT/R7iydg/VQNF6UcsyTZhplX9Qqkl1VBFqbn3idLwatunG2QSeoGF7UnA== X-Received: by 2002:adf:f007:: with SMTP id j7mr101079wro.294.1590088583667; Thu, 21 May 2020 12:16:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/29] linux-user/arm: Handle invalid arm-specific syscalls correctly Date: Thu, 21 May 2020 20:15:50 +0100 Message-Id: <20200521191610.10941-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) The kernel has different handling for syscalls with invalid numbers that are in the "arm-specific" range 0x9f0000 and up: * 0x9f0000..0x9f07ff return -ENOSYS if not implemented * other out of range syscalls cause a SIGILL (see the kernel's arch/arm/kernel/traps.c:arm_syscall()) Implement this distinction. (Note that our code doesn't look quite like the kernel's, because we have removed the 0x900000 prefix by this point, whereas the kernel retains it in arm_syscall().) Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200420212206.12776-4-peter.maydell@linaro.org --- linux-user/arm/cpu_loop.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 025887d6b86..df8b7b3fa96 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -332,10 +332,32 @@ void cpu_loop(CPUARMState *env) env->regs[0] =3D cpu_get_tls(env); break; default: - qemu_log_mask(LOG_UNIMP, - "qemu: Unsupported ARM syscall: = 0x%x\n", - n); - env->regs[0] =3D -TARGET_ENOSYS; + if (n < 0xf0800) { + /* + * Syscalls 0xf0000..0xf07ff (or 0x9f0000.. + * 0x9f07ff in OABI numbering) are defined + * to return -ENOSYS rather than raising + * SIGILL. Note that we have already + * removed the 0x900000 prefix. + */ + qemu_log_mask(LOG_UNIMP, + "qemu: Unsupported ARM syscall: 0x%x\n= ", + n); + env->regs[0] =3D -TARGET_ENOSYS; + } else { + /* Otherwise SIGILL */ + info.si_signo =3D TARGET_SIGILL; + info.si_errno =3D 0; + info.si_code =3D TARGET_ILL_ILLTRP; + info._sifields._sigfault._addr =3D env->re= gs[15]; + if (env->thumb) { + info._sifields._sigfault._addr -=3D 2; + } else { + info._sifields._sigfault._addr -=3D 4; + } + queue_signal(env, info.si_signo, + QEMU_SI_FAULT, &info); + } break; } } else { --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088770; cv=none; d=zohomail.com; s=zohoarc; b=KSE8OBAGTdM5TdJeDCchriQPMyWv9/bOXjEynu9dPHDAfrDIiVTHE2S9tgCsbTtKaXDKJTuXpGDsUkfxKRJU95atol180oCcmpy1tG8s3feUM1/UJPpobiv3U6icKdE55b1T3y1nyV/wHHRkiARhfbD2aVskSbg8TSIe899fTN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088770; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jqyrlre26HzY4/EOKXLxmJgMpYAcEqSqJmnuoHIuFXE=; b=ldFj+ZVPbuB2+4mdUZyVHpaRunx9LaA6pIM13ISiJoH/5CmgyDB7Iuw8v6u8LRVjpQZWBZOrPdTYBUhOGrYHRfSebaHSW37Wa5kOFG92bRoy95xHKee42+HVUd3rvaCqp376VLEWw5RHsvrtA3xkNlmMlv7lVuTRTqFgnWyj6So= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088770636772.8583126959722; Thu, 21 May 2020 12:19:30 -0700 (PDT) Received: from localhost ([::1]:47788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqj3-0008OU-C7 for importer@patchew.org; Thu, 21 May 2020 15:19:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg7-0002Gq-VJ for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:27 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:38704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg6-0000R3-O2 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:27 -0400 Received: by mail-wm1-x331.google.com with SMTP id u12so2757713wmd.3 for ; Thu, 21 May 2020 12:16:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jqyrlre26HzY4/EOKXLxmJgMpYAcEqSqJmnuoHIuFXE=; b=fnvEJEVbAtzKgzwdrXY3QzBVm37op7KWIJS9YimDHalAugt4KsOmYCGWJSEsDFrivw Sa055egmD1BffURhC7r+XPkP504MlCsMSL+f7i41ozZ80Q+e8Fh8+lnPuJLtq/sFBkW5 sUBAwK1XeA++pUXSGw063Zofc7mbCm5L2IuhhGvR63dXvE4D9a5e4YNm6hsLm9Qok8Py TTCJPm8Z6pPiv+jSwJqAH9tx2paGDk/YE8kNg/9cvzjfPGzZs5vuA6kSIYxSyhwPL/VV feAfLBrAlALwvdxbt0s81mifO3HkZCHAg2kSgMbnkFqmWkKRDvh7+oiry4xjE0C5jkf/ QZCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jqyrlre26HzY4/EOKXLxmJgMpYAcEqSqJmnuoHIuFXE=; b=EZUv58eSTu8AQ2mvgcWhEq8jR4thLIbHs9RxS9FMhrJI0wDV+uub/4SrC+OPMHq7/E ivNLuzL0lC70odl2Y/2LXfZRUNsz706ltN3gaz4i49P2tWiCVlzV7OGPJ1XIpR65W89a l+YIPju3Gm8IU3Re2cQs5JtYcALO75Dp+/g16L/kmGBewtinL26BciSTw4C86QofMcN/ MXjo0Db65a3ILk/v+0nUrSmtcm0fo+0lHmyqpOx8myVOaaIDt/oTqTQVQGL5dvBGo6e6 8XK8M+1+0327Q3TBH8v3MFYKB9Ibu8ijhgOErJot0TXIhWgQLO70qcI+sGpjH+hvnRvw tpKQ== X-Gm-Message-State: AOAM532Ks3IPO5MVzJ/qGnZFMxg9c2OtVvIZxuCVb8831M7VehC80BCS ipOFZ3ntj0z60VEEhDJ9pWC9RnsQr+zlFg== X-Google-Smtp-Source: ABdhPJxvO2AVXP185g7ryFGfNXgIeonu0ml69KrXDk1GMOJbriCtvBHDjcisPLpnQjJLW0DucAAdVA== X-Received: by 2002:a1c:6182:: with SMTP id v124mr10112288wmb.30.1590088584813; Thu, 21 May 2020 12:16:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/29] linux-user/arm: Fix identification of syscall numbers Date: Thu, 21 May 2020 20:15:51 +0100 Message-Id: <20200521191610.10941-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Our code to identify syscall numbers has some issues: * for Thumb mode, we never need the immediate value from the insn, but we always read it anyway * bad immediate values in the svc insn should cause a SIGILL, but we were abort()ing instead (via "goto error") We can fix both these things by refactoring the code that identifies the syscall number to more closely follow the kernel COMPAT_OABI code: * for Thumb it is always r7 * for Arm, if the immediate value is 0, then this is an EABI call with the syscall number in r7 * otherwise, we XOR the immediate value with 0x900000 (ARM_SYSCALL_BASE for QEMU; __NR_OABI_SYSCALL_BASE in the kernel), which converts valid syscall immediates into the desired value, and puts all invalid immediates in the range 0x100000 or above * then we can just let the existing "value too large, deliver SIGILL" case handle invalid numbers, and drop the 'goto error' Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Message-id: 20200420212206.12776-5-peter.maydell@linaro.org --- linux-user/arm/cpu_loop.c | 143 ++++++++++++++++++++------------------ 1 file changed, 77 insertions(+), 66 deletions(-) diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index df8b7b3fa96..13629ee1f6a 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -299,85 +299,96 @@ void cpu_loop(CPUARMState *env) env->eabi =3D 1; /* system call */ if (env->thumb) { - /* FIXME - what to do if get_user() fails? */ - get_user_code_u16(insn, env->regs[15] - 2, env); - n =3D insn & 0xff; + /* Thumb is always EABI style with syscall number in r= 7 */ + n =3D env->regs[7]; } else { + /* + * Equivalent of kernel CONFIG_OABI_COMPAT: read the + * Arm SVC insn to extract the immediate, which is the + * syscall number in OABI. + */ /* FIXME - what to do if get_user() fails? */ get_user_code_u32(insn, env->regs[15] - 4, env); n =3D insn & 0xffffff; - } - - if (n =3D=3D 0 || n >=3D ARM_SYSCALL_BASE || env->thumb) { - /* linux syscall */ - if (env->thumb || n =3D=3D 0) { + if (n =3D=3D 0) { + /* zero immediate: EABI, syscall number in r7 */ n =3D env->regs[7]; } else { - n -=3D ARM_SYSCALL_BASE; + /* + * This XOR matches the kernel code: an immediate + * in the valid range (0x900000 .. 0x9fffff) is + * converted into the correct EABI-style syscall + * number; invalid immediates end up as values + * > 0xfffff and are handled below as out-of-range. + */ + n ^=3D ARM_SYSCALL_BASE; env->eabi =3D 0; } - if ( n > ARM_NR_BASE) { - switch (n) { - case ARM_NR_cacheflush: - /* nop */ - break; - case ARM_NR_set_tls: - cpu_set_tls(env, env->regs[0]); - env->regs[0] =3D 0; - break; - case ARM_NR_breakpoint: - env->regs[15] -=3D env->thumb ? 2 : 4; - goto excp_debug; - case ARM_NR_get_tls: - env->regs[0] =3D cpu_get_tls(env); - break; - default: - if (n < 0xf0800) { - /* - * Syscalls 0xf0000..0xf07ff (or 0x9f0000.. - * 0x9f07ff in OABI numbering) are defined - * to return -ENOSYS rather than raising - * SIGILL. Note that we have already - * removed the 0x900000 prefix. - */ - qemu_log_mask(LOG_UNIMP, - "qemu: Unsupported ARM syscall: 0x%x\n= ", - n); - env->regs[0] =3D -TARGET_ENOSYS; + } + + if (n > ARM_NR_BASE) { + switch (n) { + case ARM_NR_cacheflush: + /* nop */ + break; + case ARM_NR_set_tls: + cpu_set_tls(env, env->regs[0]); + env->regs[0] =3D 0; + break; + case ARM_NR_breakpoint: + env->regs[15] -=3D env->thumb ? 2 : 4; + goto excp_debug; + case ARM_NR_get_tls: + env->regs[0] =3D cpu_get_tls(env); + break; + default: + if (n < 0xf0800) { + /* + * Syscalls 0xf0000..0xf07ff (or 0x9f0000.. + * 0x9f07ff in OABI numbering) are defined + * to return -ENOSYS rather than raising + * SIGILL. Note that we have already + * removed the 0x900000 prefix. + */ + qemu_log_mask(LOG_UNIMP, + "qemu: Unsupported ARM syscall: 0x%x\n", + n); + env->regs[0] =3D -TARGET_ENOSYS; + } else { + /* + * Otherwise SIGILL. This includes any SWI with + * immediate not originally 0x9fxxxx, because + * of the earlier XOR. + */ + info.si_signo =3D TARGET_SIGILL; + info.si_errno =3D 0; + info.si_code =3D TARGET_ILL_ILLTRP; + info._sifields._sigfault._addr =3D env->regs[1= 5]; + if (env->thumb) { + info._sifields._sigfault._addr -=3D 2; } else { - /* Otherwise SIGILL */ - info.si_signo =3D TARGET_SIGILL; - info.si_errno =3D 0; - info.si_code =3D TARGET_ILL_ILLTRP; - info._sifields._sigfault._addr =3D env->re= gs[15]; - if (env->thumb) { - info._sifields._sigfault._addr -=3D 2; - } else { - info._sifields._sigfault._addr -=3D 4; - } - queue_signal(env, info.si_signo, - QEMU_SI_FAULT, &info); + info._sifields._sigfault._addr -=3D 4; } - break; - } - } else { - ret =3D do_syscall(env, - n, - env->regs[0], - env->regs[1], - env->regs[2], - env->regs[3], - env->regs[4], - env->regs[5], - 0, 0); - if (ret =3D=3D -TARGET_ERESTARTSYS) { - env->regs[15] -=3D env->thumb ? 2 : 4; - } else if (ret !=3D -TARGET_QEMU_ESIGRETURN) { - env->regs[0] =3D ret; + queue_signal(env, info.si_signo, + QEMU_SI_FAULT, &info); } + break; } } else { - goto error; + ret =3D do_syscall(env, + n, + env->regs[0], + env->regs[1], + env->regs[2], + env->regs[3], + env->regs[4], + env->regs[5], + 0, 0); + if (ret =3D=3D -TARGET_ERESTARTSYS) { + env->regs[15] -=3D env->thumb ? 2 : 4; + } else if (ret !=3D -TARGET_QEMU_ESIGRETURN) { + env->regs[0] =3D ret; + } } } break; --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088909; cv=none; d=zohomail.com; s=zohoarc; b=iH3MUFmQ2wcQoWQuNRe1n+R4oKr2GuLYc5x2uqHLoiRONXIdDEEIFJxbk6+LuTIO6f8ranlPJU5rxtzqdVbheiq2yK5N4gT+6zMZWpY8W0jWLxE3+qRYI3bfceskysub9uO9ww3122xCq+G99fbLhLIuKsIJjlU/AYTNKv5y9Pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088909; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dFEQXmjjsTDYYVSak8Tb1Vcj0+3VcW2hSollOB67zz4=; b=N2Pg6at/cwe760tQJm4UDfy49k55XCj2FqwtegpPRnAmgYMmiN+j+tO73vfkCamX0RsIz7JMzKsJQP3pdvA9q3YvWRMwwQQGcijgqoudurHXcvSObijAtn0PO6UmxG1Anax4lA79L4kIDLcHWvgdlWaXhxa1H61DeRFtqO9A/uo= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088909814455.5989384417011; Thu, 21 May 2020 12:21:49 -0700 (PDT) Received: from localhost ([::1]:56600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqlI-0003q8-H6 for importer@patchew.org; Thu, 21 May 2020 15:21:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqg8-0002Iz-Ru for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:28 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:34250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg7-0000RD-Ti for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:28 -0400 Received: by mail-wm1-x341.google.com with SMTP id g14so2850245wme.1 for ; Thu, 21 May 2020 12:16:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dFEQXmjjsTDYYVSak8Tb1Vcj0+3VcW2hSollOB67zz4=; b=htMRgp5kApo/ZQnPb29RD+Tgk/QPKgoMxNImuX76++tnvxPWQFW6FMlJpjzqMXkACH yaXfzvthFsqLqUP//LPfEw0i3hgl+7TaieYILDQ6h0ec34jhya/pPwi6FQPxmES6ZPGl ukfwYKZA7ESgAR5HXVjDLrvwXQyfd5OiWrc37ltvGpvEZ/5+uLnYrLEmB/+jTq1YwKQ7 8k4li8GJ70IqKJlMhtWfquK7XXJQMztLrahRIgEhPqikCyTISLueanRLbvdimgHjqH8L +Jyn54xszWr6L+qDs592QULr8xGLsXUK1XO023UC9AWxbF0sCGnjgagqEEjTBdxFY3kv uazg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dFEQXmjjsTDYYVSak8Tb1Vcj0+3VcW2hSollOB67zz4=; b=lQ2xV9GmnL9zCnY4b5GQMcWQpIh7vhVoY+rv9/E/lKvAAdcBz4VUcorC39HqPo+mZJ 13b5UvyxyNwoMdkCLi5XHiSxNjjEKXbHV8XsVvlWqqgkX9QZJfjqjLEwDxCi4B0XzjEj ncATLLrvYazN32FBJItVnuQnPgyTP9NxrcgcXZG9r60pz3rYXgorV98RnoswQLnqIYfi +AHU5lYCrNcGIp9DqWzqojcc6LbD/wMIV05BDwj/bkUiFD5ruXzr4L0UY75M5R2Dlinn hHQtoLZmOrYVas2Lt1o1iL9bgFYky9G0MoGVCkafWmUgYl9zvKOaxgHWMnu+ljbw/ME3 yy0w== X-Gm-Message-State: AOAM5303rCosd7ZTaGvLyRo7/dM5bOCwo3mecf3n4H+usM4UPps9DKtB MoeUF7uUOfFF0Gqw9Z34D+xhqHLHTKuHRw== X-Google-Smtp-Source: ABdhPJwRtSc60DXVgTaWXDjiaVVh1BS+XSFaYNtSx15karoYrsTfPFmemrAG2iX3j7gwCbWd4ZtRtQ== X-Received: by 2002:a05:600c:2109:: with SMTP id u9mr9785168wml.75.1590088586237; Thu, 21 May 2020 12:16:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/29] target/arm: Remove unused GEN_NEON_INTEGER_OP macro Date: Thu, 21 May 2020 20:15:52 +0100 Message-Id: <20200521191610.10941-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::341; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The GEN_NEON_INTEGER_OP macro is no longer used; remove it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/translate.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 4c9bb8b5ac0..c8296116d4b 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -3034,29 +3034,6 @@ static inline void gen_neon_rsb(int size, TCGv_i32 t= 0, TCGv_i32 t1) default: return 1; \ }} while (0) =20 -#define GEN_NEON_INTEGER_OP(name) do { \ - switch ((size << 1) | u) { \ - case 0: \ - gen_helper_neon_##name##_s8(tmp, tmp, tmp2); \ - break; \ - case 1: \ - gen_helper_neon_##name##_u8(tmp, tmp, tmp2); \ - break; \ - case 2: \ - gen_helper_neon_##name##_s16(tmp, tmp, tmp2); \ - break; \ - case 3: \ - gen_helper_neon_##name##_u16(tmp, tmp, tmp2); \ - break; \ - case 4: \ - gen_helper_neon_##name##_s32(tmp, tmp, tmp2); \ - break; \ - case 5: \ - gen_helper_neon_##name##_u32(tmp, tmp, tmp2); \ - break; \ - default: return 1; \ - }} while (0) - static TCGv_i32 neon_load_scratch(int scratch) { TCGv_i32 tmp =3D tcg_temp_new_i32(); --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089058; cv=none; d=zohomail.com; s=zohoarc; b=BFa/Fqnn4PzzSSFoxWLhl8cYu2SySR5gpr8sMNtvNev9XP8VLzfAi/6kVyuHu4qXQNhFVEuxojEQFmuxg79aPgIuFkTQR4xr0n2fRl7k2DDzBNJCZrTIKefxhayDFHXooQFNFIUIpf315HddAuEdAr2CMcf/ZvuK+sCfC3uq/3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089058; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DvN+yAsNtscyCciNcKwAxqrn3APcppH5Qh8vMf7lyFw=; b=YXxWQ0g/UODF421st1Xo9QX12MigMPFtEVNbsZRlOQOxbpeX2eI84h4zSCPHL0Qyd52eAWOkae6cq+1QyUPEj3iStwHklweW+3IEtgkfadWrPbGBHf7olQ+ZW9LeI5oaFjtbh/zAd3qwvjTvysbKUNCwJrAmlBUdjJc3/n3NvMs= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089058894761.58235184993; Thu, 21 May 2020 12:24:18 -0700 (PDT) Received: from localhost ([::1]:40262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqnh-0000lz-L4 for importer@patchew.org; Thu, 21 May 2020 15:24:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgA-0002Mt-Fn for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:30 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:37538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqg9-0000RK-1u for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:30 -0400 Received: by mail-wm1-x341.google.com with SMTP id z72so7561857wmc.2 for ; Thu, 21 May 2020 12:16:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DvN+yAsNtscyCciNcKwAxqrn3APcppH5Qh8vMf7lyFw=; b=IZ7vj/w1UL3YoaIRIbPUB4mFylEAAKI6W14C4BA49qkDqsRBsbJQxmRxGUI+ZVON1u g+OqSoFXIrGIl+yXWDT1U/YqUIvd1zslAYCpR2i+PgmkcaezKYHrP7JuJ49bJkoIv/4E nFwwdcq5HoSuewhffWdjKoY2jx8P08E66erTszjzJu3aD5bKcpGmXoaErFXzCTUNcNIC 52Rj1Kx797FKV5ZhZdVLYNd4KNRWTTR6rJfV3UlZNyWTxHUvYB0w/RF5Dbko1tfCeg8V QkWb4JozP3Mk20V8FJQgAJQ/hMu5G8x0vd0EVavXV/v+bPPJQH3KeDLwP3lpEGmkjb2l ZlOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DvN+yAsNtscyCciNcKwAxqrn3APcppH5Qh8vMf7lyFw=; b=gjzgk1uA5uTKUtwHefkfkJEcI1ZhssQiXnRBVHhFKf3ciQh+v1tP9ZpA4t5Ggwsn82 hC/LI18NiqMkjiwVlmdaUZqQ/yp5u0JoIgpjn+AB9txvs/5AnDR4Ihs4GKq8RkgzFLdh cLDPHeRS7H4OE0k7WS7Z5L2pKgY5AfruQJltdkZUg6nREFaOmDJ9mrmQ0VsK6XY+PTmJ Fo+TBS5z1xzCpXl20E16JCR5ILqaHkMlM2qgYkHZCwR+mEocmfUXj30322q6PFmSHsDk UiD9hsmbp4hEpl7Vn0E8OS4xnUGRl44hJmtYi3w3T/NQX6qPuuLZzqHa/kTJav0Y6+t0 1CGQ== X-Gm-Message-State: AOAM533Zpqn5kl2XdjhclnAYE/aL2L3TB+/Ld2O54XFGmKRpnb7u21e4 wudASF9+ZrOD/vI8gSpiZsAX5iBdJL/dJg== X-Google-Smtp-Source: ABdhPJzFcepXl9ef9QFDKFln+wh0JQOj7awwNzItEPraV18UXIknNVxkI8glRHyy1QHqEMGJ9MOhaQ== X-Received: by 2002:a1c:6506:: with SMTP id z6mr10589311wmb.104.1590088587304; Thu, 21 May 2020 12:16:27 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/29] hw: Move i.MX watchdog driver to hw/watchdog Date: Thu, 21 May 2020 20:15:53 +0100 Message-Id: <20200521191610.10941-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::341; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck In preparation for a full implementation, move i.MX watchdog driver from hw/misc to hw/watchdog. While at it, add the watchdog files to MAINTAINERS. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-2-linux@roeck-us.net Signed-off-by: Peter Maydell --- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/fsl-imx7.h | 2 +- include/hw/{misc/imx2_wdt.h =3D> watchdog/wdt_imx2.h} | 0 hw/{misc/imx2_wdt.c =3D> watchdog/wdt_imx2.c} | 2 +- MAINTAINERS | 2 ++ hw/arm/Kconfig | 3 +++ hw/misc/Makefile.objs | 1 - hw/watchdog/Kconfig | 3 +++ hw/watchdog/Makefile.objs | 1 + 10 files changed, 13 insertions(+), 5 deletions(-) rename include/hw/{misc/imx2_wdt.h =3D> watchdog/wdt_imx2.h} (100%) rename hw/{misc/imx2_wdt.c =3D> watchdog/wdt_imx2.c} (98%) diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h index 973bcb72f7f..1ebd7513246 100644 --- a/include/hw/arm/fsl-imx6.h +++ b/include/hw/arm/fsl-imx6.h @@ -21,7 +21,7 @@ #include "hw/cpu/a9mpcore.h" #include "hw/misc/imx6_ccm.h" #include "hw/misc/imx6_src.h" -#include "hw/misc/imx2_wdt.h" +#include "hw/watchdog/wdt_imx2.h" #include "hw/char/imx_serial.h" #include "hw/timer/imx_gpt.h" #include "hw/timer/imx_epit.h" diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h index 1a0bab8daaf..37c89cc5f92 100644 --- a/include/hw/arm/fsl-imx6ul.h +++ b/include/hw/arm/fsl-imx6ul.h @@ -24,7 +24,7 @@ #include "hw/misc/imx7_snvs.h" #include "hw/misc/imx7_gpr.h" #include "hw/intc/imx_gpcv2.h" -#include "hw/misc/imx2_wdt.h" +#include "hw/watchdog/wdt_imx2.h" #include "hw/gpio/imx_gpio.h" #include "hw/char/imx_serial.h" #include "hw/timer/imx_gpt.h" diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h index 706aef2e7e0..3a0041c4c26 100644 --- a/include/hw/arm/fsl-imx7.h +++ b/include/hw/arm/fsl-imx7.h @@ -26,7 +26,7 @@ #include "hw/misc/imx7_snvs.h" #include "hw/misc/imx7_gpr.h" #include "hw/misc/imx6_src.h" -#include "hw/misc/imx2_wdt.h" +#include "hw/watchdog/wdt_imx2.h" #include "hw/gpio/imx_gpio.h" #include "hw/char/imx_serial.h" #include "hw/timer/imx_gpt.h" diff --git a/include/hw/misc/imx2_wdt.h b/include/hw/watchdog/wdt_imx2.h similarity index 100% rename from include/hw/misc/imx2_wdt.h rename to include/hw/watchdog/wdt_imx2.h diff --git a/hw/misc/imx2_wdt.c b/hw/watchdog/wdt_imx2.c similarity index 98% rename from hw/misc/imx2_wdt.c rename to hw/watchdog/wdt_imx2.c index 2aedfe803a4..ad1ef02e9e7 100644 --- a/hw/misc/imx2_wdt.c +++ b/hw/watchdog/wdt_imx2.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "sysemu/watchdog.h" =20 -#include "hw/misc/imx2_wdt.h" +#include "hw/watchdog/wdt_imx2.h" =20 #define IMX2_WDT_WCR_WDA BIT(5) /* -> External Reset WDOG_B */ #define IMX2_WDT_WCR_SRS BIT(4) /* -> Software Reset Signal */ diff --git a/MAINTAINERS b/MAINTAINERS index 023f48d3eaa..3690f313c3b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -633,8 +633,10 @@ S: Odd Fixes F: hw/arm/fsl-imx25.c F: hw/arm/imx25_pdk.c F: hw/misc/imx25_ccm.c +F: hw/watchdog/wdt_imx2.c F: include/hw/arm/fsl-imx25.h F: include/hw/misc/imx25_ccm.h +F: include/hw/watchdog/wdt_imx2.h =20 i.MX31 (kzm) M: Peter Chubb diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 53641725371..3d05dc8538c 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -375,6 +375,7 @@ config FSL_IMX6 select IMX_FEC select IMX_I2C select IMX_USBPHY + select WDT_IMX2 select SDHCI =20 config ASPEED_SOC @@ -412,6 +413,7 @@ config FSL_IMX7 select IMX select IMX_FEC select IMX_I2C + select WDT_IMX2 select PCI_EXPRESS_DESIGNWARE select SDHCI select UNIMP @@ -425,6 +427,7 @@ config FSL_IMX6UL select IMX select IMX_FEC select IMX_I2C + select WDT_IMX2 select SDHCI select UNIMP =20 diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs index 68aae2eabbc..b25181b7113 100644 --- a/hw/misc/Makefile.objs +++ b/hw/misc/Makefile.objs @@ -44,7 +44,6 @@ common-obj-$(CONFIG_IMX) +=3D imx6_ccm.o common-obj-$(CONFIG_IMX) +=3D imx6ul_ccm.o obj-$(CONFIG_IMX) +=3D imx6_src.o common-obj-$(CONFIG_IMX) +=3D imx7_ccm.o -common-obj-$(CONFIG_IMX) +=3D imx2_wdt.o common-obj-$(CONFIG_IMX) +=3D imx7_snvs.o common-obj-$(CONFIG_IMX) +=3D imx7_gpr.o common-obj-$(CONFIG_IMX) +=3D imx_rngc.o diff --git a/hw/watchdog/Kconfig b/hw/watchdog/Kconfig index 2118d897c93..293209b291d 100644 --- a/hw/watchdog/Kconfig +++ b/hw/watchdog/Kconfig @@ -14,3 +14,6 @@ config WDT_IB700 =20 config WDT_DIAG288 bool + +config WDT_IMX2 + bool diff --git a/hw/watchdog/Makefile.objs b/hw/watchdog/Makefile.objs index 3f536d1cad8..631b711d868 100644 --- a/hw/watchdog/Makefile.objs +++ b/hw/watchdog/Makefile.objs @@ -4,3 +4,4 @@ common-obj-$(CONFIG_WDT_IB6300ESB) +=3D wdt_i6300esb.o common-obj-$(CONFIG_WDT_IB700) +=3D wdt_ib700.o common-obj-$(CONFIG_WDT_DIAG288) +=3D wdt_diag288.o common-obj-$(CONFIG_ASPEED_SOC) +=3D wdt_aspeed.o +common-obj-$(CONFIG_WDT_IMX2) +=3D wdt_imx2.o --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089123; cv=none; d=zohomail.com; s=zohoarc; b=W30yaA+Om7q+yWWQ54R/pDtiVE218WnYrKCVpyF8YTNQVJVpYlwaGLGqB3NeMzIVxbSiaifm6BABj1T79cMX4NQPD+G1IRZISP4kJ1xhdwtTlYzA+HFW+i+6e0xx2pXe9Tov9+7+5LtTibtw684xzmsRrjgRSJtFkV5LQ2KnEkM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089123; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+r4uX4unNchR0Uk4YkJ3GsBkZc2Xb0u6je+WQD2TN+0=; b=k11g6oycB3rEWCa5SCjUzlyR9XYkhdETeya/mG+1fx7gUZgKId4CubSubIE7Cv6qEyKJE+XTmF9JmcQFsAdV7F6LZt0KNrpgBFvLgT1t59Elte2QerD8qk3pIxNVKh75ayq4Zk5uFa27fznYaMMMXbWRS2RTdqcdSix5Cxtp0vU= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089123935947.065733564387; Thu, 21 May 2020 12:25:23 -0700 (PDT) Received: from localhost ([::1]:44932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqok-0003L8-FI for importer@patchew.org; Thu, 21 May 2020 15:25:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgC-0002Qb-0R for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:32 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:53479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgA-0000RS-Ee for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:31 -0400 Received: by mail-wm1-x32e.google.com with SMTP id u1so6517184wmn.3 for ; Thu, 21 May 2020 12:16:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+r4uX4unNchR0Uk4YkJ3GsBkZc2Xb0u6je+WQD2TN+0=; b=vF74EXgbIOzfw1MXSrAKMMANkO8a7nGSUhUqlrvrhtmg0IditACVm0n9QfuHWb7aA5 43qsOJ5EpU29By/8L3VWNdkFH+44v2tm0LPTIV/4TdjHZTrJcZWwVjuKPlmEfh6WqU/3 NZMz6zGxMl0+FuFxj8xhzF9dt/ZHBzpL88CSvmn0oS7fWreFonFGIdHr9rkrJsY3sogL PY2KPmq2tWOVUzxAATlrAifQ7X7l8Aj07YF355qPe1CmPfz+l59XT9leYk1eockSk2HU 9gfJ0S+p/dvMzqD3qW0D9rZR4PIeGBhl2Mp4nxy59a/INR1XOw6szEMfRWiUEkcmJmeu b0Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+r4uX4unNchR0Uk4YkJ3GsBkZc2Xb0u6je+WQD2TN+0=; b=AUFMB8d1uoKspBWpE9up49aPsYjd2u+u0Fya/Gr4dqovfob3IPm44CbFnpNvfUcAjM AcSQs+oF3QS8ACq1ptdHk96f97fH0wAF4FscexKUv/ew7syk32sdSWqhNZJF1EoblCGr /vVT3QAXhONSgrfmjvKZPw9Q3JsgAfMopvf10Jhf+V6cfZne7+BxXULRrlknlaVZGoNq /i3xXoZe/WCGgkzhG84bQoTRT3eUYYQQjeqXaKLw8SVdp7goSn+dyYMeYIzGLvRPo1ED EwPhFjuaFK4RAXgeiOkU8IOnxRT6miz0FDqqgUlW1au8cz2rA0pPF7yKkoliQw2X9BJg v47Q== X-Gm-Message-State: AOAM530DVhit4OsZS5bs88uehQWGE16zcgMbAxdZqdoLLeBE63OVS4hV mEwkhhyWnwTwQ3UOOJg3AJALQwc2MFbkaQ== X-Google-Smtp-Source: ABdhPJwoMerD20F4omm/nXHGr37P1ECs/YW/ZGkLyCkOQAsPsJmFgI6Yrb23j3wzJ+mOWAfMsQFIFw== X-Received: by 2002:a1c:1b44:: with SMTP id b65mr10592231wmb.181.1590088588513; Thu, 21 May 2020 12:16:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/29] hw/watchdog: Implement full i.MX watchdog support Date: Thu, 21 May 2020 20:15:54 +0100 Message-Id: <20200521191610.10941-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck Implement full support for the watchdog in i.MX systems. Pretimeout support is optional because the watchdog hardware on i.MX31 does not support pretimeouts. Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-3-linux@roeck-us.net Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell --- include/hw/watchdog/wdt_imx2.h | 61 ++++++++- hw/watchdog/wdt_imx2.c | 239 +++++++++++++++++++++++++++++++-- 2 files changed, 285 insertions(+), 15 deletions(-) diff --git a/include/hw/watchdog/wdt_imx2.h b/include/hw/watchdog/wdt_imx2.h index b91b002528f..f9af6be4b69 100644 --- a/include/hw/watchdog/wdt_imx2.h +++ b/include/hw/watchdog/wdt_imx2.h @@ -12,22 +12,79 @@ #ifndef IMX2_WDT_H #define IMX2_WDT_H =20 +#include "qemu/bitops.h" #include "hw/sysbus.h" +#include "hw/irq.h" +#include "hw/ptimer.h" =20 #define TYPE_IMX2_WDT "imx2.wdt" #define IMX2_WDT(obj) OBJECT_CHECK(IMX2WdtState, (obj), TYPE_IMX2_WDT) =20 enum IMX2WdtRegisters { - IMX2_WDT_WCR =3D 0x0000, - IMX2_WDT_REG_NUM =3D 0x0008 / sizeof(uint16_t) + 1, + IMX2_WDT_WCR =3D 0x0000, /* Control Register */ + IMX2_WDT_WSR =3D 0x0002, /* Service Register */ + IMX2_WDT_WRSR =3D 0x0004, /* Reset Status Register */ + IMX2_WDT_WICR =3D 0x0006, /* Interrupt Control Register */ + IMX2_WDT_WMCR =3D 0x0008, /* Misc Register */ }; =20 +#define IMX2_WDT_MMIO_SIZE 0x000a + +/* Control Register definitions */ +#define IMX2_WDT_WCR_WT (0xFF << 8) /* Watchdog Timeout Field */ +#define IMX2_WDT_WCR_WDW BIT(7) /* WDOG Disable for Wait */ +#define IMX2_WDT_WCR_WDA BIT(5) /* WDOG Assertion */ +#define IMX2_WDT_WCR_SRS BIT(4) /* Software Reset Signal */ +#define IMX2_WDT_WCR_WDT BIT(3) /* WDOG Timeout Assertion */ +#define IMX2_WDT_WCR_WDE BIT(2) /* Watchdog Enable */ +#define IMX2_WDT_WCR_WDBG BIT(1) /* Watchdog Debug Enable */ +#define IMX2_WDT_WCR_WDZST BIT(0) /* Watchdog Timer Suspend */ + +#define IMX2_WDT_WCR_LOCK_MASK (IMX2_WDT_WCR_WDZST | IMX2_WDT_WCR_WDBG \ + | IMX2_WDT_WCR_WDW) + +/* Service Register definitions */ +#define IMX2_WDT_SEQ1 0x5555 /* service sequence 1 */ +#define IMX2_WDT_SEQ2 0xAAAA /* service sequence 2 */ + +/* Reset Status Register definitions */ +#define IMX2_WDT_WRSR_TOUT BIT(1) /* Reset due to Timeout */ +#define IMX2_WDT_WRSR_SFTW BIT(0) /* Reset due to software reset= */ + +/* Interrupt Control Register definitions */ +#define IMX2_WDT_WICR_WIE BIT(15) /* Interrupt Enable */ +#define IMX2_WDT_WICR_WTIS BIT(14) /* Interrupt Status */ +#define IMX2_WDT_WICR_WICT 0xff /* Interrupt Timeout */ +#define IMX2_WDT_WICR_WICT_DEF 0x04 /* Default interrupt timeout (= 2s) */ + +#define IMX2_WDT_WICR_LOCK_MASK (IMX2_WDT_WICR_WIE | IMX2_WDT_WICR_WICT) + +/* Misc Control Register definitions */ +#define IMX2_WDT_WMCR_PDE BIT(0) /* Power-Down Enable */ =20 typedef struct IMX2WdtState { /* */ SysBusDevice parent_obj; =20 + /*< public >*/ MemoryRegion mmio; + qemu_irq irq; + + struct ptimer_state *timer; + struct ptimer_state *itimer; + + bool pretimeout_support; + bool wicr_locked; + + uint16_t wcr; + uint16_t wsr; + uint16_t wrsr; + uint16_t wicr; + uint16_t wmcr; + + bool wcr_locked; /* affects WDZST, WDBG, and WDW */ + bool wcr_wde_locked; /* affects WDE */ + bool wcr_wdt_locked; /* affects WDT (never cleared) */ } IMX2WdtState; =20 #endif /* IMX2_WDT_H */ diff --git a/hw/watchdog/wdt_imx2.c b/hw/watchdog/wdt_imx2.c index ad1ef02e9e7..855b51768a8 100644 --- a/hw/watchdog/wdt_imx2.c +++ b/hw/watchdog/wdt_imx2.c @@ -13,24 +13,189 @@ #include "qemu/bitops.h" #include "qemu/module.h" #include "sysemu/watchdog.h" +#include "migration/vmstate.h" +#include "hw/qdev-properties.h" =20 #include "hw/watchdog/wdt_imx2.h" =20 -#define IMX2_WDT_WCR_WDA BIT(5) /* -> External Reset WDOG_B */ -#define IMX2_WDT_WCR_SRS BIT(4) /* -> Software Reset Signal */ - -static uint64_t imx2_wdt_read(void *opaque, hwaddr addr, - unsigned int size) +static void imx2_wdt_interrupt(void *opaque) { + IMX2WdtState *s =3D IMX2_WDT(opaque); + + s->wicr |=3D IMX2_WDT_WICR_WTIS; + qemu_set_irq(s->irq, 1); +} + +static void imx2_wdt_expired(void *opaque) +{ + IMX2WdtState *s =3D IMX2_WDT(opaque); + + s->wrsr =3D IMX2_WDT_WRSR_TOUT; + + /* Perform watchdog action if watchdog is enabled */ + if (s->wcr & IMX2_WDT_WCR_WDE) { + s->wrsr =3D IMX2_WDT_WRSR_TOUT; + watchdog_perform_action(); + } +} + +static void imx2_wdt_reset(DeviceState *dev) +{ + IMX2WdtState *s =3D IMX2_WDT(dev); + + ptimer_transaction_begin(s->timer); + ptimer_stop(s->timer); + ptimer_transaction_commit(s->timer); + + if (s->pretimeout_support) { + ptimer_transaction_begin(s->itimer); + ptimer_stop(s->itimer); + ptimer_transaction_commit(s->itimer); + } + + s->wicr_locked =3D false; + s->wcr_locked =3D false; + s->wcr_wde_locked =3D false; + + s->wcr =3D IMX2_WDT_WCR_WDA | IMX2_WDT_WCR_SRS; + s->wsr =3D 0; + s->wrsr &=3D ~(IMX2_WDT_WRSR_TOUT | IMX2_WDT_WRSR_SFTW); + s->wicr =3D IMX2_WDT_WICR_WICT_DEF; + s->wmcr =3D IMX2_WDT_WMCR_PDE; +} + +static uint64_t imx2_wdt_read(void *opaque, hwaddr addr, unsigned int size) +{ + IMX2WdtState *s =3D IMX2_WDT(opaque); + + switch (addr) { + case IMX2_WDT_WCR: + return s->wcr; + case IMX2_WDT_WSR: + return s->wsr; + case IMX2_WDT_WRSR: + return s->wrsr; + case IMX2_WDT_WICR: + return s->wicr; + case IMX2_WDT_WMCR: + return s->wmcr; + } return 0; } =20 +static void imx_wdt2_update_itimer(IMX2WdtState *s, bool start) +{ + bool running =3D (s->wcr & IMX2_WDT_WCR_WDE) && (s->wcr & IMX2_WDT_WCR= _WT); + bool enabled =3D s->wicr & IMX2_WDT_WICR_WIE; + + ptimer_transaction_begin(s->itimer); + if (start || !enabled) { + ptimer_stop(s->itimer); + } + if (running && enabled) { + int count =3D ptimer_get_count(s->timer); + int pretimeout =3D s->wicr & IMX2_WDT_WICR_WICT; + + /* + * Only (re-)start pretimeout timer if its counter value is larger + * than 0. Otherwise it will fire right away and we'll get an + * interrupt loop. + */ + if (count > pretimeout) { + ptimer_set_count(s->itimer, count - pretimeout); + if (start) { + ptimer_run(s->itimer, 1); + } + } + } + ptimer_transaction_commit(s->itimer); +} + +static void imx_wdt2_update_timer(IMX2WdtState *s, bool start) +{ + ptimer_transaction_begin(s->timer); + if (start) { + ptimer_stop(s->timer); + } + if ((s->wcr & IMX2_WDT_WCR_WDE) && (s->wcr & IMX2_WDT_WCR_WT)) { + int count =3D (s->wcr & IMX2_WDT_WCR_WT) >> 8; + + /* A value of 0 reflects one period (0.5s). */ + ptimer_set_count(s->timer, count + 1); + if (start) { + ptimer_run(s->timer, 1); + } + } + ptimer_transaction_commit(s->timer); + if (s->pretimeout_support) { + imx_wdt2_update_itimer(s, start); + } +} + static void imx2_wdt_write(void *opaque, hwaddr addr, uint64_t value, unsigned int size) { - if (addr =3D=3D IMX2_WDT_WCR && - (~value & (IMX2_WDT_WCR_WDA | IMX2_WDT_WCR_SRS))) { - watchdog_perform_action(); + IMX2WdtState *s =3D IMX2_WDT(opaque); + + switch (addr) { + case IMX2_WDT_WCR: + if (s->wcr_locked) { + value &=3D ~IMX2_WDT_WCR_LOCK_MASK; + value |=3D (s->wicr & IMX2_WDT_WCR_LOCK_MASK); + } + s->wcr_locked =3D true; + if (s->wcr_wde_locked) { + value &=3D ~IMX2_WDT_WCR_WDE; + value |=3D (s->wicr & ~IMX2_WDT_WCR_WDE); + } else if (value & IMX2_WDT_WCR_WDE) { + s->wcr_wde_locked =3D true; + } + if (s->wcr_wdt_locked) { + value &=3D ~IMX2_WDT_WCR_WDT; + value |=3D (s->wicr & ~IMX2_WDT_WCR_WDT); + } else if (value & IMX2_WDT_WCR_WDT) { + s->wcr_wdt_locked =3D true; + } + + s->wcr =3D value; + if (!(value & IMX2_WDT_WCR_SRS)) { + s->wrsr =3D IMX2_WDT_WRSR_SFTW; + } + if (!(value & (IMX2_WDT_WCR_WDA | IMX2_WDT_WCR_SRS)) || + (!(value & IMX2_WDT_WCR_WT) && (value & IMX2_WDT_WCR_WDE))) { + watchdog_perform_action(); + } + s->wcr |=3D IMX2_WDT_WCR_SRS; + imx_wdt2_update_timer(s, true); + break; + case IMX2_WDT_WSR: + if (s->wsr =3D=3D IMX2_WDT_SEQ1 && value =3D=3D IMX2_WDT_SEQ2) { + imx_wdt2_update_timer(s, false); + } + s->wsr =3D value; + break; + case IMX2_WDT_WRSR: + break; + case IMX2_WDT_WICR: + if (!s->pretimeout_support) { + return; + } + value &=3D IMX2_WDT_WICR_LOCK_MASK | IMX2_WDT_WICR_WTIS; + if (s->wicr_locked) { + value &=3D IMX2_WDT_WICR_WTIS; + value |=3D (s->wicr & IMX2_WDT_WICR_LOCK_MASK); + } + s->wicr =3D value | (s->wicr & IMX2_WDT_WICR_WTIS); + if (value & IMX2_WDT_WICR_WTIS) { + s->wicr &=3D ~IMX2_WDT_WICR_WTIS; + qemu_set_irq(s->irq, 0); + } + imx_wdt2_update_itimer(s, true); + s->wicr_locked =3D true; + break; + case IMX2_WDT_WMCR: + s->wmcr =3D value & IMX2_WDT_WMCR_PDE; + break; } } =20 @@ -45,28 +210,76 @@ static const MemoryRegionOps imx2_wdt_ops =3D { * real device but in practice there is no reason for a guest * to access this device unaligned. */ - .min_access_size =3D 4, - .max_access_size =3D 4, + .min_access_size =3D 2, + .max_access_size =3D 2, .unaligned =3D false, }, }; =20 +static const VMStateDescription vmstate_imx2_wdt =3D { + .name =3D "imx2.wdt", + .fields =3D (VMStateField[]) { + VMSTATE_PTIMER(timer, IMX2WdtState), + VMSTATE_PTIMER(itimer, IMX2WdtState), + VMSTATE_BOOL(wicr_locked, IMX2WdtState), + VMSTATE_BOOL(wcr_locked, IMX2WdtState), + VMSTATE_BOOL(wcr_wde_locked, IMX2WdtState), + VMSTATE_BOOL(wcr_wdt_locked, IMX2WdtState), + VMSTATE_UINT16(wcr, IMX2WdtState), + VMSTATE_UINT16(wsr, IMX2WdtState), + VMSTATE_UINT16(wrsr, IMX2WdtState), + VMSTATE_UINT16(wmcr, IMX2WdtState), + VMSTATE_UINT16(wicr, IMX2WdtState), + VMSTATE_END_OF_LIST() + } +}; + static void imx2_wdt_realize(DeviceState *dev, Error **errp) { IMX2WdtState *s =3D IMX2_WDT(dev); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); =20 memory_region_init_io(&s->mmio, OBJECT(dev), &imx2_wdt_ops, s, - TYPE_IMX2_WDT".mmio", - IMX2_WDT_REG_NUM * sizeof(uint16_t)); - sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio); + TYPE_IMX2_WDT, + IMX2_WDT_MMIO_SIZE); + sysbus_init_mmio(sbd, &s->mmio); + sysbus_init_irq(sbd, &s->irq); + + s->timer =3D ptimer_init(imx2_wdt_expired, s, + PTIMER_POLICY_NO_IMMEDIATE_TRIGGER | + PTIMER_POLICY_NO_IMMEDIATE_RELOAD | + PTIMER_POLICY_NO_COUNTER_ROUND_DOWN); + ptimer_transaction_begin(s->timer); + ptimer_set_freq(s->timer, 2); + ptimer_set_limit(s->timer, 0xff, 1); + ptimer_transaction_commit(s->timer); + if (s->pretimeout_support) { + s->itimer =3D ptimer_init(imx2_wdt_interrupt, s, + PTIMER_POLICY_NO_IMMEDIATE_TRIGGER | + PTIMER_POLICY_NO_IMMEDIATE_RELOAD | + PTIMER_POLICY_NO_COUNTER_ROUND_DOWN); + ptimer_transaction_begin(s->itimer); + ptimer_set_freq(s->itimer, 2); + ptimer_set_limit(s->itimer, 0xff, 1); + ptimer_transaction_commit(s->itimer); + } } =20 +static Property imx2_wdt_properties[] =3D { + DEFINE_PROP_BOOL("pretimeout-support", IMX2WdtState, pretimeout_suppor= t, + false), +}; + static void imx2_wdt_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + device_class_set_props(dc, imx2_wdt_properties); dc->realize =3D imx2_wdt_realize; + dc->reset =3D imx2_wdt_reset; + dc->vmsd =3D &vmstate_imx2_wdt; + dc->desc =3D "i.MX watchdog timer"; set_bit(DEVICE_CATEGORY_MISC, dc->categories); } =20 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590088904; cv=none; d=zohomail.com; s=zohoarc; b=UHaiACqypHcOgr0JCElLA6Sq+RMaMPYsypqznwXsGc34o8lDui6P4p/aJ4c0tB+uRFqjGXWSsR6/OsVU/H1Q245rHFvhkOII9i5WL9MrEV/oZYtDtGML77ex670l1mVnP4mJlrFRsaWuAXniDUNeCgq9GQ0e7YoNt5FRIEElmyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590088904; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+hbGBZsc8AF+X3waDnF16DXho47LwjO3DYv4rpJ8Ce8=; b=b7cia4laJmTFrlTVWpWY9nzSlNNV8d7UQ0cvaeNYh5fjdPogCT3fnUjF8qwIZznXu2eHL/SEnSLrEydj2DUWk9cQH6CNLXbuWnG6JWLwW8ZiVkNSTLnOa4yRZFJV5CUWzE2MKLYRu5dH25nJQu+5LoOQ/s+bPqAzXiyknjOUNhY= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590088904071690.5552404411859; Thu, 21 May 2020 12:21:44 -0700 (PDT) Received: from localhost ([::1]:56368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqlC-0003iC-Se for importer@patchew.org; Thu, 21 May 2020 15:21:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgD-0002TU-44 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:33 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:33462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgB-0000Rc-VG for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:32 -0400 Received: by mail-wr1-x435.google.com with SMTP id l11so7810533wru.0 for ; Thu, 21 May 2020 12:16:31 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+hbGBZsc8AF+X3waDnF16DXho47LwjO3DYv4rpJ8Ce8=; b=xg8AZVIs+o4OLrkktftOCo313ZSmdaO9FCHixpqR+jSPkIgh3ckslVAyJyNXrNGHJR 8aRKof89O55LGXV2ew7tAoPbZ9z+OvfsMrqS/ZYWoORFsXpVLWZdgCS0hm+JOhVLS2/R xI6nDK0yH3v6QLG4CuqDkQbQ4Rem1ffZyE0snyZWcbWa68PxvoA3Iarw7a/JNyTzpKgb TS6uoLtjy/DiEkZjw4LRSqEefq76U7zuL+qey7sOh/v2lTViaaTy9Dujwygf0lvDpmRz tBHNNyfL0EPhI++m/Da5f+IlUV/PHhu7QpMvws0gceKbA5Jruc5h2+wjfv4O1SR7+5Et hJ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+hbGBZsc8AF+X3waDnF16DXho47LwjO3DYv4rpJ8Ce8=; b=l7DKcMllhUIpz6zl6mersHvyFUGnh4cRxX9pnniyBMRrnvBxtJi7Zh5nOeQ9tT3Opz vrY67GBYke0vL8D7RuAmBojkua7XO7bf3IGSf+AbbFmpDgJTt6j8SaFt84uucDcTRYIV icsgKoBi7RNrWlgzM0Au7KXSiZEI0mp6M1LoiEJyBfcVEzCTIOtFGv7sN30n2lZg6giB 5TQG07qUDAmy4PBLw0ussFiFxsQU7Ce4J7zwCyq7dnyvDQud2qpig3QeLloXZJxRGd8+ AUa+gUOMN0iEA1U7fvESHMm1WvCZyPJDo0HO/lgheGB/RgNjE71D5xbZde8uYNyBiee5 zpcA== X-Gm-Message-State: AOAM533pFVAYy/iTMTxrEdGzoejep5cO5DJDZv24rcNXw3RmPLPU8/a7 A+o0hwISqYqf1TtDTv9m0QjHDJWZKs4G7g== X-Google-Smtp-Source: ABdhPJy1+1SY8wRwUo5QnexxzzB34QT1pYIjhbJVRncnpkYoOy750pMFNE0pm83mOJIMPr3i33KWHw== X-Received: by 2002:a5d:4806:: with SMTP id l6mr88187wrq.121.1590088590028; Thu, 21 May 2020 12:16:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/29] hw/arm/fsl-imx25: Wire up watchdog Date: Thu, 21 May 2020 20:15:55 +0100 Message-Id: <20200521191610.10941-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck With this commit, the watchdog on imx25-pdk is fully operational, including pretimeout support. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-4-linux@roeck-us.net Signed-off-by: Peter Maydell --- include/hw/arm/fsl-imx25.h | 5 +++++ hw/arm/fsl-imx25.c | 10 ++++++++++ hw/arm/Kconfig | 1 + 3 files changed, 16 insertions(+) diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h index 5e196bbf059..9e228daceae 100644 --- a/include/hw/arm/fsl-imx25.h +++ b/include/hw/arm/fsl-imx25.h @@ -29,6 +29,7 @@ #include "hw/gpio/imx_gpio.h" #include "hw/sd/sdhci.h" #include "hw/usb/chipidea.h" +#include "hw/watchdog/wdt_imx2.h" #include "exec/memory.h" #include "target/arm/cpu.h" =20 @@ -60,6 +61,7 @@ typedef struct FslIMX25State { IMXGPIOState gpio[FSL_IMX25_NUM_GPIOS]; SDHCIState esdhc[FSL_IMX25_NUM_ESDHCS]; ChipideaState usb[FSL_IMX25_NUM_USBS]; + IMX2WdtState wdt; MemoryRegion rom[2]; MemoryRegion iram; MemoryRegion iram_alias; @@ -229,6 +231,8 @@ typedef struct FslIMX25State { #define FSL_IMX25_GPIO1_SIZE 0x4000 #define FSL_IMX25_GPIO2_ADDR 0x53FD0000 #define FSL_IMX25_GPIO2_SIZE 0x4000 +#define FSL_IMX25_WDT_ADDR 0x53FDC000 +#define FSL_IMX25_WDT_SIZE 0x4000 #define FSL_IMX25_USB1_ADDR 0x53FF4000 #define FSL_IMX25_USB1_SIZE 0x0200 #define FSL_IMX25_USB2_ADDR 0x53FF4400 @@ -268,5 +272,6 @@ typedef struct FslIMX25State { #define FSL_IMX25_ESDHC2_IRQ 8 #define FSL_IMX25_USB1_IRQ 37 #define FSL_IMX25_USB2_IRQ 35 +#define FSL_IMX25_WDT_IRQ 55 =20 #endif /* FSL_IMX25_H */ diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c index 6f1a82ce3db..cdaa79c26bd 100644 --- a/hw/arm/fsl-imx25.c +++ b/hw/arm/fsl-imx25.c @@ -87,6 +87,7 @@ static void fsl_imx25_init(Object *obj) TYPE_CHIPIDEA); } =20 + sysbus_init_child_obj(obj, "wdt", &s->wdt, sizeof(s->wdt), TYPE_IMX2_W= DT); } =20 static void fsl_imx25_realize(DeviceState *dev, Error **errp) @@ -302,6 +303,15 @@ static void fsl_imx25_realize(DeviceState *dev, Error = **errp) usb_table[i].irq)); } =20 + /* Watchdog */ + object_property_set_bool(OBJECT(&s->wdt), true, "pretimeout-support", + &error_abort); + object_property_set_bool(OBJECT(&s->wdt), true, "realized", &error_abo= rt); + sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt), 0, FSL_IMX25_WDT_ADDR); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->wdt), 0, + qdev_get_gpio_in(DEVICE(&s->avic), + FSL_IMX25_WDT_IRQ)); + /* initialize 2 x 16 KB ROM */ memory_region_init_rom(&s->rom[0], OBJECT(dev), "imx25.rom0", FSL_IMX25_ROM0_SIZE, &err); diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 3d05dc8538c..8a5eb140f59 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -359,6 +359,7 @@ config FSL_IMX25 select IMX select IMX_FEC select IMX_I2C + select WDT_IMX2 select DS1338 =20 config FSL_IMX31 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089223; cv=none; d=zohomail.com; s=zohoarc; b=Oltb2JeoLvgfIhxwsTdhw8DXbsKni/ypqtnHCxIxCQyuO8sYMd+6JsvnRQYaxBXNb/PN7e5GHmzGE/LBLpLIxWERYGsB9Edc3ARvnBE4kjfaYS7RqxkLjru/ms1tpzoKLU52fNFKSXCryBHzs8iccx6oXkw8zflIRkLswYylH0I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089223; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g6opxpyblY3BJiC2qRIQdxGctvh0Y/Yc1moA3MhazYA=; b=ULIV2/bVGnD31kgEUdfGe9gEPx+QlBDNzJkWjcBSJd7yw90cdt7HsAo+b+tl4ltaGNSC5rgeGqklbngQ93apGJGiKffJt+x4Sa60AB1Vc68gTGyG8XnMJ5FuUTrI3IGi+mp3jhB3My1gwc77GEDjDezwtTh0LC5Sfe+TSbP18Rc= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089223794881.3655190626218; Thu, 21 May 2020 12:27:03 -0700 (PDT) Received: from localhost ([::1]:53674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqqL-0008Co-TA for importer@patchew.org; Thu, 21 May 2020 15:27:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgE-0002WI-6V for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:34 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:37999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgD-0000Rl-1L for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:33 -0400 Received: by mail-wm1-x342.google.com with SMTP id u12so2757945wmd.3 for ; Thu, 21 May 2020 12:16:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=g6opxpyblY3BJiC2qRIQdxGctvh0Y/Yc1moA3MhazYA=; b=pXFjLFj+QRe9uCKoLKExzRLAghoVCGMjOt+VM8zeOuRblvfr4YNweihnj3K1DNqQ4o /7NWSh7K7Jo7PNXc8CLIlepWmFCElAcS7djDZc0ArhCMSjVD4A1CAKm3Pudle6Iqw+V6 nyddkDZaT2pu262LV1ACI6JlGUSKvXcbAv8nomf+T0zHx+172FXAjXc6CQDW6z1GyDDC seR6wO6BpU8KdNLoQahsUGYdLdhGDCI6wmhNiCqnS4V96MTS04f4/idHmuju3zoYsZMf X9FVoF0uEyFIaSwnA7ms531SZNXiYxNbCEPIGIZtO68IlfIggYzRcrytTbdnMMvHAzzf 4Rvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g6opxpyblY3BJiC2qRIQdxGctvh0Y/Yc1moA3MhazYA=; b=SRSWnDDe6lb/UOjAtpHEa/6bn5sf7ku6IRFB5PRWN7MClua1s3l6ebKqi34VELPg35 pAAUn6+IHqB3BotWoKynaqtU7QzrxRTyRiaNwj4B2SKl/iwa9BzUrpx0A2z9KmbPqTlR fj3xZkuXlm1MNeTE6dCsz8F8kaiJYHAOZu1qg95wogh4VlkEoaTRvA5vzsM1YnzAU5t9 8ARHf2UXOJhyDIheZTUcJcPGshaLnBiwCIsscXtdJEUpyUVcPkO9CfmIXWE92CMIKeGr WHQoZih9GeMeQq/VpyGZFDo59HnpLLjgnp1/91m+iIUEWvC1qB+ZrhoLAIyIo5PV07FD tLHw== X-Gm-Message-State: AOAM533znRQhW1YIS5fmpnNApGucM/9yJ7re33Tp2+B2ZVRXSqHGOenx Qk/HrMmLKCA+exfOXVd4VmDJLmyY0T/BTQ== X-Google-Smtp-Source: ABdhPJxJLJ0PMiddTLUJHYpY6U/695lNDbgKseCBAIoxTu4xQWy26FjzOILP7T4MCGMeCY0kp/H7Mw== X-Received: by 2002:a1c:3bc2:: with SMTP id i185mr9825172wma.157.1590088591206; Thu, 21 May 2020 12:16:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/29] hw/arm/fsl-imx31: Wire up watchdog Date: Thu, 21 May 2020 20:15:56 +0100 Message-Id: <20200521191610.10941-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::342; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck With this patch, the watchdog on i.MX31 emulations is fully operational. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-5-linux@roeck-us.net Signed-off-by: Peter Maydell --- include/hw/arm/fsl-imx31.h | 4 ++++ hw/arm/fsl-imx31.c | 6 ++++++ hw/arm/Kconfig | 1 + 3 files changed, 11 insertions(+) diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h index ac5ca9826a4..dd8561b3098 100644 --- a/include/hw/arm/fsl-imx31.h +++ b/include/hw/arm/fsl-imx31.h @@ -25,6 +25,7 @@ #include "hw/timer/imx_epit.h" #include "hw/i2c/imx_i2c.h" #include "hw/gpio/imx_gpio.h" +#include "hw/watchdog/wdt_imx2.h" #include "exec/memory.h" #include "target/arm/cpu.h" =20 @@ -49,6 +50,7 @@ typedef struct FslIMX31State { IMXEPITState epit[FSL_IMX31_NUM_EPITS]; IMXI2CState i2c[FSL_IMX31_NUM_I2CS]; IMXGPIOState gpio[FSL_IMX31_NUM_GPIOS]; + IMX2WdtState wdt; MemoryRegion secure_rom; MemoryRegion rom; MemoryRegion iram; @@ -87,6 +89,8 @@ typedef struct FslIMX31State { #define FSL_IMX31_GPIO1_SIZE 0x4000 #define FSL_IMX31_GPIO2_ADDR 0x53FD0000 #define FSL_IMX31_GPIO2_SIZE 0x4000 +#define FSL_IMX31_WDT_ADDR 0x53FDC000 +#define FSL_IMX31_WDT_SIZE 0x4000 #define FSL_IMX31_AVIC_ADDR 0x68000000 #define FSL_IMX31_AVIC_SIZE 0x100 #define FSL_IMX31_SDRAM0_ADDR 0x80000000 diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index 8472d2e9111..1e7959863dd 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -63,6 +63,8 @@ static void fsl_imx31_init(Object *obj) sysbus_init_child_obj(obj, "gpio[*]", &s->gpio[i], sizeof(s->gpio[= i]), TYPE_IMX_GPIO); } + + sysbus_init_child_obj(obj, "wdt", &s->wdt, sizeof(s->wdt), TYPE_IMX2_W= DT); } =20 static void fsl_imx31_realize(DeviceState *dev, Error **errp) @@ -205,6 +207,10 @@ static void fsl_imx31_realize(DeviceState *dev, Error = **errp) gpio_table[i].irq)); } =20 + /* Watchdog */ + object_property_set_bool(OBJECT(&s->wdt), true, "realized", &error_abo= rt); + sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt), 0, FSL_IMX31_WDT_ADDR); + /* On a real system, the first 16k is a `secure boot rom' */ memory_region_init_rom(&s->secure_rom, OBJECT(dev), "imx31.secure_rom", FSL_IMX31_SECURE_ROM_SIZE, &err); diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 8a5eb140f59..9afa6eee799 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -367,6 +367,7 @@ config FSL_IMX31 select SERIAL select IMX select IMX_I2C + select WDT_IMX2 select LAN9118 =20 config FSL_IMX6 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089006; cv=none; d=zohomail.com; s=zohoarc; b=EwK8BIQEzmBYqqVpu1ATkSkdrR4nEmjxOAh94De9NuV5/JBJYz6OMErv8I9ths4N+85v47msH7I4GHFEvWRswBEr52obTo1TX5bSuz0qsxbolgwD4hQjfaUBKzylLs5hWNovcNtrwqkoZdOxuPrRN/CncGf3PaXUFoHPZ4bwsxU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089006; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/CQUeNZzF81fMUMrjQ9fUpjLOhXLi7IijeH4uibvu5Q=; b=BfRQ9MGv6A3jWSvoCkHzOym1+yDBKDUZYkNClBCj3G9Mss8sdCA02AbBCD0HZF0lUIvGySPrLi7kJu2SEwMHnc4rEQnTjij8hkKZdK9OExAL0gy8S714p+nmn/r4OWZHaENyPpxZGKFGQr1iCxDqpPfp47ntJYDS/j0oYb3ycFc= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089006714281.5862046745815; Thu, 21 May 2020 12:23:26 -0700 (PDT) Received: from localhost ([::1]:36676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqmr-0007jZ-7P for importer@patchew.org; Thu, 21 May 2020 15:23:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgE-0002Y2-Sc for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:34 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:33001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgD-0000Rt-U8 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:34 -0400 Received: by mail-wr1-x443.google.com with SMTP id l11so7810610wru.0 for ; Thu, 21 May 2020 12:16:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/CQUeNZzF81fMUMrjQ9fUpjLOhXLi7IijeH4uibvu5Q=; b=lgzIKUk9suiMCZmJ0wPZddNvVbgPVdpgeHuGqhL3KqfLR8A1dLY0+zySKARbPS4v9w W+LNsJ2PA5Gdua9HrA9sMaqiHL8sWRP701iJK8BKiyUGu3ZquRzAr9UIdMQrLhtCY54p MRN3lT//d4fx1HGaRwa161GCHv07CadzxNZ6xL1m5Q54IYmqSHDil26JDOc+8mZKR13L FtQSDcYd+2Um+dHtbckAPPX87R6PwuonnKxrblAcjcXCUGp9Hjy5Trwl1cxliuXsceA7 mOTuF3mUQ6VSI9CzkDp8mvJvKxMV6NH8rPbIpCH0zlpPsZoJdATv6BcjBT53Ga6FfesR pYwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/CQUeNZzF81fMUMrjQ9fUpjLOhXLi7IijeH4uibvu5Q=; b=lkdw7PU7/sY6UThPw/emSixgTSsgiE6gHPSCpxk8oHT1YNpjAH9Tb3c8BqA6e5H94V GPUOUveWjMKkaZyJhniSXNXgXPPilcO3vOMyA9IsivsHn2Ozgoii5gVaOx5bk5J/OGTV PfJoU6IgbybtaFoILm9f7H5wj5Sh2ES1BgLQu/Zd6pxlYmE4SDpZbpW7zgA2pQPQu/6X CYo+UdUQ36eZEwSXnC9XUbTc+QI/qAN0Hp+rmgxIs+5S72Je2d/56vUJWVHGChaihSs8 tKKWFT1Ict/lqbTIyk+eJBChMbrSdmOLzBpi8jnvsuQyzrK6VTARiZqspXyDRKZFxpLH qrBQ== X-Gm-Message-State: AOAM5331Kcq92Pj+PPcUOzOU94SAUgOGKowCA/GJEmnxFMwLGizQgp/4 6jChAlyJBDIHRLbfdgGFZw+exWXy7s74sw== X-Google-Smtp-Source: ABdhPJyUIZzNj1wwpoUz3TXHfMScyd9iFdY97GjHou1QLvh3gavYI0ZqPqtIa9u7zh4/w/JBnmz13Q== X-Received: by 2002:a05:6000:ce:: with SMTP id q14mr94570wrx.105.1590088592237; Thu, 21 May 2020 12:16:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/29] hw/arm/fsl-imx6: Connect watchdog interrupts Date: Thu, 21 May 2020 20:15:57 +0100 Message-Id: <20200521191610.10941-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::443; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck With this patch applied, the watchdog in the sabrelite emulation is fully operational, including pretimeout support. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-6-linux@roeck-us.net Signed-off-by: Peter Maydell --- hw/arm/fsl-imx6.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 13f1bf23a6c..f58c85aa8ce 100644 --- a/hw/arm/fsl-imx6.c +++ b/hw/arm/fsl-imx6.c @@ -433,11 +433,20 @@ static void fsl_imx6_realize(DeviceState *dev, Error = **errp) FSL_IMX6_WDOG1_ADDR, FSL_IMX6_WDOG2_ADDR, }; + static const int FSL_IMX6_WDOGn_IRQ[FSL_IMX6_NUM_WDTS] =3D { + FSL_IMX6_WDOG1_IRQ, + FSL_IMX6_WDOG2_IRQ, + }; =20 + object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-sup= port", + &error_abort); object_property_set_bool(OBJECT(&s->wdt[i]), true, "realized", &error_abort); =20 sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, FSL_IMX6_WDOGn_ADDR= [i]); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->wdt[i]), 0, + qdev_get_gpio_in(DEVICE(&s->a9mpcore), + FSL_IMX6_WDOGn_IRQ[i])); } =20 /* ROM memory */ --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089125; cv=none; d=zohomail.com; s=zohoarc; b=VayZUUbskrhMoSXsEHi5G6PKYUNetgBDZvrlvrp9aaPRDvBQfwmtidjuH9P1gqZd0Znv7g3K/QuD3pkMAvV7qyNguucwXCYlPl5/eU00Ils1QOr6CwCzK2jazBg9edLFHtEZzV1/rcUHaBmkmaeRus2UspinydqhHMeh+SviUuY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089125; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=d4s6zDnREhAoNMbKHlnL2nJicHbk/umExwSYklWFs54=; b=TrTnhyZNFlcyxlgUHdI9oITUcOnS6TihyPjC9ed/ZQ133uUxAYdvwDMpydAehRmF/xC8SrOm65jmaxC2+Of+rWJjMMI6+QW5BaRszX1Kx/TT13r4D0hPjyW0pNJ0/bq23V6cFaDduIvoCDqoz5lv/mJxD0ozaEFx+LKpVeRiI0E= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089125073567.665404737212; Thu, 21 May 2020 12:25:25 -0700 (PDT) Received: from localhost ([::1]:45228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqol-0003TK-O3 for importer@patchew.org; Thu, 21 May 2020 15:25:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgF-0002aH-SU for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:35 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:34794) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgE-0000S0-Uc for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:35 -0400 Received: by mail-wr1-x443.google.com with SMTP id g12so6565549wrw.1 for ; Thu, 21 May 2020 12:16:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=d4s6zDnREhAoNMbKHlnL2nJicHbk/umExwSYklWFs54=; b=tflTDjYpC52AKWnAhfxxCXbmepuYlmubnTqxirCXniltCnkuvbrTBEzcofqu01ZBn8 oJ9UCAQWo0ZQTtsOskxs4Ud1E/A9ThHiXL7yMY3cSByenZBUm2t5jhj89Iu5RtvYvz9Z 45ND27B/IjrzJ7zYs7NVJM6ne4lrE1rlc/A10CK68cTNdoEO2wJ/sZGlCzfc+2zjPYrL l+dPCkYMSJtiTC0ILFgXpNDjzNSbeIAXr7pkFrS2dzmVGQizdYxMETcE5l/X26uVUgbF 2RlLaJ8oRKHugoo1jNBJY2XiP0Kpza9aaxlJFcpCrwRJJOy6/N/q3cY+w+bbOgxv82eL Eb2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d4s6zDnREhAoNMbKHlnL2nJicHbk/umExwSYklWFs54=; b=r2S4Y9B6bZSjv4sv6es5ez5JaPMKyje6aNrWgLysOVaPPVszvZbbbgSSV484EuU42Q 6LyeOEvEM7+JCxREoUoOvbpmapAlu1bElvf36eTj6xxlnUMzFiYQiiMQt/O3191ZlrE6 f2/93h3vvS8UvhAQNt5/0U56Y6H3rZJxEY71Ra6JgiLHsRxteGB+qtrFaLk3DtHtD9H9 hVeKfUmMDdcW8+I/H/xij1ubD5F4uNB3VOcI5OM4HZ3F6pbntQ/Sjk60jl1EySIIIV7b jeO7tNp+L5OduupWu5HB5JqV5nPHUYDkkAr1PcjLIXVvCSuufII0Tqm0wRLv3Km+R8l5 bOtQ== X-Gm-Message-State: AOAM531+3N2rTZA75lGTUJFULHB6iCW0D/zyKvYVal1gVxYHrRVPS6J/ OW1nCniSshgKCVHz/UXxBlj2m7dw384rKg== X-Google-Smtp-Source: ABdhPJz5UfHtihmnw1Da25Tyw6WCCGcgOd7bOtBZos9NhSl4d0nFEJ7NxcJTVbNeVE2mpFBz7GdY4w== X-Received: by 2002:a5d:530a:: with SMTP id e10mr75209wrv.303.1590088593322; Thu, 21 May 2020 12:16:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/29] hw/arm/fsl-imx6ul: Connect watchdog interrupts Date: Thu, 21 May 2020 20:15:58 +0100 Message-Id: <20200521191610.10941-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::443; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Guenter Roeck With this commit, the watchdog on mcimx6ul-evk is fully operational, including pretimeout support. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-7-linux@roeck-us.net Signed-off-by: Peter Maydell --- hw/arm/fsl-imx6ul.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index 56dfd7cecc9..3ecb212da6f 100644 --- a/hw/arm/fsl-imx6ul.c +++ b/hw/arm/fsl-imx6ul.c @@ -531,12 +531,22 @@ static void fsl_imx6ul_realize(DeviceState *dev, Erro= r **errp) FSL_IMX6UL_WDOG2_ADDR, FSL_IMX6UL_WDOG3_ADDR, }; + static const int FSL_IMX6UL_WDOGn_IRQ[FSL_IMX6UL_NUM_WDTS] =3D { + FSL_IMX6UL_WDOG1_IRQ, + FSL_IMX6UL_WDOG2_IRQ, + FSL_IMX6UL_WDOG3_IRQ, + }; =20 + object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-sup= port", + &error_abort); object_property_set_bool(OBJECT(&s->wdt[i]), true, "realized", &error_abort); =20 sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, FSL_IMX6UL_WDOGn_ADDR[i]); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->wdt[i]), 0, + qdev_get_gpio_in(DEVICE(&s->a7mpcore), + FSL_IMX6UL_WDOGn_IRQ[i])); } =20 /* --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089169; cv=none; d=zohomail.com; s=zohoarc; b=TGwmT/QU/cHaai8m9gdnTO64I5gL5nfO2F+H5kEUWYUEJj11V/beTxgcTyk0YIHuEMa52G/R1BQwwjuHQ/CpdC+6VgmmPkc3TVRFIT3gd8bPr8/2yxXHwbgto68B30shBlI0gRaXd9i0nUd1iCJZz9/IgaZdHmFuQ8P7gNPvOXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089169; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2Mka/5Sz7nZUUrfy7Vlrx4tkhq1CXZaUSp5RTGkdVVc=; b=FQdLbXmml+F3PC/zXaJqSL+TpDy6CbIsPSffXbyqhUCWwRe3ZRZ4QzEspx7EEhCmGB4n+o2Ph4qKeOzEYYGppnG8CvRXuWZbTrSfC5GDUzxb9/KwX+dfdwdxVjqOflChNuSG9KQ+x9n7fw1ZSAyv/L8EAOAdOtXNMINNs4k7vlw= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15900891692097.253343004393628; Thu, 21 May 2020 12:26:09 -0700 (PDT) Received: from localhost ([::1]:48800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqpT-0005aM-Qv for importer@patchew.org; Thu, 21 May 2020 15:26:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgH-0002do-DH for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:37 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:45472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgG-0000SC-9n for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:37 -0400 Received: by mail-wr1-x431.google.com with SMTP id c3so3527754wru.12 for ; Thu, 21 May 2020 12:16:35 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2Mka/5Sz7nZUUrfy7Vlrx4tkhq1CXZaUSp5RTGkdVVc=; b=v2rX4itSwOvP7xr52jl0n0Z6/9me89mqWHmKmhhjgolAywV/5D1wHBJz5IBmULUzio YNqN3DoBMYjSdAL/bF3vBeXam5lzVGIY7UVz5h9dgF9EaMwatgx99nYgABxGQglGd0a5 ci4MDdu0ol+q0LLG7QUGO+cDQ+l/sSH5avW82HLTJ0o7LidSSn6mrq7WHPEpkw+V7Ys5 E2TQBNapWxMVvopF5HWy5LUfjH9RUAp6iCCcBXY5/HpDZ3MxPmaQ9noVHAeFcD4XR9eG GfQowiEnPxbMIf6X0hljk4SJ83V3dQfuzwpY3Zsuy1+hwysvjVVbuWTM6q6nDB4PYaea UMGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Mka/5Sz7nZUUrfy7Vlrx4tkhq1CXZaUSp5RTGkdVVc=; b=lVHfGnrdB7KDQR5xBZ4uSE4HzoPRGgwOOanxUeszlNYttLncyr1Sed4ldOXEnqpr52 6+tCRXpTCrEOloRsKGKNBIqOfrPQ70syPO+Jhw4EpHgiXRhhxLgnZtEyFoqtz311yNex pUBvCmmDxBzyPIAGprOADeJ01jpYH8Dw2+YRmooovZLHI8GXX4Ynmsx1maY9tineNdeC AM9ACvyrWNkCvKszunaPtSRYpAR5worPSWzOa+3eHK2SB5J5ZQtjyZqtCxvC/kJD1gNY 9SGQKqTcsFw7HJJ8OE6c4uezoTsJ90Gveh7wQH9AHsombYANGRgmPROO9bJIseAVQGuj AmUA== X-Gm-Message-State: AOAM532nI3fx0eYyTiCDkc71+I0XuoKz2xxwTVJ8iawDw6L4Wh7vCll7 MebHVVxekjRbtCr5lyS14qgTOePn1xypjg== X-Google-Smtp-Source: ABdhPJylkyyiGmqQgaS9mAYsz7c4CfCrE3EbCRBuPQLAiGogv2SISXQD3O2MmlmdGHZ6E/SXE01O5w== X-Received: by 2002:adf:b30f:: with SMTP id j15mr104163wrd.394.1590088594568; Thu, 21 May 2020 12:16:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/29] hw/arm/fsl-imx7: Instantiate various unimplemented devices Date: Thu, 21 May 2020 20:15:59 +0100 Message-Id: <20200521191610.10941-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck Instantiating PWM, CAN, CAAM, and OCOTP devices is necessary to avoid crashes when booting mainline Linux. Reviewed-by: Peter Maydell Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-8-linux@roeck-us.net Signed-off-by: Peter Maydell --- include/hw/arm/fsl-imx7.h | 16 ++++++++++++++++ hw/arm/fsl-imx7.c | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h index 3a0041c4c26..47826da2b7e 100644 --- a/include/hw/arm/fsl-imx7.h +++ b/include/hw/arm/fsl-imx7.h @@ -113,6 +113,9 @@ enum FslIMX7MemoryMap { FSL_IMX7_IOMUXC_GPR_ADDR =3D 0x30340000, FSL_IMX7_IOMUXCn_SIZE =3D 0x1000, =20 + FSL_IMX7_OCOTP_ADDR =3D 0x30350000, + FSL_IMX7_OCOTP_SIZE =3D 0x10000, + FSL_IMX7_ANALOG_ADDR =3D 0x30360000, FSL_IMX7_SNVS_ADDR =3D 0x30370000, FSL_IMX7_CCM_ADDR =3D 0x30380000, @@ -124,11 +127,24 @@ enum FslIMX7MemoryMap { FSL_IMX7_ADC2_ADDR =3D 0x30620000, FSL_IMX7_ADCn_SIZE =3D 0x1000, =20 + FSL_IMX7_PWM1_ADDR =3D 0x30660000, + FSL_IMX7_PWM2_ADDR =3D 0x30670000, + FSL_IMX7_PWM3_ADDR =3D 0x30680000, + FSL_IMX7_PWM4_ADDR =3D 0x30690000, + FSL_IMX7_PWMn_SIZE =3D 0x10000, + FSL_IMX7_PCIE_PHY_ADDR =3D 0x306D0000, FSL_IMX7_PCIE_PHY_SIZE =3D 0x10000, =20 FSL_IMX7_GPC_ADDR =3D 0x303A0000, =20 + FSL_IMX7_CAAM_ADDR =3D 0x30900000, + FSL_IMX7_CAAM_SIZE =3D 0x40000, + + FSL_IMX7_CAN1_ADDR =3D 0x30A00000, + FSL_IMX7_CAN2_ADDR =3D 0x30A10000, + FSL_IMX7_CANn_SIZE =3D 0x10000, + FSL_IMX7_I2C1_ADDR =3D 0x30A20000, FSL_IMX7_I2C2_ADDR =3D 0x30A30000, FSL_IMX7_I2C3_ADDR =3D 0x30A40000, diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index 119b281a500..d6cf7c48ce8 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -459,6 +459,30 @@ static void fsl_imx7_realize(DeviceState *dev, Error *= *errp) */ create_unimplemented_device("sdma", FSL_IMX7_SDMA_ADDR, FSL_IMX7_SDMA_= SIZE); =20 + /* + * CAAM + */ + create_unimplemented_device("caam", FSL_IMX7_CAAM_ADDR, FSL_IMX7_CAAM_= SIZE); + + /* + * PWM + */ + create_unimplemented_device("pwm1", FSL_IMX7_PWM1_ADDR, FSL_IMX7_PWMn_= SIZE); + create_unimplemented_device("pwm2", FSL_IMX7_PWM2_ADDR, FSL_IMX7_PWMn_= SIZE); + create_unimplemented_device("pwm3", FSL_IMX7_PWM3_ADDR, FSL_IMX7_PWMn_= SIZE); + create_unimplemented_device("pwm4", FSL_IMX7_PWM4_ADDR, FSL_IMX7_PWMn_= SIZE); + + /* + * CAN + */ + create_unimplemented_device("can1", FSL_IMX7_CAN1_ADDR, FSL_IMX7_CANn_= SIZE); + create_unimplemented_device("can2", FSL_IMX7_CAN2_ADDR, FSL_IMX7_CANn_= SIZE); + + /* + * OCOTP + */ + create_unimplemented_device("ocotp", FSL_IMX7_OCOTP_ADDR, + FSL_IMX7_OCOTP_SIZE); =20 object_property_set_bool(OBJECT(&s->gpr), true, "realized", &error_abort); --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089009; cv=none; d=zohomail.com; s=zohoarc; b=Dk6YGBioPEpFsK3+jJXKICrt3IMnIuNm+qGMCyev9xEb4mH7C0XAb92Ty7R/bsK0DHxi9ruORWgsjYoBDrpQHhDs/fq9LqnZ+SbRksok3DUzjAg3qCRFMRju8VnDYsypN/SG0+mQC6TDO+dUdWPwH5lhtCC1wcHbfk7ZGg1jjrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089009; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7HVyutZ+jChpWjaCI3psmvFBqjyzPdDDfNGC17h6AVA=; b=Jphjq+yhWQ0sH8QJ2Ke8WxE/2GXsctOPswUG/s93MMwbBJIa8qnh9hvNAC7iUGm3UtdvTlf2oRGAGLFrh/Xud9YtyJox7s/4dWxLnwhnOrvJRk7YJ3HIAGaU4vIIxulZ3Ia5Mo8TaiJ5/qIriMl5XpJnuN5fNgmKzkEFAfnMGcI= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089009211429.88039697087106; Thu, 21 May 2020 12:23:29 -0700 (PDT) Received: from localhost ([::1]:36976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqmt-0007rS-TP for importer@patchew.org; Thu, 21 May 2020 15:23:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgI-0002gp-Bc for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:38 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:35796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgH-0000SJ-Az for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:37 -0400 Received: by mail-wr1-x433.google.com with SMTP id x14so2391322wrp.2 for ; Thu, 21 May 2020 12:16:36 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7HVyutZ+jChpWjaCI3psmvFBqjyzPdDDfNGC17h6AVA=; b=qFbw3Untmnfv7tRO+0usM6XxrlCUxMUg0b6chY+1yLx0yPHyL5SAZbM+ABHeC209wX vHTknaYu0bFHv+KV40+H9RSQ8hhRl7ugNFGjaGVrBMKxs1ixRhYYUMHXwlo8IjY2P7rc QYY36Zr9tNDwN6yxvxqcsxQTzGwUhzIxnKjHOw95v/MkxTL2nvBFYxFv/4qBJ9KX/rTg ifyO7UMvDifTNWruwHArgCEXS74gngVBCcIjfXga01W9wfWcKdvOq8KwpkKQOj+nN5KE w7j70AkNmUkzQhnDgxR1x/lNpu7k3WOaUbmXIk1uZXQjrxmZ67pFQeAAT3MqeuU3I/BO KeaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7HVyutZ+jChpWjaCI3psmvFBqjyzPdDDfNGC17h6AVA=; b=ob9VKZsMyltzUtTTQHbVMDV1QDkiDlgHMkwAZnyWUuIn22MwmeER/8iXmBIdNOUn20 q74Hn3cDZa/htizf6Fmq/5zb7B335SbZHI+K4zTjOZc4QY7uSMMfbz27qb9mHqOypZ0G uuONJIGVBz7NuBbvDXp7caZrgIyvZNVIJt71a0/FVUpTshkDpm0NXC2PKULaIdRbEWt6 6V2tGtFc5vnNpaXhn2zdSZudWmOxTYsHZ40Y/1DcFe6GJwwE3S2K35cXdaBu2fVd83f8 di0jxvGfMhF3MVB8Ecj3PiV8v17kmJCJrsVS9kBCMUC94Y3qmLXd7eF5AK/bciTyIZCu Xijw== X-Gm-Message-State: AOAM532X0OnE/6jc9mAxvJmwqZc1gn+zJU9FEE0MCLB70pYhHV+LiCXs PurdwDlVxugnux/jHoLcwMETlMjlk0LKNg== X-Google-Smtp-Source: ABdhPJw3KkGWki159pId6Oc5FTOIW8nbDmqX7fmh0doL+s1dJ7tUHzDgR6JBfsxqwmFE2Ik0FxOULg== X-Received: by 2002:adf:e38e:: with SMTP id e14mr123880wrm.2.1590088595632; Thu, 21 May 2020 12:16:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/29] hw/arm/fsl-imx7: Connect watchdog interrupts Date: Thu, 21 May 2020 20:16:00 +0100 Message-Id: <20200521191610.10941-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Guenter Roeck i.MX7 supports watchdog pretimeout interupts. With this commit, the watchdog in mcimx7d-sabre is fully operational, including pretimeout support. Reviewed-by: Peter Maydell Signed-off-by: Guenter Roeck Message-id: 20200517162135.110364-9-linux@roeck-us.net Signed-off-by: Peter Maydell --- include/hw/arm/fsl-imx7.h | 5 +++++ hw/arm/fsl-imx7.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h index 47826da2b7e..da977f9ffb4 100644 --- a/include/hw/arm/fsl-imx7.h +++ b/include/hw/arm/fsl-imx7.h @@ -228,6 +228,11 @@ enum FslIMX7IRQs { FSL_IMX7_USB2_IRQ =3D 42, FSL_IMX7_USB3_IRQ =3D 40, =20 + FSL_IMX7_WDOG1_IRQ =3D 78, + FSL_IMX7_WDOG2_IRQ =3D 79, + FSL_IMX7_WDOG3_IRQ =3D 10, + FSL_IMX7_WDOG4_IRQ =3D 109, + FSL_IMX7_PCI_INTA_IRQ =3D 125, FSL_IMX7_PCI_INTB_IRQ =3D 124, FSL_IMX7_PCI_INTC_IRQ =3D 123, diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index d6cf7c48ce8..89c3b64c066 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -447,11 +447,22 @@ static void fsl_imx7_realize(DeviceState *dev, Error = **errp) FSL_IMX7_WDOG3_ADDR, FSL_IMX7_WDOG4_ADDR, }; + static const int FSL_IMX7_WDOGn_IRQ[FSL_IMX7_NUM_WDTS] =3D { + FSL_IMX7_WDOG1_IRQ, + FSL_IMX7_WDOG2_IRQ, + FSL_IMX7_WDOG3_IRQ, + FSL_IMX7_WDOG4_IRQ, + }; =20 + object_property_set_bool(OBJECT(&s->wdt[i]), true, "pretimeout-sup= port", + &error_abort); object_property_set_bool(OBJECT(&s->wdt[i]), true, "realized", &error_abort); =20 sysbus_mmio_map(SYS_BUS_DEVICE(&s->wdt[i]), 0, FSL_IMX7_WDOGn_ADDR= [i]); + sysbus_connect_irq(SYS_BUS_DEVICE(&s->wdt[i]), 0, + qdev_get_gpio_in(DEVICE(&s->a7mpcore), + FSL_IMX7_WDOGn_IRQ[i])); } =20 /* --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089126; cv=none; d=zohomail.com; s=zohoarc; b=iq1iM2z8vz4An5JTNGElScM3FNIiioo/rU5ylZmP2OtIIaVWZLBM38Mn9AAU0RcjynILZXUQrxmOQMxs6wHeXaWeESxvkh0EcNh2ilTr6rLCoDlObbOYSi+3IyfPtHYdwUBje7YP9dE/fMaA+5RcLO/v7p2hkKrTUaLcy2phbTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089126; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MBRcZYhsnG0Nv84sXRAp1u7ZTCa04K6nc81c5uqmkh8=; b=EVE/YeVBOecGuRWk2J6ApS2Auwkt6CQMHN65IxgyavEyjIXufDmX6V/LbDDE8zso9yPthxy7YpWhVhRa5yHfzcPkfOyVOyCD7CQOA2Zd9cirgmSuVHRdDTzvWW1GloPZl8BtgfJuq2e4qD+Sa461FhtgD82HDVGunVqtgwuAOZs= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089126850638.6817326363703; Thu, 21 May 2020 12:25:26 -0700 (PDT) Received: from localhost ([::1]:45394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqon-0003Yg-Kb for importer@patchew.org; Thu, 21 May 2020 15:25:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgJ-0002jN-Iw for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:39 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36035) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgI-0000SQ-Ex for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:39 -0400 Received: by mail-wr1-x444.google.com with SMTP id k13so7795742wrx.3 for ; Thu, 21 May 2020 12:16:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=MBRcZYhsnG0Nv84sXRAp1u7ZTCa04K6nc81c5uqmkh8=; b=DpqotN24rCXVOXyo2V0Fq9Cz24bRd25gK2MPTyEOqAL5zEp36gi3/9Wz+ybODSigcF uSD3fSHl7IdTio+6e3Pi8qfImYY1CfasSttpL34RkSwgPIyDnZzbkYGld8JLurduGwnm z/gQLJWL+ilnfT+2Chd8V/Iml1i8BEAGg/zS76xg1JHuYnIWKg6H5n4V5EaOkz9k1DGu gbqbvkQeeopAm/NIyPQav91+ttk3kDmqFhItvrSj7zw44VIne2c+/Bg+t4qxJBdgfHcY JsiW+K4K6xVbFeXmSmxUUh4XNfC+GAjAxQCQyrEFIxDzIOb+qUBRVMlPBbUghW0iMS0q WkHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MBRcZYhsnG0Nv84sXRAp1u7ZTCa04K6nc81c5uqmkh8=; b=UldF5Cdw8Km4+mEcgpxDDKg7YKXQAhV6gAbJ+l3AutUnnxbGjEl7Ym6SMb2p8iLpfs DKZwG6PE0NLsBbGz5LcmBS0/Ms8EWCb8Haj62QcmmL82JUzgPZpcWo5/0KnpRLpa1Oln zyvL+BPev4U3HrHxbM/sUHpRomyyTUv0MN7U0arrMAvGwG0VRmLSyWwcmb5AeT2j2eRN ds6jwGFz0s8vOURRk1okS0NxNyWTfwO23CrwdBXnTXObTuJ5NjPaxyeGDl7sQVFPFaF+ HPeWBdUv/MPFwFbB6LuRHEGxHUjdec/UZ1HHZ+2N28NrCqQFx6EMzjW9LhDVzoBkb82y JDyQ== X-Gm-Message-State: AOAM530aaqoJZZa3yKUuE7hGvmyr8ddgUP20LcPborlaKxkNCW1TkcNY e3pw0WLeyDj4uQTOof9Thw0NQ9TSGmDnlA== X-Google-Smtp-Source: ABdhPJwuJb0bYKnH9yW153p09mgCQE0/lAvHdtDnxELC3t11Omvotu0/ab53h9FTJHaFGIbYdNoFig== X-Received: by 2002:a5d:4d0f:: with SMTP id z15mr70137wrt.411.1590088596658; Thu, 21 May 2020 12:16:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/29] hw/arm/integratorcp: Replace hw_error() by qemu_log_mask() Date: Thu, 21 May 2020 20:16:01 +0100 Message-Id: <20200521191610.10941-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20200518140309.5220-2-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/integratorcp.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 6d69010d06b..5fb54e5aa75 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -20,6 +20,7 @@ #include "exec/address-spaces.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" +#include "qemu/log.h" #include "qemu/error-report.h" #include "hw/char/pl011.h" #include "hw/hw.h" @@ -144,8 +145,9 @@ static uint64_t integratorcm_read(void *opaque, hwaddr = offset, /* ??? Voltage control unimplemented. */ return 0; default: - hw_error("integratorcm_read: Unimplemented offset 0x%x\n", - (int)offset); + qemu_log_mask(LOG_UNIMP, + "%s: Unimplemented offset 0x%" HWADDR_PRIX "\n", + __func__, offset); return 0; } } @@ -252,8 +254,9 @@ static void integratorcm_write(void *opaque, hwaddr off= set, /* ??? Voltage control unimplemented. */ break; default: - hw_error("integratorcm_write: Unimplemented offset 0x%x\n", - (int)offset); + qemu_log_mask(LOG_UNIMP, + "%s: Unimplemented offset 0x%" HWADDR_PRIX "\n", + __func__, offset); break; } } @@ -394,7 +397,8 @@ static uint64_t icp_pic_read(void *opaque, hwaddr offse= t, case 5: /* INT_SOFTCLR */ case 11: /* FRQ_ENABLECLR */ default: - printf ("icp_pic_read: Bad register offset 0x%x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return 0; } } @@ -430,7 +434,8 @@ static void icp_pic_write(void *opaque, hwaddr offset, case 8: /* FRQ_STATUS */ case 9: /* FRQ_RAWSTAT */ default: - printf ("icp_pic_write: Bad register offset 0x%x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return; } icp_pic_update(s); @@ -504,7 +509,8 @@ static uint64_t icp_control_read(void *opaque, hwaddr o= ffset, case 3: /* CP_DECODE */ return 0x11; default: - hw_error("icp_control_read: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); return 0; } } @@ -524,7 +530,8 @@ static void icp_control_write(void *opaque, hwaddr offs= et, /* Nothing interesting implemented yet. */ break; default: - hw_error("icp_control_write: Bad offset %x\n", (int)offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089240; cv=none; d=zohomail.com; s=zohoarc; b=nxuFNQHwaxpK92LdoUNlc5+2oQv9b/kjBqbKv8rff4DVIdAjQhUr9qOHZEhm2UcheHO7INcLhRSOUAwTkeaaJasy+w24t7A4uWdSkbmrW6XhE4sFWx1olQQDKSweqkyfByOYwgtbo5bDLVc4BTV74uiIdMvOJ0QRQ/3j2JRxsJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089240; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=P9KCQG/WS9GdDGHqO3MaEt12NQUl4WXAVUVOE7KRnPs=; b=a/VDIh4u95uJEUoooFt2NqenDFKCh8UJy5++N6eRwt/CoLK8BrGgl2F75OUOSFNUcv9IYecuOaIcHlt1KuOYxeO/YNyIh4yYlSRAekgy61rUhLIx7IBHC+iwHn6iN0EPehlHEXrigEiDAIyLGaan6N8XYcxLNlfV+6gCrcGeyp4= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089240917977.7306709937745; Thu, 21 May 2020 12:27:20 -0700 (PDT) Received: from localhost ([::1]:54142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqqd-0008Sk-FG for importer@patchew.org; Thu, 21 May 2020 15:27:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgK-0002m5-OH for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:40 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:42182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgJ-0000SX-Gy for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:40 -0400 Received: by mail-wr1-x441.google.com with SMTP id s8so7744747wrt.9 for ; Thu, 21 May 2020 12:16:39 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=P9KCQG/WS9GdDGHqO3MaEt12NQUl4WXAVUVOE7KRnPs=; b=wZpnMc2byuMVHZNKWjRinyea4nLfOfujfXhtk+o9ZuosQYyCYk1RRKTRpO2KXLA1Bf LNr8zFYL/8n9MlvZPIpUhlzmiD+2JI2LpZqed3YkDj+X4t+78jgT+MCv5L+XUxaELbua VTufdJ8yUbS95mRmbFFt3dT9RS2oULmAWZ8kCByttdSdk5ZDSu0dOvUSWAePpz1q0xaX cyqVBV+3gh3DOM9uGIqfBoRm1T1n/XYl9Jnqw2XJKKgHUbFrvVBUeWneZIB4FNwC36P+ za0kbBGTPrfBM0QrVCscAHuOPNtc3ppKH7CnsMzIH3H7Eb606JALN6sM12wL3Zm6puDW sbNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P9KCQG/WS9GdDGHqO3MaEt12NQUl4WXAVUVOE7KRnPs=; b=gjoarppEph9ZR7JzgNccngX/7NNf0Ob/qw9qqg08PTxKga7T5uf6326muRzfxPVWD8 odLgJupf6WY59oO1IfdkGc43Pg9ebJ+p8jum4nDPXaaDikfJdkh7Dvuiz5+CkaCtN85y tx/UKcbjcuIA9JNo7TZydOwK803qnpLvnBek4+lUXZLX5fhnKSYb1odSgFEtXRDg1Ru9 DZ8ZV2B5AJwrJwazxzJUFWvIeWtnYLBjKM6PUCq8D8gjAJTYZWoQOsan9N7+DJm6KzkT e7Fooh6jLteq8HER5eoquEEcgk4qCe1QWb5dcBbZ5mpj1d88qE2Q8N77ZxhIq+SUlP1/ 9iKQ== X-Gm-Message-State: AOAM530T4s4n/HRpAk0qGxSOYX+RecS/GVZJ0mjeEvb5SblasKilzEJh 6L7pfzAK3th1nGmbqy0g4h9AQejNwXMNiA== X-Google-Smtp-Source: ABdhPJxaycj6EF0n1dQ4lPeBK60seLzfuT+oAy6OTfzOcH+GB4r7sA7Hb92WIODDu+a+ZfVC9BcWOQ== X-Received: by 2002:adf:fb08:: with SMTP id c8mr71268wrr.421.1590088597852; Thu, 21 May 2020 12:16:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/29] hw/arm/pxa2xx: Replace hw_error() by qemu_log_mask() Date: Thu, 21 May 2020 20:16:02 +0100 Message-Id: <20200521191610.10941-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20200518140309.5220-3-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/pxa2xx_gpio.c | 7 ++++--- hw/display/pxa2xx_lcd.c | 8 +++++--- hw/dma/pxa2xx_dma.c | 14 +++++++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c index f8df3cc2279..a01db54a518 100644 --- a/hw/arm/pxa2xx_gpio.c +++ b/hw/arm/pxa2xx_gpio.c @@ -9,7 +9,6 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" @@ -199,7 +198,8 @@ static uint64_t pxa2xx_gpio_read(void *opaque, hwaddr o= ffset, return s->status[bank]; =20 default: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } =20 return 0; @@ -252,7 +252,8 @@ static void pxa2xx_gpio_write(void *opaque, hwaddr offs= et, break; =20 default: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index 464e93161a2..d5f2e82a4ec 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -11,7 +11,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/hw.h" +#include "qemu/log.h" #include "hw/irq.h" #include "migration/vmstate.h" #include "ui/console.h" @@ -407,7 +407,8 @@ static uint64_t pxa2xx_lcdc_read(void *opaque, hwaddr o= ffset, =20 default: fail: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } =20 return 0; @@ -562,7 +563,8 @@ static void pxa2xx_lcdc_write(void *opaque, hwaddr offs= et, =20 default: fail: - hw_error("%s: Bad offset " REG_FMT "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c index 88ed4b6ff1f..8a2eeb32bc3 100644 --- a/hw/dma/pxa2xx_dma.c +++ b/hw/dma/pxa2xx_dma.c @@ -9,6 +9,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" @@ -268,7 +269,8 @@ static uint64_t pxa2xx_dma_read(void *opaque, hwaddr of= fset, unsigned int channel; =20 if (size !=3D 4) { - hw_error("%s: Bad access width\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad access width %u\n", + __func__, size); return 5; } =20 @@ -315,8 +317,8 @@ static uint64_t pxa2xx_dma_read(void *opaque, hwaddr of= fset, return s->chan[channel].cmd; } } - - hw_error("%s: Bad offset 0x" TARGET_FMT_plx "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\n", + __func__, offset); return 7; } =20 @@ -327,7 +329,8 @@ static void pxa2xx_dma_write(void *opaque, hwaddr offse= t, unsigned int channel; =20 if (size !=3D 4) { - hw_error("%s: Bad access width\n", __func__); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad access width %u\n", + __func__, size); return; } =20 @@ -420,7 +423,8 @@ static void pxa2xx_dma_write(void *opaque, hwaddr offse= t, break; } fail: - hw_error("%s: Bad offset " TARGET_FMT_plx "\n", __func__, offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); } } =20 --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089354; cv=none; d=zohomail.com; s=zohoarc; b=T7CBHLmus2zr6yXejQOE34hEnOkvQop5LjFJDa/M8sjYI2lHSg52ghOwLyA0MgEBIbiluI9Ge3jXO+BdTf69MOe8yolOsE/3OsZpWiaosGTnqZGDIvSoOU7kAYo7/5q8LwhfOdQP8bVEh0FSb9e6hhGwqc+3luKqlfnGOPE6J28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089354; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HzaGK+GNMjQeyxh3y1RKSO5ioG6l1/+Q0BYaSnO5M+E=; b=DcQ32d52nNHZ4zAPlvgS8/KVMyYiVqXxqgsDsX1SpnaDCbmIcGzB8noZo2VqvsqKrYg6B+COvCul4l3+RTokr0yr89K+uUYg8AN0OZgSmMkaUaTvgRF8oKTOHCAVMsfH2kLdn2luVoBJ4YfaovgHWHSmnwt2M5Zfs5O3/hnFer4= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15900893544251017.0177494582008; Thu, 21 May 2020 12:29:14 -0700 (PDT) Received: from localhost ([::1]:34488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqsS-0003cb-RC for importer@patchew.org; Thu, 21 May 2020 15:29:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgL-0002oh-Od for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:41 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgK-0000Sg-J7 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:41 -0400 Received: by mail-wr1-x430.google.com with SMTP id e16so7748309wra.7 for ; Thu, 21 May 2020 12:16:40 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HzaGK+GNMjQeyxh3y1RKSO5ioG6l1/+Q0BYaSnO5M+E=; b=ylVxpwfB5PcRRi1xYgO+VpFN1Xh9WOVw6z7LXPoJTgXgyX1bOcMx7lg8XmICpoAPrn i2trhR9NesHFM58V6uB+DC5Thrhx0Hcfy2c8ERKChAkI+1sLvdHmYqzGDLppAwUiufGH RpDa5KQNAA1SmuDwkxa4FiecWnzhIn9JmQOPLo54669GLGZ9az1F9CqoFBsOBtZ4iL7T ZmQuLvZzRk/S1gZupH7C0qyAwgX93pQ7CL79uZLLios2+Nn2KnKmiK3V5Y9sCd1UJWf7 fMIc5Gvb3P9bqF4pujPLrQDuhpBx7+725CK7q6cItzVtITT18qeNTxDJUymvXQq0Nt0n e3rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HzaGK+GNMjQeyxh3y1RKSO5ioG6l1/+Q0BYaSnO5M+E=; b=K5EK/p+zSsFlzDZG55VG8VfLup2mwVVlcvST6Bs7b1wVPFZqAXtSJcaEjRJ0XYReMV fDUxToNLBkWj5vQSXp5BnsB5YYa8r77LzbAk0iOlNJmn2aYauwCiM007BrinC/rQXSM+ hrLDGgXQ74oJUshtAcB0o/mPpzjav+mTBIXD23k8eXES+Q+KsuQSo6+iRCTLs0heTcNX jXghH+obgMlJHrOinSqXGusBU6XMiqIlvxVUAUFakq+GXuRBcJhsQoDdiEsxk8hggcwa 2huDnHssxPzDV+GWW6d1E4IxjmlBQyXQtYR5r3wj2USeKedcHWQ/uxwtEIMEGxqeYyNq E2Cg== X-Gm-Message-State: AOAM530ByTvKtTtTuuwF/Cho/gdv01jFKNsUWXPFgmrjrm8MYD9zeF0v UHtyZHPymrq51RCvIPkzo3XXOpCz6YLiNw== X-Google-Smtp-Source: ABdhPJzdETqamoNm9fUfJBrryWtqMHpokaNNhZRlFr92ysFtTcY7Pj82O7vHOSohmIeQdmxYwJ1bvg== X-Received: by 2002:a5d:52c6:: with SMTP id r6mr79510wrv.269.1590088598848; Thu, 21 May 2020 12:16:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/29] hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask() Date: Thu, 21 May 2020 20:16:03 +0100 Message-Id: <20200521191610.10941-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Reviewed-by: Edgar E. Iglesias Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20200518140309.5220-4-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/char/xilinx_uartlite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index c6512285d73..ae4ccd00c70 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -23,7 +23,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/hw.h" +#include "qemu/log.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" @@ -135,7 +135,8 @@ uart_write(void *opaque, hwaddr addr, switch (addr) { case R_STATUS: - hw_error("write to UART STATUS?\n"); + qemu_log_mask(LOG_GUEST_ERROR, "%s: write to UART STATUS\n", + __func__); break; =20 case R_CTRL: --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089274; cv=none; d=zohomail.com; s=zohoarc; b=Q/0LesYqXJEiUCpPVRjK6lVa3ZeGBJn+CH+Nsrpn1d9LD1Arc84O2rWISYACMDAYKs8JYWAzjOEwR51GchltMg1vc1CCh0SbxCDUqK6Q2vcLNm9eV5GYMkBUX3PDdaL0bCaYmfzBCe4bDSKojiE/uvaoSN7I+RykziIwBbGpWeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089274; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sYpEGSBz8UzRlzjELlw5FyhD7AkAmPGjMh/mhZ4E1dI=; b=X4lUSaavaGpjzKng1X8EpixC1cKriQdDh79H/Bz134Cj8m+Ovg9Yt5cjDAInKD+kNJcyge+a4glrPoQNszQ9R0unqMCT+lYadU22Qy396CmDIybgWkw7A7/m/nHt0d2a3A+rOibM8zWDhadEvBh3vlyiprX9kxUSaLEmr+ANf/U= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089274288304.7296007462612; Thu, 21 May 2020 12:27:54 -0700 (PDT) Received: from localhost ([::1]:57446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqrA-0001Sj-U9 for importer@patchew.org; Thu, 21 May 2020 15:27:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgN-0002sA-4p for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:43 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:46513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgL-0000Sv-Je for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:42 -0400 Received: by mail-wr1-x442.google.com with SMTP id w7so7718362wre.13 for ; Thu, 21 May 2020 12:16:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sYpEGSBz8UzRlzjELlw5FyhD7AkAmPGjMh/mhZ4E1dI=; b=DovtG7yBxn4W4qb6J6Wrj9T10wH+P/ajnU26i6A5rE1g4U6TL3URs29SF75SUSZkRB KqD7YM9ot89UJi5HcCfXnDTs+OlZzddGl8jPulNstWhm8BbDPyu3BuLxn5Hv68qNda4y p8UTRvSszHcdMIWtwAvdDLOIpmgSoEu0wRpGN41pjQeY5oariTBxNo61jYkpTvmNIj+6 yI1V9+VSue65UI+VRii2e6tozYWsJBTU3rny8lzgRB0vc070c3qMgvYtsPECQSbE0ixA S6ORUJ9jyEr2SanR2ixfN65P91T/BSU3A091o1cdQY8QQKYCKPJpb4sPxwx03pgjbDmM vsYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sYpEGSBz8UzRlzjELlw5FyhD7AkAmPGjMh/mhZ4E1dI=; b=JCbi4S+bbbP6ZD0yAzYuzxp/jCYjXM7eB1RNrgy6vyLuCqgi+maJScUycgSgcRYYkk geKZ5mfTeCDMgReS5vcmQ/udggVSEXwH//TS1N4OwtPzpw70Vzb/U2LjUj9MJ9qCCOGp F2eI7vVcL845F/JNhM7yyJLax8rdDM0PL5tVfLSh0nLutIMHQhCKNLYQT9QFIWHo7uOO bi5u9yzJmhnteuUcNbX/qyK8LWPYQWh4kmGfqx26Upe2Kgx1pVFZ88YIDAJJbtkG9uAu PykPVAZmxXFt06hEvL4ohbp5AvgTr1Q38n/jI9HLPaTty+GiOfm2Pj57JEZJAr1utisT hFAQ== X-Gm-Message-State: AOAM530PPRVpvbHIdbILJ0Eo74tLzJwc1Ey32tj7zy1nNpwvqyjNppvq DwNbxCc4Fz3rp1DdsBbK66vg7dIK6d5JdQ== X-Google-Smtp-Source: ABdhPJx4RrSs/HeybZKBGC2DID4YrXcOuSTcs0KOHOBZVNOL4Th/+1smodWnoJqy118gMkAbl4dz+Q== X-Received: by 2002:adf:f601:: with SMTP id t1mr88382wrp.207.1590088599828; Thu, 21 May 2020 12:16:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/29] hw/timer/exynos4210_mct: Replace hw_error() by qemu_log_mask() Date: Thu, 21 May 2020 20:16:04 +0100 Message-Id: <20200521191610.10941-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::442; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 hw_error() calls exit(). This a bit overkill when we can log the accesses as unimplemented or guest error. When fuzzing the devices, we don't want the whole process to exit. Replace some hw_error() calls by qemu_log_mask(). Per the datasheet "Exynos 4412 RISC Microprocessor Rev 1.00" Chapter 25 "Multi Core Timer (MCT)" figure 1 and table 4, the default value on the APB bus is 0. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20200518140309.5220-5-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/timer/exynos4210_mct.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 570cf7075bc..29a4b10676a 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -54,7 +54,6 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" -#include "hw/hw.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/timer.h" @@ -62,7 +61,6 @@ #include "hw/ptimer.h" =20 #include "hw/arm/exynos4210.h" -#include "hw/hw.h" #include "hw/irq.h" =20 //#define DEBUG_MCT @@ -1062,7 +1060,7 @@ static uint64_t exynos4210_mct_read(void *opaque, hwa= ddr offset, int index; int shift; uint64_t count; - uint32_t value; + uint32_t value =3D 0; int lt_i; =20 switch (offset) { @@ -1158,8 +1156,8 @@ static uint64_t exynos4210_mct_read(void *opaque, hwa= ddr offset, break; =20 default: - hw_error("exynos4210.mct: bad read offset " - TARGET_FMT_plx "\n", offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); break; } return value; @@ -1484,8 +1482,8 @@ static void exynos4210_mct_write(void *opaque, hwaddr= offset, break; =20 default: - hw_error("exynos4210.mct: bad write offset " - TARGET_FMT_plx "\n", offset); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset 0x%" HWADDR_PRIX "\= n", + __func__, offset); break; } } --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089270; cv=none; d=zohomail.com; s=zohoarc; b=QfGMyFO3/hDFG8PQntO/el79rnY8NiAlH3C/p5MWM8ZN0RpxZRh8JY0gwhpMX/SvaxgqKEOIcEDOB4gHBhSU8YwxkcSS3IrFAy//3aNrbBQz7L95s1G4rzo7ZaOC3Y3zN9yZc331VBcwI4d8mzIVGQfVDiRi3kgexKiRP97CMiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089270; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YOXfD2pneFZXI2RE/b2MMOUSrD0bIY/e/3jbjeg7p5o=; b=Xuajncu4CVFTXvB5V+SfGP8xjiRQucHzCmRYPN2asXRLKdKkJNI03l+vTD53u1AnPxdpwofJ9i6an67KOM41klOSsp4heW7PUUIdwk9ggNd77mrJ1TMaohb5xR7k7BsPekbFvl2ewUdrLjB78dCgj9zsHUz50LytJFLv1iwUhK0= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089270658340.9096522787114; Thu, 21 May 2020 12:27:50 -0700 (PDT) Received: from localhost ([::1]:57060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqr6-0001JK-6h for importer@patchew.org; Thu, 21 May 2020 15:27:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgN-0002ts-Oo for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:43 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgM-0000Te-M4 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:43 -0400 Received: by mail-wm1-x32c.google.com with SMTP id u12so2758361wmd.3 for ; Thu, 21 May 2020 12:16:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YOXfD2pneFZXI2RE/b2MMOUSrD0bIY/e/3jbjeg7p5o=; b=bmzlmqcj9N1OqivZfhyLltPCg/Xfn88Ygb3/8HP2oZ5ZE2bsemkdA59jaXM7GcTrRu 3hOjHfW4U6BtmVvZA30IpkGTB0UCQgH2Pp3nw3lywiB97sksBc5gpdneyKpn9BcmLU+0 yxExqlPlOG9/d+uUEGdGjhPxKRnFYvXq6IrYfOb/QfYThRlkCp2bal0tmIrPiadE3CkT GzO2QIQkQ3STRIq/i2KmOK9KT6+ofweAu5x/hqa7eiJCR18Xx6olXLh9LeqjTawBXzOU O2JsP26oS5oQmI0u2RTQoJQZwPqg4unZd+a/pbFYVeHEO9u2mb/BYIV/VWjxMWHocb5P F6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YOXfD2pneFZXI2RE/b2MMOUSrD0bIY/e/3jbjeg7p5o=; b=TaZATwlm1Kxclwc+ZgnDZ9U+mJ37bkko2OjHDBdiGJ1RVL79zKnW/iIIA1ft2VSyHx VIWOdGK6blAqoPxwDCvIDpc7quukzquWb1G6CiOwkGSG957hpq/UENuBUnZgaqL5QB7k 3P74WYeFX57DXfr63EyWxTDBpeayGg3hHB7+pMw0UYOmktbbWNe0vDvDGAnWd4176wvm oF0REvMbs4FHrfmTRosaRmUtpVsVpk31/1Z//ohh55IZz2gNSHAd5N3bg71XiUe3I8Cg 5d+dOzrfo2VBBUwOn4WEnkprN0KNC99u/V8qyLKKHf9WJVG7gl3xhqnYX5LjT21fApRM N51g== X-Gm-Message-State: AOAM531HQEcyPfE71lmFlNgNbK+oP+46mEpmf1eBi1oY0ir8fcbF17eI LpNHilsvCn7RKpJkWaHTPKwFaW7mDpRdxA== X-Google-Smtp-Source: ABdhPJwqWMU6/Qjy8eiERVROpgr9+gxiuoozc6AP00ZURpMDVBfT4QHIGirvo+s60Cns7PX/AFGrHw== X-Received: by 2002:a1c:1904:: with SMTP id 4mr9689280wmz.125.1590088600884; Thu, 21 May 2020 12:16:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/29] ARM: PL061: Introduce N_GPIOS Date: Thu, 21 May 2020 20:16:05 +0100 Message-Id: <20200521191610.10941-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Geert Uytterhoeven Add a definition for the number of GPIO lines controlled by a PL061 instance, and use it instead of the hardcoded magic value 8. Suggested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Geert Uytterhoeven Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200519085143.1376-1-geert+renesas@glider.be Signed-off-by: Peter Maydell --- hw/gpio/pl061.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c index 2a828260bdb..6d3c36bc16c 100644 --- a/hw/gpio/pl061.c +++ b/hw/gpio/pl061.c @@ -36,6 +36,8 @@ static const uint8_t pl061_id_luminary[12] =3D #define TYPE_PL061 "pl061" #define PL061(obj) OBJECT_CHECK(PL061State, (obj), TYPE_PL061) =20 +#define N_GPIOS 8 + typedef struct PL061State { SysBusDevice parent_obj; =20 @@ -62,7 +64,7 @@ typedef struct PL061State { uint32_t cr; uint32_t amsel; qemu_irq irq; - qemu_irq out[8]; + qemu_irq out[N_GPIOS]; const unsigned char *id; uint32_t rsvd_start; /* reserved area: [rsvd_start, 0xfcc] */ } PL061State; @@ -112,7 +114,7 @@ static void pl061_update(PL061State *s) changed =3D s->old_out_data ^ out; if (changed) { s->old_out_data =3D out; - for (i =3D 0; i < 8; i++) { + for (i =3D 0; i < N_GPIOS; i++) { mask =3D 1 << i; if (changed & mask) { DPRINTF("Set output %d =3D %d\n", i, (out & mask) !=3D 0); @@ -125,7 +127,7 @@ static void pl061_update(PL061State *s) changed =3D (s->old_in_data ^ s->data) & ~s->dir; if (changed) { s->old_in_data =3D s->data; - for (i =3D 0; i < 8; i++) { + for (i =3D 0; i < N_GPIOS; i++) { mask =3D 1 << i; if (changed & mask) { DPRINTF("Changed input %d =3D %d\n", i, (s->data & mask) != =3D 0); @@ -364,8 +366,8 @@ static void pl061_init(Object *obj) memory_region_init_io(&s->iomem, obj, &pl061_ops, s, "pl061", 0x1000); sysbus_init_mmio(sbd, &s->iomem); sysbus_init_irq(sbd, &s->irq); - qdev_init_gpio_in(dev, pl061_set_irq, 8); - qdev_init_gpio_out(dev, s->out, 8); + qdev_init_gpio_in(dev, pl061_set_irq, N_GPIOS); + qdev_init_gpio_out(dev, s->out, N_GPIOS); } =20 static void pl061_class_init(ObjectClass *klass, void *data) --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089382; cv=none; d=zohomail.com; s=zohoarc; b=BXwZiVmFGmDXY+1m4Y+KXZbuWOhIxkGjgDbcFgA+EuXVqwEmM1VS660Wk0nQI47g6OJaoF80TlgbnZSoSs4oUUd1HMf/CF8ZVgh8iwJhafk5I7zKsghrg4sj3megx5CmeV1sCzidf/YHaHCKG273gU0rvSonEviP0BaLWVs5OAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089382; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QclnVfbMD5AWwXuMc23KpxYEB+63sc4bwxzl9PH81Kc=; b=G7Bt3RApipIQJ3nTvJY7SbVyDedEyF24wjiDn7TkaUVtBt2dXSmIwqlBzkWtc5dAXrBrPI7DiCgt+Sxj7uBi2jEV8HhPl8phNXEyS62oz+JOrTnP61wscOh7l41xqpw9o3aASUhX+9/SNXfoYTkYrQ3ASrYtAG+r0u2LTDnI2tU= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089382040141.15760648438572; Thu, 21 May 2020 12:29:42 -0700 (PDT) Received: from localhost ([::1]:37524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqsu-0005Pq-Qj for importer@patchew.org; Thu, 21 May 2020 15:29:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgO-0002uV-8U for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:44 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgN-0000UE-Cp for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:43 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so2391574wrp.2 for ; Thu, 21 May 2020 12:16:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=QclnVfbMD5AWwXuMc23KpxYEB+63sc4bwxzl9PH81Kc=; b=q00LdH/Qnak1rTF4RpgBiLsbS142SFQf+ZWd8cWg++WHG4YJ7eH7Vg5jX3+UWlUYI0 OKrkRc4q9rmUZu0xMJjB+5rYV30FF/TLEZcLwqhqJRRVhCqRuEJeNKUDplkUHd48Hv+P Su1hDfkR0nwXN3jqf13f9s6MoFvRGrzusP75b27KHawaRiAUkqcjmCZ9qBI5jywqEK2L glhe35Iz6DacXUH5zHYjlwKBjcVlsxzVFecMTDmYNmtBzXvoJmIvUOaGBD1yrNi/qRLb zaRiFp+mknFT31F2FL4TeQse5sAkH7lxeCWkN3N8nuMniAh5zVsr8n9F6ImQviJvzj3+ rPgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QclnVfbMD5AWwXuMc23KpxYEB+63sc4bwxzl9PH81Kc=; b=C0S6isn4v8FwjXWXyqXH4o28CWpCUYHOsgOn211y2BIpobIHOdL552hMa80VN8CnjL 9PftO47JM3SixhA2quympGAznOU56jz3zdn0UXUmbrwKwRhu0ngP4P2KSdRMTs2Qynyn 0V1xpZIQ020Py0EfiN4n9FuTjhyV4gYZGvH5rhXHpT6CIA5fASiiZ3YEm9INv9AboD0Q WaDzUGZdAizpltgtnuJkO15iakavqlCSqQJ1VRFHIdqeyZb4dNi81NBeNKSAAS6qIya6 Dv+KoOjrTu+VyVZ7mqtYAu0fZZLEf55T8Zmb8xWI/QxF43UoCZLQYMfkHHjNsKx8p9Qz ZaNw== X-Gm-Message-State: AOAM533iCi+aUjYsn4O+AthkwrSZHFd4XATrb2iOywDDt5DXjM9uUtbc 5oQsaYQ02gO2g6qfOipVlXmY3EcTKpUj0A== X-Google-Smtp-Source: ABdhPJzdxCYqxF47TQzqlOXFAYSJwWyHrdv/VK8dDjTPMa1x5HdSVhgpKQwCQM+xdUwjsPReqaOdZg== X-Received: by 2002:a5d:4e41:: with SMTP id r1mr92132wrt.420.1590088601733; Thu, 21 May 2020 12:16:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 25/29] target/arm: Use tcg_gen_gvec_mov for clear_vec_high Date: Thu, 21 May 2020 20:16:06 +0100 Message-Id: <20200521191610.10941-26-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Richard Henderson The 8-byte store for the end a !is_q operation can be merged with the other stores. Use a no-op vector move to trigger the expand_clr portion of tcg_gen_gvec_mov. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson Message-id: 20200519212453.28494-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 991e451644c..4f6edb28927 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -496,14 +496,8 @@ static void clear_vec_high(DisasContext *s, bool is_q,= int rd) unsigned ofs =3D fp_reg_offset(s, rd, MO_64); unsigned vsz =3D vec_full_reg_size(s); =20 - if (!is_q) { - TCGv_i64 tcg_zero =3D tcg_const_i64(0); - tcg_gen_st_i64(tcg_zero, cpu_env, ofs + 8); - tcg_temp_free_i64(tcg_zero); - } - if (vsz > 16) { - tcg_gen_gvec_dup_imm(MO_64, ofs + 16, vsz - 16, vsz - 16, 0); - } + /* Nop move, with side effect of clearing the tail. */ + tcg_gen_gvec_mov(MO_64, ofs, ofs, is_q ? 16 : 8, vsz); } =20 void write_fp_dreg(DisasContext *s, int reg, TCGv_i64 v) --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089387; cv=none; d=zohomail.com; s=zohoarc; b=PRvnJRF2hiJjD/Z//+0ekFAvaT2rYGCsV9rhL+7RxvrLf3DOAw+WlDnuuJJX68Hxz4oNvslRjtTwXbB/VckblOjCnmXSFDUYn/QUfmKTk2OZkfIClG78IjuGwSnAinueMgaIoJTbLHEj4WlmHJoArmE+erq2cyJDM1UQmV4frDc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089387; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6lARWAcGcGM1iXMRMByZiacWi/0jxcclvLVCQpWGN5I=; b=KcO1zS4UahSGiUGnLi6Fdc9y+7W1EOoW+Ud32b8Uqk+eRdmu8H52aFVYhrwTWGz64Hq06SjhgbhFJ5cZg9Cu4NiXUR5B6xluh6B+zTCdPMXrv57imm2XelwoPoJowlynlYsgHRuKTEMuVJZ7uhbOomyi7aWM7FJz2sNlSwlbgwA= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089387870725.8281064033902; Thu, 21 May 2020 12:29:47 -0700 (PDT) Received: from localhost ([::1]:37784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqsz-0005YG-Iq for importer@patchew.org; Thu, 21 May 2020 15:29:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgP-0002y6-N5 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:45 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgO-0000V8-JJ for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:45 -0400 Received: by mail-wr1-x444.google.com with SMTP id g12so6565931wrw.1 for ; Thu, 21 May 2020 12:16:44 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6lARWAcGcGM1iXMRMByZiacWi/0jxcclvLVCQpWGN5I=; b=BmGNT/oiqmgQpXBq+5fFZcVtx8zi+EP0aBrdQ/tjg5NJYA+tXIU160PYRyXa3tlga6 MNpmP26aUMzdhrQt4kBApD79zrBHsRIQTngcBFwK1maIjmHaNUBX7FieOLHz5RgF7HgT gnhtBp3fBQSSCUunu8QBYB4FLM/Ue7qYe9chKisdqZKe2UYnw++xx9+Ud0qHed0jfjCb XeSw+xb5ZEIcRn07MKnPdlHca0to7yWApx64UMCW8YrxoWQrUoX19GyAn4W2cVZNN+R+ i/1ShZVZrAt70LjT1Up3OQz7ze44K26Nhc5s/ZJ8oD9SMx+sT1lgXX6OdqR5kcBtFGwD 1RLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6lARWAcGcGM1iXMRMByZiacWi/0jxcclvLVCQpWGN5I=; b=Si9RkxC0MD34HIPbhsoVNz3yi4iibYXogFrEfHT/mD7MZreK9sqpFMI/yB2rLmgIRU AeoJ91caKz8TNCT768sdvhrBdigEJWmRRa6xLL3GD7wYq5Gi9XzgAcopoGX5Dnn3VtLv W29ajZEhDPUK4FMJOoOu1AW1jzmSQPLdU8I5XUd5v1HjFGzLkAxMYGmnMWvsMPVDkvS3 oqAsBDwlCJFRUYh3Is021J/QNRJhEy7/+6KgAW8BTT1pfRKU34Km9IS0eyO4bJeKORXa 52ZGL1b8Gvx9iIByjLIz/N34kLLmkbJ7xcZWOmvsospaEKIwKtKAwYTOls4HkF3LN3j/ CFXA== X-Gm-Message-State: AOAM531KQNBLd9kq7jtUYaOJ0hiuUdzV7IZCCsy0pPDAQvDOJST2ydos Oocq/uwsdpnCTx1kLiZmp/5NNdpqV0vI6w== X-Google-Smtp-Source: ABdhPJwZkvD/5GmyBMITbbHOAWt5nEMrPYHesKQWmwCrc3aV362m1sbOjBvvCONWcMs0bkTBfjzi7A== X-Received: by 2002:adf:e90b:: with SMTP id f11mr97028wrm.364.1590088602951; Thu, 21 May 2020 12:16:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/29] target/arm: Use clear_vec_high more effectively Date: Thu, 21 May 2020 20:16:07 +0100 Message-Id: <20200521191610.10941-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Richard Henderson Do not explicitly store zero to the NEON high part when we can pass !is_q to clear_vec_high. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson Message-id: 20200519212453.28494-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 53 +++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4f6edb28927..874f3eb4f97 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -900,11 +900,10 @@ static void do_fp_ld(DisasContext *s, int destidx, TC= Gv_i64 tcg_addr, int size) { /* This always zero-extends and writes to a full 128 bit wide vector */ TCGv_i64 tmplo =3D tcg_temp_new_i64(); - TCGv_i64 tmphi; + TCGv_i64 tmphi =3D NULL; =20 if (size < 4) { MemOp memop =3D s->be_data + size; - tmphi =3D tcg_const_i64(0); tcg_gen_qemu_ld_i64(tmplo, tcg_addr, get_mem_index(s), memop); } else { bool be =3D s->be_data =3D=3D MO_BE; @@ -922,12 +921,13 @@ static void do_fp_ld(DisasContext *s, int destidx, TC= Gv_i64 tcg_addr, int size) } =20 tcg_gen_st_i64(tmplo, cpu_env, fp_reg_offset(s, destidx, MO_64)); - tcg_gen_st_i64(tmphi, cpu_env, fp_reg_hi_offset(s, destidx)); - tcg_temp_free_i64(tmplo); - tcg_temp_free_i64(tmphi); =20 - clear_vec_high(s, true, destidx); + if (tmphi) { + tcg_gen_st_i64(tmphi, cpu_env, fp_reg_hi_offset(s, destidx)); + tcg_temp_free_i64(tmphi); + } + clear_vec_high(s, tmphi !=3D NULL, destidx); } =20 /* @@ -6934,7 +6934,6 @@ static void disas_simd_ext(DisasContext *s, uint32_t = insn) read_vec_element(s, tcg_resh, rm, 0, MO_64); do_ext64(s, tcg_resh, tcg_resl, pos); } - tcg_gen_movi_i64(tcg_resh, 0); } else { TCGv_i64 tcg_hh; typedef struct { @@ -6964,9 +6963,11 @@ static void disas_simd_ext(DisasContext *s, uint32_t= insn) =20 write_vec_element(s, tcg_resl, rd, 0, MO_64); tcg_temp_free_i64(tcg_resl); - write_vec_element(s, tcg_resh, rd, 1, MO_64); + if (is_q) { + write_vec_element(s, tcg_resh, rd, 1, MO_64); + } tcg_temp_free_i64(tcg_resh); - clear_vec_high(s, true, rd); + clear_vec_high(s, is_q, rd); } =20 /* TBL/TBX @@ -7003,17 +7004,21 @@ static void disas_simd_tb(DisasContext *s, uint32_t= insn) * the input. */ tcg_resl =3D tcg_temp_new_i64(); - tcg_resh =3D tcg_temp_new_i64(); + tcg_resh =3D NULL; =20 if (is_tblx) { read_vec_element(s, tcg_resl, rd, 0, MO_64); } else { tcg_gen_movi_i64(tcg_resl, 0); } - if (is_tblx && is_q) { - read_vec_element(s, tcg_resh, rd, 1, MO_64); - } else { - tcg_gen_movi_i64(tcg_resh, 0); + + if (is_q) { + tcg_resh =3D tcg_temp_new_i64(); + if (is_tblx) { + read_vec_element(s, tcg_resh, rd, 1, MO_64); + } else { + tcg_gen_movi_i64(tcg_resh, 0); + } } =20 tcg_idx =3D tcg_temp_new_i64(); @@ -7033,9 +7038,12 @@ static void disas_simd_tb(DisasContext *s, uint32_t = insn) =20 write_vec_element(s, tcg_resl, rd, 0, MO_64); tcg_temp_free_i64(tcg_resl); - write_vec_element(s, tcg_resh, rd, 1, MO_64); - tcg_temp_free_i64(tcg_resh); - clear_vec_high(s, true, rd); + + if (is_q) { + write_vec_element(s, tcg_resh, rd, 1, MO_64); + tcg_temp_free_i64(tcg_resh); + } + clear_vec_high(s, is_q, rd); } =20 /* ZIP/UZP/TRN @@ -7072,7 +7080,7 @@ static void disas_simd_zip_trn(DisasContext *s, uint3= 2_t insn) } =20 tcg_resl =3D tcg_const_i64(0); - tcg_resh =3D tcg_const_i64(0); + tcg_resh =3D is_q ? tcg_const_i64(0) : NULL; tcg_res =3D tcg_temp_new_i64(); =20 for (i =3D 0; i < elements; i++) { @@ -7123,9 +7131,12 @@ static void disas_simd_zip_trn(DisasContext *s, uint= 32_t insn) =20 write_vec_element(s, tcg_resl, rd, 0, MO_64); tcg_temp_free_i64(tcg_resl); - write_vec_element(s, tcg_resh, rd, 1, MO_64); - tcg_temp_free_i64(tcg_resh); - clear_vec_high(s, true, rd); + + if (is_q) { + write_vec_element(s, tcg_resh, rd, 1, MO_64); + tcg_temp_free_i64(tcg_resh); + } + clear_vec_high(s, is_q, rd); } =20 /* --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089448; cv=none; d=zohomail.com; s=zohoarc; b=ZKOytgwiXhP8piRCUWgHDOpYutxAlTQbPXn+Le/ER6958DB1RG7QGTgKlYSqn7h4drgbDIR6wq4XGDvCzhw3Wf5PhsW6VOs9WaE81OFId90uwTHl768EygK8F97h5Fxcj8SyKkLIC+Dyl4SLWwMFHYL0VAHec2CXF81SrdgX3v4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089448; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L3EBlkC846TlitKEKsoLOy71erLb9L5nYlku8kDSWCM=; b=RWXNc/HVOJ9A1gf6W359nzpl1Iya4MALXw9Vc5ZYCulwn+UnhNYsH+9piZKgzsUw+Zbgrq13d1J3n2+1JyTv6hc7Cx4VHcA8JiHAA1riP5mJDqnez4H2gR1yuCLK1ify2zUyk4DoMDPPtbSA8j0Heb+jx5e5441ufjZx9W/yOw8= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089448481769.9728556591663; Thu, 21 May 2020 12:30:48 -0700 (PDT) Received: from localhost ([::1]:43054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqty-0008DK-AS for importer@patchew.org; Thu, 21 May 2020 15:30:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgQ-00030u-Qn for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:46 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:33453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgP-0000VK-Q1 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:46 -0400 Received: by mail-wr1-x42a.google.com with SMTP id l11so7811112wru.0 for ; Thu, 21 May 2020 12:16:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=L3EBlkC846TlitKEKsoLOy71erLb9L5nYlku8kDSWCM=; b=W9L3eJ+ElVnuWx37iAUFLxZDCogjYBrCxLitsboj4Kkfl17IRFGgjAlgqhkf5PMiWv Qaq7sMryOL/TRS061Tb8YOFGjaoVc8m5Omru2htNhasxYXW3bAG0QnFrssfH3F1tNWjz 5eWqUQ7PeErDrHt8W2OmnEZsOIT30UF1/Rsn7mqOoBn9i2s7FcMlJqMWO46KOYo3/qMz FEJNj2DvOPYIhshTLz1zn2KY7d5WppK5VYBdgtcIM+h5bhGTbDlb36FzS94/ZMKxVr2Q XDTtfVyy4zK1PX/Y2VUzcOrLe5t4iTifGMPdFIIJG7XH9GfqZRx/thE+dOyRdsIn4Oxn jnkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L3EBlkC846TlitKEKsoLOy71erLb9L5nYlku8kDSWCM=; b=NBf9d0BcOWNpTKPHy+fshVwqUwubl4iM2MYIRo/DUfmNVpTKXYXXo1j5IK/gIEIJVA AUg/MqJLmYqkCXcg4LhDJ1oMzo71rwALD3CHsPajIn0LVebH9ESHeb9DwPQEDELLya+/ EOxWOwHcintGveGcSaSKlV6mr3sneGGVDU3CEjOGO5stq3s/xVKnYQMeLddCP3v/PELI TMvJKeSMgMz2LX+ei5MJzjN3RioTInkxIQ4PfmYwF4biLUateNf1Glg/9IqlDdcQyEc6 0YDj4mhCf/v3WEJUbAMUHREThtQ3jBmwsUv2qjjwSG0C+wV0dn9PyQWW20VZN4AIGV9c BY9Q== X-Gm-Message-State: AOAM5329UZEd1kPejnxnfSvUdEpgHoE5SvgK3rSs3HvQCNeo4DknQFOC NFwYCbiZLKZLu2kL/rLTYoaMVpcoXeM7mA== X-Google-Smtp-Source: ABdhPJzs5ZLIWAPszcP2LOZ4Dl7KZoi7ZhASx0SkQy0jCPwROI8oiNny3FH6GY6N5SY29gjsfPWx7w== X-Received: by 2002:a05:6000:114e:: with SMTP id d14mr112709wrx.110.1590088603861; Thu, 21 May 2020 12:16:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 27/29] target/arm: Allow user-mode code to write CPSR.E via MSR Date: Thu, 21 May 2020 20:16:08 +0100 Message-Id: <20200521191610.10941-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Using the MSR instruction to write to CPSR.E is deprecated, but it is required to work from any mode including unprivileged code. We were incorrectly forbidding usermode code from writing it because CPSR_USER did not include the CPSR_E bit. We use CPSR_USER in only three places: * as the mask of what to allow userspace MSR to write to CPSR * when deciding what bits a linux-user signal-return should be able to write from the sigcontext structure * in target_user_copy_regs() when we set up the initial registers for the linux-user process In the first two cases not being able to update CPSR.E is a bug, and in the third case it doesn't matter because CPSR.E is always 0 there. So we can fix both bugs by adding CPSR_E to CPSR_USER. Because the cpsr_write() in restore_sigcontext() is now changing a CPSR bit which is cached in hflags, we need to add an arm_rebuild_hflags() call there; the callsite in target_user_copy_regs() was already rebuilding hflags for other reasons. (The recommended way to change CPSR.E is to use the 'SETEND' instruction, which we do correctly allow from usermode code.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200518142801.20503-1-peter.maydell@linaro.org --- target/arm/cpu.h | 2 +- linux-user/arm/signal.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 5d995368d4f..677584e5da0 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1230,7 +1230,7 @@ void pmu_init(ARMCPU *cpu); #define CACHED_CPSR_BITS (CPSR_T | CPSR_AIF | CPSR_GE | CPSR_IT | CPSR_Q \ | CPSR_NZCV) /* Bits writable in user mode. */ -#define CPSR_USER (CPSR_NZCV | CPSR_Q | CPSR_GE) +#define CPSR_USER (CPSR_NZCV | CPSR_Q | CPSR_GE | CPSR_E) /* Execution state bits. MRS read as zero, MSR writes ignored. */ #define CPSR_EXEC (CPSR_T | CPSR_IT | CPSR_J | CPSR_IL) =20 diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c index d96fc27ce11..8020c80acb5 100644 --- a/linux-user/arm/signal.c +++ b/linux-user/arm/signal.c @@ -546,6 +546,7 @@ restore_sigcontext(CPUARMState *env, struct target_sigc= ontext *sc) #ifdef TARGET_CONFIG_CPU_32 __get_user(cpsr, &sc->arm_cpsr); cpsr_write(env, cpsr, CPSR_USER | CPSR_EXEC, CPSRWriteByInstr); + arm_rebuild_hflags(env); #endif =20 err |=3D !valid_user_regs(env); --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089493; cv=none; d=zohomail.com; s=zohoarc; b=M80O6rqpwOxgd3VEfMhmXYV0N39fNJoMhNe9nxO2JeSXIBeUTt3mCZCdFq+A0h3lNZGw/syefQEpztpG40lOD0fmDd7r3aPx2pFUcP7eSAzHVxQoljry4k/lj8d2uLcl4UAd6kmqA2lZzkogS4nCI130g7JZD1LHrcaESyTCXyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089493; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9kKd+uI5z6jR/8DRUg4wAhiNt2UeI3CInnSxtouYWeE=; b=AH1mrj/qpXhAtQFH8jFHwDVP5rIQhmJv5qO2EOD4Ex5nDsYMEZZj1MRSowJ2vPiPbP1frsaNqeFaA8M7pVttZTtE2+fGBXxHFTd3mOqf1AjLKjGNiBb6Tn8MlSPNLr925ph8Y4c42C1W86A8oReFjtri+YjnmaJoCCTkgC89hSk= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089493904592.7002493017673; Thu, 21 May 2020 12:31:33 -0700 (PDT) Received: from localhost ([::1]:45658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqui-0000tl-KU for importer@patchew.org; Thu, 21 May 2020 15:31:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38168) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgS-000345-31 for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:48 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgR-0000VS-3e for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:47 -0400 Received: by mail-wm1-x344.google.com with SMTP id u12so2758532wmd.3 for ; Thu, 21 May 2020 12:16:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9kKd+uI5z6jR/8DRUg4wAhiNt2UeI3CInnSxtouYWeE=; b=p+EcMrVjRaowMi9Xukm6rJ5kDln3uw+DoHqlw4RKl3fneVQJMgnecx9knyGGJVguuX FMHP3a14Zp6zjcRVwlimPbTzGT9SBweDPTRVTq2dC9xySSf6HjUbr6/g+ps5zz/YU5ci IoWidifCr7Ex0yK+tq2MTR11sg1W8hbPNaAH0ti2m3oPDhnb3vdleZntC0LygyWgvtSZ RsCUGm24QPBu/D4SsmiGy7o7tpIMAIA5UThJUBgtvkyHCTxgFMqagYsMGD9qXhUg2HCU SvPDor1J4ApCg2oQLSTg7UNqA5nB9r+lyEPMxR+LxLJSRiI8/oo8QX4CyFjpAMeIqPiI J2Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9kKd+uI5z6jR/8DRUg4wAhiNt2UeI3CInnSxtouYWeE=; b=gJAcYe0H/+BVrcg9RbY80tlXyCOtYwxKTqS4G0O6H2+QX3GUCTmaXOv/WIAv+SjTef tpM1THv/Fl0gL2Yn8DvVyxFK2ae6Dba4loq8IbUEEwoBVb13EaKBe6ZVG2Nda++3d2/N U1icqFwKFI03gEkibhZ9xDsv4XYx7EESslNjkNLU0chr+It8Pt+gxCw1vUj++vRU3Cx/ R7MtEndMq7ZUttKpSDbPD2gwoke82KYVVxr2kIGOKRwGplRD5sVDQ3ycGDmeylu6eqCy u3xa1+QahJHEYph8MBU3BF8v8hOSe/R2SXsHNR8bRSVLAYlFgl6fnAP3o/wTRAQMuoFo GBaw== X-Gm-Message-State: AOAM5321LE38mjP9Jb0iMCGFt8va5E6gqsZpy9mDb1CYoVEDQj6ojzwN zNuNdVbjI3jVB+9pdBWjE55jWgJe80d8aQ== X-Google-Smtp-Source: ABdhPJxu9ut3355w7XQyjaOSM5bSpCHoSwDvl81S6POsawkAihH0lSjwrnbGUWv4m4Uw+csjnrz+iA== X-Received: by 2002:a1c:740e:: with SMTP id p14mr10671500wmc.137.1590088605504; Thu, 21 May 2020 12:16:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 28/29] linux-user/arm: Reset CPSR_E when entering a signal handler Date: Thu, 21 May 2020 20:16:09 +0100 Message-Id: <20200521191610.10941-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::344; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Amanieu d'Antras This fixes signal handlers running with the wrong endianness if the interrupted code used SETEND to dynamically switch endianness. Signed-off-by: Amanieu d'Antras Reviewed-by: Peter Maydell Message-id: 20200511131117.2486486-1-amanieu@gmail.com Signed-off-by: Peter Maydell --- linux-user/arm/signal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c index 8020c80acb5..698985a647e 100644 --- a/linux-user/arm/signal.c +++ b/linux-user/arm/signal.c @@ -244,6 +244,11 @@ setup_return(CPUARMState *env, struct target_sigaction= *ka, } else { cpsr &=3D ~CPSR_T; } + if (env->cp15.sctlr_el[1] & SCTLR_E0E) { + cpsr |=3D CPSR_E; + } else { + cpsr &=3D ~CPSR_E; + } =20 if (ka->sa_flags & TARGET_SA_RESTORER) { if (is_fdpic) { @@ -287,7 +292,8 @@ setup_return(CPUARMState *env, struct target_sigaction = *ka, env->regs[13] =3D frame_addr; env->regs[14] =3D retcode; env->regs[15] =3D handler & (thumb ? ~1 : ~3); - cpsr_write(env, cpsr, CPSR_IT | CPSR_T, CPSRWriteByInstr); + cpsr_write(env, cpsr, CPSR_IT | CPSR_T | CPSR_E, CPSRWriteByInstr); + arm_rebuild_hflags(env); =20 return 0; } --=20 2.20.1 From nobody Tue Apr 23 14:28:47 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1590089606; cv=none; d=zohomail.com; s=zohoarc; b=aIPq6kD5N5wbCw/NHW9fKBU01UnqRcWsGHkqrOgLzE3SWr3D9xdMMAdRadZ1/2LGR5F6A1leipS4FBtRqMcPvoqTNm3aY4jwofr6fsJEZviG6yZfkO7b4+EVUKHqiH9ttqH2LCrWilo7u9VVViuYmQu2Nx7sb1RWkImwD0DOci4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590089606; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JGi0kam4Hb96tw8QLNp1XZzN02TvAsgq8rt91AU8qsU=; b=ijqZGuP5OyHIpmM0yo2gAL9OxdvwSWDSWaxnd7votnuqxoC5kve19a2MFu4Ls21ARmNLoXozzs4zOBO/O4uOYIMiVfDe17dt1TmS+P/BoIdKwrHAObN9UckywG1OAzXk+7Eif6LnI4+nXcZLlZeedrtMC/F3EyIaCi7VIFUEan4= ARC-Authentication-Results: i=1; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590089605997795.7823537935341; Thu, 21 May 2020 12:33:25 -0700 (PDT) Received: from localhost ([::1]:54208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbqwW-0004k9-QQ for importer@patchew.org; Thu, 21 May 2020 15:33:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbqgU-0003AY-MA for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:50 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbqgS-0000Vh-5c for qemu-devel@nongnu.org; Thu, 21 May 2020 15:16:50 -0400 Received: by mail-wr1-x444.google.com with SMTP id c3so3528180wru.12 for ; Thu, 21 May 2020 12:16:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id z124sm7335100wmg.20.2020.05.21.12.16.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 12:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=JGi0kam4Hb96tw8QLNp1XZzN02TvAsgq8rt91AU8qsU=; b=dxGBjI4+plqULDMi3VU0ejpviQu07Pr1yDT8h6IUcv26CGVkMUYqjCJ23Tl4sQffVt o0KUYqha4+zgYyUYBVxRTxbn3hvNici6EPlGxIW5bXygjnIvWl2ByQF1OsHj4k2efz7d qQTyvjIHWGjqHK2V9/x3eJKogVHDe0ocx455urGHXxAklvPwgLRGLP07d2jzIkpJ8wt8 75b0lZKUqQjXEQGNxUqoyET/JKJYjwlByXGYhIK6Fh2LxnzMZrshvswotPpdXDJmnJUp FO/A0VT9TBBeGhrae7PIynDKZ/QE66/4Vb9tBEjncnflX8SBUTm0FgAZMJrCSF0FP8qf gvuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JGi0kam4Hb96tw8QLNp1XZzN02TvAsgq8rt91AU8qsU=; b=qEXCHywuPssSQs12vK9jXx5qtljct/jNfxdp+HdKOBHLIm8gwu9QDyAi7Y3VOJbqFF 9+D9iXOeP+5OKzxnMn+CiNpQGq+PJwAjUZ+oEuFBgGog9xy1ZFEofGbrdT3nGBZ2Xxsv kMiYLw/+mnlS6OIJ1PnKWOvcPwxjHZJLwyuR5fFK3uIP77SRsFMlJpqNDeNane5AbsjH 0BCLTTKRtyKIrLdm6EfPX8aN5pthXVfLQjPqfHp+h+MTxVci1o/ymRpsEu/b3b4tjPIV DhgnnR30sjIi4t76FYvnEJmnbfHNnlLprmbTSBkGOJV2dhY1SqBYr+PB5QBHNA9PHfRz +hIw== X-Gm-Message-State: AOAM532oPKee8Og9X6lpTg3aWjaZ3gvgGKgpO6eUTs6gPqeIBHD/GFdr i/L3y/2HzKDLxYEACWoB35VGvFPVtv27iA== X-Google-Smtp-Source: ABdhPJzcELP+isSbNzjyyoYS1XlzfuKRDK9QcW6U5TdVMCaBch7zXhiI+SZ2KOTTWkspE8YsMH8TZQ== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr108524wri.342.1590088606527; Thu, 21 May 2020 12:16:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 29/29] linux-user/arm/signal.c: Drop TARGET_CONFIG_CPU_32 Date: Thu, 21 May 2020 20:16:10 +0100 Message-Id: <20200521191610.10941-30-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200521191610.10941-1-peter.maydell@linaro.org> References: <20200521191610.10941-1-peter.maydell@linaro.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=2a00:1450:4864:20::444; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The Arm signal-handling code has some parts ifdeffed with a TARGET_CONFIG_CPU_32, which is always defined. This is a leftover from when this code's structure was based on the Linux kernel signal handling code, where it was intended to support 26-bit Arm CPUs. The kernel dropped its CONFIG_CPU_32 in kernel commit 4da8b8208eded0ba21e3 in 2009. QEMU has never had 26-bit CPU support and is unlikely to ever add it; we certainly aren't going to support 26-bit Linux binaries via linux-user mode. The ifdef is just unhelpful noise, so remove it entirely. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200518143014.20689-1-peter.maydell@linaro.org --- linux-user/arm/signal.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/linux-user/arm/signal.c b/linux-user/arm/signal.c index 698985a647e..f21d1535e4d 100644 --- a/linux-user/arm/signal.c +++ b/linux-user/arm/signal.c @@ -126,8 +126,6 @@ struct rt_sigframe_v2 abi_ulong retcode[4]; }; =20 -#define TARGET_CONFIG_CPU_32 1 - /* * For ARM syscalls, we encode the syscall number into the instruction. */ @@ -187,9 +185,7 @@ setup_sigcontext(struct target_sigcontext *sc, /*struct= _fpstate *fpstate,*/ __put_user(env->regs[13], &sc->arm_sp); __put_user(env->regs[14], &sc->arm_lr); __put_user(env->regs[15], &sc->arm_pc); -#ifdef TARGET_CONFIG_CPU_32 __put_user(cpsr_read(env), &sc->arm_cpsr); -#endif =20 __put_user(/* current->thread.trap_no */ 0, &sc->trap_no); __put_user(/* current->thread.error_code */ 0, &sc->error_code); @@ -549,11 +545,9 @@ restore_sigcontext(CPUARMState *env, struct target_sig= context *sc) __get_user(env->regs[13], &sc->arm_sp); __get_user(env->regs[14], &sc->arm_lr); __get_user(env->regs[15], &sc->arm_pc); -#ifdef TARGET_CONFIG_CPU_32 __get_user(cpsr, &sc->arm_cpsr); cpsr_write(env, cpsr, CPSR_USER | CPSR_EXEC, CPSRWriteByInstr); arm_rebuild_hflags(env); -#endif =20 err |=3D !valid_user_regs(env); =20 --=20 2.20.1