From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691112; cv=none; d=zohomail.com; s=zohoarc; b=On5dfzhiRgTQ1TNWInGK3Ks+FH/oSakQu6m1LsP+WFo07rPpscwTYbfIMat6oHYi5H5TNfxN5AhSqqHn0FTdwrzHM3gKxNu1n/ttTWPpTPnX/TKWKiJQokKaWA+gSJJQTHIotpY9PCMF4t2qMqTZfbUdLdPDgM6zqfu5hATg2bA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691112; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Hwpo4Gdo6ndwqVzHgyIgbMFjcV7Bk74avs3plMLuDNI=; b=ekFJ2bhHLk6B9hs5I3VAKgzDMK9yx45DPRjgQZ1D1J4CxTRXaM1MKxz53l6NINB3lxka5rWnhnvI+HeB0pKHz4S+Sekbs/52SCpfcZOLXplPGSlYN4lX2fLKpbOva4jnJrCZwjNsf9C48W5CtVgxZ9ImmhUPY+HcNaRCduGBg6M= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691112275760.7011055643901; Wed, 31 Jan 2024 00:51:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6JM-0001rD-BE; Wed, 31 Jan 2024 03:51:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JK-0001r4-BA for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:10 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JH-0007op-Qw for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:09 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40e80046246so3373005e9.1 for ; Wed, 31 Jan 2024 00:51:07 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691065; x=1707295865; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Hwpo4Gdo6ndwqVzHgyIgbMFjcV7Bk74avs3plMLuDNI=; b=erd5q3ZIFNE/yhocS12ndZn4NfK80ohZPV37takLyD1JkNSav7yrPBh5dHZIvuUl2l 0A9QmLO5AqYEoxWQNanb4IeJxO+EjAvZgTyjFqCTx55GvI3+hN57qhTNzSyL60jphgJg h2e5BS4fsHD06n+hy7m4GP9AGJH9IgRlwxy5xJiL8vynWyubGwdeRe4x/8vJ4vfRm4ns S6kL/WwKk6QdiuTL7O6OlD+0jOL1gUpfpkkg3kzQDtjEtKPASgz0J5J8dR1A8ILLOYNq uRiRMK9lyYwpHEQM053VlJH18mNsXT9CZckIMM7xbei6yy1Z00jyWNrzFOFNbNdWZZyb 7kkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691065; x=1707295865; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hwpo4Gdo6ndwqVzHgyIgbMFjcV7Bk74avs3plMLuDNI=; b=QqE+BAy3dgAPYGg04aLrIxdzSAgEJyYFd62N3t10asveHThyb7zzqLXcPxYDt3iUGC 26X88ymWEPYICsmtybxbKipGUFP7VWSAYVo2kKpcNytOWNsf10w2SZH3GerAdYlhVnrY cihKY1RcFV39LR8DzQ/xTWeT0s/xBvBROeU2ZhZvZ5bxfQWQLHg+NMqa45zx/sk9qSDs 7SMKGwPYJEmbmd1n70dqu9vPhxf6/1NXVGpif+VDeCBb+4uBnplasRctQy8ZFyp+BNgl FBXNGZeRM151NcYsvMxcCusiHKM+CBXDBCPdyLHiHZA++CP9k3f2Fh2T5jT2Ikws7Fl3 IHuA== X-Gm-Message-State: AOJu0YyHDwsUnyaZxJwFv0Z5WjrNs8GcUk5ObQqrMDP0NDXzSDjY3MP9 2rdhR0qDQFbX4uA7vWw+MzOFXen88vd6pSh2gEKCyeL6u42CcEPA6xopTUXy5Lt0+V088tTjSOs = X-Google-Smtp-Source: AGHT+IG7AcxHbx8pHdTGYHF0203JbZ8B9liUYYryhPqKBzauNWMel8s/jtwY1WYqSpWQATahn73kcA== X-Received: by 2002:a05:600c:4f82:b0:40e:fa51:3526 with SMTP id n2-20020a05600c4f8200b0040efa513526mr802828wmq.10.1706691065610; Wed, 31 Jan 2024 00:51:05 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV7f3jSmk+Tcz3Whe6BMX9y/7kd7A/3k83Hj53DSUzUzVBXFvjTTF7GdHVEg98rWqBiFojLI+5NiKZ0/D/onJ9c6MbxDZCfoqkZdUYjUnUMhUbCVCPmmFb+sEJK From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/9] sparc/grlib: split out the headers for each peripherals Date: Wed, 31 Jan 2024 09:50:39 +0100 Message-Id: <20240131085047.18458-2-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::331; envelope-from=chigot@adacore.com; helo=mail-wm1-x331.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691112831100001 ... and move them in their right hardware directory. Update Copyright and add SPDX-License-Identifier at the same time. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/char/grlib_apbuart.c | 6 ++-- hw/intc/grlib_irqmp.c | 6 ++-- hw/sparc/leon3.c | 8 +++-- hw/timer/grlib_gptimer.c | 6 ++-- include/hw/char/grlib_uart.h | 32 +++++++++++++++++++ .../hw/{sparc/grlib.h =3D> intc/grlib_irqmp.h} | 16 ++++------ include/hw/timer/grlib_gptimer.h | 32 +++++++++++++++++++ 7 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 include/hw/char/grlib_uart.h rename include/hw/{sparc/grlib.h =3D> intc/grlib_irqmp.h} (86%) create mode 100644 include/hw/timer/grlib_gptimer.h diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index 82ff40a530..515b65bc07 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB APB UART Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -26,7 +28,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" -#include "hw/sparc/grlib.h" +#include "hw/char/grlib_uart.h" #include "hw/sysbus.h" #include "qemu/module.h" #include "chardev/char-fe.h" diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 3bfe2544b7..11eef62457 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -3,7 +3,9 @@ * * (Multiprocessor and extended interrupt not supported) * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -29,7 +31,7 @@ #include "hw/sysbus.h" =20 #include "hw/qdev-properties.h" -#include "hw/sparc/grlib.h" +#include "hw/intc/grlib_irqmp.h" =20 #include "trace.h" #include "qapi/error.h" diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 2dfb742566..b7d81c76f3 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -1,7 +1,9 @@ /* * QEMU Leon3 System Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -40,7 +42,9 @@ #include "elf.h" #include "trace.h" =20 -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" +#include "hw/char/grlib_uart.h" +#include "hw/intc/grlib_irqmp.h" #include "hw/misc/grlib_ahb_apb_pnp.h" =20 /* Default system clock. */ diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c index 5c4923c1e0..4990885451 100644 --- a/hw/timer/grlib_gptimer.c +++ b/hw/timer/grlib_gptimer.c @@ -1,7 +1,9 @@ /* * QEMU GRLIB GPTimer Emulator * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -23,7 +25,7 @@ */ =20 #include "qemu/osdep.h" -#include "hw/sparc/grlib.h" +#include "hw/timer/grlib_gptimer.h" #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/irq.h" diff --git a/include/hw/char/grlib_uart.h b/include/hw/char/grlib_uart.h new file mode 100644 index 0000000000..7496f8fd5e --- /dev/null +++ b/include/hw/char/grlib_uart.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB UART + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_UART_H +#define GRLIB_UART_H + +#define TYPE_GRLIB_APB_UART "grlib-apbuart" + +#endif diff --git a/include/hw/sparc/grlib.h b/include/hw/intc/grlib_irqmp.h similarity index 86% rename from include/hw/sparc/grlib.h rename to include/hw/intc/grlib_irqmp.h index ef1946c7f8..c5a90cbb3e 100644 --- a/include/hw/sparc/grlib.h +++ b/include/hw/intc/grlib_irqmp.h @@ -1,7 +1,9 @@ /* * QEMU GRLIB Components * - * Copyright (c) 2010-2019 AdaCore + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2010-2024 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -22,8 +24,8 @@ * THE SOFTWARE. */ =20 -#ifndef GRLIB_H -#define GRLIB_H +#ifndef GRLIB_IRQMP_H +#define GRLIB_IRQMP_H =20 #include "hw/sysbus.h" =20 @@ -36,10 +38,4 @@ =20 void grlib_irqmp_ack(DeviceState *dev, int intno); =20 -/* GPTimer */ -#define TYPE_GRLIB_GPTIMER "grlib-gptimer" - -/* APB UART */ -#define TYPE_GRLIB_APB_UART "grlib-apbuart" - -#endif /* GRLIB_H */ +#endif /* GRLIB_IRQMP_H */ diff --git a/include/hw/timer/grlib_gptimer.h b/include/hw/timer/grlib_gpti= mer.h new file mode 100644 index 0000000000..e56f1b8bf3 --- /dev/null +++ b/include/hw/timer/grlib_gptimer.h @@ -0,0 +1,32 @@ +/* + * QEMU GRLIB GPTimer + * + * SPDX-License-Identifier: MIT + * + * Copyright (c) 2024 AdaCore + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ + +#ifndef GRLIB_GPTIMER_H +#define GRLIB_GPTIMER_H + +#define TYPE_GRLIB_GPTIMER "grlib-gptimer" + +#endif --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691101; cv=none; d=zohomail.com; s=zohoarc; b=b3fDFcuYiR0kcbpbeXOSSVX35pbUrr0HUBFb3bB0w4SlBFCc5MZaxZ8jR/eUhWUNwenHVok1ufM9OOP21HR6HbZxCsIxq+ePSvulyMs9fKIAcm+/J4jrylNCqOCG7tNL6iuT9EWWZmvTzLqitVghbap2mWmsVgiHCJhWrR2mWH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691101; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MDOC//9rYljv8JbNJSrklqxInCkoTiR/AirLn143wHQ=; b=P+tN18zYdGyt4pFY9BzWgn1lptdAMEVkJIRw548QnzjGhthMsTFLWG0HGLHRV7ySKy7JzUOFKEruc3FKjCHdIRpnewdn+A9vWQ9LxQF3pPNXk58CDkaGgeRFPcyi9kYrUkfpzYU4PXMDAhwpl5TBBdDCkyZgSIcfwPZ717nz3hE= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691101234526.7851789797026; Wed, 31 Jan 2024 00:51:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6JP-0001s0-Tz; Wed, 31 Jan 2024 03:51:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JO-0001rn-FB for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:14 -0500 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JL-0007pN-MK for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:13 -0500 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2cf3ed3b917so58550701fa.1 for ; Wed, 31 Jan 2024 00:51:11 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691069; x=1707295869; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MDOC//9rYljv8JbNJSrklqxInCkoTiR/AirLn143wHQ=; b=fvZOpWE35/8nt82L5Fr9x3+foNAUT6sL7QWI27P7QzYzWOLPqPQaU5yD1ks3HNbWj7 m1f154i56nuCfy2BTBMc+A+hiHahUdtPF9exSCFU/0RqszxvB14CpK47RH1ayt+mkOUL 5trdq8UW+BN/VnbEcL3UneWd/h2esA3b1lQVZkr3F39N+8mbzz9AfYistPE0FzvJhyl5 QNU8qogxdXtu+0E/xw7wElVJol+Lmo7j2cW7NVdeooRFe/7iodrqeGcGwGqvgF/QBT1z /507ATItTySMyZ6+vpRal6eNTWULv9CgMDOzeFgGfweZN441Kh6ef4wpgJCfsSAp/+BS c3pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691069; x=1707295869; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MDOC//9rYljv8JbNJSrklqxInCkoTiR/AirLn143wHQ=; b=P2sJPyQYMDv8hUyDe8TD4268JxJt82nZ7jPoERItKAKCelx8Is0LC8zrlxebLlA456 DTMomxbFI5JvEDmwIbkmJX7JYhEaBCbSo4kVcvNKtlPb3+xZnDoTohu4joq8APlJ1ZFw tQ4avIgIeVqwZL6/H64R+F0IEEVSN99vQn7ZdkMGzQXge7NUtxS3cU/UVy+38m6T/SJ+ w2aS3jWesuZf+V72GNnqSmPSzL3MxMTrPODEz3Vj0TPiM+f/Aiin+CE+aU0phCGwTgpJ NkJLI4C7XpBgpb0dKt71eyAL6aG5xuWd8lhxYGFoWfUw/ELmvU/3ZlN/UtWBva02kWp+ G0Xw== X-Gm-Message-State: AOJu0YwM0Cg6RjsQtJvqIWkga1wGmAj5SF2Y/n6gSA2Zhi5RW7cxENas eMUNSoBTsyUc/ZJ7lozSn1NgZxFEgj4XqJq0yUaEvH6yvc4359noc5C7FI6+2Pq4TetiRWZg7b0 = X-Google-Smtp-Source: AGHT+IHlY5klwGaOyqwk3P5zy8miktx/NMWNhpGdqiR/I31mZaTsQEnlIZBt/l/ZkLB30hIdm5mQFw== X-Received: by 2002:a05:6512:74c:b0:50f:f9b9:f542 with SMTP id c12-20020a056512074c00b0050ff9b9f542mr858980lfs.7.1706691069516; Wed, 31 Jan 2024 00:51:09 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUnop1HaG+EJLNGY2/ijnkLBpWGLiqC4kvAc96rXI5UwuJaTicKlwnqSny2YZNcrlIkRfV4WoZsjvgBd5xvyr6HOvEqMIMktzDF3g4jOj/rkvDKM42gR3GD4l36 From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/9] intc/grlib_irqmp: add ncpus property Date: Wed, 31 Jan 2024 09:50:40 +0100 Message-Id: <20240131085047.18458-3-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::22d; envelope-from=chigot@adacore.com; helo=mail-lj1-x22d.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691102785100001 This adds a "ncpus" property to the "grlib-irqmp" device to be used later, this required a little refactoring of how we initialize the device (ie: use realize instead of init). Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/intc/grlib_irqmp.c | 30 +++++++++++++++++++++--------- hw/sparc/leon3.c | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 11eef62457..744cd64c58 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -1,7 +1,7 @@ /* * QEMU GRLIB IRQMP Emulator * - * (Multiprocessor and extended interrupt not supported) + * (Extended interrupt not supported) * * SPDX-License-Identifier: MIT * @@ -63,6 +63,7 @@ struct IRQMP { =20 MemoryRegion iomem; =20 + unsigned int ncpus; IRQMPState *state; qemu_irq irq; }; @@ -326,33 +327,44 @@ static void grlib_irqmp_reset(DeviceState *d) irqmp->state->parent =3D irqmp; } =20 -static void grlib_irqmp_init(Object *obj) +static void grlib_irqmp_realize(DeviceState *dev, Error **errp) { - IRQMP *irqmp =3D GRLIB_IRQMP(obj); - SysBusDevice *dev =3D SYS_BUS_DEVICE(obj); + IRQMP *irqmp =3D GRLIB_IRQMP(dev); =20 - qdev_init_gpio_in(DEVICE(obj), grlib_irqmp_set_irq, MAX_PILS); - qdev_init_gpio_out_named(DEVICE(obj), &irqmp->irq, "grlib-irq", 1); - memory_region_init_io(&irqmp->iomem, obj, &grlib_irqmp_ops, irqmp, + if ((!irqmp->ncpus) || (irqmp->ncpus > IRQMP_MAX_CPU)) { + error_setg(errp, "Invalid ncpus properties: " + "%u, must be 0 < ncpus =3D< %u.", irqmp->ncpus, + IRQMP_MAX_CPU); + } + + qdev_init_gpio_in(dev, grlib_irqmp_set_irq, MAX_PILS); + qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); + memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, ir= qmp, "irqmp", IRQMP_REG_SIZE); =20 irqmp->state =3D g_malloc0(sizeof *irqmp->state); =20 - sysbus_init_mmio(dev, &irqmp->iomem); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &irqmp->iomem); } =20 +static Property grlib_irqmp_properties[] =3D { + DEFINE_PROP_UINT32("ncpus", IRQMP, ncpus, 1), + DEFINE_PROP_END_OF_LIST(), +}; + static void grlib_irqmp_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + dc->realize =3D grlib_irqmp_realize; dc->reset =3D grlib_irqmp_reset; + device_class_set_props(dc, grlib_irqmp_properties); } =20 static const TypeInfo grlib_irqmp_info =3D { .name =3D TYPE_GRLIB_IRQMP, .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(IRQMP), - .instance_init =3D grlib_irqmp_init, .class_init =3D grlib_irqmp_class_init, }; =20 diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index b7d81c76f3..b72761b959 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -265,11 +265,11 @@ static void leon3_generic_hw_init(MachineState *machi= ne) =20 /* Allocate IRQ manager */ irqmpdev =3D qdev_new(TYPE_GRLIB_IRQMP); + sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, env, "pil", 1); qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, qdev_get_gpio_in_named(DEVICE(cpu), "pil",= 0)); - sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); env->irq_manager =3D irqmpdev; env->qemu_irq_ack =3D leon3_irq_manager; --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691108; cv=none; d=zohomail.com; s=zohoarc; b=B8Hh8I/kAvlYnZe5A4FTv+YWrLJdQw396k6eq3uUCjiZhxdkyYS7T8UFcjTSKqY9CIRFy4qxCcGmL1OLOCEyuRkW86+fqW6nnkblvpakMjYuyHFnOeQ0t/ar1mPSNu+aS/rhSRW1TqzJAlQzR5OmyuaSJ9fg6qNoCi3hH1kCZ/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691108; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UhFG2si/8hc7valLejRKh0mzo2o2mJ+vEmfkcumKKLU=; b=JuVgZCp8UrmiBy+M87vxgCQRXcs0fDxqCps2RMsMM2oJbiLDznwjoPHAW20vKqpYsCAVha92joBbzhJkNerxnum/Xb5A8kXhXD+EoYbnE+z5DT56nf0Rb/WDsUZDDPLfAyeBYSfrDQi++2skT3LesE7kvBvfcHN6g6l6RbKwOsg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17066911084131018.5008051149422; Wed, 31 Jan 2024 00:51:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6JW-0001vL-7b; Wed, 31 Jan 2024 03:51:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JR-0001u8-FT for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:17 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JO-0007po-7A for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:17 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e7065b7bdso54152165e9.3 for ; Wed, 31 Jan 2024 00:51:12 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691071; x=1707295871; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UhFG2si/8hc7valLejRKh0mzo2o2mJ+vEmfkcumKKLU=; b=YKGnv2XA2PnlOK2/PmfJfQUJgIPRHq8xSAxajHe2DC9dmtmPaybWCb5L68mAliR7h/ QY9Pcjpb1toMmoYVxDHgqnaj5cUv7iKL89OSMXIto/uSmDmxZKEk0atMaSCbJLK9LK+m WiFr3T3wscw5Y15lh5sIM39j1BJJ/FONoqU2xHeHdHpZHjh5sHYFHO5SBYksd9yWKSHU kYpTcE0TWTTjkNa+sdeTN7lMN41YGXOnghhI2gRsCqci+5fStkISExFcFia32syKqk4o awFvpOTa+NQkJ+Ynbc4PM6JGWK6lDKw/gAN/ervx0prn7BNmar/Od3MGa+2oVVGzwAQ1 6/mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691071; x=1707295871; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UhFG2si/8hc7valLejRKh0mzo2o2mJ+vEmfkcumKKLU=; b=QEeBMbmgU+AvjrX7wepoPNGIagAfn3CMg0HGJFWhstF+OWa5317ocY7MRKpICRCfXj OWphRa8pSzbX1CnzEkM8TlM26G50dWPED4e5dtTfw0Nm5e95c7vRtv5PPWaW87fi5Jux Ju+hN71syl/89Zifgm2lteSBjXKIeh+U7+oOOUgEsP6UWW+ZxqvdDpuFfWMQv3KnmKoO fS6k+0/kj/9Slks/Zv4b8Knu+/YjqWommU7XEJVyUWxA05hGSIINUyGQZWvJgKNgSb7j g2KGgPffNz8S6VievVxBmgCjXqGcS3pkGq78LMxU8pYhfTmABdFPGiw73QdkBuLc2L1m ylSA== X-Gm-Message-State: AOJu0YxZAY3pPMnwxImJIgKSuaK2yR7Nor0E59sul7J6QbUKcoNvpLWI T5pFBx43sfQwR2wE5KTwHM/Lk2mij7+D5jJg+L3ORMdwUV5hDnBlTxXggX5W4z1PsdQ4QYnm+eU = X-Google-Smtp-Source: AGHT+IEOySXRt+Zv0KqHA3NQdMAyKw+lwax13cU07sBZ+Vm/YhAP1SfjpDKZzWEA5EjPSDlEtGAr0A== X-Received: by 2002:a05:600c:3c83:b0:40e:d4d1:2e0b with SMTP id bg3-20020a05600c3c8300b0040ed4d12e0bmr765092wmb.19.1706691071599; Wed, 31 Jan 2024 00:51:11 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVHOZmqgxzeK7aNB0hAoyg5OHAPd4uqCFh4thHu418hTgoo4PzYgIcuCsPqedbNtUkTlHr8BkMjAHYMj/8ixrzDPP021JrFGo+QV8XdZfOA83FIMbo6wCA+Kzyk From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/9] intc/grlib_irqmp: implements the multiprocessor status register Date: Wed, 31 Jan 2024 09:50:41 +0100 Message-Id: <20240131085047.18458-4-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::334; envelope-from=chigot@adacore.com; helo=mail-wm1-x334.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691108889100001 This implements the multiprocessor status register in grlib-irqmp and bind it to a start signal, which will be later wired in leon3-generic to start a cpu. The EIRQ and BA bits are not implemented. Based on https://gaisler.com/doc/gr712rc-usermanual.pdf, =C2=A78.3.5. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/intc/grlib_irqmp.c | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 744cd64c58..1e073bd232 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -52,6 +52,10 @@ #define FORCE_OFFSET 0x80 #define EXTENDED_OFFSET 0xC0 =20 +/* Multiprocessor Status Register */ +#define MP_STATUS_CPU_STATUS_MASK ((1 << IRQMP_MAX_CPU)-2) +#define MP_STATUS_NCPU_SHIFT 28 + #define MAX_PILS 16 =20 OBJECT_DECLARE_SIMPLE_TYPE(IRQMP, GRLIB_IRQMP) @@ -65,6 +69,7 @@ struct IRQMP { =20 unsigned int ncpus; IRQMPState *state; + qemu_irq start_signal[IRQMP_MAX_CPU]; qemu_irq irq; }; =20 @@ -72,6 +77,7 @@ struct IRQMPState { uint32_t level; uint32_t pending; uint32_t clear; + uint32_t mpstatus; uint32_t broadcast; =20 uint32_t mask[IRQMP_MAX_CPU]; @@ -182,10 +188,12 @@ static uint64_t grlib_irqmp_read(void *opaque, hwaddr= addr, return state->force[0]; =20 case CLEAR_OFFSET: - case MP_STATUS_OFFSET: /* Always read as 0 */ return 0; =20 + case MP_STATUS_OFFSET: + return state->mpstatus; + case BROADCAST_OFFSET: return state->broadcast; =20 @@ -224,8 +232,9 @@ static uint64_t grlib_irqmp_read(void *opaque, hwaddr a= ddr, static void grlib_irqmp_write(void *opaque, hwaddr addr, uint64_t value, unsigned size) { - IRQMP *irqmp =3D opaque; + IRQMP *irqmp =3D opaque; IRQMPState *state; + int i; =20 assert(irqmp !=3D NULL); state =3D irqmp->state; @@ -258,7 +267,18 @@ static void grlib_irqmp_write(void *opaque, hwaddr add= r, return; =20 case MP_STATUS_OFFSET: - /* Read Only (no SMP support) */ + /* + * Writing and reading operations are reversed for the CPU status. + * Writing "1" will start the CPU, but reading "1" means that the = CPU + * is power-down. + */ + value &=3D MP_STATUS_CPU_STATUS_MASK; + for (i =3D 0; i < irqmp->ncpus; i++) { + if ((value >> i) & 1) { + qemu_set_irq(irqmp->start_signal[i], 1); + state->mpstatus &=3D ~(1 << i); + } + } return; =20 case BROADCAST_OFFSET: @@ -325,6 +345,8 @@ static void grlib_irqmp_reset(DeviceState *d) =20 memset(irqmp->state, 0, sizeof *irqmp->state); irqmp->state->parent =3D irqmp; + irqmp->state->mpstatus =3D ((irqmp->ncpus - 1) << MP_STATUS_NCPU_SHIFT= ) | + ((1 << irqmp->ncpus) - 2); } =20 static void grlib_irqmp_realize(DeviceState *dev, Error **errp) @@ -338,6 +360,13 @@ static void grlib_irqmp_realize(DeviceState *dev, Erro= r **errp) } =20 qdev_init_gpio_in(dev, grlib_irqmp_set_irq, MAX_PILS); + + /* + * Transitionning from 0 to 1 starts the CPUs. The opposite can't + * happen. + */ + qdev_init_gpio_out_named(dev, irqmp->start_signal, "grlib-start-cpu", + IRQMP_MAX_CPU); qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, ir= qmp, "irqmp", IRQMP_REG_SIZE); --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691172; cv=none; d=zohomail.com; s=zohoarc; b=Qr7T3Huj9Z0HwUy/WmNfa079kblgB/h1Iiwu0FoyRGzYFtW+j6g5F8PGR8G6zoRZ1M+jXyRW5EZfW4UiWrQBvEGDYS7qomZhmFYfyxfxR29IfnX+iWrHJDN63ffF1sOxTqGfYRYeTd0j1NFtmZMmq7rqsfirq7XH74E4zpA/LXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691172; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=e4h/3nnPQ8lnDqMYJQ1DshvzX1Bc/jBjk24rZPsboDU=; b=l7anNaEN7WuG6f8BtOu7+OERsoeCZVO93b0N7dDFLuLsI9I7pT3EwFk0E3SYdTBu3j7HK5o5Si5o/Ybk0KEb7FgYzz9MRbaBff5buaT5rXwfX3NVDdeziAN0d/UAu/CYN+oq2HF2XKux8hLvwFISTH8I/R+aZRjCD32faAuVVys= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691172962916.6917837558966; Wed, 31 Jan 2024 00:52:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6JX-0001vN-D1; Wed, 31 Jan 2024 03:51:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JR-0001u9-Ia for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:17 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JP-0007qD-JJ for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:17 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-51124d43943so635099e87.2 for ; Wed, 31 Jan 2024 00:51:15 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691073; x=1707295873; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e4h/3nnPQ8lnDqMYJQ1DshvzX1Bc/jBjk24rZPsboDU=; b=Q+FkKS3pg8S9D4DeQDRGiO5mYibsrvzSXj9hCa2xpw9q+4ediJyu4+cLa5r5WELms7 67d3d4BukJanKFTaqbg1wv7XPi2aP3BfhR74suQM8/VGvLZ1rUkM0pjN5ei8/GY+j14m 23j20kaP8tJlAEy5mt8cTyRlQpuYvmnMsq5ZTamwRktpKv9E4+ixgoTwmrPFk2CKAnt4 BpOpuDKFGX5GZVAgMJGmszVcoOD0iRK0mLuEFa4XA/cWCa0uIZLXV1c80wk4B+sqKQZq MquwlJbWrk+leOJPa7j0LWhVuRCWzH9F4dYy9NcgMqaB8H7BgcUCDxXOgk/PONy8xaGB 9dMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691073; x=1707295873; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e4h/3nnPQ8lnDqMYJQ1DshvzX1Bc/jBjk24rZPsboDU=; b=emgRWF+r/iW6Kq7Fb1cIzt6hA2VmKPZynvJ5Dz4hs4Fd5A5GSf58NFeAO7Or3otSMu bLvPJki5pRYhpuwCJFY5qB4CxWBAM09DNVCfq2SthcogFOJhywEhqD+BzMUWXxXNxWhb vPsk/+69PqkesDiCnBqfg1mDP1KwbYnj+Tqq8oKJ7Ajffjdew+2NYFOFYwUaRnU6hx4j nAsn7NJnVD3WIxf2vn35RaGtT6QkA8SfuaL2IjUDfgCJTgnP8FKzIp1nobmISW/2RBTY 9KdWn0FHkN1Oz+UjRo8Cd7PKnn0rCbOCU66vCxv66CHe+hkxa9IT1+uTHMaUZOcgdTXj JROQ== X-Gm-Message-State: AOJu0Yx2PQfRVEh9ioUJljeFXecJAzVSb+pdIf9Vt+0D9Ns05BVk+e58 dutoKYhKb+9qBhsWQ7egnFeT/agfFY/TSYKooILWxG4hmbAP6/x4XY7bWCR07cJZZY3HXhtnXV8 = X-Google-Smtp-Source: AGHT+IGs/9949DPA8sdmmtLemwNf6uWUnk3kuyBkOfnfv1ZgZbkHVq6CiA+SBZF+lheNQWwh1jxlQQ== X-Received: by 2002:a05:6512:3092:b0:50d:1c9d:59e4 with SMTP id z18-20020a056512309200b0050d1c9d59e4mr853925lfd.47.1706691073040; Wed, 31 Jan 2024 00:51:13 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXDYY265u549utEEB7gQkiGGb4xfpLe4jc21uCG5k8gM2WzmrATkv6Kvn5s226dmOssumjmRu62PWSEPAFmshlYmGwyP+BakTb/GipL4DxZo1OUorw+n4AvAlW/ From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 4/9] intc/grlib_irqmp: implements multicore irq Date: Wed, 31 Jan 2024 09:50:42 +0100 Message-Id: <20240131085047.18458-5-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::12a; envelope-from=chigot@adacore.com; helo=mail-lf1-x12a.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691174948100003 Now there is an ncpus property, use it in order to deliver the IRQ to multiple CPU. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/intc/grlib_irqmp.c | 41 +++++++++++++++++------------------ hw/sparc/leon3.c | 3 ++- include/hw/intc/grlib_irqmp.h | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 1e073bd232..144b121d48 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -70,7 +70,7 @@ struct IRQMP { unsigned int ncpus; IRQMPState *state; qemu_irq start_signal[IRQMP_MAX_CPU]; - qemu_irq irq; + qemu_irq irq[IRQMP_MAX_CPU]; }; =20 struct IRQMPState { @@ -89,37 +89,35 @@ struct IRQMPState { =20 static void grlib_irqmp_check_irqs(IRQMPState *state) { - uint32_t pend =3D 0; - uint32_t level0 =3D 0; - uint32_t level1 =3D 0; + int i; =20 assert(state !=3D NULL); assert(state->parent !=3D NULL); =20 - /* IRQ for CPU 0 (no SMP support) */ - pend =3D (state->pending | state->force[0]) - & state->mask[0]; - - level0 =3D pend & ~state->level; - level1 =3D pend & state->level; + for (i =3D 0; i < state->parent->ncpus; i++) { + uint32_t pend =3D (state->pending | state->force[i]) & state->mask= [i]; + uint32_t level0 =3D pend & ~state->level; + uint32_t level1 =3D pend & state->level; =20 - trace_grlib_irqmp_check_irqs(state->pending, state->force[0], - state->mask[0], level1, level0); + trace_grlib_irqmp_check_irqs(state->pending, state->force[i], + state->mask[i], level1, level0); =20 - /* Trigger level1 interrupt first and level0 if there is no level1 */ - qemu_set_irq(state->parent->irq, level1 ?: level0); + /* Trigger level1 interrupt first and level0 if there is no level1= */ + qemu_set_irq(state->parent->irq[i], level1 ?: level0); + } } =20 -static void grlib_irqmp_ack_mask(IRQMPState *state, uint32_t mask) +static void grlib_irqmp_ack_mask(IRQMPState *state, unsigned int cpu, + uint32_t mask) { /* Clear registers */ state->pending &=3D ~mask; - state->force[0] &=3D ~mask; /* Only CPU 0 (No SMP support) */ + state->force[cpu] &=3D ~mask; =20 grlib_irqmp_check_irqs(state); } =20 -void grlib_irqmp_ack(DeviceState *dev, int intno) +void grlib_irqmp_ack(DeviceState *dev, unsigned int cpu, int intno) { IRQMP *irqmp =3D GRLIB_IRQMP(dev); IRQMPState *state; @@ -133,7 +131,7 @@ void grlib_irqmp_ack(DeviceState *dev, int intno) =20 trace_grlib_irqmp_ack(intno); =20 - grlib_irqmp_ack_mask(state, mask); + grlib_irqmp_ack_mask(state, cpu, mask); } =20 static void grlib_irqmp_set_irq(void *opaque, int irq, int level) @@ -159,7 +157,6 @@ static void grlib_irqmp_set_irq(void *opaque, int irq, = int level) s->pending |=3D 1 << irq; } grlib_irqmp_check_irqs(s); - } } =20 @@ -263,7 +260,9 @@ static void grlib_irqmp_write(void *opaque, hwaddr addr, =20 case CLEAR_OFFSET: value &=3D ~1; /* clean up the value */ - grlib_irqmp_ack_mask(state, value); + for (i =3D 0; i < irqmp->ncpus; i++) { + grlib_irqmp_ack_mask(state, i, value); + } return; =20 case MP_STATUS_OFFSET: @@ -367,7 +366,7 @@ static void grlib_irqmp_realize(DeviceState *dev, Error= **errp) */ qdev_init_gpio_out_named(dev, irqmp->start_signal, "grlib-start-cpu", IRQMP_MAX_CPU); - qdev_init_gpio_out_named(dev, &irqmp->irq, "grlib-irq", 1); + qdev_init_gpio_out_named(dev, irqmp->irq, "grlib-irq", irqmp->ncpus); memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, ir= qmp, "irqmp", IRQMP_REG_SIZE); =20 diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index b72761b959..7866f0a049 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -170,7 +170,8 @@ static void leon3_cache_control_int(CPUSPARCState *env) =20 static void leon3_irq_ack(CPUSPARCState *env, int intno) { - grlib_irqmp_ack(env->irq_manager, intno); + /* No SMP support yet, only CPU #0 available so far. */ + grlib_irqmp_ack(env->irq_manager, 0, intno); } =20 /* diff --git a/include/hw/intc/grlib_irqmp.h b/include/hw/intc/grlib_irqmp.h index c5a90cbb3e..a76acbf940 100644 --- a/include/hw/intc/grlib_irqmp.h +++ b/include/hw/intc/grlib_irqmp.h @@ -36,6 +36,6 @@ /* IRQMP */ #define TYPE_GRLIB_IRQMP "grlib-irqmp" =20 -void grlib_irqmp_ack(DeviceState *dev, int intno); +void grlib_irqmp_ack(DeviceState *dev, unsigned int cpu, int intno); =20 #endif /* GRLIB_IRQMP_H */ --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691232; cv=none; d=zohomail.com; s=zohoarc; b=HaD8d99ITT8oy4F/2V2oJt5gycO0B8U6d/xO3QpBPtdL0MiyeABlvOII8yn/56HtthQQsYr5/pAFj0QGZFjaGPU35Oxf4w1liQWLcCPr3n1+5vzUrv3gQKMUvfi+CuiXxGaEmYiZ0cYjdtrNgBuH2dA+SDizTggXSiqd1Zt7ZBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691232; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mUU2OsysmeYjtlDgPMbUT7x1rpWKo5GkfDES6teYBdY=; b=dC4qPLj0gZMEJ0XntEdsMsoFw3DwGP6V8Pr/WOnEHm7P+RVVHO7gotMVaM2tcVnN1aao0T6j0x8E4KSvXxOkuqbLdat970ibChNgdAlcQ6x76aHN5Rg7ql+Fabk6+KwCjnybYIQaAJAZmt5T8SIpJexQyW7QiY70XAjEPVMAuW8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691232931302.62316027104; Wed, 31 Jan 2024 00:53:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6JZ-0001vO-0g; Wed, 31 Jan 2024 03:51:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JT-0001uS-RC for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JQ-0007qO-0s for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:17 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40fb5d67763so1514385e9.2 for ; Wed, 31 Jan 2024 00:51:15 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691074; x=1707295874; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mUU2OsysmeYjtlDgPMbUT7x1rpWKo5GkfDES6teYBdY=; b=PV34dV6HSMdyHIzENNGZ2KDFFcmxMGW+D2Vf+KsHJOEDSGFi/KgEKUZBhvNvIe3ZSs ONAtpqLwB0n58rZTYwEdzoEQ9+VAAkYudKRkmclqqoHz6H+83t9NdeuvQ8lv8SGD2q8j enhDdILIVOTmYUXzQFTfHPxUCbg5VUF2blrKykbB1eMKsdla9BAxjcRvDImnNJkUjoXd 4JK4+wugVg2g5MyfCIPxAtSoRNS4//omgZzaZM4+z7F8I2zoGGJWcbCNNKGebH3gvYBh YgyBg18FoGw9grjAOmBD/kXOfgM62gEJ5Gb/Q967kw1A/UgVWMCIUOY2lF8qtPLZH6X4 ZtAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691074; x=1707295874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mUU2OsysmeYjtlDgPMbUT7x1rpWKo5GkfDES6teYBdY=; b=fKeRmO3ByDcjHKDBgc23veZV7sGWh9jUA+edPyYHFFb8jooj8+54YrhwuXK5kgnAMD cOEA/OnNAsVdvmdLaBVlLqo2r8P/WD7jczWZ3lTve8fXAB2T8MV2PkTJ1KG6XF3nGuvj VNuNDfNSHM74LIUJMl5quHEDXqmJbO3ulEECVIb+8RWqH4FSSgE+doJjRFtTqWneHKaL caqfcn4uV0RrcS/aJYZ3YO/XfJa8C9s6lfGR4i7rsCUsFT9qjuLHFbFTncBjPIv+bKv9 1vDaP1S52/Ey3umCWHCS9gJCjVVCWnAZ8KD3bFUyZOSWpLWOCs+2XNcgZGFGYA0NpyX/ m1ww== X-Gm-Message-State: AOJu0Yws98FjY32SkWE1jh8rodyO+rRUKKvkiLOqONr+Q/joPwcCX60e dUNppRpRHVY6OCBrpGIuCmUL6jXsUCrVLYV3eB4R6hm9ywqyIZEqx42cg8TGU3qicXvI2aOVKUY = X-Google-Smtp-Source: AGHT+IEysSa5YspvsShTwBbW9xPU4Cui3kKxfEeS88udYSZ2/odEuwQb9eW0Pl2JKk8iQp2sHFHY6Q== X-Received: by 2002:a05:600c:3411:b0:40e:f6a1:ad02 with SMTP id y17-20020a05600c341100b0040ef6a1ad02mr767476wmp.14.1706691074278; Wed, 31 Jan 2024 00:51:14 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUSGcp/WPJNqFLCN91P3Z62hfHVVn8apf70Q8IAXmSq9BHxuHFhIYAjj0tiiPsHmqjWshaoOqOCZuQV8iKAZiE06GJ5DM3VeAZbk3LjlhTsSO05u1ZRQlndaM7N8PpsYp8ozIXBe5JG1RX5aSmNmFGa5FqDsaQQAxpx From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 5/9] target/sparc: implement asr17 feature for smp Date: Wed, 31 Jan 2024 09:50:43 +0100 Message-Id: <20240131085047.18458-6-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::32a; envelope-from=chigot@adacore.com; helo=mail-wm1-x32a.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691235028100003 This allows the guest program to know its cpu id. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/sparc/helper.c | 16 ++++++++++++++++ target/sparc/helper.h | 1 + target/sparc/translate.c | 13 +++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index bd10b60e4b..2247e243b5 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -212,4 +212,20 @@ void helper_power_down(CPUSPARCState *env) env->npc =3D env->pc + 4; cpu_loop_exit(cs); } + +target_ulong helper_rdasr17(CPUSPARCState *env) +{ + CPUState *cs =3D env_cpu(env); + target_ulong val; + + /* + * TODO: There are many more fields to be filled, + * some of which are writable. + */ + val =3D env->def.nwindows - 1; /* [4:0] NWIN */ + val |=3D 1 << 8; /* [8] V8 */ + val |=3D (cs->cpu_index) << 28; /* [31:28] INDEX */ + + return val; +} #endif diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 55eff66283..fc818b8678 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -2,6 +2,7 @@ DEF_HELPER_1(rett, void, env) DEF_HELPER_2(wrpsr, void, env, tl) DEF_HELPER_1(rdpsr, tl, env) +DEF_HELPER_1(rdasr17, tl, env) DEF_HELPER_1(power_down, void, env) #else DEF_HELPER_FLAGS_2(wrpil, TCG_CALL_NO_RWG, void, env, tl) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 9387299559..1cabda9565 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -37,6 +37,7 @@ =20 #ifdef TARGET_SPARC64 # define gen_helper_rdpsr(D, E) qemu_build_not_reached() +# define gen_helper_rdasr17(D, E) qemu_build_not_reached() # define gen_helper_rett(E) qemu_build_not_reached() # define gen_helper_power_down(E) qemu_build_not_reached() # define gen_helper_wrpsr(E, S) qemu_build_not_reached() @@ -2681,16 +2682,8 @@ static bool trans_RDY(DisasContext *dc, arg_RDY *a) =20 static TCGv do_rd_leon3_config(DisasContext *dc, TCGv dst) { - uint32_t val; - - /* - * TODO: There are many more fields to be filled, - * some of which are writable. - */ - val =3D dc->def->nwindows - 1; /* [4:0] NWIN */ - val |=3D 1 << 8; /* [8] V8 */ - - return tcg_constant_tl(val); + gen_helper_rdasr17(dst, tcg_env); + return dst; } =20 TRANS(RDASR17, ASR17, do_rd_special, true, a->rd, do_rd_leon3_config) --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691223; cv=none; d=zohomail.com; s=zohoarc; b=e0GHaEi4LuknXGjRZbKgB99WdODqbF2qF1vKfut6JRcbh48xk+XL5+gJDE2+H/5+pXIV3vweYQJS36YVUgcH7O7fVDFLCMPn1c++A6DiOcWcRP9bXDAhLx1zYxmV+52HpioblFhGYycqCrOiPQ5bIo6iWThlBYnD/tCzVcpbiDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691223; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i9v7qgpqTwh9hq22Mg4JAHZdgJYch8tJcJ4v6ze8WCo=; b=bdUOqfGEo8EBekLaKnSiN8Yxc7zh83FOniAOitkVi6KEZTKoyBosuNdmyyjg/j20XbRv1yqE0vV9leJptMOkaocU1QbPK6GJg5dI5RhNv3PuJXipOE1TO/IZNFfgTeF/deTeGrPe9B0g7Tirub9hufFofxIIW+wvpVjLHrvUU7I= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691223512738.0930184909238; Wed, 31 Jan 2024 00:53:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6Ja-0001wE-CB; Wed, 31 Jan 2024 03:51:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JT-0001uU-S7 for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JR-0007s3-Cr for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:18 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40f02b8d176so12884825e9.1 for ; Wed, 31 Jan 2024 00:51:16 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691075; x=1707295875; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i9v7qgpqTwh9hq22Mg4JAHZdgJYch8tJcJ4v6ze8WCo=; b=ZPoXcyEBCvZNSMq/t02gNYWG5Pp0UMPQBa7+e+ae5nUJf5mXtAd4sYJ8ZuMAn86QYr GwnkxCQ9leGDL1FWgw+arvKY2CJc1UHF4ReDgjUNc1AXDDi1nJscMqWtz53mMqLBLGpt +NxctMHaKML5qep5nRLp8WQmjiodzAn3bDI51qXHwAeSBZ0sSxU7eZV/sug7SArNONVA px+aoA8eo2qp4jQP6GqaWeyIS47k6eXcHhZrxV2jFAmZim0OMqtY4BVhTIIYDUF01bQi RoCamVZFqvtxkyzvWbkqysf/6lMYXfa9Jcmf1rdx6Rr2DWFH/d7XwjuohUz9ytz23+tB hIlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691075; x=1707295875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i9v7qgpqTwh9hq22Mg4JAHZdgJYch8tJcJ4v6ze8WCo=; b=rk3iIcCnqo0qKAOGVkJTiqABsdJcXVB3i4Cq8KviiOkdHKuJzS6SsCzEQq7AefLoN0 LlY8XKuIFX2CvNl+1E0I0gxSzjRpPgagKkn6283u1UA1kL4c6N3wD72p9CJGCfUCMyHS fU3pBMXJTHlQFw9JTasxKhHzE1Lwxhi4Hfi0EFq1YAtpxk/jthqpQR+nZjgvXKdcmXgS K5Qy0dkUgi10KCd+2JaVj1+paecVwEc3FVvl3X/EuOu4wVo94l3jGIB43VD6GI5z9oAS 9unZLSN5kMoc2Nd1DKjppFq0G7IVoFHWOrZGpOYwfm1vwVujKaSufK0zlRBk9QubHzfz 817g== X-Gm-Message-State: AOJu0YztvFVrIT7ioS4eU/o5bcDxQV1cQSuf+rx0Bgp2kDbEgYVd5Pzw G3cQ1vtWZVUM/0pEHEQkWhuGzthRaYX70H6tR9r+xHfJ3WZw9T9rO3bPFdavC5eqe8DGPyAVzwc = X-Google-Smtp-Source: AGHT+IEI8i2zxFB9XGjsgrT0ld7AM+ELVoSvx0klCgge3VE4glNDVT/HvHHI78RdkTPg0XwGRzwZBA== X-Received: by 2002:a05:600c:470f:b0:40e:cdff:8d10 with SMTP id v15-20020a05600c470f00b0040ecdff8d10mr708731wmo.6.1706691075522; Wed, 31 Jan 2024 00:51:15 -0800 (PST) From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= Subject: [PATCH v3 6/9] leon3: remove SP initialization Date: Wed, 31 Jan 2024 09:50:44 +0100 Message-Id: <20240131085047.18458-7-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::335; envelope-from=chigot@adacore.com; helo=mail-wm1-x335.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691225080100001 According to the doc (see =C2=A74.2.15 in [1]), the reset operation should not impact %SP. [1] https://gaisler.com/doc/gr712rc-usermanual.pdf Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/sparc/leon3.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 7866f0a049..317eb57336 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -69,7 +69,6 @@ typedef struct ResetData { SPARCCPU *cpu; uint32_t entry; /* save kernel entry in case of reset */ - target_ulong sp; /* initial stack pointer */ } ResetData; =20 static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) @@ -136,7 +135,6 @@ static void main_cpu_reset(void *opaque) cpu->halted =3D 0; env->pc =3D s->entry; env->npc =3D s->entry + 4; - env->regbase[6] =3D s->sp; } =20 static void leon3_cache_control_int(CPUSPARCState *env) @@ -247,7 +245,6 @@ static void leon3_generic_hw_init(MachineState *machine) /* Reset data */ reset_info =3D g_new0(ResetData, 1); reset_info->cpu =3D cpu; - reset_info->sp =3D LEON3_RAM_OFFSET + ram_size; qemu_register_reset(main_cpu_reset, reset_info); =20 ahb_pnp =3D GRLIB_AHB_PNP(qdev_new(TYPE_GRLIB_AHB_PNP)); --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691214; cv=none; d=zohomail.com; s=zohoarc; b=nHgPi0tM+AZUcpuOPesppyBxql3FLN/VkIm4zwkQHTbJHcI6/aGh2q+9U/9zyCE9dzGjzsnACOEoug4ufC2RZP81d5qXl1hg0A9EriGq6KS2C/IUUSkgOHGYQsgcnkZzlSYBDcw1xfqJ6daUawwqg2arWVYt0eVgOOfHTKZRTBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691214; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nd+SvcQVLHH71F1dqQ4YcF9V/XC9gxQZ0Gj03Wj4mVs=; b=M1nb9gPgVO9WRva8Or6EdJbMyFr4CAq0Ni7LL3e/G2uy+qpHnaKH6EskSAtoRvCISCaWrNO4UhlBCZ4eAFiPQDdkxTps5FzfyRVp+uNft7h9ail47mHW+OZUgQ4xPkzrKusdLK9SVm5ja3dKD3+4Y3kAhmSiZArniF1TMEOY74E= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17066912145231009.023414891533; Wed, 31 Jan 2024 00:53:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6Ja-0001wQ-Fc; Wed, 31 Jan 2024 03:51:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JV-0001ua-AI for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JT-0007sa-A5 for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40fb3e278adso3647015e9.2 for ; Wed, 31 Jan 2024 00:51:18 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691077; x=1707295877; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nd+SvcQVLHH71F1dqQ4YcF9V/XC9gxQZ0Gj03Wj4mVs=; b=R1jm0BVXQg8f0dobWOl/GbHEJg/vwoxqYA/XdiF6KxtUCXoXMGT93R5uqZy/snmSsD AmP93tS+qGTnAqM8zm0ESAkmGVDroXFksXOYkJaALjY/fJS2dBlsbqNh57pc5N5Q83aL gs+lr6V3l2HYVVM6tY6EUEnfYtZig6NClVezdEQZOSsfHsF8ULGxh6SmGhlNKMf3JW24 74cKco/Det4fPWpfZUdA4875HlhODdVLEqQ+PiieqRP9HCdj9mh/yGOFesKa4W3Xtclh /r/iJGfv4V93q42t0mMgh8vW8aLDpnef+lOmOuMS6+YVND71B8vivB3b1OzmLC56/y/1 0seg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691077; x=1707295877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nd+SvcQVLHH71F1dqQ4YcF9V/XC9gxQZ0Gj03Wj4mVs=; b=ZvE1H8PGpheSbYTsmn0D0votIc6vmZpht1kqjPTv29oMnd8wtWo7QQtj8ZbP7tiqAH LLP2QdnYj+m0KsXnIZegAWqYcSS87YB30ln3h/wnqMv2ObSuQhma/kQ8CuP2zZ4jABpr QFf4y8UANdgPNsJa3Y2sK0zyULaZ3cYsxiQAkVdZG4jEEu9kWIEPR0+ytgz1GmIOZv5M aiuIKcwMcGf6UKUjSi0yXPn5KSKZ7kOkuEOvhg5V4IxxqMYGMzwijYJAcSm+fvAcgSBm 8DzQdtMtGTFJzS0QrbO7/u4Pj00qaU/11eGYDRZAtzYiq5v8EciB7v1N99dbcSfNe9eA GcUw== X-Gm-Message-State: AOJu0Yx+64LmA7r4QvLreHb04Cmgp/sAclI4JI/M7Wlc9LPEmG34xfrr 7N3zj2LAb2YZzwE6AY4PGS2eObZnnExh4O+6GVNzuEQvMRjballXPdRNmTyQVlrBspTtLKyBsSY = X-Google-Smtp-Source: AGHT+IGZuGchCmGZEzmNbClbRXQrcEONaVCnmjUwj6dOPUB/GQ4J/oMM/RbyjIKlBNSSLVQExk20fg== X-Received: by 2002:a05:600c:4f4d:b0:40f:b65c:6127 with SMTP id m13-20020a05600c4f4d00b0040fb65c6127mr13707wmq.35.1706691076930; Wed, 31 Jan 2024 00:51:16 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW3EdcYwuOOtWQtQOtDwqZxAM0tPC7i5yjZvXVtPCmGM5zroGQ5QxMPAd8VDCNaWArftqPz19sceHdgvvuBamLkPnf7BQtlxho= From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad Subject: [PATCH v3 7/9] leon3: implement multiprocessor Date: Wed, 31 Jan 2024 09:50:45 +0100 Message-Id: <20240131085047.18458-8-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::329; envelope-from=chigot@adacore.com; helo=mail-wm1-x329.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691215010100001 This allows to register more than one CPU on the leon3_generic machine. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot --- hw/sparc/leon3.c | 98 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 317eb57336..252aff72cd 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -54,6 +54,8 @@ #define LEON3_PROM_OFFSET (0x00000000) #define LEON3_RAM_OFFSET (0x40000000) =20 +#define MAX_CPUS 4 + #define LEON3_UART_OFFSET (0x80000100) #define LEON3_UART_IRQ (3) =20 @@ -67,8 +69,11 @@ #define LEON3_AHB_PNP_OFFSET (0xFFFFF000) =20 typedef struct ResetData { - SPARCCPU *cpu; - uint32_t entry; /* save kernel entry in case of reset */ + struct CPUResetData { + int id; + SPARCCPU *cpu; + } info[MAX_CPUS]; + uint32_t entry; /* save kernel entry in case of reset */ } ResetData; =20 static uint32_t *gen_store_u32(uint32_t *code, hwaddr addr, uint32_t val) @@ -124,17 +129,19 @@ static void write_bootloader(CPUSPARCState *env, uint= 8_t *base, stl_p(p++, 0x01000000); /* nop */ } =20 -static void main_cpu_reset(void *opaque) +static void leon3_cpu_reset(void *opaque) { - ResetData *s =3D (ResetData *)opaque; - CPUState *cpu =3D CPU(s->cpu); - CPUSPARCState *env =3D &s->cpu->env; + struct CPUResetData *info =3D (struct CPUResetData *) opaque; + int id =3D info->id; + ResetData *s =3D (ResetData *)DO_UPCAST(ResetData, info[id], info); + CPUState *cpu =3D CPU(s->info[id].cpu); + CPUSPARCState *env =3D cpu_env(cpu); =20 cpu_reset(cpu); =20 - cpu->halted =3D 0; - env->pc =3D s->entry; - env->npc =3D s->entry + 4; + cpu->halted =3D cpu->cpu_index !=3D 0; + env->pc =3D s->entry; + env->npc =3D s->entry + 4; } =20 static void leon3_cache_control_int(CPUSPARCState *env) @@ -168,8 +175,8 @@ static void leon3_cache_control_int(CPUSPARCState *env) =20 static void leon3_irq_ack(CPUSPARCState *env, int intno) { - /* No SMP support yet, only CPU #0 available so far. */ - grlib_irqmp_ack(env->irq_manager, 0, intno); + CPUState *cpu =3D CPU(env_cpu(env)); + grlib_irqmp_ack(env->irq_manager, cpu->cpu_index, intno); } =20 /* @@ -211,6 +218,19 @@ static void leon3_set_pil_in(void *opaque, int n, int = level) } } =20 +static void leon3_start_cpu_async_work(CPUState *cpu, run_on_cpu_data data) +{ + cpu->halted =3D 0; +} + +static void leon3_start_cpu(void *opaque, int n, int level) +{ + CPUState *cs =3D CPU(opaque); + + assert(level =3D=3D 1); + async_run_on_cpu(cs, leon3_start_cpu_async_work, RUN_ON_CPU_NULL); +} + static void leon3_irq_manager(CPUSPARCState *env, int intno) { leon3_irq_ack(env, intno); @@ -236,16 +256,20 @@ static void leon3_generic_hw_init(MachineState *machi= ne) AHBPnp *ahb_pnp; APBPnp *apb_pnp; =20 - /* Init CPU */ - cpu =3D SPARC_CPU(cpu_create(machine->cpu_type)); - env =3D &cpu->env; + reset_info =3D g_malloc0(sizeof(ResetData)); =20 - cpu_sparc_set_id(env, 0); + for (i =3D 0; i < machine->smp.cpus; i++) { + /* Init CPU */ + cpu =3D SPARC_CPU(cpu_create(machine->cpu_type)); + env =3D &cpu->env; =20 - /* Reset data */ - reset_info =3D g_new0(ResetData, 1); - reset_info->cpu =3D cpu; - qemu_register_reset(main_cpu_reset, reset_info); + cpu_sparc_set_id(env, i); + + /* Reset data */ + reset_info->info[i].id =3D i; + reset_info->info[i].cpu =3D cpu; + qemu_register_reset(leon3_cpu_reset, &reset_info->info[i]); + } =20 ahb_pnp =3D GRLIB_AHB_PNP(qdev_new(TYPE_GRLIB_AHB_PNP)); sysbus_realize_and_unref(SYS_BUS_DEVICE(ahb_pnp), &error_fatal); @@ -263,14 +287,28 @@ static void leon3_generic_hw_init(MachineState *machi= ne) =20 /* Allocate IRQ manager */ irqmpdev =3D qdev_new(TYPE_GRLIB_IRQMP); + object_property_set_int(OBJECT(irqmpdev), "ncpus", machine->smp.cpus, + &error_fatal); sysbus_realize_and_unref(SYS_BUS_DEVICE(irqmpdev), &error_fatal); - qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, - env, "pil", 1); - qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", 0, - qdev_get_gpio_in_named(DEVICE(cpu), "pil",= 0)); + + for (i =3D 0; i < machine->smp.cpus; i++) { + cpu =3D reset_info->info[i].cpu; + env =3D &cpu->env; + qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_start_cpu, + cpu, "start_cpu", 1); + qdev_connect_gpio_out_named(irqmpdev, "grlib-start-cpu", i, + qdev_get_gpio_in_named(DEVICE(cpu), + "start_cpu", 0)= ); + qdev_init_gpio_in_named_with_opaque(DEVICE(cpu), leon3_set_pil_in, + env, "pil", 1); + qdev_connect_gpio_out_named(irqmpdev, "grlib-irq", i, + qdev_get_gpio_in_named(DEVICE(cpu), + "pil", 0)); + env->irq_manager =3D irqmpdev; + env->qemu_irq_ack =3D leon3_irq_manager; + } + sysbus_mmio_map(SYS_BUS_DEVICE(irqmpdev), 0, LEON3_IRQMP_OFFSET); - env->irq_manager =3D irqmpdev; - env->qemu_irq_ack =3D leon3_irq_manager; grlib_apb_pnp_add_entry(apb_pnp, LEON3_IRQMP_OFFSET, 0xFFF, GRLIB_VENDOR_GAISLER, GRLIB_IRQMP_DEV, 2, 0, GRLIB_APBIO_AREA); @@ -344,10 +382,13 @@ static void leon3_generic_hw_init(MachineState *machi= ne) uint8_t *bootloader_entry; =20 bootloader_entry =3D memory_region_get_ram_ptr(prom); - write_bootloader(env, bootloader_entry, entry); - env->pc =3D LEON3_PROM_OFFSET; - env->npc =3D LEON3_PROM_OFFSET + 4; + write_bootloader(&reset_info->info[0].cpu->env, bootloader_ent= ry, + entry); reset_info->entry =3D LEON3_PROM_OFFSET; + for (i =3D 0; i < machine->smp.cpus; i++) { + reset_info->info[i].cpu->env.pc =3D LEON3_PROM_OFFSET; + reset_info->info[i].cpu->env.npc =3D LEON3_PROM_OFFSET + 4; + } } } =20 @@ -386,6 +427,7 @@ static void leon3_generic_machine_init(MachineClass *mc) mc->init =3D leon3_generic_hw_init; mc->default_cpu_type =3D SPARC_CPU_TYPE_NAME("LEON3"); mc->default_ram_id =3D "leon3.ram"; + mc->max_cpus =3D MAX_CPUS; } =20 DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init) --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691113; cv=none; d=zohomail.com; s=zohoarc; b=W6OrpLJMbczyg5I1WSOPxdGrDz9fY+bCxqvFWilotQecjBc5zk9ITCcgYtpjiinkK+eaWBO+QocCcBQd9hvjoHCOqWj68lXgKdHJ6m3j+ZeKaQq8OpAxHH8bXF4jPWDwfqjUurfQeee6Ek/FynKFpyiB6h+ZboxkPUcSB/+aks4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691113; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=++E/Dn1qTfQEQgf0YVqIQ3YMM6hUVCoKevVh61Nx1dE=; b=g5Mnjyj9YNVsK5iyg51NOW0JCyMHBcO/UHZq6rCZC73O+cKgf7TL9tTWxguvJ3/EmH5ljXwEC+/UpPAKK8eFpAH886Wms28I4E/ZdgRXyFz/EyeRnr16RIBGOuPt0g3tJmGaRXtDO2xrHY/lOo4lUIwer/l0z6mg7q2RO/+dhyg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691113635757.234795868365; Wed, 31 Jan 2024 00:51:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6Jb-0001ws-Ej; Wed, 31 Jan 2024 03:51:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JV-0001v0-FU for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JT-0007sl-S5 for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:21 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40ef3f351d2so3182535e9.1 for ; Wed, 31 Jan 2024 00:51:19 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691078; x=1707295878; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=++E/Dn1qTfQEQgf0YVqIQ3YMM6hUVCoKevVh61Nx1dE=; b=JaapevQ36C94dLja2e3Ypcig8PUgHXkHe8rUq0Y4RP7i6Cr1ihKiYSlYBTJYfaryf4 dfJE/QbdnjzRkgsAhQ8Fbt7SAX3trYyn3tTxA3BQvfpxeaN2e2Mj7wq+aV74dQgjvQnz EVMpZ+uEzYSSLAFUyYq22YrmypuHWJrUccbSS0zakdh/voFDZ8dxDkx+QSkiaGojsF4g h9X12zX6fi7tsbynZUFTvtreHlNHdeMrdx6FJRxKMp9IKH2BPbaG32eb9K1AIvIaD1d4 k3aM4cH2nUkLrUWenrCB2O0SwdujkJh9ZB1pPWJP/joJ4CYRt+SHDCdcSmZie2RDzT0q rGaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691078; x=1707295878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=++E/Dn1qTfQEQgf0YVqIQ3YMM6hUVCoKevVh61Nx1dE=; b=iv44t8YYnoEvEJXLA9sXRnJTS3YZSkAx4m2DnOWFsDxs4EH9zaxeADFzdh5QVxheZL lQYRn0m+HRAlxdfCy65s8UswlZeWybdKUbskxE9OEX3nMCVOOJ+UcrLKuOGDgh3aIvye iqgtdc4BYe3PQu0bbOw5h9BHrpsRDcZ4d5+FOTViP2KIqZ2zQ31STCHtrGSwQEexjIZ6 0vN1XT+DjXGphONXFOcPb+kr4FCsORqWD8rTFrqw+ff/Ei81PJidqufJKzWyRuDK8xg3 w2SnsiRBURwtzK+Q110drym9gxBqQ3aKJBgKB+sXh1T+18t5p2eeF9FdokT8eGf9KtaD bt2w== X-Gm-Message-State: AOJu0YzxYtkFdP01BCLB02Bgu0t82CaatFBXGUip+8ik/sCCXcmQeHVE fHjh2wCy0h+upjKwqvkXEYpqXmoys3EKkdkUCHaKS5hsEV1QGlGW/zlGYJiyy5gBAxfQ0E09svQ = X-Google-Smtp-Source: AGHT+IFCfOg6T7YVeeDOr/NiSOTkv41lTfH/GuKpeGzI/nTqyHbnRdxp8uZP0/NAQD6tHEGK3sOenA== X-Received: by 2002:a05:600c:3548:b0:40e:6ca9:98a0 with SMTP id i8-20020a05600c354800b0040e6ca998a0mr926223wmq.15.1706691078143; Wed, 31 Jan 2024 00:51:18 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWLpjoYvBUjYKuVnEIhCkGE+Eo4CK784ENwOaLxJoB+SmFgu2tCJXlW2nuwleZfxQRVi76KOu7nJCjOJ13xsK42HQRUWDtbLJOCnNfoqmNrCikSQkbIu8tmVKeB From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Frederic Konrad , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 8/9] leon3: check cpu_id in the tiny bootloader Date: Wed, 31 Jan 2024 09:50:46 +0100 Message-Id: <20240131085047.18458-9-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::32a; envelope-from=chigot@adacore.com; helo=mail-wm1-x32a.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691114808100005 Now that SMP is possible, the asr17 must be checked in the little boot code or the secondary CPU will reinitialize the Timer and the Uart. Co-developed-by: Frederic Konrad Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/sparc/leon3.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 252aff72cd..798dba1e5a 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -99,13 +99,27 @@ static uint32_t *gen_store_u32(uint32_t *code, hwaddr a= ddr, uint32_t val) =20 /* * When loading a kernel in RAM the machine is expected to be in a differe= nt - * state (eg: initialized by the bootloader). This little code reproduces - * this behavior. + * state (eg: initialized by the bootloader). This little code reproduces + * this behavior. Also this code can be executed by the secondary cpus as + * well since it looks at the %asr17 register before doing any + * initialization, it allows to use the same reset address for all the + * cpus. */ static void write_bootloader(CPUSPARCState *env, uint8_t *base, hwaddr kernel_addr) { uint32_t *p =3D (uint32_t *) base; + uint32_t *sec_cpu_branch_p =3D NULL; + + /* If we are running on a secondary CPU, jump directly to the kernel. = */ + + stl_p(p++, 0x85444000); /* rd %asr17, %g2 */ + stl_p(p++, 0x8530a01c); /* srl %g2, 0x1c, %g2 */ + stl_p(p++, 0x80908000); /* tst %g2 */ + /* Filled below. */ + sec_cpu_branch_p =3D p; + stl_p(p++, 0x0BADC0DE); /* bne xxx */ + stl_p(p++, 0x01000000); /* nop */ =20 /* Initialize the UARTs */ /* *UART_CONTROL =3D UART_RECEIVE_ENABLE | UART_TRANSMIT_ENABLE; */ @@ -119,6 +133,10 @@ static void write_bootloader(CPUSPARCState *env, uint8= _t *base, /* *GPTIMER0_CONFIG =3D GPTIMER_ENABLE | GPTIMER_RESTART; */ p =3D gen_store_u32(p, 0x80000318, 3); =20 + /* Now, the relative branch above can be computed. */ + stl_p(sec_cpu_branch_p, 0x12800000 + + (p - sec_cpu_branch_p)); + /* JUMP to the entry point */ stl_p(p++, 0x82100000); /* mov %g0, %g1 */ stl_p(p++, 0x03000000 + extract32(kernel_addr, 10, 22)); --=20 2.25.1 From nobody Tue Nov 26 14:26:52 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=quarantine dis=none) header.from=adacore.com ARC-Seal: i=1; a=rsa-sha256; t=1706691101; cv=none; d=zohomail.com; s=zohoarc; b=hTuX4fEkBM7IaQF2Ry0dORZWBBFFjRZt19op6EAgH+jIoEs5YUI8RT846phRg3AVwJFaZ4YWDbcwUpGZJBFx/IkpQ7vORbBfw9cmkabJkJoTaSpJUxVnCxlNdym+ZayjVVEvaf4XQqYTZCrCojKYRT64+gc3i4Y/4vXPXL8KpZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706691101; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bonA+4kiwsu4AWOnHikZYFkdI6euRG1YokhpseyRs04=; b=n0i7noD1yBaE1OskJ6ENmtwlRJRc7cBvKQerbNFI0KG1EloFgnkqSi/bmFBGRwtK1GsJEs1uEVz5iNGP/bfEduRl8TyUrb8qGLMiynSQLSpMkxb6DDYBU+AoQciQb/8toVFwjJoFYx0g3m4xlyMKzrueoLNbFVAeIFc6PBAlKpM= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706691101142358.2942382022703; Wed, 31 Jan 2024 00:51:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV6Jb-0001wx-Ie; Wed, 31 Jan 2024 03:51:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV6JZ-0001vm-6e for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:25 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rV6JV-0007t8-FO for qemu-devel@nongnu.org; Wed, 31 Jan 2024 03:51:24 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33ae3be1c37so351028f8f.0 for ; Wed, 31 Jan 2024 00:51:21 -0800 (PST) Received: from chigot-Dell.home ([2a01:cb15:8123:8100:aea2:cdf3:9482:a36]) by smtp.gmail.com with ESMTPSA id n28-20020a05600c181c00b0040efd216050sm909926wmp.35.2024.01.31.00.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706691079; x=1707295879; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bonA+4kiwsu4AWOnHikZYFkdI6euRG1YokhpseyRs04=; b=Nk/CKIeHXNyRdInAR8ZxYHywObY5qYKq5uGVE5t6pi1D6Yu4u3pjctM26z2I62+z3L 6QyV2KtZgiSuxSqewS0EfFcoayxZhd5jKadDgQC6BmCUK7hMxBS+LPHqT2zds3yQuDck 6+grvMYsf8efm7lvbTuP+kHIpzmvzVgc97PFtE6CJsEXkNsazc3uondU3mzswexIzMmk zKf5zPvJUb42wtv39pt7R5t5aMFW0MNy6/oxAW7xepH58Mil2lgIPCpYOEWEapkCgVQQ hZlyNWZhvf3BffgQ1+7Vf+0Q6W93+9rWjcTdTEFHfDLPhmmsl12/KfQ7gMO94k8Soj9r b53A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706691079; x=1707295879; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bonA+4kiwsu4AWOnHikZYFkdI6euRG1YokhpseyRs04=; b=wddD7xd2d0S7M+ebJkRTqZ5+5lS6AQ6duL7RZMu4q2ftPOBhvmZYCJKpKcHSiZcuUo obzpcKG2GRA7uNaDqKs1sPqkkNhWvcEq+3miGuGrXpYVFeZ+GB3U+rNumGEmtpnIIBGX lxPdq5wF1YnjBtJLzDLVTnkNOcMrvby6ra8QfhHwjmFBiJ/GYEHIgzHQnOX/gDDG0YV1 L8QbOMGtDY6+eYapPDNUbLgu59Oph/+tQHvm1hdwpW6yuvFmXzMLRUJN2vkdKKosJYzM ACuJc9VMj0kdZuQyoGVYXKSxxvf5wBp6WQz/cM0ioua3SZvMTpHbBKTS9ltkZpdhUpQx JDrA== X-Gm-Message-State: AOJu0Yz7mwHCUyJbh6MhNkVeLuLWzeIKetneevwgeAEdI961GQXo7gai x5S9/2GoYQ1DuZqAi9jTQgm4dk+imBRCOVPoVbHNOVL5lo7QqCR7Pl2O7G88iZPNt2SbhBvg/Ho = X-Google-Smtp-Source: AGHT+IG9cNTOS44vhO3E6vJRZ7xwteT4owK+z210QPbIeudp1wqoRiOXRARuJQxSOqJ5kJme1cbO2g== X-Received: by 2002:a05:6000:2cc:b0:33a:e605:57c9 with SMTP id o12-20020a05600002cc00b0033ae60557c9mr3826463wry.27.1706691079584; Wed, 31 Jan 2024 00:51:19 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVQ42+SGV2b9T9vNSQ7/i5B7E8ml87bAHgex7OAhm9tPrSrg249P2XaKcY0dDH2ZNYS267tg84EC9f6n+M+6ZdW24jB6g== From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= , Fabien Chouteau Subject: [PATCH v3 9/9] MAINTAINERS: replace Fabien by myself as Leon3 maintainer Date: Wed, 31 Jan 2024 09:50:47 +0100 Message-Id: <20240131085047.18458-10-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131085047.18458-1-chigot@adacore.com> References: <20240131085047.18458-1-chigot@adacore.com> 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::42f; envelope-from=chigot@adacore.com; helo=mail-wr1-x42f.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @adacore.com) X-ZM-MESSAGEID: 1706691102802100002 CC: Fabien Chouteau Signed-off-by: Cl=C3=A9ment Chigot Reviewed-by: Fabien Chouteau --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index dfaca8323e..f076c97fcb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1708,7 +1708,7 @@ F: hw/rtc/sun4v-rtc.c F: include/hw/rtc/sun4v-rtc.h =20 Leon3 -M: Fabien Chouteau +M: Cl=C3=A9ment Chigot M: Frederic Konrad S: Maintained F: hw/sparc/leon3.c --=20 2.25.1