1. 07 9月, 2017 1 次提交
    • P
      target/arm: Implement ARMv8M's PMSAv8 registers · 0e1a46bb
      Peter Maydell 提交于
      As part of ARMv8M, we need to add support for the PMSAv8 MPU
      architecture.
      
      PMSAv8 differs from PMSAv7 both in register/data layout (for instance
      using base and limit registers rather than base and size) and also in
      behaviour (for example it does not have subregions); rather than
      trying to wedge it into the existing PMSAv7 code and data structures,
      we define separate ones.
      
      This commit adds the data structures which hold the state for a
      PMSAv8 MPU and the register interface to it.  The implementation of
      the MPU behaviour will be added in a subsequent commit.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1503414539-28762-2-git-send-email-peter.maydell@linaro.org
      0e1a46bb
  2. 04 9月, 2017 2 次提交
  3. 31 7月, 2017 1 次提交
  4. 17 7月, 2017 1 次提交
    • P
      target/arm: Make Cortex-M3 and M4 default to 8 PMSA regions · 8d92e26b
      Peter Maydell 提交于
      The Cortex-M3 and M4 CPUs always have 8 PMSA MPU regions (this isn't
      a configurable option for the hardware).  Make the default value of
      the pmsav7-dregion property be set per-cpu, so we don't need to have
      every user of these CPUs set it manually.  (The existing default of
      16 is correct for the other PMSAv7 core, the Cortex-R5.)
      
      This fixes a bug where we were creating the M3 and M4 with
      too many regions; most guest software would not notice or
      care, though, since it would just not use the registers
      associated with the unexpected extra regions.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-id: 1499788408-10096-4-git-send-email-peter.maydell@linaro.org
      8d92e26b
  5. 06 6月, 2017 1 次提交
  6. 04 6月, 2017 1 次提交
  7. 02 6月, 2017 4 次提交
  8. 12 5月, 2017 2 次提交
  9. 21 4月, 2017 1 次提交
  10. 28 2月, 2017 1 次提交
    • P
      armv7m: Fix condition check for taking exceptions · 7ecdaa4a
      Peter Maydell 提交于
      The M profile condition for when we can take a pending exception or
      interrupt is not the same as that for A/R profile.  The code
      originally copied from the A/R profile version of the
      cpu_exec_interrupt function only worked by chance for the
      very simple case of exceptions being masked by PRIMASK.
      Replace it with a call to a function in the NVIC code that
      correctly compares the priority of the pending exception
      against the current execution priority of the CPU.
      
      [Michael Davidsaver's patchset had a patch to do something
      similar but the implementation ended up being a rewrite.]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      7ecdaa4a
  11. 24 2月, 2017 1 次提交
  12. 11 2月, 2017 1 次提交
  13. 08 2月, 2017 3 次提交
    • J
      arm: Correctly handle watchpoints for BE32 CPUs · 40612000
      Julian Brown 提交于
      In BE32 mode, sub-word size watchpoints can fail to trigger because the
      address of the access is adjusted in the opcode helpers before being
      compared with the watchpoint registers.  This patch reverses the address
      adjustment before performing the comparison with the help of a new CPUClass
      hook.
      
      This version of the patch augments and tidies up comments a little.
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: caaf64ffc72f6ae183015337b7afdbd4b8989cb6.1484929304.git.julian@codesourcery.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      40612000
    • J
      Fix Thumb-1 BE32 execution and disassembly. · f7478a92
      Julian Brown 提交于
      Thumb-1 code has some issues in BE32 mode (as currently implemented). In
      short, since bytes are swapped within words at load time for BE32
      executables, this also swaps pairs of adjacent Thumb-1 instructions.
      
      This patch un-swaps those pairs of instructions again, both for execution,
      and for disassembly. (The previous version of the patch always read four
      bytes in arm_read_memory_func and then extracted the proper two bytes,
      in a probably misguided attempt to match the behaviour of actual hardware
      as described by e.g. the ARM9TDMI TRM, section 3.3 "Endian effects for
      instruction fetches". It's less complicated to just read the correct
      two bytes though.)
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: ca20462a044848000370318a8bd41dd0a4ed273f.1484929304.git.julian@codesourcery.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f7478a92
    • J
      target/arm: Add cfgend parameter for ARM CPU selection. · 3a062d57
      Julian Brown 提交于
      Add a new "cfgend" property which selects whether the CPU resets into
      big-endian mode or not.  This setting affects whether we reset with
      SCTLR_B (ARMv6 and earlier) or SCTLR_EE (ARMv7 and later) set.
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: 11420d1c49636c1790e60578ee996e51f0f0b835.1484929304.git.julian@codesourcery.com
      [PMM: use error_report_err() rather than error_report();
       move the integratorcp changes to their own patch;
       drop an unnecessary extra #include;
       rephrase commit message accordingly;
       move setting of reset_sctlr above registration of cpregs
       so it actually has an effect]
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3a062d57
  14. 27 1月, 2017 5 次提交
  15. 20 1月, 2017 3 次提交
  16. 13 1月, 2017 1 次提交
    • A
      qom/cpu: move tlb_flush to cpu_common_reset · 1f5c00cf
      Alex Bennée 提交于
      It is a common thing amongst the various cpu reset functions want to
      flush the SoftMMU's TLB entries. This is done either by calling
      tlb_flush directly or by way of a general memset of the CPU
      structure (sometimes both).
      
      This moves the tlb_flush call to the common reset function and
      additionally ensures it is only done for the CONFIG_SOFTMMU case and
      when tcg is enabled.
      
      In some target cases we add an empty end_of_reset_fields structure to the
      target vCPU structure so have a clear end point for any memset which
      is resetting value in the structure before CPU_COMMON (where the TLB
      structures are).
      
      While this is a nice clean-up in general it is also a precursor for
      changes coming to cputlb for MTTCG where the clearing of entries
      can't be done arbitrarily across vCPUs. Currently the cpu_reset
      function is usually called from the context of another vCPU as the
      architectural power up sequence is run. By using the cputlb API
      functions we can ensure the right behaviour in the future.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      1f5c00cf
  17. 27 12月, 2016 2 次提交
    • C
      target-arm: Add VBAR support to ARM1176 CPUs · 91db4642
      Cédric Le Goater 提交于
      ARM1176 CPUs have TrustZone support and can use the Vector Base
      Address Register, but currently, qemu only adds VBAR support to ARMv7
      CPUs. Fix this by adding a new feature ARM_FEATURE_VBAR which can used
      for ARMv7 and ARM1176 CPUs.
      
      The VBAR feature is always set for ARMv7 because some legacy boards
      require it even if this is not architecturally correct.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-id: 1481810970-9692-1-git-send-email-clg@kaod.org
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      91db4642
    • J
      Correct value of ARM Cortex-A8 MVFR1 register. · 0f194473
      Julian Brown 提交于
      The value of the MVFR1 (Media and VFP Feature Register 1) register for
      the Cortex-A8 appears to be incorrect (according to the TRM, DDI0344K),
      with the "full denormal arithmetic" and "propagation of NaN" fields
      holding both 0 instead of both 1.
      
      I had a go tracing the history of the use of this value, and it seems
      it's always just been wrong in QEMU: maybe it was derived from early
      documentation, or guessed based on the use of a "VFP Lite" implementation
      in the Cortex-A8.
      
      Depending on the startup/early-boot code in use, this can manifest as
      failure to perform denormal arithmetic properly: in our case, selecting
      a Cortex-A8 CPU when using QEMU as an instruction-set simulator for
      bare-metal GCC testing caused tests using denormal arithmetic to
      fail. Problems might be masked (or not occur) when using a full OS kernel
      with suitable trap handlers (I'm not sure).
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: 1481130858-31767-1-git-send-email-julian@codesourcery.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0f194473
  18. 21 12月, 2016 1 次提交
    • T
      Move target-* CPU file into a target/ folder · fcf5ef2a
      Thomas Huth 提交于
      We've currently got 18 architectures in QEMU, and thus 18 target-xxx
      folders in the root folder of the QEMU source tree. More architectures
      (e.g. RISC-V, AVR) are likely to be included soon, too, so the main
      folder of the QEMU sources slowly gets quite overcrowded with the
      target-xxx folders.
      To disburden the main folder a little bit, let's move the target-xxx
      folders into a dedicated target/ folder, so that target-xxx/ simply
      becomes target/xxx/ instead.
      
      Acked-by: Laurent Vivier <laurent@vivier.eu> [m68k part]
      Acked-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> [tricore part]
      Acked-by: Michael Walle <michael@walle.cc> [lm32 part]
      Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x part]
      Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> [s390x part]
      Acked-by: Eduardo Habkost <ehabkost@redhat.com> [i386 part]
      Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> [sparc part]
      Acked-by: Richard Henderson <rth@twiddle.net> [alpha part]
      Acked-by: Max Filippov <jcmvbkbc@gmail.com> [xtensa part]
      Reviewed-by: David Gibson <david@gibson.dropbear.id.au> [ppc part]
      Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> [cris&microblaze part]
      Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [unicore32 part]
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      fcf5ef2a
  19. 28 10月, 2016 1 次提交
  20. 25 10月, 2016 1 次提交
  21. 24 10月, 2016 1 次提交
  22. 23 9月, 2016 1 次提交
  23. 17 6月, 2016 2 次提交
  24. 19 5月, 2016 1 次提交
  25. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c