From nobody Fri May 3 02:18:16 2024 Delivered-To: importer@patchew.org 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; 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=1584985409; cv=none; d=zohomail.com; s=zohoarc; b=iPTyB3pQk55fhT4WDMkaEfQtDktJEfcXVdR+IJEeI7PBUMmUH81Ge/0u36UBZwd79SEIMfvt7RqMMuCIoVzGhS4Jfx4Zf5cUDaG8pKPT77gVfoKGVCsgaZwgsNDk45Nd5qIcwqG5muiFRoqXr+c/iRcFaktxiH+MXRDwjNa6ubM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584985409; 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=5a3auB4qdgqdR6eDWJTA8UcdAj8hCoHOLQiKnN1qJ3s=; b=Z3yGFUUYWLbBCLfLt2WP1qbroKx0O6vymN17kkWFA1ylcKIlEovMjgHGuLg0pctqQK3bBCBO/GSY0CNiSLBv8KWXhELrzU2+bHJ6noASYbsowLl9lM94kMy/kSO1uOyyMjJ1K7pMAVm+FYELP2RxnCknXryQQY1M4+iQ2mhfGjI= 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 1584985409426758.1809913455328; Mon, 23 Mar 2020 10:43:29 -0700 (PDT) Received: from localhost ([::1]:37670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR6m-00014d-2k for importer@patchew.org; Mon, 23 Mar 2020 13:43:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52250) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR3i-0004Ow-Q5 for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGR3g-0003hj-Iq for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:18 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:39083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGR3g-0003f9-6F for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:16 -0400 Received: by mail-wm1-x32d.google.com with SMTP id a9so436315wmj.4 for ; Mon, 23 Mar 2020 10:40:12 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm25145282wrw.20.2020.03.23.10.40.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 10:40:10 -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=5a3auB4qdgqdR6eDWJTA8UcdAj8hCoHOLQiKnN1qJ3s=; b=Vp+8G5hjhwcLmg45ndXc1a15tvj3fS3ERCXQleJKSJYnbG8CVmdi4abPiZGkGJrlR6 0GBodwWFJkiBTcIuiKNj/puiJ7cW+uJ/vVs+cqlGZqjGEkXy1h3PxRNuxCGmgD7e1Yow HAGg9MrpvRjEHoJOh7xkDfjmXL0Rd2r351ps9hefRzMRyQ+HoDjEmbs96jBhzCyJKeUq 7gtgw3yovHq/mHJNeXYQqArpRCs2FxCMnmessaQV59tuERX+9iggVkX/G5FsCaTswGYT Mnl1sIJp7v/2Tu/Fw99y8WNCbBqaXiQU7TqeAaY/728OKqJoCma2xEfY5ud3kfKtguLd JrgA== 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=5a3auB4qdgqdR6eDWJTA8UcdAj8hCoHOLQiKnN1qJ3s=; b=s7qUbOf4lpWANMGKT1HLilKcFvRmEyuiHDdhjSfnl0sdlKm0AleymnkRWT6Q8AdXMt 0M0UhtxQlqeeU9frpT96ak4anwBWjsxyJbZzHR2l/sMyAYJ2EPC1C4C4p1+tE2P8KtgN AXOsd4/NNIP0JOwxRQ/2ojEpBc8CJwXE1KdqFT6Tn+M5hyzgfLT4AL6Mv8SeCq29uwHZ PUL9/tMoBytquZD1xeezHkN4DmGc+qf4JYDbA9ILt/6qWe0NixYbwGBF7sxl/X98pNmQ Fe5Bp0H+18+w589OJyPGxE+lLx/CSlTtrfBQEBZqrFiSUroG89nme8jFEx218N0eME8Z 6REw== X-Gm-Message-State: ANhLgQ2WnL6mhPm1xy9mJzLh1Jy+OdJfPWqH1dO2S1wQe8bwCXafcoHc +jV1WgaV2+YZV9NB6tDUaz1/iqV2mGujQw== X-Google-Smtp-Source: ADFU+vsGssyD+5BkntBb/TNcIbgdPgxiqmuU/oiKD1RyBdNOU6IQDll7gPt0pXUtZFjGOj1QuTU8CQ== X-Received: by 2002:a7b:cb42:: with SMTP id v2mr440975wmj.170.1584985210885; Mon, 23 Mar 2020 10:40:10 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 1/5] hw/arm/bcm283x: Correct the license text Date: Mon, 23 Mar 2020 17:40:02 +0000 Message-Id: <20200323174006.8468-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200323174006.8468-1-peter.maydell@linaro.org> References: <20200323174006.8468-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32d 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 The license is the 'GNU General Public License v2.0 or later', not 'and': This program is free software; you can redistribute it and/ori modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Fix the license comment. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200312213455.15854-1-philmd@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/hw/arm/bcm2835_peripherals.h | 3 ++- include/hw/arm/bcm2836.h | 3 ++- include/hw/char/bcm2835_aux.h | 3 ++- include/hw/display/bcm2835_fb.h | 3 ++- include/hw/dma/bcm2835_dma.h | 4 +++- include/hw/intc/bcm2835_ic.h | 4 +++- include/hw/intc/bcm2836_control.h | 3 ++- include/hw/misc/bcm2835_mbox.h | 4 +++- include/hw/misc/bcm2835_mbox_defs.h | 4 +++- include/hw/misc/bcm2835_property.h | 4 +++- hw/arm/bcm2835_peripherals.c | 3 ++- hw/arm/bcm2836.c | 3 ++- hw/arm/raspi.c | 3 ++- hw/display/bcm2835_fb.c | 1 - hw/dma/bcm2835_dma.c | 4 +++- hw/intc/bcm2835_ic.c | 4 ++-- hw/intc/bcm2836_control.c | 4 +++- hw/misc/bcm2835_mbox.c | 4 +++- hw/misc/bcm2835_property.c | 4 +++- 19 files changed, 45 insertions(+), 20 deletions(-) diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_= peripherals.h index 7859281e11b..2e8655a7c2d 100644 --- a/include/hw/arm/bcm2835_peripherals.h +++ b/include/hw/arm/bcm2835_peripherals.h @@ -5,7 +5,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_PERIPHERALS_H diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h index 92a6544816b..024af8aae4f 100644 --- a/include/hw/arm/bcm2836.h +++ b/include/hw/arm/bcm2836.h @@ -5,7 +5,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2836_H diff --git a/include/hw/char/bcm2835_aux.h b/include/hw/char/bcm2835_aux.h index cdbf7e3e37e..934acf9c813 100644 --- a/include/hw/char/bcm2835_aux.h +++ b/include/hw/char/bcm2835_aux.h @@ -2,7 +2,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_AUX_H diff --git a/include/hw/display/bcm2835_fb.h b/include/hw/display/bcm2835_f= b.h index 228988ba056..2246be74d83 100644 --- a/include/hw/display/bcm2835_fb.h +++ b/include/hw/display/bcm2835_fb.h @@ -5,7 +5,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_FB_H diff --git a/include/hw/dma/bcm2835_dma.h b/include/hw/dma/bcm2835_dma.h index 91ed8d05d16..a6747842b76 100644 --- a/include/hw/dma/bcm2835_dma.h +++ b/include/hw/dma/bcm2835_dma.h @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_DMA_H diff --git a/include/hw/intc/bcm2835_ic.h b/include/hw/intc/bcm2835_ic.h index fb75fa0064e..392ded1cb33 100644 --- a/include/hw/intc/bcm2835_ic.h +++ b/include/hw/intc/bcm2835_ic.h @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_IC_H diff --git a/include/hw/intc/bcm2836_control.h b/include/hw/intc/bcm2836_co= ntrol.h index de061b8929a..2c22405686b 100644 --- a/include/hw/intc/bcm2836_control.h +++ b/include/hw/intc/bcm2836_control.h @@ -8,7 +8,8 @@ * ARM Local Timer IRQ Copyright (c) 2019. Zolt=C3=A1n Baldaszti * Added basic IRQ_TIMER interrupt support * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2836_CONTROL_H diff --git a/include/hw/misc/bcm2835_mbox.h b/include/hw/misc/bcm2835_mbox.h index 7e8f3ce86de..57f95cc35ea 100644 --- a/include/hw/misc/bcm2835_mbox.h +++ b/include/hw/misc/bcm2835_mbox.h @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_MBOX_H diff --git a/include/hw/misc/bcm2835_mbox_defs.h b/include/hw/misc/bcm2835_= mbox_defs.h index a18e520b22f..9670bf33a03 100644 --- a/include/hw/misc/bcm2835_mbox_defs.h +++ b/include/hw/misc/bcm2835_mbox_defs.h @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_MBOX_DEFS_H diff --git a/include/hw/misc/bcm2835_property.h b/include/hw/misc/bcm2835_p= roperty.h index 11be0dbeac7..b321f224990 100644 --- a/include/hw/misc/bcm2835_property.h +++ b/include/hw/misc/bcm2835_property.h @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #ifndef BCM2835_PROPERTY_H diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c index 17207ae07e3..edcaa4916d0 100644 --- a/hw/arm/bcm2835_peripherals.c +++ b/hw/arm/bcm2835_peripherals.c @@ -5,7 +5,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 38e2941baba..43022b83f5f 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -5,7 +5,8 @@ * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft * Written by Andrew Baumann * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c index acd2bb794d1..fe3b9bc78bb 100644 --- a/hw/arm/raspi.c +++ b/hw/arm/raspi.c @@ -8,7 +8,8 @@ * Raspberry Pi 3 emulation Copyright (c) 2018 Zolt=C3=A1n Baldaszti * Upstream code cleanup (c) 2018 Pekka Enberg * - * This code is licensed under the GNU GPLv2 and later. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c index d6bf3374a67..c6263808a27 100644 --- a/hw/display/bcm2835_fb.c +++ b/hw/display/bcm2835_fb.c @@ -1,7 +1,6 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade * Refactoring for Pi2 Copyright (c) 2015, Microsoft. Written by Andrew Ba= umann. - * This code is licensed under the GNU GPLv2 and later. * * Heavily based on milkymist-vgafb.c, copyright terms below: * QEMU model of the Milkymist VGA framebuffer. diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c index ccff5ed55b2..4cd9dab745a 100644 --- a/hw/dma/bcm2835_dma.c +++ b/hw/dma/bcm2835_dma.c @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 05bd28e4f9d..53ab8f58810 100644 --- a/hw/intc/bcm2835_ic.c +++ b/hw/intc/bcm2835_ic.c @@ -1,7 +1,6 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade * Refactoring for Pi2 Copyright (c) 2015, Microsoft. Written by Andrew Ba= umann. - * This code is licensed under the GNU GPLv2 and later. * Heavily based on pl190.c, copyright terms below: * * Arm PrimeCell PL190 Vector Interrupt Controller @@ -9,7 +8,8 @@ * Copyright (c) 2006 CodeSourcery. * Written by Paul Brook * - * This code is licensed under the GPL. + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index 61f884ff9e7..53dba0080ca 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -4,7 +4,6 @@ * Written by Andrew Baumann * * Based on bcm2835_ic.c (Raspberry Pi emulation) (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. * * At present, only implements interrupt routing, and mailboxes (i.e., * not PMU interrupt, or AXI counters). @@ -13,6 +12,9 @@ * * Ref: * https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/= QA7_rev3.4.pdf + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c index 77d2d80706c..2afa06a7464 100644 --- a/hw/misc/bcm2835_mbox.c +++ b/hw/misc/bcm2835_mbox.c @@ -1,11 +1,13 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. * * This file models the system mailboxes, which are used for * communication with low-bandwidth GPU peripherals. Refs: * https://github.com/raspberrypi/firmware/wiki/Mailboxes * https://github.com/raspberrypi/firmware/wiki/Accessing-mailboxes + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index df91280dfcc..3e228ca0ae4 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -1,6 +1,8 @@ /* * Raspberry Pi emulation (c) 2012 Gregory Estrade - * This code is licensed under the GNU GPLv2 and later. + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. */ =20 #include "qemu/osdep.h" --=20 2.20.1 From nobody Fri May 3 02:18:16 2024 Delivered-To: importer@patchew.org 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; 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=1584985408; cv=none; d=zohomail.com; s=zohoarc; b=AicTFFT4akzRf6AagzT7MOON8Lm8kgWStvZPhKRf9QLX8uzBIkMG1pIftSGWcQVhCHdGJ4frsmkCEhz3L+R1yW3z+xjOWxPLxlV7SH31v5/9g0RfZTXRGBfkWleJYCOog9V3ool+QOpUjFpqPZpY//rVw4Fp5nMc+uEjEta/+oQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584985408; 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=Blca2M8WsWfCbkoVy34ezoOEGpYFuC8v0ZvsUkwATQw=; b=SmQEqvtl4+GH+Ks9iELU6/+fa7QKaHhLSguXysHl4kTrvJQ9yylq+y/PDpHq5FWQ8sUjKmTpw9uDFtN7IqLLu72kSerHjr6ADxz3ZoZatRD01ol7DYX0chYeRc00Z5WCjnBS4TS83cGfEyiBycBswVLoHpgyXGS+iIV/TMd7DjA= 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 1584985408581655.7606420242296; Mon, 23 Mar 2020 10:43:28 -0700 (PDT) Received: from localhost ([::1]:37664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR6l-00012y-2A for importer@patchew.org; Mon, 23 Mar 2020 13:43:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52235) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR3i-0004Oo-2I for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGR3g-0003hk-JH for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:17 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGR3g-0003fN-6G for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:16 -0400 Received: by mail-wm1-x331.google.com with SMTP id a81so359327wmf.5 for ; Mon, 23 Mar 2020 10:40:13 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm25145282wrw.20.2020.03.23.10.40.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 10:40:11 -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=Blca2M8WsWfCbkoVy34ezoOEGpYFuC8v0ZvsUkwATQw=; b=cNa9iJOHXRN3TsQN6ZdGDMLijkPX5US+Sy8j9En5JdOqdLGJ0gIdF3eO9Dhe74QY7U F8IwNBxz/PZcHK4nr5tDcYQVYMEoqvcOz+5C34blzVnuGQkUDhMbdIsKegj7B6JOkkBU oo7yIkoIqLkAJzfEiCX5/lN9CgIonLZ27soNIiPd6QCDJIfPhSTxUPx2pzCuvkp9DfRw iJJbFa0h//Wt/oMJMNN5jIjQnD/dMsGh72Q0UIp80bpuLwCp0WDNOcmd2oswXbKyUhF0 6gtZblm29t6EGneFskH8BbVIPvchedGzcL8ctl4EwsZaFMRhZhK9cLYOYWBuvmTMkgN5 7J2w== 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=Blca2M8WsWfCbkoVy34ezoOEGpYFuC8v0ZvsUkwATQw=; b=LC0yMAj1FJ8rg2xOfURen0iB+bFEdHkJPkzUECZFFzuqKqiBKx4jqrlQ5mGHNFEj11 twG1E+JX0JNWs6BtcTX7I6BVXlT89Z7YNpMCsLFQuwl4d7o9wnvfJgTALUtrVMn4zaeK 6iZM3m1vkdz5f3cXViMjmyA6MJcj2S07gd5vUevRMGA/ZX6A/SkqwnFBd0VVpDrrlvJS QQzliPx0yQdIA/0WA3AeXWf4QK1kz1WE7cwigR7Z83HUxQSBVZtBmNVVgEt4UUtdqI7D 4tz1Jfi/cYAfEBknBedG/hKYrZkdCo4OGZ0yiS0ud2xIyrJB2uv9CmfbZWe5/dKzH1Up v2DQ== X-Gm-Message-State: ANhLgQ02DoanUrvaE1KEucNkE3UGR6jD+xWQJK+MiOFRhGByiT7W7r4U aW776+baHv5lCMoQRnEo5n0zIOxdu17UYQ== X-Google-Smtp-Source: ADFU+vuSq3sh4a5EowREAtMW75K3DDLcZshYHQP3J/XXGU1LTJcAXrnOHJ5SA9Cd12TTpOyTVinzPA== X-Received: by 2002:a1c:e109:: with SMTP id y9mr441847wmg.62.1584985211923; Mon, 23 Mar 2020 10:40:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 2/5] aspeed/smc: Fix DMA support for AST2600 Date: Mon, 23 Mar 2020 17:40:03 +0000 Message-Id: <20200323174006.8468-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200323174006.8468-1-peter.maydell@linaro.org> References: <20200323174006.8468-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 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: C=C3=A9dric Le Goater Recent firmwares uses SPI DMA transfers in U-Boot to load the different images (kernel, initrd, dtb) in the SoC DRAM. The AST2600 FMC model is missing the masks to be applied on the DMA registers which resulted in incorrect values. Fix that and wire the SPI controllers which have DMA support on the AST2600. Fixes: bcaa8ddd081c ("aspeed/smc: Add AST2600 support") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Joel Stanley Message-id: 20200320053923.20565-1-clg@kaod.org Signed-off-by: Peter Maydell --- hw/arm/aspeed_ast2600.c | 6 ++++++ hw/ssi/aspeed_smc.c | 15 +++++++++++++-- hw/ssi/trace-events | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 446b44d31cf..1a869e09b96 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -411,6 +411,12 @@ static void aspeed_soc_ast2600_realize(DeviceState *de= v, Error **errp) =20 /* SPI */ for (i =3D 0; i < sc->spis_num; i++) { + object_property_set_link(OBJECT(&s->spi[i]), OBJECT(s->dram_mr), + "dram", &err); + if (err) { + error_propagate(errp, err); + return; + } object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", &err); object_property_set_bool(OBJECT(&s->spi[i]), true, "realized", &local_err); diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 9d5c696d5a1..2edccef2d54 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -364,6 +364,8 @@ static const AspeedSMCController controllers[] =3D { .flash_window_base =3D ASPEED26_SOC_FMC_FLASH_BASE, .flash_window_size =3D 0x10000000, .has_dma =3D true, + .dma_flash_mask =3D 0x0FFFFFFC, + .dma_dram_mask =3D 0x3FFFFFFC, .nregs =3D ASPEED_SMC_R_MAX, .segment_to_reg =3D aspeed_2600_smc_segment_to_reg, .reg_to_segment =3D aspeed_2600_smc_reg_to_segment, @@ -379,7 +381,9 @@ static const AspeedSMCController controllers[] =3D { .segments =3D aspeed_segments_ast2600_spi1, .flash_window_base =3D ASPEED26_SOC_SPI_FLASH_BASE, .flash_window_size =3D 0x10000000, - .has_dma =3D false, + .has_dma =3D true, + .dma_flash_mask =3D 0x0FFFFFFC, + .dma_dram_mask =3D 0x3FFFFFFC, .nregs =3D ASPEED_SMC_R_MAX, .segment_to_reg =3D aspeed_2600_smc_segment_to_reg, .reg_to_segment =3D aspeed_2600_smc_reg_to_segment, @@ -395,7 +399,9 @@ static const AspeedSMCController controllers[] =3D { .segments =3D aspeed_segments_ast2600_spi2, .flash_window_base =3D ASPEED26_SOC_SPI2_FLASH_BASE, .flash_window_size =3D 0x10000000, - .has_dma =3D false, + .has_dma =3D true, + .dma_flash_mask =3D 0x0FFFFFFC, + .dma_dram_mask =3D 0x3FFFFFFC, .nregs =3D ASPEED_SMC_R_MAX, .segment_to_reg =3D aspeed_2600_smc_segment_to_reg, .reg_to_segment =3D aspeed_2600_smc_reg_to_segment, @@ -1135,6 +1141,11 @@ static void aspeed_smc_dma_rw(AspeedSMCState *s) MemTxResult result; uint32_t data; =20 + trace_aspeed_smc_dma_rw(s->regs[R_DMA_CTRL] & DMA_CTRL_WRITE ? + "write" : "read", + s->regs[R_DMA_FLASH_ADDR], + s->regs[R_DMA_DRAM_ADDR], + s->regs[R_DMA_LEN]); while (s->regs[R_DMA_LEN]) { if (s->regs[R_DMA_CTRL] & DMA_CTRL_WRITE) { data =3D address_space_ldl_le(&s->dram_as, s->regs[R_DMA_DRAM_= ADDR], diff --git a/hw/ssi/trace-events b/hw/ssi/trace-events index 0a70629801a..0ea498de910 100644 --- a/hw/ssi/trace-events +++ b/hw/ssi/trace-events @@ -6,5 +6,6 @@ aspeed_smc_do_snoop(int cs, int index, int dummies, int dat= a) "CS%d index:0x%x d aspeed_smc_flash_write(int cs, uint64_t addr, uint32_t size, uint64_t dat= a, int mode) "CS%d @0x%" PRIx64 " size %u: 0x%" PRIx64" mode:%d" aspeed_smc_read(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx6= 4 " size %u: 0x%" PRIx64 aspeed_smc_dma_checksum(uint32_t addr, uint32_t data) "0x%08x: 0x%08x" +aspeed_smc_dma_rw(const char *dir, uint32_t flash_addr, uint32_t dram_addr= , uint32_t size) "%s flash:@0x%08x dram:@0x%08x size:0x%08x" aspeed_smc_write(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx= 64 " size %u: 0x%" PRIx64 aspeed_smc_flash_select(int cs, const char *prefix) "CS%d %sselect" --=20 2.20.1 From nobody Fri May 3 02:18:16 2024 Delivered-To: importer@patchew.org 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; 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=1584985314; cv=none; d=zohomail.com; s=zohoarc; b=mwu3+aaXP2hmPvJKpLjRCwyo0DiJgpyO3wSr4xqRappq632WEc3BcG2OkLBXC3K2gYO/oxnUX6d+smzeMFV6J+OzIoxRhZEOWvmofLTArefU/iSrNXycyD0puFIFjjhfvAyIiAnCTyEwYQxe7PMUJF16D+5m2GTO0ipK3D+htZc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584985314; 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=P717LorGeXb892L2rPZftLo69BBrecynggE4xn2hmr0=; b=g1XR4O3JMoeaJy5D3Fzh/P1ocPVubEkbp4EK7WQhQFvsxvbkF9NSNyz8i660HQ7IFRwTRcO52ZeNxILxLbF48G0Qdkb4falzj112c46LtVc2xecpCdnonQ11YixtlUx0NMVavdJAo4co4SL2bLAFQeZHfeYvXrfzuBiM0GFDyBU= 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 1584985314754224.58121716886353; Mon, 23 Mar 2020 10:41:54 -0700 (PDT) Received: from localhost ([::1]:37630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR5F-00063T-Dn for importer@patchew.org; Mon, 23 Mar 2020 13:41:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52225) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR3h-0004OK-Ku for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGR3g-0003hV-Ih for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:17 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGR3g-0003fe-5u for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:16 -0400 Received: by mail-wm1-x344.google.com with SMTP id a9so436401wmj.4 for ; Mon, 23 Mar 2020 10:40:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm25145282wrw.20.2020.03.23.10.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 10:40:12 -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=P717LorGeXb892L2rPZftLo69BBrecynggE4xn2hmr0=; b=RR3hgNfbENzWCdCJP17GedyzqJeSMjgzBerbhmsLVmpiNXXbm62VCqcogTQdbHt0/m l3+J5ZziKVyAWOb25wOOf0s9UTRsDwGT6lNjeef4bZWNWO/sVx0Kf/xkVA9Xm/2js3az lyu6ofMag9bqCdLMf214FHZ333eMJjvIQDLX/MEnTlt6ze0caVaYAL234fLOgsbglvyf 6tAhY+qraEemNKpBwg8BWQUDRVakng5bNBPQnnnw+Coa+Lp+v77uHMBB2e6lcpdCtouY DWr9hCR15FfV91LygBcd2aEUTSImfwnd+OSyvtUfYRiHMPKZtxhkndwOZ3V1VTl5+f7q qwsw== 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=P717LorGeXb892L2rPZftLo69BBrecynggE4xn2hmr0=; b=UZmZXECaw1dMAXRW+L6Url+6Y460+4Awa/iyi8Z8cP6hcBaaTfXzn8bdeBUKMZOC72 2x++vnQ4DNa/1t2XOueZhr0RXVW/UigPDQGLSEbgjrS43mImsqHsfAMAMkIP39FriQKJ 8Y3lZBHyPSk0OpiR82t99c9JtH8KBUbqDsxQ0hTTN2C7QsEAoFpWQcv2fxWWwCz16/ZQ 2n11o7jT0XtjXa+YNZHd1tF1IMoy3nzaY8x7NHJQEdxE+s++ktHrAdxO8Y4IWvwA9Qla rbf5269HsPXPu6txi8KzEP7iwdbV+wPiINrJYefBfEevfzI37yqr51fbj0Na4xIrh8sl BW+w== X-Gm-Message-State: ANhLgQ3UDVrvfysYdGzjh4exZchRHdMwCmkzpvZoPGrYbdDMSsMHN5WB qf8dwHlauDEJDLa3A/1EwyWsATj5JnOe+Q== X-Google-Smtp-Source: ADFU+vuS1DVLUB7gaYFecguqL6bB913zJn/KrOk9izmSV4Ljjbzn7E8FsoyvzXYGTBR//v1RcVzs1A== X-Received: by 2002:a1c:4c1a:: with SMTP id z26mr422398wmf.11.1584985213048; Mon, 23 Mar 2020 10:40:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 3/5] target/arm: Rearrange disabled check for watchpoints Date: Mon, 23 Mar 2020 17:40:04 +0000 Message-Id: <20200323174006.8468-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200323174006.8468-1-peter.maydell@linaro.org> References: <20200323174006.8468-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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 Coverity rightly notes that ctz32(bas) on 0 will return 32, which makes the len calculation a BAD_SHIFT. A value of 0 in DBGWCR_EL1.BAS is reserved. Simply move the existing check we have for this case. Reported-by: Coverity (CID 1421964) Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200320160622.8040-2-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/helper.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index d2ec2c53510..b7b6887241d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6340,17 +6340,18 @@ void hw_watchpoint_update(ARMCPU *cpu, int n) int bas =3D extract64(wcr, 5, 8); int basstart; =20 - if (bas =3D=3D 0) { - /* This must act as if the watchpoint is disabled */ - return; - } - if (extract64(wvr, 2, 1)) { /* Deprecated case of an only 4-aligned address. BAS[7:4] are * ignored, and BAS[3:0] define which bytes to watch. */ bas &=3D 0xf; } + + if (bas =3D=3D 0) { + /* This must act as if the watchpoint is disabled */ + return; + } + /* The BAS bits are supposed to be programmed to indicate a contig= uous * range of bytes. Otherwise it is CONSTRAINED UNPREDICTABLE wheth= er * we fire for each byte in the word/doubleword addressed by the W= VR. --=20 2.20.1 From nobody Fri May 3 02:18:16 2024 Delivered-To: importer@patchew.org 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; 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=1584985314; cv=none; d=zohomail.com; s=zohoarc; b=TWVRdL/Ml6pwmehIQ7ATY2c2VIbaTZNauOUtEpoOyVW4XALYmyEiVEOvjhUH9w4QVXhmZwtqoyOHIHFYB8HRdCYuVSSGaY5/awKgC041MgAgn2WGCrv4jyyB4RXM9yP1e7MeDvsZWy/bRAIxZurCQXbw/g3jRci9Ivcg9EtQn4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584985314; 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=Bajoz+UVKNChgk5fuej6bzALgtOzMFKSB1SLz/XHXRk=; b=W3qx0pJah6fo9bRKBR9iLg/KkXMg3HiF+cMbow71jMa+e1FvX57m3bhRbWLUfsEXiMLUacBIpM630DNkpnSsqQFvLoNyWwW9wlQoLhVVdDaAoO03MhS8Hw3ehDb55WWPH8zVP93BZZRUu/5UxL83rH9cP1Ktk8i/G24SBv1pcqA= 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 1584985314359825.202846640517; Mon, 23 Mar 2020 10:41:54 -0700 (PDT) Received: from localhost ([::1]:37622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR5E-00061N-MD for importer@patchew.org; Mon, 23 Mar 2020 13:41:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52220) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR3h-0004OG-Hw for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGR3g-0003hZ-If for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:17 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:39659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGR3g-0003g3-5v for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:16 -0400 Received: by mail-wr1-x441.google.com with SMTP id p10so5764031wrt.6 for ; Mon, 23 Mar 2020 10:40:15 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm25145282wrw.20.2020.03.23.10.40.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 10:40: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=Bajoz+UVKNChgk5fuej6bzALgtOzMFKSB1SLz/XHXRk=; b=VeQEvntktYkrFhTTinhzDdlSffzgyQJcqnsTTuyZyemL9UGRjlxdJincdEA5cSuYec Txvs51POF+yI0Pbi+MC9ov1W4VSpu9zFj7PRCZEeToZjZXldz7vqJldGgBuIDOuwlftx jGXIzxrOHwd3ohksrxFm7rnva+BcluBQIwbMqWM+vhLS24ZaTQ9MZQwLZm4OeDWhbSBt azwDrZm8ibQZeYFZdK86y26+EOuYZ8GBj9slLafFXj4D5nTcPy7cUi1CocPP+RRXNumM U+PxFpZ2HPaS68kTywFsagD+HgBUT67TBi3lVWgX9V4RjZkcVyS2nAOQ09pk+uZ+2sAH dVOg== 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=Bajoz+UVKNChgk5fuej6bzALgtOzMFKSB1SLz/XHXRk=; b=R2nNumqp+86y2RoIMM0kRONevzPDqV2nLeQ9G+NZXnJi9MjVVDt0+bmuag34sEoyF/ YwuOmphVWehPgnNEabTL5mtEUopQ1Vqy1+9MJKHDwLVl9C+AA9jJ8T/WQhGH/3oZwM2B mYSCpGUrF5uiwHDnjKfklKmpAvOQ0q2sLIA11Qzo48ZzEnHYJFYfqHoY2pZn/4hRmTI7 XkLsZO//L2Q+mVnL/uvmSy2O1AJoTuZ2FA4ZMHu8SLjGWzdRPlq1Qn5hxTAcEo2EcGV6 ecQrraiyQaerZ8EadZm6D1wJiMiKubRebWpXDRgc0kO9pW1z1wF0gvJaO287agnxsOQb 5qsw== X-Gm-Message-State: ANhLgQ13Qc89MG/ZW8BRb0znZmjzpgYZ80NTdfINg4uAZZzP+WwgVJac rvWw3Av+ASHkj90yQHnUnWiVrVYgsj/86A== X-Google-Smtp-Source: ADFU+vsabAUZ/Hx2f2uURgCoAc8fPBPFO5E1BBweePnyxqncscz7rDhNZa61qi5MPILHBaAC3sfuZw== X-Received: by 2002:adf:efc9:: with SMTP id i9mr10965935wrp.23.1584985214122; Mon, 23 Mar 2020 10:40:14 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 4/5] target/arm: Assert immh != 0 in disas_simd_shift_imm Date: Mon, 23 Mar 2020 17:40:05 +0000 Message-Id: <20200323174006.8468-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200323174006.8468-1-peter.maydell@linaro.org> References: <20200323174006.8468-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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 Coverity raised a shed-load of errors cascading from inferring that clz32(immh) might yield 32, from immh might be 0. While immh cannot be 0 from encoding, it is not obvious even to a human how we've checked that: via the filtering provided by data_proc_simd[]. Reported-by: Coverity (CID 1421923, and more) Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200320160622.8040-3-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 8fffb52203d..032478614c4 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10405,6 +10405,9 @@ static void disas_simd_shift_imm(DisasContext *s, u= int32_t insn) bool is_u =3D extract32(insn, 29, 1); bool is_q =3D extract32(insn, 30, 1); =20 + /* data_proc_simd[] has sent immh =3D=3D 0 to disas_simd_mod_imm. */ + assert(immh !=3D 0); + switch (opcode) { case 0x08: /* SRI */ if (!is_u) { --=20 2.20.1 From nobody Fri May 3 02:18:16 2024 Delivered-To: importer@patchew.org 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; 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=1584985314; cv=none; d=zohomail.com; s=zohoarc; b=Pk2jHi48S2uDPBZhe4WDofEbgiz6klQ7EZnT177su2EBUmRJ+/9YSbFDDI9cem5nSgFVodNfgA1mWztuG2qYosusQhSx8e2WIQqY6uGWXqfStG9MFDMGrXkWdoJ+o0YPdeHwvjYqbL3p5ElaZQMd97qjFjIEvDHhUO0AFbW6h64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584985314; 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=RITZnDTDn/38AGh+VF4YqFkEzRJU1Dvi8yVVJIkiyIw=; b=IqKO3sW9iOCfGW0R4Tdrzlk0DDDKjb9qBWuRlrQ5PJgj5psBiwaB6Eoc8sPvK6UNv7xicMgscX78VMerXmXTtUZAPKNpZ9kJMKwfVTvGxjoYtJOLK4rCgcu3h6xE7ZcIZHQKHyzckxx5Xif5rpEFvcycTiArgIaozoAC/m0K0so= 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 1584985314355177.3130435154019; Mon, 23 Mar 2020 10:41:54 -0700 (PDT) Received: from localhost ([::1]:37618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR5E-0005zy-EQ for importer@patchew.org; Mon, 23 Mar 2020 13:41:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGR3h-0004OJ-KZ for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGR3g-0003hU-In for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:17 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:40433) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGR3g-0003gR-AA for qemu-devel@nongnu.org; Mon, 23 Mar 2020 13:40:16 -0400 Received: by mail-wr1-x442.google.com with SMTP id f3so18165960wrw.7 for ; Mon, 23 Mar 2020 10:40:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id o9sm25145282wrw.20.2020.03.23.10.40.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Mar 2020 10:40:14 -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=RITZnDTDn/38AGh+VF4YqFkEzRJU1Dvi8yVVJIkiyIw=; b=lNkaiIsVZhLVcfdrXM4QCWv+fiqLXAVpWEFSgeHNunyKPwaNWSjxEdhEcEF5Fe+Y94 j3MwJx/6lw2BWdkpGTeTid2999JpgNZBiz/hpCsJI4RxxsLE+GX+XYSBX9kp54ciXy4L 3vkPHoMdPJThMiJZYF/OOk7P4LIv5/mpxkTmUwCRmW35p9cUwhPHbXZHRA4PrahETYOk Y/cfX50oE+N0ZmGxmkMvyWjQ9FDpBjxKSuKJanX+HVOJz70GCv6N8uxntPh5KT0Ghntq /Xr/9qhN0OB6LgbBIxUbQnZvvRP1qYXNorK2RNIpqfb55qqQy/ICHZ4tvEDwdgP6usrT rEPQ== 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=RITZnDTDn/38AGh+VF4YqFkEzRJU1Dvi8yVVJIkiyIw=; b=R6La5c63tk31zb/Pn3jP4vCnJOJjIn0lnTQCU78NQFjkgkS0VYDL5GE6/lZoB4eTKD QSZjGLKsbSoOTH3nnHOLrdH5tlQeyJEASLiK1WjF7hIHwT9jLBqfQKS57PzQ54A0gxdn bKnc4xBF4sG+1F8f9EfUzOelo+2lfd9iahWWcJS0RMsCMVa9SoBef+mLrOHRPos6yheF yyg5DOi9eKstLovTjA8/8H1lqAmFTPk+P460WHy+GJktzp/7Ts0ENbO0qvJeB+83R7qh p3+zCYVKok0K66hYBJvnUgxAz/SyI1rs3UCgJW64Ri7nSw0m/qbLttfLYaIHpsY86cFq 9z3w== X-Gm-Message-State: ANhLgQ0hvkMaHZfbCuVGAarf1PrkR3Fi00WACFdoxGKoENVE+7GuKUmB +BDPHnD9n5lUzh+4RJQTL77CMRwngh5kAg== X-Google-Smtp-Source: ADFU+vsmZGxFB5z5Uiu9MVKsO2O71aEuPDYr7aiXhSBFs26P679sf7zIMwgvek9tgqaXz+ui62MyQA== X-Received: by 2002:adf:80cb:: with SMTP id 69mr29927986wrl.320.1584985215054; Mon, 23 Mar 2020 10:40:15 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 5/5] target/arm: Move computation of index in handle_simd_dupe Date: Mon, 23 Mar 2020 17:40:06 +0000 Message-Id: <20200323174006.8468-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200323174006.8468-1-peter.maydell@linaro.org> References: <20200323174006.8468-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 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 Coverity reports a BAD_SHIFT with ctz32(imm5), with imm5 =3D=3D 0. This is an invalid encoding, but we diagnose that just below by rejecting size > 3. Avoid the warning by sinking the computation of index below the check. Reported-by: Coverity (CID 1421965) Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20200320160622.8040-4-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 032478614c4..7580e463674 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -7422,7 +7422,7 @@ static void handle_simd_dupe(DisasContext *s, int is_= q, int rd, int rn, int imm5) { int size =3D ctz32(imm5); - int index =3D imm5 >> (size + 1); + int index; =20 if (size > 3 || (size =3D=3D 3 && !is_q)) { unallocated_encoding(s); @@ -7433,6 +7433,7 @@ static void handle_simd_dupe(DisasContext *s, int is_= q, int rd, int rn, return; } =20 + index =3D imm5 >> (size + 1); tcg_gen_gvec_dup_mem(size, vec_full_reg_offset(s, rd), vec_reg_offset(s, rn, index, size), is_q ? 16 : 8, vec_full_reg_size(s)); --=20 2.20.1