From nobody Tue May 7 14:29:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540000069882855.2860175529981; Fri, 19 Oct 2018 18:47:49 -0700 (PDT) Received: from localhost ([::1]:53345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDgMV-0000w4-4v for importer@patchew.org; Fri, 19 Oct 2018 21:47:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDgLZ-0000dG-WF for qemu-devel@nongnu.org; Fri, 19 Oct 2018 21:46:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDgLZ-0008Ha-9Z for qemu-devel@nongnu.org; Fri, 19 Oct 2018 21:46:33 -0400 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]:43992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDgLZ-0008Dl-1J for qemu-devel@nongnu.org; Fri, 19 Oct 2018 21:46:33 -0400 Received: by mail-lf1-x144.google.com with SMTP id p34-v6so26539853lfg.10 for ; Fri, 19 Oct 2018 18:46:32 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id b19-v6sm797956lfa.63.2018.10.19.18.46.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Oct 2018 18:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=X9yVfJ3+zqPEpcl5MF2bDaLzTAMtQ9FlGPRpWyjVvT4=; b=VEGw8zpnUGpM/K/st/mBZbtBdfm3fhX1/4BKYI+WlqKnrJ7qRBSfLJ/JfV5NzrzMTB QN1D9cixdRhMMxPaYU2Vc9MM1p6WkL/sztBE/kzSwHjtS0KPtW/K52YyBRHetcJ93/xW YuqARAE1tFaTK6lSKpBeR8GM6VFa/nr8g3A0762FSc1jhURWvAr2B/ieekNtnwyLvQEU lAjkDFfqKQH69NkZc9I2Tf2sgMvuQu3FcE8UP2feLg9+eeGFziTsX9jFYFRqArl/VE7U 11+PGOUZNEaczYifkH6XXRFnr1DkjLDoIKVFrgf80Pov9MPtK552KXJwD7FpfyHZ4RNy SVFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X9yVfJ3+zqPEpcl5MF2bDaLzTAMtQ9FlGPRpWyjVvT4=; b=LhOaGLH6+rMXZCqm5hE2sVIpOCkV3u3zCyQ+ZNc7AM6Fwlqj/+q0EjjbRB7AWWE2HJ L2zj7Rz5+2Nt6SRPtwl5Nwe1lA1VEK8WKdx5DqzqvRi9Ezj+wBqFN4VbZrqKnXP2a4SR mJjK9BGN67QeeQY1JJFZ/dst7F1l8SB2VWXa2zhtI/FgeMRug0JdEtlrHSDoBL/Vazqm oFuad+sB4kTd3qWSZFzd0IZPlxyyTwqIFJozoFE9p1Et6DIhJaMColfAG2aHP3wg8r3c +91dWUxU/RoG+CDGzO5gM5UcXPxJxKfi1hV98L2IHTKcFXgrSpFiwxvsTH21a/Bb+7wu VBsw== X-Gm-Message-State: ABuFfog6RoVrFWZCXByivH+pUdQyPRvJPNSdWEUI1aXMBT+Xdw0ZJufR D7mDlfpUk7M9os585rOHqa5vaLMg X-Google-Smtp-Source: ACcGV600HlOTZxJO2xkVrkLS17HiWYRbWykZww/+Fxy44MyHglMR4TMrQDQVH8C66CPhNVJhQCZmIw== X-Received: by 2002:a19:9f8c:: with SMTP id i134-v6mr4254434lfe.52.1539999991134; Fri, 19 Oct 2018 18:46:31 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Fri, 19 Oct 2018 18:46:12 -0700 Message-Id: <20181020014612.29736-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::144 Subject: [Qemu-devel] [PATCH] linux-user: xtensa: enable bFLT support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Max Filippov , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" - request bflt support in configure; - implement custom linux-user/xtensa/target_flat.h that doesn't put envp on stack; - fix #include "target_flat.h" in flatload.c so that it first search for arch-customized version of the header. Signed-off-by: Max Filippov --- configure | 1 + linux-user/flatload.c | 2 +- linux-user/xtensa/target_flat.h | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 linux-user/xtensa/target_flat.h diff --git a/configure b/configure index 18006f0865b7..2c6b850ac690 100755 --- a/configure +++ b/configure @@ -7178,6 +7178,7 @@ case "$target_name" in ;; xtensa|xtensaeb) TARGET_ARCH=3Dxtensa + bflt=3D"yes" mttcg=3D"yes" target_compiler=3D$cross_cc_xtensa ;; diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 10c529910fc8..2eefe55e5000 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -37,7 +37,7 @@ =20 #include "qemu.h" #include "flat.h" -#include "target_flat.h" +#include =20 //#define DEBUG =20 diff --git a/linux-user/xtensa/target_flat.h b/linux-user/xtensa/target_fla= t.h new file mode 100644 index 000000000000..732adddb0d1e --- /dev/null +++ b/linux-user/xtensa/target_flat.h @@ -0,0 +1,10 @@ +/* If your arch needs to do custom stuff, create your own target_flat.h + * header file in linux-user// + */ +#define flat_argvp_envp_on_stack() 0 +#define flat_reloc_valid(reloc, size) ((reloc) <=3D= (size)) +#define flat_old_ram_flag(flag) (flag) +#define flat_get_relocate_addr(relval) (relval) +#define flat_get_addr_from_rp(rp, relval, flags, persistent) (rp) +#define flat_set_persistent(relval, persistent) (*persistent) +#define flat_put_addr_at_rp(rp, addr, relval) put_user_ual(= addr, rp) --=20 2.11.0