From patchwork Wed Jul 17 10:57:15 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: 812998 Delivered-To: patch@linaro.org Received: by 2002:a5d:42c4:0:b0:367:895a:4699 with SMTP id t4csp728338wrr; Wed, 17 Jul 2024 03:58:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7NplsIm6LDnw1DKBEhpTzsVm+3dmAylMId8g36Plvd35iBFNM3weMg6jlVQSy2dIGpnC4Cb2UBT6WdC1X83DT X-Google-Smtp-Source: AGHT+IGxXwv7jXnpBWlfPifdnsUB7WIOEb29FN3C+3hLhy9IUPpT/5mPE8+02DiiQ+z6KUR2VZGC X-Received: by 2002:a05:6214:1c86:b0:6b5:9439:f048 with SMTP id 6a1803df08f44-6b78ca32bd2mr17215196d6.19.1721213914163; Wed, 17 Jul 2024 03:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721213914; cv=none; d=google.com; s=arc-20160816; b=c1hYy2cwttf8ga79S6VImjjp0PzkDfKC/tvae6lwahG6ANYUoCBw1IkoQGDiBrM5xb RaXpl/TwkubrWiZ5APuJ17yVkaZ+tO8SR5sreodmhwLznwTMnKKyLkP9gvgUVqBcYb7R LnhdzelYUZD/ufGq1feFgwm+WW6SGzcnEbGoD+dxBac+skRQfZCD52zwvQsquD72ekFA La+tQlUcB+ttkjSIpz0rckzYyXAmLt3mNgqlf8iFZM72MjRsiMyjyQqj4O4yWUl0AHdq J5tluR5BxCqEuMibVgCxWY9vsmB4kKINeKLp8uJuhGznX7JY+XicD5R+oIQtanb9q2z6 VHwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=ypRi42JthdMqqbguYBq+FqsBl60eengyhwuwMJG+k/k=; fh=fFO5KHblrPjHQvS+UPQNFZmS97LAporGvOR/23UBkpo=; b=Cn2liGY7+SLqExrXknd8SbsxSj4EEw6FN4GcWqUH0tvCfltYQtbU69Qk31J5882MtY 1PPsOc3izD9eHE52du0U0p0FDGFj4YElbl3oVPzcQm3SbnhrWigT9vc//5WjQxauiXy1 +s7gvOm4Xe202Obd9w9AhWxEamatj7e7BdgMP3CM+r5vq3LfrmIs/D+OQhuDKHfjO5HS QXzm5XLhEUzCtYaYTkVS1J9tXk5brRNeZ956QFhXrNwpZOyG62tSiHFddpwlxaC8UayL 68fWQHb/oO9fHdIHjI+V/6gLFaZ5YPE5EFir/DBx+tm0CJiw7yul81EgiLfpnsodyNgo CwdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFe9jOQw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b761a25703si95082946d6.406.2024.07.17.03.58.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jul 2024 03:58:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFe9jOQw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sU2Lj-00026J-EL; Wed, 17 Jul 2024 06:57:31 -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 1sU2Lh-0001ye-Hd for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:29 -0400 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 1sU2Lf-0005bc-PA for qemu-devel@nongnu.org; Wed, 17 Jul 2024 06:57:29 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42726d6eca5so48294975e9.1 for ; Wed, 17 Jul 2024 03:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721213846; x=1721818646; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ypRi42JthdMqqbguYBq+FqsBl60eengyhwuwMJG+k/k=; b=VFe9jOQwQlCN/okYobm5B9OjyL7l3IKytphcCCmgQbCqqK7hG1KX1ioyEbi5UOw0wI 2KBheTg0EKJGSycY5IjZP35d8pdaId8IViQbQHBudJSL4ZPDogIqs6bLlSD2fZ4DnMaI XWvXCliBX+wCCxfJL5bQ4ThsTqDs+ArY6wjJ/DVBg01rLEd1kZZq+BPK1QhnLZLY3yHl kWwRZOW9XTeDUdpcM/pd0r0eraLyjDSP3lA3k66r5zZcckFRr4Wrm8n93/BH5hQ92Gb0 Xw8tC5D5/kqU0f5hTNhb0FVfKJ190T4F8bpCcNQj0K+bwujc0RaWRa22z95FtcomGsdL ZxYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721213846; x=1721818646; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ypRi42JthdMqqbguYBq+FqsBl60eengyhwuwMJG+k/k=; b=i1l9xuS9i3Q4t7abPvP5z0NuEcFdQYm9N9YMNpgfUUg9pOhgSr96WB9wrbm7nlnaoW yNGUvo8Uo+1My15I6L+zA+q9hhLbOivuWwLnKCmI9SFCK9F4cAkgFMtroOeD7MmTZ9p4 yZ87sfmOtJsML6ihcqzON5TtmqOmEJpwMO2PD/+8UwH4gP74bIG5NSzE97n8VguEAoOJ fDoRh7GqGkLd1Jg+6f3Mw4of91wbFIzAJd78T02NENHoJBN3/I3yWfV/5c6PEb2YDkyv gLwOZZ/CCGW3cowhO37GVTAEHbEOFG8uzeUE8JOH8lRWj8mKGOk5VxVc8QaQLE/QAl3B Q6zQ== X-Gm-Message-State: AOJu0YweShBUNFmHU9kW3PYSrASMPUIpoRQHie6J3h3L38kfJxY8yA6U KoF6bWrvIUUdvFzlxAFJWn/yoi7+0q3QP45wdSIpXDKYcT2PcZpwP+c1tP+FQKC4YNy3BKO9b48 vO/gsMw== X-Received: by 2002:a05:600c:3d8e:b0:426:51dc:f6cd with SMTP id 5b1f17b1804b1-427c2cb560bmr8811765e9.18.1721213845859; Wed, 17 Jul 2024 03:57:25 -0700 (PDT) Received: from localhost.localdomain ([176.187.208.21]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427a5e81f0dsm165081785e9.12.2024.07.17.03.57.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Jul 2024 03:57:25 -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 , Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v4 0/8] semihosting: Restrict to TCG Date: Wed, 17 Jul 2024 12:57:15 +0200 Message-ID: <20240717105723.58965-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org v4: Address Paolo's comment v3: Address Anton's comment v2: Address Paolo's comment Semihosting currently uses the TCG probe_access API, so it is pointless to have it in the binary when TCG isn't. It could be implemented for other accelerators, but work need to be done. Meanwhile, do not enable it unless TCG is available. Philippe Mathieu-Daudé (8): semihosting: Include missing 'gdbstub/syscalls.h' header target/m68k: Add semihosting stub target/mips: Add semihosting stub target/m68k: Restrict semihosting to TCG target/mips: Restrict semihosting to TCG target/riscv: Restrict semihosting to TCG target/xtensa: Restrict semihosting to TCG semihosting: Restrict to TCG include/semihosting/syscalls.h | 2 ++ target/m68k/semihosting-stub.c | 15 +++++++++++++++ target/mips/tcg/sysemu/semihosting-stub.c | 15 +++++++++++++++ semihosting/Kconfig | 1 + target/m68k/Kconfig | 2 +- target/m68k/meson.build | 5 ++++- target/mips/Kconfig | 2 +- target/mips/tcg/sysemu/meson.build | 6 ++++-- target/riscv/Kconfig | 4 ++-- target/xtensa/Kconfig | 2 +- 10 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 target/m68k/semihosting-stub.c create mode 100644 target/mips/tcg/sysemu/semihosting-stub.c