From baead642970602ec5ec935fc8e3653b5fa5f22fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 28 Dec 2022 20:10:41 +0000 Subject: linux-user/sparc: Don't use 16-bit UIDs on SPARC V9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 64-bit SPARC V9 syscall ABI uses 32-bit UIDs. Only enable the 16-bit UID wrappers for 32-bit SPARC (V7 and V8). Possibly missed in commit 992f48a036 ("Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)"). Reported-by: Gregor Riepl Tested-by: John Paul Adrian Glaubitz Tested-by: Zach van Rijn Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1394 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Laurent Vivier Message-Id: <20230327131910.78564-1-philmd@linaro.org> --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 614a1cb..cc37054 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -61,7 +61,7 @@ #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \ || (defined(TARGET_ARM) && defined(TARGET_ABI32)) \ - || defined(TARGET_SPARC) \ + || (defined(TARGET_SPARC) && defined(TARGET_ABI32)) \ || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS) /* 16 bit uid wrappers emulation */ #define USE_UID16 -- cgit v1.1 From 450cb7ec2c5fda51b9650ca25e59ac9deeb60d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 15 Mar 2023 08:39:23 +0100 Subject: linux-user/mips: Use P5600 as default CPU to run NaN2008 ELF binaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(+) (limited to 'linux-user') diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index a98c9bd..b965e86 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 -- cgit v1.1