Skip to content
Snippets Groups Projects
  1. Jun 16, 2021
    • Peter Maydell's avatar
      target/arm: Implement MVE WLSTP insn · 6822abfd
      Peter Maydell authored
      
      Implement the MVE WLSTP insn; this is like the existing WLS insn,
      except that it specifies a size value which is used to set
      FPSCR.LTPSIZE.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-8-peter.maydell@linaro.org
      6822abfd
    • Peter Maydell's avatar
      target/arm: Implement MVE LCTP · 76c32d72
      Peter Maydell authored
      
      Implement the MVE LCTP instruction.
      
      We put its decode and implementation with the other
      low-overhead-branch insns because although it is only present if MVE
      is implemented it is logically in the same group as the other LOB
      insns.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-7-peter.maydell@linaro.org
      76c32d72
    • Peter Maydell's avatar
      target/arm: Let vfp_access_check() handle late NOCP checks · 9a486856
      Peter Maydell authored
      
      In commit a3494d46 we reworked the M-profile handling of its
      checks for when the NOCP exception should be raised because the FPU
      is disabled, so that (in line with the architecture) the NOCP check
      is done early over a large range of the encoding space, and takes
      precedence over UNDEF exceptions.  As part of this, we removed the
      code from full_vfp_access_check() which raised an exception there for
      M-profile with the FPU disabled, because it was no longer reachable.
      
      For MVE, some instructions which are outside the "coprocessor space"
      region of the encoding space must nonetheless do "is the FPU enabled"
      checks and possibly raise a NOCP exception.  (In particular this
      covers the MVE-specific low-overhead branch insns LCTP, DLSTP and
      WLSTP.) To support these insns, reinstate the code in
      full_vfp_access_check(), so that their trans functions can call
      vfp_access_check() and get the correct behaviour.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-6-peter.maydell@linaro.org
      9a486856
    • Peter Maydell's avatar
      target/arm: Add handling for PSR.ECI/ICI · 5138bd01
      Peter Maydell authored
      
      On A-profile, PSR bits [15:10][26:25] are always the IT state bits.
      On M-profile, some of the reserved encodings of the IT state are used
      to instead indicate partial progress through instructions that were
      interrupted partway through by an exception and can be resumed.
      
      These resumable instructions fall into two categories:
      
      (1) load/store multiple instructions, where these bits are called
      "ICI" and specify the register in the ldm/stm list where execution
      should resume.  (Specifically: LDM, STM, VLDM, VSTM, VLLDM, VLSTM,
      CLRM, VSCCLRM.)
      
      (2) MVE instructions subject to beatwise execution, where these bits
      are called "ECI" and specify which beats in this and possibly also
      the following MVE insn have been executed.
      
      There are also a few insns (LE, LETP, and BKPT) which do not use the
      ICI/ECI bits but must leave them alone.
      
      Otherwise, we should raise an INVSTATE UsageFault for any attempt to
      execute an insn with non-zero ICI/ECI bits.
      
      So far we have been able to ignore ECI/ICI, because the architecture
      allows the IMPDEF choice of "always restart load/store multiple from
      the beginning regardless of ICI state", so the only thing we have
      been missing is that we don't raise the INVSTATE fault for bad guest
      code.  However, MVE requires that we honour ECI bits and do not
      rexecute beats of an insn that have already been executed.
      
      Add the support in the decoder for handling ECI/ICI:
       * identify the ECI/ICI case in the CONDEXEC TB flags
       * when a load/store multiple insn succeeds, it updates the ECI/ICI
         state (both in DisasContext and in the CPU state), and sets a flag
         to say that the ECI/ICI state was handled
       * if we find that the insn we just decoded did not handle the
         ECI/ICI state, we delete all the code that we just generated for
         it and instead emit the code to raise the INVFAULT.  This allows
         us to avoid having to update every non-MVE non-LDM/STM insn to
         make it check for "is ECI/ICI set?".
      
      We continue with our existing IMPDEF choice of not caring about the
      ICI state for the load/store multiples and simply restarting them
      from the beginning.  Because we don't allow interrupts in the middle
      of an insn, the only way we would see this state is if the guest set
      ICI manually on return from an exception handler, so it's a corner
      case which doesn't merit optimisation.
      
      ICI update for LDM/STM is simple -- it always zeroes the state.  ECI
      update for MVE beatwise insns will be a little more complex, since
      the ECI state may include information for the following insn.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-5-peter.maydell@linaro.org
      5138bd01
    • Peter Maydell's avatar
      target/arm: Handle VPR semantics in existing code · 375256a8
      Peter Maydell authored
      
      When MVE is supported, the VPR register has a place on the exception
      stack frame in a previously reserved slot just above the FPSCR.
      It must also be zeroed in various situations when we invalidate
      FPU context.
      
      Update the code which handles the stack frames (exception entry and
      exit code, VLLDM, and VLSTM) to save/restore VPR.
      
      Update code which invalidates FP registers (mostly also exception
      entry and exit code, but also VSCCLRM and the code in
      full_vfp_access_check() that corresponds to the ExecuteFPCheck()
      pseudocode) to zero VPR.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-4-peter.maydell@linaro.org
      375256a8
    • Peter Maydell's avatar
      target/arm: Enable FPSCR.QC bit for MVE · c485ce2c
      Peter Maydell authored
      
      MVE has an FPSCR.QC bit similar to the A-profile Neon one; when MVE
      is implemented make the bit writeable, both in the generic "load and
      store FPSCR" helper functions and in the code for handling the NZCVQC
      sysreg which we had previously left as "TODO when we implement MVE".
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-3-peter.maydell@linaro.org
      c485ce2c
    • Peter Maydell's avatar
      target/arm: Provide and use H8 and H1_8 macros · 6e802db3
      Peter Maydell authored
      
      Currently we provide Hn and H1_n macros for accessing the correct
      data within arrays of vector elements of size 1, 2 and 4, accounting
      for host endianness.  We don't provide any macros for elements of
      size 8 because there the host endianness doesn't matter.  However,
      this does result in awkwardness where we need to pass empty arguments
      to macros, because checkpatch complains about them.  The empty
      argument is a little confusing for humans to read as well.
      
      Add H8() and H1_8() macros and use them where we were previously
      passing empty arguments to macros.
      
      Suggested-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210614151007.4545-2-peter.maydell@linaro.org
      Message-id: 20210610132505.5827-1-peter.maydell@linaro.org
      6e802db3
    • Patrick Venture's avatar
      hw/arm: quanta-q71l add pca954x muxes · 3ec75e39
      Patrick Venture authored
      
      Adds the pca954x muxes expected.
      
      Tested: Booted quanta-q71l image to userspace.
      Signed-off-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarHao Wu <wuhaotsh@google.com>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Message-id: 20210608202522.2677850-4-venture@google.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      3ec75e39
    • Patrick Venture's avatar
      hw/arm: gsj add pca9548 · 6229659e
      Patrick Venture authored
      
      Tested: Quanta-gsj firmware booted.
      
      i2c /dev entries driver
      I2C init bus 1 freq 100000
      I2C init bus 2 freq 100000
      I2C init bus 3 freq 100000
      I2C init bus 4 freq 100000
      I2C init bus 8 freq 100000
      I2C init bus 9 freq 100000
      at24 9-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
      I2C init bus 10 freq 100000
      at24 10-0055: 8192 byte 24c64 EEPROM, writable, 1 bytes/write
      I2C init bus 12 freq 100000
      I2C init bus 15 freq 100000
      i2c i2c-15: Added multiplexed i2c bus 16
      i2c i2c-15: Added multiplexed i2c bus 17
      i2c i2c-15: Added multiplexed i2c bus 18
      i2c i2c-15: Added multiplexed i2c bus 19
      i2c i2c-15: Added multiplexed i2c bus 20
      i2c i2c-15: Added multiplexed i2c bus 21
      i2c i2c-15: Added multiplexed i2c bus 22
      i2c i2c-15: Added multiplexed i2c bus 23
      pca954x 15-0075: registered 8 multiplexed busses for I2C switch pca9548
      
      Signed-off-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarHao Wu <wuhaotsh@google.com>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Message-id: 20210608202522.2677850-3-venture@google.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      6229659e
    • Patrick Venture's avatar
      hw/arm: gsj add i2c comments · 31946687
      Patrick Venture authored
      
      Adds comments to the board init to identify missing i2c devices.
      
      Signed-off-by: default avatarPatrick Venture <venture@google.com>
      Reviewed-by: default avatarHao Wu <wuhaotsh@google.com>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Message-id: 20210608202522.2677850-2-venture@google.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      31946687
    • Richard Henderson's avatar
      target/arm: Fix mte page crossing test · d3327a38
      Richard Henderson authored
      The test was off-by-one, because tag_last points to the
      last byte of the tag to check, thus tag_last - prev_page
      will equal TARGET_PAGE_SIZE when we use the first byte
      of the next page.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/403
      
      
      Reported-by: default avatarPeter Collingbourne <pcc@google.com>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20210612195707.840217-1-richard.henderson@linaro.org
      Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d3327a38
  2. Jun 15, 2021
  3. Jun 14, 2021
Loading