Skip to content
Snippets Groups Projects
  1. Oct 30, 2021
  2. Sep 20, 2021
  3. Sep 01, 2021
    • Peter Maydell's avatar
      arm: Remove system_clock_scale global · 683754c7
      Peter Maydell authored
      
      All the devices that used to use system_clock_scale have now been
      converted to use Clock inputs instead, so the global is no longer
      needed; remove it and all the code that sets it.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-id: 20210812093356.1946-26-peter.maydell@linaro.org
      683754c7
    • Peter Maydell's avatar
      hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale · d18fdd69
      Peter Maydell authored
      
      The stellaris-gptm timer currently uses system_clock_scale for one of
      its timer modes where the timer runs at the CPU clock rate.  Make it
      use a Clock input instead.
      
      We don't try to make the timer handle changes in the clock frequency
      while the downcounter is running.  This is not a change in behaviour
      from the previous system_clock_scale implementation -- we will pick
      up the new frequency only when the downcounter hits zero.  Handling
      dynamic clock changes when the counter is running would require state
      that the current gptm implementation doesn't have.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarDamien Hedde <damien.hedde@greensocs.com>
      Message-id: 20210812093356.1946-25-peter.maydell@linaro.org
      d18fdd69
    • Peter Maydell's avatar
      hw/arm/stellaris: Split stellaris-gptm into its own file · f3eb7557
      Peter Maydell authored
      
      The implementation of the Stellaris general purpose timer module
      device stellaris-gptm is currently in the same source file as the
      board model.  Split it out into its own source file in hw/timer.
      
      Apart from the new file comment headers and the Kconfig and
      meson.build changes, this is just code movement.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarDamien Hedde <damien.hedde@greensocs.com>
      Message-id: 20210812093356.1946-24-peter.maydell@linaro.org
      f3eb7557
    • Peter Maydell's avatar
      hw/timer/armv7m_systick: Use clock inputs instead of system_clock_scale · a40e10f1
      Peter Maydell authored
      
      Now that all users of the systick devices wire up the clock inputs,
      use those instead of the system_clock_scale and the hardwired 1MHz
      value for the reference clock.
      
      This will fix various board models where we were incorrectly
      providing a 1MHz reference clock instead of some other value or
      instead of providing no reference clock at all.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarDamien Hedde <damien.hedde@greensocs.com>
      Message-id: 20210812093356.1946-22-peter.maydell@linaro.org
      a40e10f1
    • Peter Maydell's avatar
      hw/timer/armv7m_systick: Add input clocks · 5c6e1a1c
      Peter Maydell authored
      
      The v7M systick timer can be programmed to run from either of
      two clocks:
       * an "external reference clock" (when SYST_CSR.CLKSOURCE == 0)
       * the main CPU clock (when SYST_CSR.CLKSOURCE == 1)
      
      Our implementation currently hardwires the external reference clock
      to be 1MHz, and allows boards to set the main CPU clock frequency via
      the global 'system_clock_scale'.  (Most boards set that to a constant
      value; the Stellaris boards allow the guest to reprogram it via the
      board-specific RCC registers).
      
      As the first step in converting this to use the Clock infrastructure,
      add input clocks to the systick device for the reference clock and
      the CPU clock.  The device implementation ignores them; once we have
      made all the users of the device correctly wire up the new Clocks we
      will switch the implementation to use them and ignore the old
      system_clock_scale.
      
      This is a migration compat break for all M-profile boards, because of
      the addition of the new clock objects to the vmstate struct.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Reviewed-by: default avatarLuc Michel <luc@lmichel.fr>
      Message-id: 20210812093356.1946-6-peter.maydell@linaro.org
      5c6e1a1c
  4. Jun 24, 2021
  5. Jun 02, 2021
  6. May 13, 2021
  7. May 12, 2021
  8. May 02, 2021
  9. Mar 30, 2021
  10. Mar 19, 2021
    • Markus Armbruster's avatar
      hw: Replace anti-social QOM type names · e178113f
      Markus Armbruster authored
      
      Several QOM type names contain ',':
      
          ARM,bitband-memory
          etraxfs,pic
          etraxfs,serial
          etraxfs,timer
          fsl,imx25
          fsl,imx31
          fsl,imx6
          fsl,imx6ul
          fsl,imx7
          grlib,ahbpnp
          grlib,apbpnp
          grlib,apbuart
          grlib,gptimer
          grlib,irqmp
          qemu,register
          SUNW,bpp
          SUNW,CS4231
          SUNW,DBRI
          SUNW,DBRI.prom
          SUNW,fdtwo
          SUNW,sx
          SUNW,tcx
          xilinx,zynq_slcr
          xlnx,zynqmp
          xlnx,zynqmp-pmu-soc
          xlnx,zynq-xadc
      
      These are all device types.  They can't be plugged with -device /
      device_add, except for xlnx,zynqmp-pmu-soc, and I doubt that one
      actually works.
      
      They *can* be used with -device / device_add to request help.
      Usability is poor, though: you have to double the comma, like this:
      
          $ qemu-system-x86_64 -device SUNW,,fdtwo,help
      
      Trap for the unwary.  The fact that this was broken in
      device-introspect-test for more than six years until commit e27bd498
      fixed it demonstrates that "the unwary" includes seasoned developers.
      
      One QOM type name contains ' ': "ICH9 SMB".  Because having to
      remember just one way to quote would be too easy.
      
      Rename the "SUNW,FOO types to "sun-FOO".  Summarily replace ',' and '
      ' by '-' in the other type names.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20210304140229.575481-2-armbru@redhat.com>
      Reviewed-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e178113f
  11. Mar 16, 2021
  12. Mar 12, 2021
  13. Mar 10, 2021
    • Peter Maydell's avatar
      hw/timer/renesas_tmr: Fix use of uninitialized data in read_tcnt() · 81b3ddaf
      Peter Maydell authored
      
      The read_tcnt() function calculates the TCNT register values for the
      two channels of the timer module; it sets these up in the local
      tcnt[] array, and eventually returns either one or both of them,
      depending on whether the access is 8 or 16 bits.  However, not all of
      the code paths through this function set both elements of this array:
      if the guest has programmed the TCCR.CSS register fields to values
      which are either documented as not to be used or which QEMU does not
      implement, then the function will return uninitialized data.  (This
      was spotted by Coverity.)
      
      Add the missing CSS cases to this code, so that we return a
      consistent value instead of uninitialized data, and so the code
      structure indicates what's happening.
      
      Fixes: CID 1429976
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20210219223241.16344-3-peter.maydell@linaro.org
      81b3ddaf
    • Peter Maydell's avatar
      hw/timer/renesas_tmr: Prefix constants for CSS values with CSS_ · 02f8fe11
      Peter Maydell authored
      
      The #defines INTERNAL and CASCADING represent different possible
      values for the TCCR.CSS register field; prefix them with CSS_ to make
      this more obvious, before we add more defines to represent the
      other possible values of the field in the next commit.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20210219223241.16344-2-peter.maydell@linaro.org
      02f8fe11
  14. Mar 09, 2021
  15. Mar 08, 2021
  16. Mar 06, 2021
  17. Feb 11, 2021
  18. Jan 29, 2021
Loading