From patchwork Sat Oct 20 01:46:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 987111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VEGw8zpn"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42cQd602Q1z9sDX for ; Sat, 20 Oct 2018 12:47:04 +1100 (AEDT) Received: from localhost ([::1]:53342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDgLy-0000dL-0C for incoming@patchwork.ozlabs.org; Fri, 19 Oct 2018 21:46:58 -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) 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) 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) 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" - 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=xtensa + bflt="yes" mttcg="yes" target_compiler=$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 @@ #include "qemu.h" #include "flat.h" -#include "target_flat.h" +#include //#define DEBUG diff --git a/linux-user/xtensa/target_flat.h b/linux-user/xtensa/target_flat.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) <= (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)