From patchwork Wed Jul 17 10:57:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5955EC3DA5E for ; Wed, 17 Jul 2024 10:59:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2Lt-0002ji-PO; Wed, 17 Jul 2024 06:57:41 -0400 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 1sU2Ls-0002ec-Fx for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:40 -0400 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 1sU2Lq-0005cA-Ue for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:40 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-368313809a4so275675f8f.0 for ; Wed, 17 Jul 2024 03:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213851; x=1721818651; 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=anM9EOpDNnsAeOw8+e0Zh8fKDzaQ6DzWrkazNPeEQ8s=; b=u05j5Ay9z5riM9nRuuFpszVbqPt2OUksQTs0aRagCUeBrPlC6nKbg5PjYcYcjG2riC Z/gqDTG6id7tlDpXpQRY3npDJrXinh7zXn1LNjP9RhmmaZpInOsPg7NViONvsAYBwn8u 4fAShowAK/mnHkkns+F3tw/qxnk+FEGkkACKATS2np0CVgZiv0JlohILFVi273awNKMQ yyMkYOzbDqwIoymGyqGpISRM0iq92eJZZj8UTobsk7ZInZxMdceb9pSX1kU64cSBXTai cBaTRdVdWzMrOF36p/M27wm8Got0Ux6kFitRDLPuKdjNB4fYypKgiGW373afM/or7gGz Q/1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213851; x=1721818651; 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=anM9EOpDNnsAeOw8+e0Zh8fKDzaQ6DzWrkazNPeEQ8s=; b=DxeoXvpO7yFI0cUIVCy5dq1bV4jsMBj7XE45ocWizeZug+7PmSwsmlyikR3cwI9UQn kz/j/8Gxvx3OWtVRapQu5rNKgE25LeMOaiBOYvbjbYljw6lhKPuXC2RQCecCmJTv7yrM YAZ0XxoLcONPfiJq7mrDdDu0csEUSyD452Mx+DFpKi/oEIBNd3gCtaTlwL3XydezVPhm xU3D3w0Ccp9BwCiF4WpKNG9XtU2MVSnal2U2FD6EVbcYimEiYmfaQ2m+SYsXSHojP+1q /q8CMY7VSFI8eL5uadSbQkB7iweaaB3sH0VTcyrrc5rP0omXK2NAuDh7eHl+HZoro3l4 s5kw== X-Gm-Message-State: AOJu0Yzu27B3o2bSao/F5K/Unmf2v2rFoKu106siQzHPh1A3e9N8a4uP dz2bJldLa3LTxtZeaVvTBNdc490Nr9NtyWxj9jYn492+sLv1SAPJaH8YKdIHeSVjXcru/QOwJfP LziB+FQ== X-Google-Smtp-Source: AGHT+IEwovGhsY+bkb3/ZgiiCZom4FZB/H059O8NbmDHkvZVSmIHXKHRLHAXx9EkW43q3IwzdRR4pg== X-Received: by 2002:a5d:4583:0:b0:368:377a:e8bb with SMTP id ffacd0b85a97d-368377aea6bmr808541f8f.28.1721213851197; Wed, 17 Jul 2024 03:57:31 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f25abf0sm204165295e9.14.2024.07.17.03.57.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 1/8] semihosting: Include missing 'gdbstub/syscalls.h' header Date: Wed, 17 Jul 2024 12:57:16 +0200 Message-ID: <20240717105723.58965-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org "semihosting/syscalls.h" requires definitions from "gdbstub/syscalls.h", include it in order to avoid: include/semihosting/syscalls.h:23:38: error: unknown type name 'gdb_syscall_complete_cb' void semihost_sys_open(CPUState *cs, gdb_syscall_complete_cb complete, ^ Signed-off-by: Philippe Mathieu-Daudé --- include/semihosting/syscalls.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/semihosting/syscalls.h b/include/semihosting/syscalls.h index 3a5ec229eb..b5937c619a 100644 --- a/include/semihosting/syscalls.h +++ b/include/semihosting/syscalls.h @@ -9,6 +9,8 @@ #ifndef SEMIHOSTING_SYSCALLS_H #define SEMIHOSTING_SYSCALLS_H +#include "gdbstub/syscalls.h" + /* * Argument loading from the guest is performed by the caller; * results are returned via the 'complete' callback. From patchwork Wed Jul 17 10:57:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1524FC3DA42 for ; Wed, 17 Jul 2024 10:59:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2Lv-0002r8-G7; Wed, 17 Jul 2024 06:57:43 -0400 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 1sU2Lt-0002js-Oh for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:41 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2Lr-0005ch-1H for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:41 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-36786081ac8so3870398f8f.0 for ; Wed, 17 Jul 2024 03:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213856; x=1721818656; 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=+H84pjhZV03SKMSQm8z6X2LsGjCdphEi5b/GpyyBaBI=; b=YX0/ei4IO5avpFUjb2X8cxCPqhzKx7IHG0QWtCai+iZyeRtTzzGwqgz2WDzdeaQi1T yDs6ZZxY2RngWFGMG9aVCbEtuKlYQFgVa4yVTR73nXzToI+okPDSBF/oTHHfiEqB7FNZ j6d/deoq24DngNyDNAehRp2H2BGUTt+nTNYjOyKB/oNFSfobgp7dJLgXZ08H+B0zd8pe XZvBPGI6PtLehbT4VhcCcNV0jedAbOP0dfv2ZKXtqG3orfdD1ZKzAC75uHtoQD3tTVR8 aiYFaomcYElcuZVnZY0v/PrwauQPSwL/MyBdrHTlEGpEdAufzRqPYiJn5PLDxWwh1AFD hg8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213856; x=1721818656; 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=+H84pjhZV03SKMSQm8z6X2LsGjCdphEi5b/GpyyBaBI=; b=nxr2iRNGx8/EuNdKfx2wmxeroewvzmZt3v+0mSJ2A5MBw800ANECXS62t6iwMQ/OGE 6kKwHxneRL3bDuxp2k9AXS+DH2WEo5R2kJ68mD5qWZZJtJvCXWPMur+vOCWNfFXFXwgV wWoYVumLvCqqO1n9U+NZwO4hm7U9y4Dpck0UPIebjJJ7tUfZum67Ab14EwN4o7ynkC/N n8wqcwSKYNi6VtMi+IeFsQKc7AYxj+CsyIbpCrJIbDjR4kqO/8CpuyKQqSAWewyk8bTd kGUgThOqOmfgDyHwI/zG7e3NFk5vx0/zYE3RG6J/YQ+hhpURqaYgkv01ai7iqRVeOEpy 6vbg== X-Gm-Message-State: AOJu0YxF7zKn2Cx/WjcymU6MbDU7mTUg2UFJrfFK+IOrzrsXSjORASuS CvSJMchrPmWhlii8T6XiwBgipNiiX1YH0a8s+QFjX58FspCznTsz8Qdqt6RPXWeAnZoK7IZpmu+ anTAYWA== X-Google-Smtp-Source: AGHT+IHF7SYa4V+5+rhqqd9d5bFweCnycR06dMue3MnLt4LjRHWPqbuWZRDdeYrEnTChWqhACkXXOQ== X-Received: by 2002:adf:eb45:0:b0:367:958e:9832 with SMTP id ffacd0b85a97d-36831600277mr1197662f8f.14.1721213856573; Wed, 17 Jul 2024 03:57:36 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dabefa6sm11330056f8f.44.2024.07.17.03.57.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 2/8] target/m68k: Add semihosting stub Date: Wed, 17 Jul 2024 12:57:17 +0200 Message-ID: <20240717105723.58965-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/semihosting-stub.c | 15 +++++++++++++++ target/m68k/meson.build | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 target/m68k/semihosting-stub.c diff --git a/target/m68k/semihosting-stub.c b/target/m68k/semihosting-stub.c new file mode 100644 index 0000000000..d6a5965e29 --- /dev/null +++ b/target/m68k/semihosting-stub.c @@ -0,0 +1,15 @@ +/* + * m68k/ColdFire semihosting stub + * + * SPDX-FileContributor: Philippe Mathieu-Daudé + * SPDX-FileCopyrightText: 2024 Linaro Ltd. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "cpu.h" + +void do_m68k_semihosting(CPUM68KState *env, int nr) +{ + g_assert_not_reached(); +} diff --git a/target/m68k/meson.build b/target/m68k/meson.build index 8d3f9ce288..4d213daaf6 100644 --- a/target/m68k/meson.build +++ b/target/m68k/meson.build @@ -11,9 +11,12 @@ m68k_ss.add(files( m68k_system_ss = ss.source_set() m68k_system_ss.add(files( - 'm68k-semi.c', 'monitor.c' )) +m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'], + if_true: files('m68k-semi.c'), + if_false: files('semihosting-stub.c') +) target_arch += {'m68k': m68k_ss} target_system_arch += {'m68k': m68k_system_ss} From patchwork Wed Jul 17 10:57:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F6CCC3DA42 for ; Wed, 17 Jul 2024 10:59:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2Lz-00035b-8P; Wed, 17 Jul 2024 06:57:47 -0400 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 1sU2Lx-00030g-U5 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:45 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2Lw-0005di-6x for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:45 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52ea2ce7abaso10798137e87.0 for ; Wed, 17 Jul 2024 03:57:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213862; x=1721818662; 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=ou+CSdE+RsteI59EhF42GcubahUccwY83pILcCuYj94=; b=CM0u5MtwfXcnWbs3/CQInB6/zftJoFQfHgjXPa7CaQs4l2a/DuFq5Qnb7uWEXTj/w/ 2MLuDOTyHcnmR4cA484qmBlcT/3E192x5i+JchhqwN4LaID9nQd5yQIl0mGyjSwPTYoc 5sDW7uI+NHfIkaDN4iSPWjXlMZ0Rt5vTgLMhhi0L2HX4EtowaqIcISO8fr2HBvvW3i2Q QCtXHtE5wnGq+ZHPQ9BubdiSu+VUx0BMnH1U9eGW+1t11P+JJ4vk9xRDUkSiV6wuqTIX HZI8NU2Xl7Fmqlb2yT8RAoSKzbLA2o8NcQ/yA+KzeG6PfIzMc75rGxdx+6OV01XRdL3E 4L4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213862; x=1721818662; 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=ou+CSdE+RsteI59EhF42GcubahUccwY83pILcCuYj94=; b=GeD2qiG8+BzqeNFiY7sQobkeFWX9nQqJJ3DLjtDkDjaI1/6fx6sWIz4QZnp93mrZL+ k9Jl6kKSRWqhRsjRJdTCrqrqMlWid6OZxF0SAlt5sJAjuwSdqaBmC8bu0waRYDQHBxDt 61NC/3Q3VJlXoKzZj3OFGrGygnYW0KDOB4Jr7sGV9lXho3cJnNpSt/ZHS3jl1MymGq2A aXaepqc9SbZcSHQmGSX0nj0oakgF9H1yJGjrZIFf/2xP3+JBDnzVS8dZb9Mt8CmWv/rZ YkdlVXX6w1peaLXt5hdozUFXxHzTbILKBBWT8n5Ti/hp0Ohzb45BZDcQXcAoXnRX0tKK a28A== X-Gm-Message-State: AOJu0Yw4YyIc2dFZ35gQ9O0syVRKFi1fwcg2n3B0ohX1c3GHw3VF/lZY RdRIiujEwGfyTbE+63ggB4rV9rYGl45KLOR40aeMxwE3MsRTZVrWq4+L2C8l9yx41dqNMt57esm H0uGfIQ== X-Google-Smtp-Source: AGHT+IFPg+DItzAcEnxpiOtkR+wnPj14zG+bGUCK80yc79bIL8YTw7OIF1FlI5soLa5Ja4AryhUu4Q== X-Received: by 2002:a05:6512:ac7:b0:52b:9c8a:734f with SMTP id 2adb3069b0e04-52ee5411e3dmr1222139e87.50.1721213862089; Wed, 17 Jul 2024 03:57:42 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e81f0dsm165095375e9.12.2024.07.17.03.57.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 3/8] target/mips: Add semihosting stub Date: Wed, 17 Jul 2024 12:57:18 +0200 Message-ID: <20240717105723.58965-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/sysemu/semihosting-stub.c | 15 +++++++++++++++ target/mips/tcg/sysemu/meson.build | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 target/mips/tcg/sysemu/semihosting-stub.c diff --git a/target/mips/tcg/sysemu/semihosting-stub.c b/target/mips/tcg/sysemu/semihosting-stub.c new file mode 100644 index 0000000000..7ae27d746f --- /dev/null +++ b/target/mips/tcg/sysemu/semihosting-stub.c @@ -0,0 +1,15 @@ +/* + * MIPS semihosting stub + * + * SPDX-FileContributor: Philippe Mathieu-Daudé + * SPDX-FileCopyrightText: 2024 Linaro Ltd. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "internal.h" + +void mips_semihosting(CPUMIPSState *env) +{ + g_assert_not_reached(); +} diff --git a/target/mips/tcg/sysemu/meson.build b/target/mips/tcg/sysemu/meson.build index ec665a4b1e..911341ac37 100644 --- a/target/mips/tcg/sysemu/meson.build +++ b/target/mips/tcg/sysemu/meson.build @@ -1,10 +1,12 @@ mips_system_ss.add(files( 'cp0_helper.c', - 'mips-semi.c', 'special_helper.c', 'tlb_helper.c', )) - +mips_system_ss.add(when: ['CONFIG_SEMIHOSTING'], + if_true: files('mips-semi.c'), + if_false: files('semihosting-stub.c') +) mips_system_ss.add(when: 'TARGET_MIPS64', if_true: files( 'lcsr_helper.c', )) From patchwork Wed Jul 17 10:57:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD355C3DA42 for ; Wed, 17 Jul 2024 10:58:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2M4-0003So-Ft; Wed, 17 Jul 2024 06:57:52 -0400 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 1sU2M2-0003Li-O9 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:50 -0400 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 1sU2M1-0005eG-7O for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:50 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4266fcb311cso47289075e9.1 for ; Wed, 17 Jul 2024 03:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213867; x=1721818667; 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=5U3x05a4v+4MAIH1ElGBtlNNkjkLnxPJovuCbksbMLE=; b=yF6Mi2mHwe+979jIUulF8Qdr9JvDLS6E6n/fqdbuLBpc3ZSTncwfjr4wjVk9D2uHYg XW1iZ2pW7T9UaXjL9fdKkRSu3PZfjge1hSHjZzRtTMUa7muXVOvg9oLaxwnHYOYCiasE Zz0u+IM1LlzFqCOSHBQHYx/oW3W48FM81kJF/PeKIIzCmwBX3Tq5HEBZ7BGelcJfKFqy rVnDR9WrC9G8R34Qk1dbXhLl6vqEBIIJZykG26E8mFdwz6NRzIlvri1pLczxzohN5DD5 tM+72+jd99L3LjbKKWg33hcJYG6U+RR8Vf+hRtBFPaeu66BxahQFwJCIGpavqtbj3XSP Ul+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213867; x=1721818667; 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=5U3x05a4v+4MAIH1ElGBtlNNkjkLnxPJovuCbksbMLE=; b=a9qYUol0+i5Hf3STCaGr5YYeK+tfENDF6vd5I1nZz+UfMd6XtcgXO/vBwJVS8T+TD1 /9tthOLwLwJvGTHwqLmj8gKHzPlSQ+ixz+uFqX3u/Vmd3jj2Yh8N2VhyXqi1huLsSwmH FSCjzQ5huPte8B6FBYxkuTGMXfi0l6L1hORvqHWEDi/AUFIl7uG9qs3uH1tH0S0FZf4m wMGlZQ0D6J85ylj4hQUQsvKx2Gqr4lYPmlBCScWeH8nXs39oGcy4irn0l+5mE4iXfaOS t4QLgJLUjRRJCbyWLSL+7urpSgGX/FtqEd+i1p84M/qA/ulmhpIUUUTCEuVqtLu8jBjk h1kQ== X-Gm-Message-State: AOJu0YwshEpDdJlsC9Kboje4Z+4aLX/JX9Sr8f+KANdjf9TXwEUGDnv9 qQWTzOtddQVuVlj9GBLDz/Z0rkvPQtFRafoUQrQoGYq4lrGDwk5sP9vF21Dh5H/ae7jBq4ZFbWv EwuulRA== X-Google-Smtp-Source: AGHT+IHxngnjKg7fVWUFSr9kiakzmQEkrJNVV0j1ecEUfXo1D2P5XEiEJ/L1pSkAh+LaSK7WHkj6lg== X-Received: by 2002:a05:600c:3b24:b0:426:5269:982e with SMTP id 5b1f17b1804b1-427c2cc9861mr8336775e9.5.1721213867618; Wed, 17 Jul 2024 03:57:47 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dabf3c8sm11269615f8f.34.2024.07.17.03.57.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 4/8] target/m68k: Restrict semihosting to TCG Date: Wed, 17 Jul 2024 12:57:19 +0200 Message-ID: <20240717105723.58965-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; 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 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the m68k target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-by: Anton Johansson Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/Kconfig b/target/m68k/Kconfig index 9eae71486f..23aae24ebe 100644 --- a/target/m68k/Kconfig +++ b/target/m68k/Kconfig @@ -1,3 +1,3 @@ config M68K bool - select SEMIHOSTING + imply SEMIHOSTING if TCG From patchwork Wed Jul 17 10:57:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A417C41513 for ; Wed, 17 Jul 2024 10:58:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2MB-0003vb-MB; Wed, 17 Jul 2024 06:57:59 -0400 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 1sU2M9-0003md-Ej for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:57 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2M7-0005f5-08 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:57 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-367963ea053so5376159f8f.2 for ; Wed, 17 Jul 2024 03:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213873; x=1721818673; 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=uWQ9swtHKmaOCXCNUZVXDCsGfJqeWobhkzplnSNVd9c=; b=YToaASXDkV4C+iCeXboIBwteD7hud5CWdRl8dYVyN1vOmHoN5mbxtFf6b81EB2krok ol6F4irt+UEMbVfLC9rIcwm1y9//VfynkzCtzyACbChFaEFwO9aJpjKOq/LWii/xb5NK 7BDag9K4240/lss4B60T7gYqEjSKbHCn2WcpEOuMZKor3d0iMP0GcbMNEsyWOmR+K0vI xUreYh2ChTE0/0FET1SdC1a9N5KQKgVPKC3dMFZmWCCe4UIoopgxAdzLtfV9MbDmkhPS +DmcPPvG1eS5XswQSQQXdL2NT7dsjgPsozzCj0DhSsPui/2Fl9APv9fBB9qdZRaTl7Nh e+wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213873; x=1721818673; 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=uWQ9swtHKmaOCXCNUZVXDCsGfJqeWobhkzplnSNVd9c=; b=qjDnZ9v35YOBpk7JZTJNi3IVzocyTpiMiSp0F4miwjrny2GhqYKe1mGbc1AnpTSAus M9b9VSvYf0UNgH1ZypvOHdIt1cO+jjnb+06UEThaXLwSrt+I3PKIoce/ROVFR5TCdrN9 uiLrKfrduJnVh4oxaUREy39KIAXfY3ymM/W7uYx3rOd0enLgeBR4AlCuXKqPIQxeVefK Wo8vFTOrHddIw1Yqb7Kwp7lWnY0btN34qhBTK6Z9Bem8GecMxYHgbTz/DQFQdz+SEC2U DI2iJCWGGFLIkJRmUXsguBTTX/CvqhC7Bo/aQScle/+x4+Ah+O20gq2+60TbLlYQe4rT V3hw== X-Gm-Message-State: AOJu0YzrxoBls1vLIUYElNTLyyDtYiSepEU5qbgepRiAjKZt4RdINQ8o SO2shiW/FvaQ9Jdax00mKixwb4tZkR/VWbYOYWOhVr42GUGyK/37p9MAnyoTlJa10I1HxkUlwLq KjDP0DQ== X-Google-Smtp-Source: AGHT+IEDi9ZiWTj2WFUcpd41lKdGXpUIdw4o7sNbplPMZH+PTKtOvBXAms50j19yvQM5vl6jWaWZHg== X-Received: by 2002:adf:cd12:0:b0:368:255e:ab17 with SMTP id ffacd0b85a97d-368315f1f50mr1310879f8f.9.1721213873068; Wed, 17 Jul 2024 03:57:53 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680db0484dsm11522763f8f.110.2024.07.17.03.57.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 5/8] target/mips: Restrict semihosting to TCG Date: Wed, 17 Jul 2024 12:57:20 +0200 Message-ID: <20240717105723.58965-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson --- target/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/Kconfig b/target/mips/Kconfig index eb19c94c7d..876048b150 100644 --- a/target/mips/Kconfig +++ b/target/mips/Kconfig @@ -1,6 +1,6 @@ config MIPS bool - select SEMIHOSTING + imply SEMIHOSTING if TCG config MIPS64 bool From patchwork Wed Jul 17 10:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D60EFC41513 for ; Wed, 17 Jul 2024 10:59:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2MF-0004Bc-9I; Wed, 17 Jul 2024 06:58:03 -0400 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 1sU2MD-00044H-Je for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:01 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2MC-0005fj-2D for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:01 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-36798e62aeeso4312846f8f.1 for ; Wed, 17 Jul 2024 03:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213878; x=1721818678; 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=YQ5kcnCOObbjA6/Or2TYLNPevY5gyQfg0ztfeo6rNcw=; b=awDkfBAQ35vvxlBLC5tWQMTYjibDAsKNdyPaMK885LEoBDQWqsiCZBl/rStaePO+MP PHdMHF3MoOAqvXVXTyc2qggcFNCkbKZktQuEThoukzAzSR0pEs4YIMiZvA2Coiuatbs4 00/hB7DJed7DV3kcf73IX8enbVE3uw0tGSYUo/5h5Vj5ZRZUZMKRrVdJhyW3/zKqflsZ eWftatCqla2Lleyr8tGqecPEA6LfelPdMz+GWeJ4+CmSaGyjb3qc5A3j4dE9Uo/3OpaH un7Y/IF8zNHPhUZDHdpqjz9ZuZmf8lwnAnznWVebr+vCuOKL8Mrqxt0R4E/Wn0q81VL8 92dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213878; x=1721818678; 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=YQ5kcnCOObbjA6/Or2TYLNPevY5gyQfg0ztfeo6rNcw=; b=mZjSJdHCFo0sVzRHsaMajzrn72XCXOkr2y93gpTcf++XfQM8F2k0NeCsdim4FIUpoh ZjdO2Qd21OyIHQXzC87DoHXDGNWYat0tJJ9syd2BXkvIsVtBYBPJLCzre7ejahrYIxK6 2HwIX6vEEG7pcGKy1bmD2rXS/OVQtfARB97/WAd7BXfgtpXQivbWovKiNTOGZ0pmER3P BxwV595BGfhPtTBIjWJ/+Z1jY6zHt/hsNvne4j8HTblA+UY+vGRSq4z9l3x6LAz3Xf2s HDL6hWdgguiiKG3lTAai/dkxD7wDr02elDG49iIUGFQC/Lyh229kj6XG0UaPWl0hEGFx FfFg== X-Gm-Message-State: AOJu0Yz1JIxTaub9XFcotpcp8YGT5HiOe0CVC7JFBb2lJqLkb73tk0UP QKXhI1aFkBiFiIC0yb8nRN6kQfECtBsqtc3FhBubRd1SkVROmKU+eHW2bwsc5yyjsFnhTRCY+v9 CYlTpyQ== X-Google-Smtp-Source: AGHT+IEBQtuQmFSGg1imDLHD/Xw3NQLIn8z4odfK/LV9hKI5DQW6WxvJCZYkj6qpurG05qKXWUdjPA== X-Received: by 2002:a5d:5cc3:0:b0:368:d0d:a5cf with SMTP id ffacd0b85a97d-368316f8093mr740735f8f.45.1721213878365; Wed, 17 Jul 2024 03:57:58 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dafba03sm11370123f8f.76.2024.07.17.03.57.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 6/8] target/riscv: Restrict semihosting to TCG Date: Wed, 17 Jul 2024 12:57:21 +0200 Message-ID: <20240717105723.58965-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Semihosting currently uses the TCG probe_access API. To prepare for encoding the TCG dependency in Kconfig, do not enable it unless TCG is available. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson --- target/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig index 5f30df22f2..c332616d36 100644 --- a/target/riscv/Kconfig +++ b/target/riscv/Kconfig @@ -1,9 +1,9 @@ config RISCV32 bool - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + imply ARM_COMPATIBLE_SEMIHOSTING if TCG select DEVICE_TREE # needed by boot.c config RISCV64 bool - select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting() + imply ARM_COMPATIBLE_SEMIHOSTING if TCG select DEVICE_TREE # needed by boot.c From patchwork Wed Jul 17 10:57:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DFB3DC3DA42 for ; Wed, 17 Jul 2024 10:59:39 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2MO-0004oF-43; Wed, 17 Jul 2024 06:58:12 -0400 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 1sU2MN-0004lp-G2 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:11 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2MI-0005h2-MY for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:11 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-367a3d1a378so5780501f8f.1 for ; Wed, 17 Jul 2024 03:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213884; x=1721818684; 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=vQhy8hrl81u7GNgqWNgI0Q8CnNR/8+x5QLQF6iXo760=; b=EAxCSOQs309zoqCvVDuCu9kcojJ7PnBRxPOQudSgZp2NM1XmfpXsliIaHVZuG83eML JgSg914huZIFitrBQF2gxV7lqERr+DQhGndRhi4mt+sExdZhKLbd5KhRLj5pnPbueTgF KtkIfawDA9m39BA6g0blAQhV3PZGl68LU3oLXuVlPnS2fMYM1h2r7b35uqUo2YkCMeJN UDyR3Eb/aMQvO8W23IrZRu3zFAAzmNsezzTqtM4hFqxVt7JcJ1x9t4uJ8m5qKtqPCxCG di/ncXobQSO964Bl1knDDmr/tWOxRnu7tDv6CIdSBdG9zR0XMazue7V86sj1KpMLur2Z 92ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213884; x=1721818684; 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=vQhy8hrl81u7GNgqWNgI0Q8CnNR/8+x5QLQF6iXo760=; b=EdpgyyXfJ/LgA1BXiOTvxn7mU2aJOkXf9YYIXtyfl3thlYea+0yK0dbiNChP0IAPQB tYUK2zkiIVxz6d+bVz/uL1RV9dt9CRSS5ll5W9NDEnhY9tH7qRaW1TmxxqtqeI5qW8Jr msz9UgoboR5Zuisob0VCjyV6AboJ1cGnhpYkItBpF9XgjAkhmQvyH79rVFk1RpkAXBDo cCOfZXPGSUEQdaKwHviGz613B7otQ0jNvgTtAjM1a0RRpo4lHEcUiPdr1jPsKOsjr9X/ doAvHO9/HCr3pZJZkcz8ux1CWGy5F85qdHYpaEGds86yW68Y+mo9NnKEr46fnn3mir/9 bB/g== X-Gm-Message-State: AOJu0YySnYTOsuCaiiX4lU5F9dyWHYNi8wU9lI4X8v/NOlugSghGfVzL ZFbwbu7JOvur13p+VNOFYxt4nUy1rulFKkTKO6cY8fDEilmtxcob8JDgaXP34R/hCiArM3hTWA9 x6x6rnA== X-Google-Smtp-Source: AGHT+IHj1D6egyRizVLhAmUWoLS0647TnuQwqHYn5D1nM1mUW6PDpKnneJ0AC07v/mqX/DqaHrpo1w== X-Received: by 2002:a05:6000:244:b0:367:8607:daa9 with SMTP id ffacd0b85a97d-368315fe1d3mr1166903f8f.15.1721213883801; Wed, 17 Jul 2024 03:58:03 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dabefa6sm11331239f8f.44.2024.07.17.03.58.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:58:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 7/8] target/xtensa: Restrict semihosting to TCG Date: Wed, 17 Jul 2024 12:57:22 +0200 Message-ID: <20240717105723.58965-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The semihosting feature depends on TCG (due to the probe_access API access). Although TCG is the single accelerator currently available for the xtensa target, use the Kconfig "imply" directive which is more correct (if we were to support a different accel). Reported-by: Anton Johansson Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/Kconfig b/target/xtensa/Kconfig index 5e46049262..e8c2598c4d 100644 --- a/target/xtensa/Kconfig +++ b/target/xtensa/Kconfig @@ -1,3 +1,3 @@ config XTENSA bool - select SEMIHOSTING + imply SEMIHOSTING if TCG From patchwork Wed Jul 17 10:57:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 13735341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0ECC6C3DA5E for ; Wed, 17 Jul 2024 10:59:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2MS-0005EG-OT; Wed, 17 Jul 2024 06:58:16 -0400 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 1sU2MP-0004zx-PS for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:13 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sU2MN-0005j1-Oc for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:58:13 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-36794da7c96so2199893f8f.0 for ; Wed, 17 Jul 2024 03:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213889; x=1721818689; 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=S4LCP0TPUvNWs+1AuzrihN13r1C08nRA9emJSD2ibmQ=; b=p84PL4uNts4JPPeEVfLo//iSombWu28Fim54m050gPSOVkiB+gWKmNE13NhlPM4fQV 6ModDQnr2mkPnCcNV6mUMfvSMwhYAsAI7yFj37rfk5tBNeLuoCMYRiP1aQ2ADArXa9Me Qvc256ZNDYlClgkMTxvhQJo6drI3bfG2VwR6fjZvHSDi5suvjYcGN1tpgGW0GhGpD94v v5yx6G4QBZTqh2nvhsssFMO4MVE4r32Kd1X9Rb2QZEBqbpcHsw8m7cilZkHjADiDOhvo UvkFu7FHqGbEsqAGVKppg0q0BG0v9LusfA+LIF2rJ5fUBVaNE0TVQNXonMe5U0MsMlig ATyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213889; x=1721818689; 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=S4LCP0TPUvNWs+1AuzrihN13r1C08nRA9emJSD2ibmQ=; b=dw8A/+AlaSNmerdQZQmkWXoVEISU9UMbOu0EEl1Gc3gxRTcs4gpfKnZrt1/zBbyF/l MQ21X4DwI/ZKE0TYHMGZXbRpnzNUI2s3XzWuivV14Feo9j5lY0QGtYayLBZN8bVtw/Zs hZTP1zx2oSCZCaAu3IJpIt+uML9JIsZdQYXxlUjnjsTndtll7Gi/sH+2QfU6cOL2zCV0 vFq6rpEigRquQ1Dq475Lqe75lM+S2/OrDfQp/5ek+hjXsLZwf1A4XtnpgBX0P49lyxfT QmXZP3d1csmfz4LMMYxYdXGMmLzoJndKnYjJCnNXPnw2YFMOBPAk59+naVnhYcvcdRf4 f0cA== X-Gm-Message-State: AOJu0YwRu2cQ2/SrYzF36HDG9NVzLbSyHgzxfw70m5t91WsG/RiTT8PQ IWgWfOaqISCezqoyDHraCUN1bHSrwtyY8avvh7LZxDLa0JMafK9ZQHEby/O5sLfmRK+qJ/gW9HG rZKMyDQ== X-Google-Smtp-Source: AGHT+IFb0DArV+yDso2NvZpQvFOXENEFNEJSvTsMvEgTk9tab0oY6ZhD+GB6Uqf0m8OMtmkDJzXzKw== X-Received: by 2002:a05:6000:1372:b0:367:8a24:1fde with SMTP id ffacd0b85a97d-3683165e7fbmr1132850f8f.17.1721213889111; Wed, 17 Jul 2024 03:58:09 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368337e1d12sm987534f8f.31.2024.07.17.03.58.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:58:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Anton Johansson , qemu-riscv@nongnu.org, Paolo Bonzini , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 8/8] semihosting: Restrict to TCG Date: Wed, 17 Jul 2024 12:57:23 +0200 Message-ID: <20240717105723.58965-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240717105723.58965-1-philmd@linaro.org> References: <20240717105723.58965-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Semihosting currently uses the TCG probe_access API. It is pointless to have it in the binary when TCG isn't. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- semihosting/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/Kconfig b/semihosting/Kconfig index eaf3a20ef5..fbe6ac87f9 100644 --- a/semihosting/Kconfig +++ b/semihosting/Kconfig @@ -1,6 +1,7 @@ config SEMIHOSTING bool + depends on TCG config ARM_COMPATIBLE_SEMIHOSTING bool