OSDN Git Service

qmiga/qemu.git
6 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180301' into...
Peter Maydell [Thu, 1 Mar 2018 15:37:31 +0000 (15:37 +0000)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180301' into staging

target-arm queue:
 * update MAINTAINERS for Alistair's new email address
 * add Arm v8.2 FP16 arithmetic extension for linux-user
 * implement display connector emulation for vexpress board
 * xilinx_spips: Enable only two slaves when reading/writing with stripe
 * xilinx_spips: Use 8 dummy cycles with the QIOR/QIOR4 commands
 * hw: register: Run post_write hook on reset

# gpg: Signature made Thu 01 Mar 2018 11:22:46 GMT
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180301: (42 commits)
  MAINTAINERS: Update my email address
  linux-user: Report AArch64 FP16 support via hwcap bits
  target/arm: Enable ARM_V8_FP16 feature bit for the AArch64 "any" CPU
  arm/translate-a64: add all single op FP16 to handle_fp_1src_half
  arm/translate-a64: implement simd_scalar_three_reg_same_fp16
  arm/translate-a64: add all FP16 ops in simd_scalar_pairwise
  arm/translate-a64: add FP16 FMOV to simd_mod_imm
  arm/translate-a64: add FP16 FRSQRTE to simd_two_reg_misc_fp16
  arm/helper.c: re-factor rsqrte and add rsqrte_f16
  arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 FRCPX to simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 FRECPE
  arm/helper.c: re-factor recpe and add recepe_f16
  arm/translate-a64: add FP16 FNEG/FABS to simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 SCVTF/UCVFT to simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 FCMxx (zero) to simd_two_reg_misc_fp16
  arm/translate-a64: add FCVTxx to simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 FPRINTx to simd_two_reg_misc_fp16
  arm/translate-a64: initial decode for simd_two_reg_misc_fp16
  arm/translate-a64: add FP16 x2 ops for simd_indexed
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging
Peter Maydell [Thu, 1 Mar 2018 12:32:31 +0000 (12:32 +0000)]
Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging

Block patches 2018-03-01

Coverity fixes for nvme://

# gpg: Signature made Thu 01 Mar 2018 07:24:24 GMT
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/staging-pull-request:
  block/nvme: fix Coverity reports

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging
Peter Maydell [Thu, 1 Mar 2018 11:50:51 +0000 (11:50 +0000)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging

qemu-sparc update

# gpg: Signature made Tue 27 Feb 2018 19:03:28 GMT
# gpg:                using RSA key 5BC2C56FAE0F321F
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-sparc-signed:
  loader: don't perform overlapping address check for memory region ROM images

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMAINTAINERS: Update my email address
Alistair Francis [Thu, 1 Mar 2018 11:05:58 +0000 (11:05 +0000)]
MAINTAINERS: Update my email address

I am leaving Xilinx, so to avoid having an email address that bounces
update my maintainer address to point to my personal email address.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 7bb690382e3370aa1c1e047a84e36603c787ec0e.1519749987.git.alistair.francis@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agolinux-user: Report AArch64 FP16 support via hwcap bits
Peter Maydell [Thu, 1 Mar 2018 11:05:58 +0000 (11:05 +0000)]
linux-user: Report AArch64 FP16 support via hwcap bits

Set the appropriate Linux hwcap bits to tell the guest binary if we
have implemented half-precision floating point support.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
6 years agotarget/arm: Enable ARM_V8_FP16 feature bit for the AArch64 "any" CPU
Peter Maydell [Thu, 1 Mar 2018 11:05:58 +0000 (11:05 +0000)]
target/arm: Enable ARM_V8_FP16 feature bit for the AArch64 "any" CPU

Now we have implemented FP16 we can enable it for the "any" CPU.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[PMM: split out from an earlier patch in the series]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add all single op FP16 to handle_fp_1src_half
Alex Bennée [Thu, 1 Mar 2018 11:05:57 +0000 (11:05 +0000)]
arm/translate-a64: add all single op FP16 to handle_fp_1src_half

This includes FMOV, FABS, FNEG, FSQRT and  FRINT[NPMZAXI]. We re-use
existing helpers to achieve this.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-32-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: implement simd_scalar_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:57 +0000 (11:05 +0000)]
arm/translate-a64: implement simd_scalar_three_reg_same_fp16

This covers the encoding group:

  Advanced SIMD scalar three same FP16

As all the helpers are already there it is simply a case of calling the
existing helpers in the scalar context.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-31-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add all FP16 ops in simd_scalar_pairwise
Alex Bennée [Thu, 1 Mar 2018 11:05:56 +0000 (11:05 +0000)]
arm/translate-a64: add all FP16 ops in simd_scalar_pairwise

I only needed to do a little light re-factoring to support the
half-precision helpers.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-30-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FMOV to simd_mod_imm
Alex Bennée [Thu, 1 Mar 2018 11:05:56 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FMOV to simd_mod_imm

Only one half-precision instruction has been added to this group.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-29-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FRSQRTE to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:56 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FRSQRTE to simd_two_reg_misc_fp16

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-28-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/helper.c: re-factor rsqrte and add rsqrte_f16
Alex Bennée [Thu, 1 Mar 2018 11:05:55 +0000 (11:05 +0000)]
arm/helper.c: re-factor rsqrte and add rsqrte_f16

Much like recpe the ARM ARM has simplified the pseudo code for the
calculation which is done on a fixed point 9 bit integer maths. So
while adding f16 we can also clean this up to be a little less heavy
on the floating point and just return the fractional part and leave
the calle's to do the final packing of the result.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-27-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:55 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FSQRT to simd_two_reg_misc_fp16

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-26-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FRCPX to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:55 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FRCPX to simd_two_reg_misc_fp16

We go with the localised helper.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-25-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FRECPE
Alex Bennée [Thu, 1 Mar 2018 11:05:54 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FRECPE

Now we have added f16 during the re-factoring we can simply call the
helper.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-24-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/helper.c: re-factor recpe and add recepe_f16
Alex Bennée [Thu, 1 Mar 2018 11:05:54 +0000 (11:05 +0000)]
arm/helper.c: re-factor recpe and add recepe_f16

It looks like the ARM ARM has simplified the pseudo code for the
calculation which is done on a fixed point 9 bit integer maths. So
while adding f16 we can also clean this up to be a little less heavy
on the floating point and just return the fractional part and leave
the calle's to do the final packing of the result.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-23-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FNEG/FABS to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:54 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FNEG/FABS to simd_two_reg_misc_fp16

Neither of these operations alter the floating point status registers
so we can do a pure bitwise operation, either squashing any sign
bit (ABS) or inverting it (NEG).

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-22-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 SCVTF/UCVFT to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:54 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 SCVTF/UCVFT to simd_two_reg_misc_fp16

I've re-factored the handle_simd_intfp_conv helper to properly handle
half-precision as well as call plain conversion helpers when we are
not doing fixed point conversion.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-21-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FCMxx (zero) to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:53 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FCMxx (zero) to simd_two_reg_misc_fp16

I re-use the existing handle_2misc_fcmp_zero handler and tweak it
slightly to deal with the half-precision case.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-20-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FCVTxx to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:53 +0000 (11:05 +0000)]
arm/translate-a64: add FCVTxx to simd_two_reg_misc_fp16

This covers all the floating point convert operations.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-19-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FPRINTx to simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:53 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FPRINTx to simd_two_reg_misc_fp16

This adds the full range of half-precision floating point to integral
instructions.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-18-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: initial decode for simd_two_reg_misc_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:52 +0000 (11:05 +0000)]
arm/translate-a64: initial decode for simd_two_reg_misc_fp16

This actually covers two different sections of the encoding table:

   Advanced SIMD scalar two-register miscellaneous FP16
   Advanced SIMD two-register miscellaneous (FP16)

The difference between the two is covered by a combination of Q (bit
30) and S (bit 28). Notably the FRINTx instructions are only
available in the vector form.

This is just the decode skeleton which will be filled out by later
patches.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-17-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 x2 ops for simd_indexed
Alex Bennée [Thu, 1 Mar 2018 11:05:52 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 x2 ops for simd_indexed

A bunch of the vectorised bitwise operations just operate on larger
chunks at a time. We can do the same for the new half-precision
operations by introducing some TWOHALFOP helpers which work on each
half of a pair of half-precision operations at once.

Hopefully all this hoop jumping will get simpler once we have
generically vectorised helpers here.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-16-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FMULX/MLS/FMLA to simd_indexed
Alex Bennée [Thu, 1 Mar 2018 11:05:51 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FMULX/MLS/FMLA to simd_indexed

The helpers use the new re-factored muladd support in SoftFloat for
the float16 work.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20180227143852.11175-15-alex.bennee@linaro.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 pairwise ops simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:51 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 pairwise ops simd_three_reg_same_fp16

This includes FMAXNMP, FADDP, FMAXP, FMINNMP, FMINP.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-14-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FR[ECP/SQRT]S to simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:50 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FR[ECP/SQRT]S to simd_three_reg_same_fp16

As some of the constants here will also be needed
elsewhere (specifically for the upcoming SVE support) we move them out
to softfloat.h.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-13-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FMULA/X/S to simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:50 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FMULA/X/S to simd_three_reg_same_fp16

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-12-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 F[A]C[EQ/GE/GT] to simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:49 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 F[A]C[EQ/GE/GT] to simd_three_reg_same_fp16

These use the generic float16_compare functionality which in turn uses
the common float_compare code from the softfloat re-factor.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-11-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: add FP16 FADD/FABD/FSUB/FMUL/FDIV to simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:49 +0000 (11:05 +0000)]
arm/translate-a64: add FP16 FADD/FABD/FSUB/FMUL/FDIV to simd_three_reg_same_fp16

The fprintf is only there for debugging as the skeleton is added to,
it will be removed once the skeleton is complete.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-10-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: initial decode for simd_three_reg_same_fp16
Alex Bennée [Thu, 1 Mar 2018 11:05:48 +0000 (11:05 +0000)]
arm/translate-a64: initial decode for simd_three_reg_same_fp16

This is the initial decode skeleton for the Advanced SIMD three same
instruction group.

The fprintf is purely to aid debugging as the additional instructions
are added. It will be removed once the group is complete.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-9-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: handle_3same_64 comment fix
Alex Bennée [Thu, 1 Mar 2018 11:05:48 +0000 (11:05 +0000)]
arm/translate-a64: handle_3same_64 comment fix

We do implement all the opcodes.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-8-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/translate-a64: implement half-precision F(MIN|MAX)(V|NMV)
Alex Bennée [Thu, 1 Mar 2018 11:05:48 +0000 (11:05 +0000)]
arm/translate-a64: implement half-precision F(MIN|MAX)(V|NMV)

This implements the half-precision variants of the across vector
reduction operations. This involves a re-factor of the reduction code
which more closely matches the ARM ARM order (and handles 8 element
reductions).

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-7-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/arm/helper: pass explicit fpst to set_rmode
Alex Bennée [Thu, 1 Mar 2018 11:05:47 +0000 (11:05 +0000)]
target/arm/helper: pass explicit fpst to set_rmode

As the rounding mode is now split between FP16 and the rest of
floating point we need to be explicit when tweaking it. Instead of
passing the CPU env we now pass the appropriate fpst pointer directly.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-6-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/arm/cpu.h: add additional float_status flags
Alex Bennée [Thu, 1 Mar 2018 11:05:47 +0000 (11:05 +0000)]
target/arm/cpu.h: add additional float_status flags

Half-precision flush to zero behaviour is controlled by a separate
FZ16 bit in the FPCR. To handle this we pass a pointer to
fp_status_fp16 when working on half-precision operations. The value of
the presented FPCR is calculated from an amalgam of the two when read.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-5-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/arm/cpu.h: update comment for half-precision values
Alex Bennée [Thu, 1 Mar 2018 11:05:47 +0000 (11:05 +0000)]
target/arm/cpu.h: update comment for half-precision values

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-4-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/arm/cpu64: introduce ARM_V8_FP16 feature bit
Alex Bennée [Thu, 1 Mar 2018 11:05:47 +0000 (11:05 +0000)]
target/arm/cpu64: introduce ARM_V8_FP16 feature bit

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-3-alex.bennee@linaro.org
[PMM: postpone actually enabling feature until end of the
 patch series]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoinclude/exec/helper-head.h: support f16 in helper calls
Alex Bennée [Thu, 1 Mar 2018 11:05:46 +0000 (11:05 +0000)]
include/exec/helper-head.h: support f16 in helper calls

This allows us to explicitly pass float16 to helpers rather than
assuming uint32_t and dealing with the result. Of course they will be
passed in i32 sized registers by default.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180227143852.11175-2-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoarm/vexpress: Add proper display connector emulation
Linus Walleij [Thu, 1 Mar 2018 11:05:46 +0000 (11:05 +0000)]
arm/vexpress: Add proper display connector emulation

This adds the SiI9022 (and implicitly EDID I2C) device to the ARM
Versatile Express machine, and selects the two I2C devices necessary
in the arm-softmmu.mak configuration so everything will build
smoothly.

I am implementing proper handling of the graphics in the Linux
kernel and adding proper emulation of SiI9022 and EDID makes the
driver probe as nicely as before, retrieving the resolutions
supported by the "QEMU monitor" and overall just working nice.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-6-linus.walleij@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/sii9022: Add support for Silicon Image SII9022
Linus Walleij [Thu, 1 Mar 2018 11:05:45 +0000 (11:05 +0000)]
hw/sii9022: Add support for Silicon Image SII9022

This adds support for emulating the Silicon Image SII9022 DVI/HDMI
bridge. It's not very clever right now, it just acknowledges
the switch into DDC I2C mode and back. Combining this with the
existing DDC I2C emulation gives the right behavior on the Versatile
Express emulation passing through the QEMU EDID to the emulated
platform.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-5-linus.walleij@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: explictly reset ddc_req/ddc_skip_finish/ddc]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/i2c-ddc: Do not fail writes
Linus Walleij [Thu, 1 Mar 2018 11:05:45 +0000 (11:05 +0000)]
hw/i2c-ddc: Do not fail writes

The tx function of the DDC I2C slave emulation was returning 1
on all writes resulting in NACK in the I2C bus. Changing it to
0 makes the DDC I2C work fine with bit-banged I2C such as the
versatile I2C.

I guess it was not affecting whatever I2C controller this was
used with until now, but with the Versatile I2C it surely
does not work.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-4-linus.walleij@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoi2c: Move the bus class to i2c.h
Corey Minyard [Thu, 1 Mar 2018 11:05:45 +0000 (11:05 +0000)]
i2c: Move the bus class to i2c.h

Some devices need access to it.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-3-linus.walleij@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoi2c: Fix some brace style issues
Corey Minyard [Thu, 1 Mar 2018 11:05:44 +0000 (11:05 +0000)]
i2c: Fix some brace style issues

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Message-id: 20180227104903.21353-2-linus.walleij@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoxilinx_spips: Use 8 dummy cycles with the QIOR/QIOR4 commands
Francisco Iglesias [Thu, 1 Mar 2018 11:05:44 +0000 (11:05 +0000)]
xilinx_spips: Use 8 dummy cycles with the QIOR/QIOR4 commands

Use 8 dummy cycles (4 dummy bytes) with the QIOR/QIOR4 commands in legacy mode
for matching what is expected by Micron (Numonyx) flashes (the default target
flash type of the QSPI).

Signed-off-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180223232233.31482-3-frasse.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoxilinx_spips: Enable only two slaves when reading/writing with stripe
Francisco Iglesias [Thu, 1 Mar 2018 11:05:44 +0000 (11:05 +0000)]
xilinx_spips: Enable only two slaves when reading/writing with stripe

Assert only the lower cs on bus 0 and upper cs on bus 1 when both buses and
chip selects are enabled (e.g reading/writing with stripe).

Signed-off-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180223232233.31482-2-frasse.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw: register: Run post_write hook on reset
Alistair Francis [Thu, 1 Mar 2018 11:05:43 +0000 (11:05 +0000)]
hw: register: Run post_write hook on reset

Ensure that the post write hook is called during reset. This allows us
to rely on the post write functions instead of having to call them from
the reset() function.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: d131e24b911653a945e46ca2d8f90f572469e1dd.1517856214.git.alistair.francis@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-02-21-2' into...
Peter Maydell [Thu, 1 Mar 2018 10:13:21 +0000 (10:13 +0000)]
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-02-21-2' into staging

Merge tpm 2018/02/21 v2

# gpg: Signature made Tue 27 Feb 2018 13:50:28 GMT
# gpg:                using RSA key 75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* remotes/stefanberger/tags/pull-tpm-2018-02-21-2:
  tests: add test for TPM TIS device
  tests: Move common TPM test code into tpm-emu.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoblock/nvme: fix Coverity reports
Paolo Bonzini [Tue, 13 Feb 2018 01:52:40 +0000 (09:52 +0800)]
block/nvme: fix Coverity reports

1) string not null terminated in sysfs_find_group_file

