From patchwork Fri Apr 18 00:50:56 2025 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: 882300 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp587421wrs; Thu, 17 Apr 2025 17:52:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWWzHc+/VX9LklJjfW8i+nC713YPxUn4+Eqa1ckfJ1uYaBQC4P8eTOZEQQMp+CNVWsMryF7Tg==@linaro.org X-Google-Smtp-Source: AGHT+IFeowGuMa+5lwADXdxhz21LyY/2eD2/qXhqAn9/E+SAeJmfMzxuCffJCr/Xi7CAh7BGQUJf X-Received: by 2002:a05:620a:3184:b0:7c5:a542:10f with SMTP id af79cd13be357-7c92800920dmr155382085a.35.1744937541931; Thu, 17 Apr 2025 17:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744937541; cv=none; d=google.com; s=arc-20240605; b=QGSVPjtI5nNRkWjD9hhhlIntgUOyIm1YVCLWaIsQyyODufYxxsibWQhRz668xxk8M0 cqwiJT6+YykH7T+rWsSkBmeaJ+uPVyObadf5E0Rb0O9MwJxtRFrmKO734plgHNc75IPp 9FOP6BbSJ8BQnz9DnfjtlyjuwacQ3O5syA3juMb8twgQSybMYXjKtYWgnXsb4Q+9SerH FhS7uD7a2tn+KiZ+R8/N11q2xAucbCFxbfR2a1j9n63xQbE8p3ECwaYGaD/Iwc0T2xkC 6sLtGka88vLaP4fLp+aqVoyA8wF3xWsYeMftH5npHyKYWTnHQzzd+TFtLiphCajMrpBN uSdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gm2dOsKzPvwvg/Tuqc3gLIr1jfZVElB4JK7LqftVN0s=; fh=pHutNFPOAyF4blgBXa73XQ9oh8q7bmEMXCobHwajltI=; b=IFjdqrl26mKmYxh7jLdCKH+QruI1bHSER2y2p4rs7nk4hskJCjK3vF6npi8r6pc+tG okyXAl4HKMLizx/6E0CvFU4YD7IfZOQBJ6FzN1jKRS5X1h7CeCR8xrm6eKCi2ZK10aFY D45I2C7wCCdQNbpyFwc1syk+4fJADSZHiw+G0VmhitkunwNPgPzjcSqdTGc+nTEYZEpd hL4Xh0cpxLRz0c38+aiCE6HCC3CXrvlB1mcFBsdpTsXUkgKOKp562hhOM4/ivhvEa9Bz j51cDgMGmR79/XU0W6EQnFh01RY6p+ltB9pkxiAi0MHAsspAndS8hYwrn74I1fffUGqZ mUtQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LSW3Cm1c; 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 af79cd13be357-7c925bd1f98si100024685a.568.2025.04.17.17.52.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Apr 2025 17:52:21 -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=LSW3Cm1c; 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 1u5ZxN-0002C2-Du; Thu, 17 Apr 2025 20:51:51 -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 1u5ZxK-00025F-Nq for qemu-devel@nongnu.org; Thu, 17 Apr 2025 20:51:47 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u5ZxI-000663-WB for qemu-devel@nongnu.org; Thu, 17 Apr 2025 20:51:46 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso14150795e9.1 for ; Thu, 17 Apr 2025 17:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744937503; x=1745542303; 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=gm2dOsKzPvwvg/Tuqc3gLIr1jfZVElB4JK7LqftVN0s=; b=LSW3Cm1cob+cXDI+j6Wq8IvoAUgJciqXpX72kS6oG2GYgK9iSwV9Vm42Vqv2hLEAZl IidlcHy0qrtAutBgKMunqM2kQbIP5qxpDVXUjKwJsJWSSb53D60vCjhF4rzirrOcDzzI 8MaK6l4UBmXILv5Nlh3+fx0mhmnMqY0n4trGvdYE0GP0ESh8psl8PpP6Mo/s4902IT7L tuDmG/ucK/jG86DQLE5dV3vFgVWtggM/TNe1FQ20wGQxZ+fZzSPVqwMHPSzyJqrNZBck AMKebXF+HKBGNxROz2CA+htRLfdWArLUvuCCQ6ndI/2wmeYsRtFOR616vCqBwNB6VD9C o8Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744937503; x=1745542303; 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=gm2dOsKzPvwvg/Tuqc3gLIr1jfZVElB4JK7LqftVN0s=; b=CQI7Gtsk5fra7TrhJZpiwPoefWk22JTl6ftVc6+8IAEQKI5cSrS3BYh+fMmWPn4SQs GkzGVRwjp8VqIHBBnwb2cV/gsEjLo+a56jmYODzDuKvvtd7tT8Pa+vY+aiNPjvc+/nIL eVTdg0VPXdiKgB69hqTvj/NRa9FT9cxhQbpQeijMJiUsUj6x4/6bRr1y6FRavadIUK8k 7UCjNhbo0GafTGk4ozoZy+U5cosFIk0OluIx85xiLm35bAh2Y1hN1f6699/7euJPWDTL OPztgO54oLY/A0hCtcFk0xzakYBD+Ns7OF2KbIMKu6ZZL7o30LGo5FmT/Danj7b3tfYy k2Lw== X-Forwarded-Encrypted: i=1; AJvYcCVvT4nAHjTSg+AHHBS0sob3qQxqnlrIhH66Rhc5BWTWC06pQkhefnx2JxSKZKF7zs6DshRzqR+TJLL9@nongnu.org X-Gm-Message-State: AOJu0Yyt+KLau2/OH4KAIT6c/bIjtYyzsYZnE9StGDwvxwMKzgxYoBTR hU9yy0WOe0WOyNyQy62Mfv/SDau5ONOXJclMk1ZsCdECALb9aPQTQIuHgNLF8Zg= X-Gm-Gg: ASbGncvcTqh23c2dqAdzy8Q2Mwkn+hjcgIOa7sy1gyek+TSr+Z0yq19PFoWxYfa6vfp tj7zIRS3jLewdtFEczAlFqupbaY8rmIYxxKLxzcQ38NHseaNuCVC350Q6Brq1i4JNvpZuYHoBJF x+DdRbriFeMXPlT+E9ovg8NmKSrsMjA0lUWPCSwbt5c/Mw5LbjRItvsVYHrzSg5cNMJshL/jt7k svQ8rh0d2OhlIQsXZOpMO9GSyB7X/LJpYdXiqZza55GdPdOPb++tdd2R+trwX4gCHV+MIqiIEqy T+m7tSsvbaFYGW8KLdXEIKQMHT/dArlnsaJ54SRtiSjLYTH/Fr/c+MrXIQc1kLOCd5ADiSuHWFH HAaAETKjo9kXdFekhY4Le X-Received: by 2002:a05:600c:384b:b0:43d:b85:1831 with SMTP id 5b1f17b1804b1-4406aa872edmr8260175e9.0.1744937503634; Thu, 17 Apr 2025 17:51:43 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5bbd8asm2185285e9.23.2025.04.17.17.51.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 17 Apr 2025 17:51:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Pierrick Bouvier , qemu-devel@nongnu.org Cc: Anton Johansson , Richard Henderson Subject: [RFC PATCH v2 08/11] config/target: Implement per-binary TargetInfo structure (ARM) Date: Fri, 18 Apr 2025 02:50:56 +0200 Message-ID: <20250418005059.4436-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250418005059.4436-1-philmd@linaro.org> References: <20250418005059.4436-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 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, RCVD_IN_XBL=0.375, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 If a file defining the binary TargetInfo structure is available, link with it. Otherwise keep using the stub. Implement such structure for arm-softmmu. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 7 ++++++- configs/targets/arm-softmmu.c | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 configs/targets/arm-softmmu.c diff --git a/meson.build b/meson.build index 168b07b5887..da24cc2ba41 100644 --- a/meson.build +++ b/meson.build @@ -3809,7 +3809,6 @@ specific_ss.add(files('page-target.c', 'page-vary-target.c')) common_ss.add(files('target_info.c')) system_ss.add(files('target_info-qom.c')) -specific_ss.add(files('target_info-stub.c')) subdir('backends') subdir('disas') @@ -4272,6 +4271,12 @@ foreach target : target_dirs arch_srcs += gdbstub_xml endif + target_info_c = meson.project_source_root() / 'configs' / 'targets' / target + '.c' + if not fs.exists(target_info_c) + target_info_c = meson.project_source_root() / 'target_info-stub.c' + endif + arch_srcs += target_info_c + t = target_arch[target_base_arch].apply(config_target, strict: false) arch_srcs += t.sources() arch_deps += t.dependencies() diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c new file mode 100644 index 00000000000..6263d604f19 --- /dev/null +++ b/configs/targets/arm-softmmu.c @@ -0,0 +1,22 @@ +/* + * QEMU binary/target API (qemu-system-arm) + * + * Copyright (c) Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/target_info-impl.h" +#include "qemu/target_info-qom.h" +#include "cpu-qom.h" + +static const TargetInfo target_info_arm_system = { + .name = "arm", + .machine_typename = TYPE_TARGET_ARM_MACHINE, +}; + +const TargetInfo *target_info(void) +{ + return &target_info_arm_system; +}