From patchwork Mon Mar 27 16:24:44 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: 667399 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp1192957wrt; Mon, 27 Mar 2023 09:25:05 -0700 (PDT) X-Google-Smtp-Source: AK7set+TX2cGzIkGZKYtRuwQyej1LzBFLYpft0dzY5oxIi1Ge8xVCJNX+Uti2cSkhmctcYxsCkdC X-Received: by 2002:a05:622a:24a:b0:3e3:93f9:1907 with SMTP id c10-20020a05622a024a00b003e393f91907mr20492756qtx.40.1679934305072; Mon, 27 Mar 2023 09:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679934305; cv=none; d=google.com; s=arc-20160816; b=O8kWE/siOIIvrC3dcWGO70gfrtudnbQfe65QSg/JxDdtcpu6pi7RuBNrmERlCQGSIp tezhJ9UtliaNCji5MW8bqEpVWNPOjRimx1UNAnBw7z6RRaOmgyAmlx3XZaXzzsQLWfWU ayles1Jpr9hej7CJULcKuRRwOT4G6uumizh4Vnbntapjkv8KpoFJt+2Ial2ilBf+rUEU lqNFnZPHfohhlAvFfUGd5Sbmkl3dysNa9bhEDSLxKvh9MQ7iCw0sG5yWNz920tMg3GW4 S5qyGHScvCOlIMAWaLvsW9vwkmFQbH30vxqZ5V+xoZld085XPwIgXZpPNU4DcIs060ye t0qg== 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=+WTJHwJEid8pCJpVjxqSEGg9967iqK/eIFWgdQyH0NU=; b=Uo7rc55IBpN3SDIF5U6lnA+jBMP9vjwLNx65zD6c+M2/+J/0POpuRaPvtUWbWbctQ4 PpFSBVScFRMQFRevccoAM+E5j4y441aWFd0Jwh99dwdBSsYXSfMlY3JcgAlDA0BOdyOa Fdu6EwM4Be9Zr0JeyvJGZLm2w4Y1BitEqPGotGKgtb8bhqEwZ8OgRDtSbeHkd+jrgIV7 Yzo/ZskIfJmc7iOyBWs7LMfo26NHlPn7QExwlgt7ZMjhQ5igAtHnX8jGs2AvygV8kD7A ZoKOW4GQtkSm4wzoQPpELDwchxYv+tHAO6hFgoi9dvY97/xc5q2gZcfK836OfJ3XM8bP qsvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dbh/G2wv"; 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 c22-20020ac85a96000000b003d382f66917si17973300qtc.674.2023.03.27.09.25.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Mar 2023 09:25:05 -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="dbh/G2wv"; 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 1pgpeP-0003ty-N5; Mon, 27 Mar 2023 12:24:53 -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 1pgpeN-0003tg-93 for qemu-devel@nongnu.org; Mon, 27 Mar 2023 12:24:51 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgpeK-0002jf-NP for qemu-devel@nongnu.org; Mon, 27 Mar 2023 12:24:50 -0400 Received: by mail-wr1-x435.google.com with SMTP id l27so9421957wrb.2 for ; Mon, 27 Mar 2023 09:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679934287; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+WTJHwJEid8pCJpVjxqSEGg9967iqK/eIFWgdQyH0NU=; b=dbh/G2wv349+jGRdva5YFhWDgk6AKiwDSO1MuDXBWF+4c0u9GEJAUq9AJeVzVx3aZN Jhj5o5ASuHj5BAXSoh9gCghyr87Vno/HWBGO75U4+dpSP4dgq0AATO4MZPF/dcsCTw26 Ya4f0cG3jDOCbl9PjfhI8ajViFx5vBFdXVgb1fxPsU4ZNohaZBOYguQRv+oGDicNW8/8 cMnuumDNzQYkB2yrefmFu3Ls3VRKOcYGYADdMSKV0nh0Tr7nLynh7IKo8NC5CcWXhyZM Hq5lNzQLRKICRsZpLNjd3llpPhxkvJQ/nP8CxXnfRHkvagXTEsQd+1EfFvutdkD1nDEY lZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679934287; 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=+WTJHwJEid8pCJpVjxqSEGg9967iqK/eIFWgdQyH0NU=; b=f7qMUfDOIgbBX/hHiTwPabp4BTnVGH+8sgc+IoKigmiNevWJ+/dBLERIgU422sM4vI TQjTC452R2ZlLk5fM/l9jjd4JAejjwh3kJCvOPdvSApDUby168TYr5JGfeEio56e9oDk c6WHn9wDkqpkS0NFQkARUelqambtDuiQ7T5Tr/AN92y4ysLC71+YJgjo1f9IRgGoZOFo vfNnSsU26E+4wfdiEgr43dQMBWXpv+pPfq6yD/RDxKOdscP2LyMhoVwHBWCWhYWTgdRB mzWr7uJASYuBmnbUug7TbrOaT+wp9kt3U1JYI4X09gMFfqSLPPGxLiVxMKjhxv1VlG/4 Ia5Q== X-Gm-Message-State: AAQBX9dtZy/Uex5S5LXY0QQrqVjr+5HbUOxNnrLhddZCQSwAnNJyDjiA woVZfcdz0VlGPjS03AodR/GvKMv5wodXdF+YpSc= X-Received: by 2002:a5d:6082:0:b0:2cf:e70a:ad9e with SMTP id w2-20020a5d6082000000b002cfe70aad9emr9010655wrt.46.1679934286932; Mon, 27 Mar 2023 09:24:46 -0700 (PDT) Received: from localhost.localdomain (4be54-h02-176-184-9-157.dsl.sta.abo.bbox.fr. [176.184.9.157]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6082000000b002c6d0462163sm25352020wrt.100.2023.03.27.09.24.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Mar 2023 09:24:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: YunQiang Su , Jiaxun Yang , Jue Wang , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0] linux-user/mips: Use P5600 as default CPU to run NaN2008 ELF binaries Date: Mon, 27 Mar 2023 18:24:44 +0200 Message-Id: <20230327162444.388-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 --- 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