2) NULL pointer dereference and dead local variable in nvme_init.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180213015240.9352-1-famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
6 years agoloader: don't perform overlapping address check for memory region ROM images
Mark Cave-Ayland [Fri, 23 Feb 2018 11:10:17 +0000 (11:10 +0000)]
loader: don't perform overlapping address check for memory region ROM images

All memory region ROM images have a base address of 0 which causes the overlapping
address check to fail if more than one memory region ROM image is present, or an
existing ROM image is loaded at address 0.

Make sure that we ignore the overlapping address check in
rom_check_and_register_reset() if this is a memory region ROM image. In particular
this fixes the "rom: requested regions overlap" error on startup when trying to
run qemu-system-sparc with a -kernel image since commit 7497638642: "tcx: switch to
load_image_mr() and remove prom_addr hack".

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/usb-20180227-pull-request' into...
Peter Maydell [Tue, 27 Feb 2018 17:50:46 +0000 (17:50 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180227-pull-request' into staging

usb: add mtp write support.

# gpg: Signature made Tue 27 Feb 2018 08:39:01 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20180227-pull-request:
  usb-mtp: Advertise SendObjectInfo for write support
  usb-mtp: Introduce write support for MTP objects
  usb-mtp: Support delete of mtp objects
  usb-mtp: print parent path in IN_IGNORED trace fn
  usb-mtp: Add one more argument when building results

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/vga-20180227-pull-request' into...
Peter Maydell [Tue, 27 Feb 2018 14:01:19 +0000 (14:01 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180227-pull-request' into staging

virtio-gpu: add support for second capability set

# gpg: Signature made Tue 27 Feb 2018 07:30:31 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20180227-pull-request:
  virtio-gpu-3d: add support for second capability set (v4)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request...
Peter Maydell [Tue, 27 Feb 2018 10:14:31 +0000 (10:14 +0000)]
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging

# gpg: Signature made Sun 25 Feb 2018 17:54:21 GMT
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-2.12-pull-request:
  linux-user: MIPS set cpu to r6 CPU if binary is R6
  linux-user, m68k: select CPU according to ELF header values
  linux-user: introduce functions to detect CPU type
  linux-user: Move CPU type name selection to a function

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agovirtio-gpu-3d: add support for second capability set (v4)
Dave Airlie [Fri, 23 Feb 2018 02:38:14 +0000 (12:38 +1000)]
virtio-gpu-3d: add support for second capability set (v4)

Due to a kernel bug we can never increase the size of capability
set 1, so introduce a new capability set in parallel, old userspace
will continue to use the old set, new userspace will start using
the new one when it detects a fixed kernel.

v2: don't use a define from virglrenderer, just probe it.
v3: fix compilation when virglrenderer disabled
v4: fix style warning, just use ?: op instead.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Message-id: 20180223023814.24459-1-airlied@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agousb-mtp: Advertise SendObjectInfo for write support
Bandan Das [Fri, 23 Feb 2018 16:48:29 +0000 (11:48 -0500)]
usb-mtp: Advertise SendObjectInfo for write support

This patch implements a dummy ObjectInfo structure so that
it's easy to typecast the incoming data. If the metadata is
valid, write_pending is set. Also, the incoming filename
is utf-16, so, instead of depending on external libraries, just
implement a simple function to get the filename

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-6-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agousb-mtp: Introduce write support for MTP objects
Bandan Das [Fri, 23 Feb 2018 16:48:28 +0000 (11:48 -0500)]
usb-mtp: Introduce write support for MTP objects

Allow write operations on behalf of the initiator. The
precursor to write is the sending of the write metadata
that consists of the ObjectInfo dataset. This patch introduces
a flag that is set when the responder is ready to receive
write data based on a previous SendObjectInfo operation by
the initiator (The SendObjectInfo implementation is in a
later patch)

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-5-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agousb-mtp: Support delete of mtp objects
Bandan Das [Fri, 23 Feb 2018 16:48:27 +0000 (11:48 -0500)]
usb-mtp: Support delete of mtp objects

Write of existing objects by the initiator is acheived by
making a temporary buffer with the new changes, deleting the
old file and then writing a new file with the same name.

Also, add a "readonly" property which needs to be set to false
for deletion to work.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-4-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agousb-mtp: print parent path in IN_IGNORED trace fn
Bandan Das [Fri, 23 Feb 2018 16:48:26 +0000 (11:48 -0500)]
usb-mtp: print parent path in IN_IGNORED trace fn

Fix a possible null dereference when deleting a folder and
its contents. An ignored event might be received for its contents
after the parent folder is deleted which will return a null object.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-3-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agousb-mtp: Add one more argument when building results
Bandan Das [Fri, 23 Feb 2018 16:48:25 +0000 (11:48 -0500)]
usb-mtp: Add one more argument when building results

The response to a SendObjectInfo consists of the storageid,
parent obejct handle and the handle reserved for the new
incoming object

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-2-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 years agolinux-user: MIPS set cpu to r6 CPU if binary is R6
YunQiang Su [Tue, 20 Feb 2018 17:33:07 +0000 (18:33 +0100)]
linux-user: MIPS set cpu to r6 CPU if binary is R6

So here we need to detect the version of binaries and set
cpu_model for it.

Signed-off-by: YunQiang Su <syq@debian.org>
[lv: original patch modified to move code into cpu_get_model()]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180220173307.25125-5-laurent@vivier.eu>

6 years agolinux-user, m68k: select CPU according to ELF header values
Laurent Vivier [Tue, 20 Feb 2018 17:33:06 +0000 (18:33 +0100)]
linux-user, m68k: select CPU according to ELF header values

M680x0 doesn't support the same set of instructions
as ColdFire, so we can't use "any" CPU type to execute
m68020 instructions.
We select CPU type ("m68040" or "any" for ColdFire)
according to the ELF header. If we can't, we
use by default the value used until now: "any".

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180220173307.25125-4-laurent@vivier.eu>

6 years agolinux-user: introduce functions to detect CPU type
YunQiang Su [Tue, 20 Feb 2018 17:33:05 +0000 (18:33 +0100)]
linux-user: introduce functions to detect CPU type

Add a function to return ELF e_flags and use it
to select the CPU model.

Signed-off-by: YunQiang Su <syq@debian.org>
[lv: split the patch and some cleanup in get_elf_eflags()]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180220173307.25125-3-laurent@vivier.eu>

6 years agolinux-user: Move CPU type name selection to a function
Laurent Vivier [Tue, 20 Feb 2018 17:33:04 +0000 (18:33 +0100)]
linux-user: Move CPU type name selection to a function

Instead of a sequence of "#if ... #endif" move the
selection to a function in linux-user/*/target_elf.h

We can't add them in linux-user/*/target_cpu.h
because we will need to include "elf.h" to
use ELF flags with eflags, and including
"elf.h" in "target_cpu.h" introduces some
conflicts in elfload.c

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180220173307.25125-2-laurent@vivier.eu>

6 years agomaintainers: Add myself as a OpenBSD maintainer
Brad Smith [Fri, 16 Feb 2018 16:46:20 +0000 (11:46 -0500)]
maintainers: Add myself as a OpenBSD maintainer

Add myself as an OpenBSD maintainer and add OpenBSD as maintained.

Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Kamil Rytarowski <n54@gmx.com>
Message-id: 20180216164620.GA53727@humpty.home.comstyle.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/rth/tags/pull-decode-20180222' into staging
Peter Maydell [Fri, 23 Feb 2018 10:05:07 +0000 (10:05 +0000)]
Merge remote-tracking branch 'remotes/rth/tags/pull-decode-20180222' into staging

Add decodetree.py

# gpg: Signature made Thu 22 Feb 2018 23:44:43 GMT
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-decode-20180222:
  scripts: Add decodetree.py

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoscripts: Add decodetree.py
Richard Henderson [Thu, 7 Dec 2017 20:44:09 +0000 (12:44 -0800)]
scripts: Add decodetree.py

To be used to decode ARM SVE, but could be used for any fixed-width ISA.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180222' into...
Peter Maydell [Thu, 22 Feb 2018 15:41:24 +0000 (15:41 +0000)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180222' into staging

 * New "raspi3" machine emulating RaspberryPi 3
 * Fix bad register definitions for VMIDR and VMPIDR (which caused
   assertions for 64-bit guest CPUs with EL2 on big-endian hosts)
 * hw/char/stm32f2xx_usart: fix TXE/TC bit handling
 * Fix ast2500 protection register emulation
 * Lots of SD card emulation cleanups and bugfixes

# gpg: Signature made Thu 22 Feb 2018 15:18:53 GMT
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180222: (32 commits)
  sdcard: simplify SD_SEND_OP_COND (ACMD41)
  sdcard: simplify SEND_IF_COND (CMD8)
  sdcard: warn if host uses an incorrect address for APP CMD (CMD55)
  sdcard: check the card is in correct state for APP CMD (CMD55)
  sdcard: handles more commands in SPI mode
  sdcard: use a more descriptive label 'unimplemented_spi_cmd'
  sdcard: handle the Security Specification commands
  sdcard: handle CMD54 (SDIO)
  sdcard: use the registerfields API for the CARD_STATUS register masks
  sdcard: use the correct masked OCR in the R3 reply
  sdcard: simplify using the ldst API
  sdcard: remove commands from unsupported old MMC specification
  sdcard: clean the SCR register and add few comments
  sdcard: fix the 'maximum data transfer rate' to 25MHz
  sdcard: update the CSD CRC register regardless the CSD structure version
  sdcard: Don't always set the high capacity bit
  sdcard: use the registerfields API to access the OCR register
  sdcard: use G_BYTE from cutils
  sdcard: define SDMMC_CMD_MAX instead of using the magic '64'
  sdcard: add more trace events
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: simplify SD_SEND_OP_COND (ACMD41)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: simplify SD_SEND_OP_COND (ACMD41)

replace switch(single case) -> if()

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-17-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: simplify SEND_IF_COND (CMD8)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: simplify SEND_IF_COND (CMD8)

replace switch(single case) -> if()

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-16-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: warn if host uses an incorrect address for APP CMD (CMD55)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: warn if host uses an incorrect address for APP CMD (CMD55)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-15-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: check the card is in correct state for APP CMD (CMD55)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: check the card is in correct state for APP CMD (CMD55)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-14-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: handles more commands in SPI mode
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handles more commands in SPI mode

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-13-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: use a more descriptive label 'unimplemented_spi_cmd'
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use a more descriptive label 'unimplemented_spi_cmd'

Suggested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-12-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: handle the Security Specification commands
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handle the Security Specification commands

returning sd_illegal, since they are not implemented.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-11-f4bug@amsat.org
[PMM: tweak multiline comment format]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: handle CMD54 (SDIO)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handle CMD54 (SDIO)

Linux uses it to poll the bus before polling for a card.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-10-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: use the registerfields API for the CARD_STATUS register masks
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use the registerfields API for the CARD_STATUS register masks

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-9-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: use the correct masked OCR in the R3 reply
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use the correct masked OCR in the R3 reply

use the registerfields API to access the OCR register

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-8-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: simplify using the ldst API
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: simplify using the ldst API

the code is easier to review/refactor.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-7-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: remove commands from unsupported old MMC specification
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: remove commands from unsupported old MMC specification

This device does not model MMCA Specification previous to v4.2

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-6-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: clean the SCR register and add few comments
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: clean the SCR register and add few comments

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: fix the 'maximum data transfer rate' to 25MHz
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: fix the 'maximum data transfer rate' to 25MHz

To comply with Spec v1.10 (and 2.00, 3.01):

. TRAN_SPEED

for current SD Memory Cards that field must be always 0_0110_010b (032h) which is
equal to 25MHz - the mandatory maximum operating frequency of SD Memory Card.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-4-f4bug@amsat.org
[PMM: fixed comment indent]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: update the CSD CRC register regardless the CSD structure version
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: update the CSD CRC register regardless the CSD structure version

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: Don't always set the high capacity bit
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: Don't always set the high capacity bit

Don't set the high capacity bit by default as it will be set if required
in the sd_set_csd() function.

[based on a patch from Alistair Francis <alistair.francis@xilinx.com>
 and Peter Ogden <ogden@xilinx.com> from qemu/xilinx tag xilinx-v2015.4]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: use the registerfields API to access the OCR register
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: use the registerfields API to access the OCR register

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-12-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: use G_BYTE from cutils
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: use G_BYTE from cutils

code is now easier to read.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-11-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: define SDMMC_CMD_MAX instead of using the magic '64'
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: define SDMMC_CMD_MAX instead of using the magic '64'

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-8-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: add more trace events
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: add more trace events

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-6-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: replace fprintf() by qemu_hexdump()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: replace fprintf() by qemu_hexdump()

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: add a trace event for command responses
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: add a trace event for command responses

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180215220540.6556-4-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: replace DPRINTF() by trace events
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: replace DPRINTF() by trace events

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agosdcard: reorder SDState struct members
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: reorder SDState struct members

place card registers first, this will ease further code movements.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215220540.6556-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/sd/ssi-sd: use the SDBus API, connect the SDCard to the bus
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
hw/sd/ssi-sd: use the SDBus API, connect the SDCard to the bus

On reset the bus will reset the card,
we can now drop the device_reset() call.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180216022933.10945-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/sd/milkymist-memcard: expose a SDBus and connect the SDCard to it
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: expose a SDBus and connect the SDCard to it

using the sdbus_*() API.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Acked-by: Michael Walle <michael@walle.cc>
Message-id: 20180216022933.10945-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/sd/milkymist-memcard: split realize() out of SysBusDevice init()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: split realize() out of SysBusDevice init()

Create the SDCard in the realize() function.

Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Acked-by: Michael Walle <michael@walle.cc>
Message-id: 20180216022933.10945-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/sd/milkymist-memcard: use qemu_log_mask()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: use qemu_log_mask()

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Acked-by: Michael Walle <michael@walle.cc>
Message-id: 20180216022933.10945-2-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoFix ast2500 protection register emulation
Hugo Landau [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
Fix ast2500 protection register emulation

Some register blocks of the ast2500 are protected by protection key
registers which require the right magic value to be written to those
registers to allow those registers to be mutated.

Register manuals indicate that writing the correct magic value to these
registers should cause subsequent reads from those values to return 1,
and writing any other value should cause subsequent reads to return 0.

Previously, qemu implemented these registers incorrectly: the registers
were handled as simple memory, meaning that writing some value x to a
protection key register would result in subsequent reads from that
register returning the same value x. The protection was implemented by
ensuring that the current value of that register equaled the magic
value.

This modifies qemu to have the correct behaviour: attempts to write to a
ast2500 protection register results in a transition to 1 or 0 depending
on whether the written value is the correct magic. The protection logic
is updated to ensure that the value of the register is nonzero.

This bug caused deadlocks with u-boot HEAD: when u-boot is done with a
protectable register block, it attempts to lock it by writing the
bitwise inverse of the correct magic value, and then spinning forever
until the register reads as zero. Since qemu implemented writes to these
registers as ordinary memory writes, writing the inverse of the magic
value resulted in subsequent reads returning that value, leading to
u-boot spinning forever.

Signed-off-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 20180220132627.4163-1-hlandau@devever.net
[PMM: fixed incorrect code indentation]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agohw/char/stm32f2xx_usart: fix TXE/TC bit handling
Richard Braun [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/char/stm32f2xx_usart: fix TXE/TC bit handling

I/O currently being synchronous, there is no reason to ever clear the
SR_TXE bit. However the SR_TC bit may be cleared by software writing
to the SR register, so set it on each write.

In addition, fix the reset value of the USART status register.

Signed-off-by: Richard Braun <rbraun@sceen.net>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
[PMM: removed XXX tag from comment, since it isn't something
 we need to come back and fix in QEMU]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoraspi: Add "raspi3" machine type
Pekka Enberg [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
raspi: Add "raspi3" machine type

This patch adds a "raspi3" machine type, which can now be selected as
the machine to run on by users via the "-M" command line option to QEMU.

The machine type does *not* ignore memory transaction failures so we
likely need to add some dummy devices later when people run something
more complicated than what I'm using for testing.

Signed-off-by: Pekka Enberg <penberg@iki.fi>
[PMM: added #ifdef TARGET_AARCH64 so we don't provide the 64-bit
 board in the 32-bit only arm-softmmu build.]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agotarget/arm: Fix register definitions for VMIDR and VMPIDR
Peter Maydell [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
target/arm: Fix register definitions for VMIDR and VMPIDR

The register definitions for VMIDR and VMPIDR have separate
reginfo structs for the AArch32 and AArch64 registers. However
the 32-bit versions are wrong:
 * they use offsetof instead of offsetoflow32 to mark where
   the 32-bit value lives in the uint64_t CPU state field
 * they don't mark themselves as ARM_CP_ALIAS

In particular this means that if you try to use an Arm guest CPU
which enables EL2 on a big-endian host it will assert at reset:
 target/arm/cpu.c:114: cp_reg_check_reset: Assertion `oldvalue == newvalue' failed.

because the reset of the 32-bit register writes to the top
half of the uint64_t.

Correct the errors in the structures.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
This is necessary for 'make check' to pass on big endian
systems with the 'raspi3' board enabled, which is the
first board which has an EL2-enabled-by-default CPU.

6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/ui-20180222-pull-request' into...
Peter Maydell [Thu, 22 Feb 2018 14:44:42 +0000 (14:44 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180222-pull-request' into staging

ui: reverse keymap improvements.
sdl2: hotkey fix.
opengl: dmabuf fixes.

# gpg: Signature made Thu 22 Feb 2018 10:22:58 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180222-pull-request:
  keymap: consider modifier state when picking a mapping
  keymap: record multiple keysym -> keycode mappings
  keymap: numpad keysyms and keycodes are fixed
  keymap: use glib hash for kbd_layout_t
  keymap: make struct kbd_layout_t private to ui/keymaps.c
  egl-helpers: add alpha channel to texture format
  egl-headless: cursor_dmabuf: handle NULL cursor
  console/opengl: split up dpy_gl_cursor ops
  sdl2: fix hotkey keyup

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging
Peter Maydell [Thu, 22 Feb 2018 11:37:05 +0000 (11:37 +0000)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging

Update OpenBIOS images

# gpg: Signature made Thu 22 Feb 2018 08:12:01 GMT
# gpg:                using RSA key 5BC2C56FAE0F321F
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>"
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-openbios-signed:
  Update OpenBIOS images to 54d959d9 built from submodule.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-softfloat-refactor-210218...
Peter Maydell [Thu, 22 Feb 2018 10:01:23 +0000 (10:01 +0000)]
Merge remote-tracking branch 'remotes/stsquad/tags/pull-softfloat-refactor-210218-1' into staging

This is the re-factor of softfloat:

  - shared common code path float16/32/64
  - well commented and easy to follow code
  - added a bunch of float16 support

While some operations are slower the key ones exercised by the
floating point dbt-bench are the same: https://i.imgur.com/oXNJNql.png

# gpg: Signature made Wed 21 Feb 2018 10:44:14 GMT
# gpg:                using RSA key FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-softfloat-refactor-210218-1: (22 commits)
  fpu/softfloat: re-factor sqrt
  fpu/softfloat: re-factor compare
  fpu/softfloat: re-factor minmax
  fpu/softfloat: re-factor scalbn
  fpu/softfloat: re-factor int/uint to float
  fpu/softfloat: re-factor float to int/uint
  fpu/softfloat: re-factor round_to_int
  fpu/softfloat: re-factor muladd
  fpu/softfloat: re-factor div
  fpu/softfloat: re-factor mul
  fpu/softfloat: re-factor add/sub
  fpu/softfloat: define decompose structures
  fpu/softfloat: move the extract functions to the top of the file
  fpu/softfloat: improve comments on ARM NaN propagation
  include/fpu/softfloat: add some float16 constants
  include/fpu/softfloat: implement float16_set_sign helper
  include/fpu/softfloat: implement float16_chs helper
  include/fpu/softfloat: implement float16_abs helper
  target/*/cpu.h: remove softfloat.h
  fpu/softfloat-types: new header to prevent excessive re-builds
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>