From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 958D7C4361B for ; Thu, 17 Dec 2020 17:37:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D958B23426 for ; Thu, 17 Dec 2020 17:37:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D958B23426 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nocrew.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpxD7-0002IL-Q1 for qemu-devel@archiver.kernel.org; Thu, 17 Dec 2020 12:37:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpwxS-0006YG-OV for qemu-devel@nongnu.org; Thu, 17 Dec 2020 12:20:54 -0500 Received: from ste-pvt-msa2.bahnhof.se ([213.80.101.71]:20053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpwxQ-0006zq-Hj for qemu-devel@nongnu.org; Thu, 17 Dec 2020 12:20:54 -0500 Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id 738FA3F655; Thu, 17 Dec 2020 18:20:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JsaQYzt0WxEy; Thu, 17 Dec 2020 18:20:25 +0100 (CET) Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id BB8EA3F59B; Thu, 17 Dec 2020 18:20:24 +0100 (CET) Date: Thu, 17 Dec 2020 18:20:45 +0100 From: Fredrik Noring To: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Subject: Re: [PATCH 2/4] linux-user/mips64: Support o32 ABI syscalls Message-ID: References: <20201119161710.1985083-1-f4bug@amsat.org> <20201119161710.1985083-3-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: softfail client-ip=213.80.101.71; envelope-from=noring@nocrew.org; helo=ste-pvt-msa2.bahnhof.se X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Maciej W. Rozycki" , Richard Henderson , Laurent Vivier , Aurelien Jarno , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Dec 17, 2020 at 05:10:24PM +0100, Philippe Mathieu-Daudé wrote: > On 12/17/20 11:40 AM, Laurent Vivier wrote: > > Le 19/11/2020 à 17:17, Philippe Mathieu-Daudé a écrit : > >> o32 ABI syscalls start at offset 4000. > >> > >> Signed-off-by: Philippe Mathieu-Daudé > >> --- > >> linux-user/mips64/syscall_nr.h | 5 ++++- > >> 1 file changed, 4 insertions(+), 1 deletion(-) > >> > >> diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h > >> index 672f2fa51cb..6579421fa63 100644 > >> --- a/linux-user/mips64/syscall_nr.h > >> +++ b/linux-user/mips64/syscall_nr.h > >> @@ -1,4 +1,7 @@ > >> -#ifdef TARGET_ABI_MIPSN32 > >> +#if defined(TARGET_ABI_MIPSO32) > >> +#define TARGET_SYSCALL_OFFSET 4000 > > > > The value of the offset is hardcoded in linux-user/mips/meson.build, so either you remove > > TARGET_SYSCALL_OFFSET here or you update meson.build to use it. > > I don't understand what this Meson rule does, as this > doesn't work without this patch... > > You can download PS2 64-bit O32 binaries from 2002 (before > the official MIPS TLS ABI) there: > https://sourceforge.net/projects/kernelloader/files/ These look rather like 128 bits, as there are R5900 MMIs. For instance, one can find LQ, SQ, PEXTLB, PEXTLW and so on in /lib/ld.so in ps2linux_live_v5_pal_netsurf_usb.7z. There may be other surprises. R5900 Linux 2.x kernels are not IEEE 754 compatible, as opposed to both 5.x kernels and QEMU, for instance. I would suggest compiling tests with a recent GCC. Fredrik