target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs
authorLeon Alrae <leon.alrae@imgtec.com>
Wed, 24 Feb 2016 10:47:10 +0000 (10:47 +0000)
committerLeon Alrae <leon.alrae@imgtec.com>
Wed, 23 Mar 2016 13:36:55 +0000 (13:36 +0000)
commitba5c79f26221c0fd7139c883a34a4e75d993f732
tree89fdd4d5eb8e135b8f78f5ad34a78c622f25f6d3
parentffa6564c9b13cea4b704e184d29d721f2cb061bb
target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs

MIPS Release 6 and MIPS SIMD Architecture make it mandatory to have IEEE
754-2008 FPU which is indicated by CP1 FIR.HAS2008, FCSR.ABS2008 and
FCSR.NAN2008 bits set to 1.

In QEMU we still keep these bits cleared as there is no 2008-NaN support.
However, this now causes problems preventing from running R6 Linux with
the v4.5 kernel. Kernel refuses to execute 2008-NaN ELFs on a CPU
whose FPU does not support 2008-NaN encoding:

  (...)
  VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
  devtmpfs: mounted
  Freeing unused kernel memory: 256K (ffffffff806f0000 - ffffffff80730000)
  request_module: runaway loop modprobe binfmt-464c
  Starting init: /sbin/init exists but couldn't execute it (error -8)
  request_module: runaway loop modprobe binfmt-464c
  Starting init: /bin/sh exists but couldn't execute it (error -8)
  Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

Therefore always indicate presence of 2008-NaN support in R6 as well as in
R5+MSA CPUs, even though this feature is not yet supported by MIPS in QEMU.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
target-mips/cpu.h
target-mips/translate.c
target-mips/translate_init.c