From patchwork Thu Mar 30 13:18:52 2023 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: 668608 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp931414wrt; Thu, 30 Mar 2023 06:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1j0UFJg5/HfqGWpjwztK3/RN0MaoEnLNuROxEz0AEXZQqRv0qjc72mh9feYDszDceyafp X-Received: by 2002:a05:622a:1cb:b0:3e4:e2ee:7e5a with SMTP id t11-20020a05622a01cb00b003e4e2ee7e5amr27383175qtw.42.1680182409895; Thu, 30 Mar 2023 06:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680182409; cv=none; d=google.com; s=arc-20160816; b=g83kcqhtL25TOCSaDAti6euiC9IjCQ3XyPEmRfGKJPWkisECQrj4969KjU7vVc43K4 JqU/DB0dsXdmKR4HWYU3ADDu3gSSIf8xJ89ybRuZZfyuL1OnTj3uICJgDQdC7SFnjgV0 8QCv52E2irVGEHFkNZm/pFrGYxp+BtUcgVkY2rf2WYk8+NYd5q48iOiBJ0WUn8w4QxP9 47EZmDmkn6l6qUKOabF2k4MdTDcDBFLy9ZY/GPSuODhi7sFbD8wpuxtyzs/OuaLh1iBA pdf2ePuI9B44H1RuT/MlJNTSQrFuZ5LcbKMLvWqQhYn76hTi+OCkoUqjxO+QqvjusxIM zHOw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=axrHquqovWXKFS7KB8MYvz9UzlI4SX5HVDnd0tPE70gWu/z205ZWJS5BJ9e9aT9KNk yNlWRwcfg5FO7S27BnMIeh2Y+hYaomhI7ncIGQBlyoXV9YxBxPZ1DfzIBnW4avZcNlYI 5zKHpVmHgdFszrwQNf0/Z2gA61DxCm8o+q4KXdTwIvtxPeP8LZ+5cdd1yISNXmcXuYhx JlsPjaYm7tyxPq0ZX3JFZ9O4Sc8Nb0nuGe0O0ZGLZMMmJuNE8GllzYuI4gPySlpieL2k nqalvSLhU3IPQXpu9DZJcqHoz7uWIEBHUD/xOUllHVPkEe//6/UOLiYw6Ea6PYMYULn6 GelQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WsXDiTkt; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f11-20020a05622a104b00b003b9f89d2720si25577546qte.88.2023.03.30.06.20.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:20:09 -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=WsXDiTkt; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBX-0007sj-1K; Thu, 30 Mar 2023 09:19:24 -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 1phsBM-0007hC-0V for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBK-00020w-Cj for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:11 -0400 Received: by mail-wm1-x32f.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso13429430wms.1 for ; Thu, 30 Mar 2023 06:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182349; 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=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=WsXDiTktmk/x41KB1TLDuc2UN+WEKkNuKpNzpyrcegs/PMRqhEnQwR6bvKtZQTFZ6L 3ayKX0iuzhaH6wN9ODzjx4RfhZO1rX0BUI55mZatdlJUVjqfTYBqZ5KcQ/LXoiTjJBlP Kra1a8Ummq46NMQw20llMMBonr5WNlxulMxY36nio/Q/WI0Cnw21FX0k/1ZEYpHDl4QS Bp7M9G236Zbu68G1OWtA3Rlg2AFqfflt+KSM/vZDkGs0Z+dJou0Y25aBy6iPsdouy4u7 VdlmabvjMR9iW0GgHngeRoN1VKWkadiWr4kaT5/vqQe5RbKqflaovkIpBeyIqbfrBAzh jK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182349; 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=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=Zn3V7DboXHRTH32hJ+Gl3FyOSAkoZZMck7kfyHZqRHmLIDjjO1KtHm7gdWqvKMlHKr XXvHbryQxAuq8ceH66XmyC1viFeEhU+sMJjJ7bAFuf7BS1X+JYfaI3Y534t6ldisLeeP 2NogwW20xLn9y8f/m+mc0d/NnUhHVqrTgY3zQYW325lMrHn770bWAgGWBnDgph0kJkAZ Zw0f6IJdIVmeFr/PZY9wiLU0ObRNkDmDO0tCNz4hFOv+cn1ztMugcEAe8aevH7ujuQgp DP83eY4CdshYe/45aE8I1bclsRl4SNh+kjoKt5xgkqek6N2XQXA2C0o/h/uJL3ad3T6R /AeQ== X-Gm-Message-State: AO0yUKU1itWZrFD4eCyHxwOjwQ6Rg8drbNtqtRabCvXwLZCUWOflo9mJ 3MAtxZpwYbGn5v1E+cTB8ZqglQ563xYTafzdT64= X-Received: by 2002:a05:600c:22cd:b0:3eb:29fe:7343 with SMTP id 13-20020a05600c22cd00b003eb29fe7343mr17152558wmg.33.1680182348879; Thu, 30 Mar 2023 06:19:08 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y26-20020a1c4b1a000000b003ef62deb830sm5816581wma.25.2023.03.30.06.19.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 2/6] linux-user/mips: Use P5600 as default CPU to run NaN2008 ELF binaries Date: Thu, 30 Mar 2023 15:18:52 +0200 Message-Id: <20230330131856.94210-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 Per the release 6.06 revision history: 5.03 August 21, 2013 • ABS2008 and NAN2008 fields of Table 5.7 “FCSR RegisterField Descriptions” were optional in release 3 and could be R/W, but as of release 5 are required, read-only, and preset by hardware. The P5600 core implements the release 5, and has the ABS2008 and NAN2008 bits set in CP1_fcr31. Therefore it is able to run ELF binaries compiled with EF_MIPS_NAN2008, such the CIP United Debian NaN2008 distribution: http://repo.oss.cipunited.com/mipsel-nan2008/README.txt In order to run such compiled binaries, select by default the P5600 core when the ELF 'MIPS_NAN2008' flag is set. Reported-by: Jiaxun Yang Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Laurent Vivier Message-Id: <20230327162444.388-1-philmd@linaro.org> --- linux-user/mips/target_elf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index a98c9bd6ad..b965e86b2b 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -15,6 +15,9 @@ static inline const char *cpu_get_model(uint32_t eflags) if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) { return "R5900"; } + if (eflags & EF_MIPS_NAN2008) { + return "P5600"; + } return "24Kf"; } #endif