1. 08 10月, 2018 1 次提交
  2. 26 4月, 2018 2 次提交
  3. 24 3月, 2018 1 次提交
    • P
      target/arm: Factor out code to calculate FSR for debug exceptions · 81621d9a
      Peter Maydell 提交于
      When a debug exception is taken to AArch32, it appears as a Prefetch
      Abort, and the Instruction Fault Status Register (IFSR) must be set.
      The IFSR has two possible formats, depending on whether LPAE is in
      use. Factor out the code in arm_debug_excp_handler() which picks
      an FSR value into its own utility function, update it to use
      arm_fi_to_lfsc() and arm_fi_to_sfsc() rather than hard-coded constants,
      and use the correct condition to select long or short format.
      
      In particular this fixes a bug where we could select the short
      format because we're at EL0 and the EL1 translation regime is
      not using LPAE, but then route the debug exception to EL2 because
      of MDCR_EL2.TDE and hand EL2 the wrong format FSR.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180320134114.30418-3-peter.maydell@linaro.org
      81621d9a
  4. 16 2月, 2018 1 次提交
  5. 16 1月, 2018 1 次提交
    • P
      target/arm: Handle page table walk load failures correctly · 3b39d734
      Peter Maydell 提交于
      Instead of ignoring the response from address_space_ld*()
      (indicating an attempt to read a page table descriptor from
      an invalid physical address), use it to report the failure
      correctly.
      
      Since this is another couple of locations where we need to
      decide the value of the ARMMMUFaultInfo ea bit based on a
      MemTxResult, we factor out that operation into a helper
      function.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3b39d734
  6. 14 12月, 2017 3 次提交
  7. 31 10月, 2017 1 次提交
  8. 12 10月, 2017 2 次提交
  9. 06 10月, 2017 1 次提交
    • P
      target/arm: Implement security attribute lookups for memory accesses · 35337cc3
      Peter Maydell 提交于
      Implement the security attribute lookups for memory accesses
      in the get_phys_addr() functions, causing these to generate
      various kinds of SecureFault for bad accesses.
      
      The major subtlety in this code relates to handling of the
      case when the security attributes the SAU assigns to the
      address don't match the current security state of the CPU.
      
      In the ARM ARM pseudocode for validating instruction
      accesses, the security attributes of the address determine
      whether the Secure or NonSecure MPU state is used. At face
      value, handling this would require us to encode the relevant
      bits of state into mmu_idx for both S and NS at once, which
      would result in our needing 16 mmu indexes. Fortunately we
      don't actually need to do this because a mismatch between
      address attributes and CPU state means either:
       * some kind of fault (usually a SecureFault, but in theory
         perhaps a UserFault for unaligned access to Device memory)
       * execution of the SG instruction in NS state from a
         Secure & NonSecure code region
      
      The purpose of SG is simply to flip the CPU into Secure
      state, so we can handle it by emulating execution of that
      instruction directly in arm_v7m_cpu_do_interrupt(), which
      means we can treat all the mismatch cases as "throw an
      exception" and we don't need to encode the state of the
      other MPU bank into our mmu_idx values.
      
      This commit doesn't include the actual emulation of SG;
      it also doesn't include implementation of the IDAU, which
      is a per-board way to specify hard-coded memory attributes
      for addresses, which override the CPU-internal SAU if they
      specify a more secure setting than the SAU is programmed to.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Message-id: 1506092407-26985-15-git-send-email-peter.maydell@linaro.org
      35337cc3
  10. 15 9月, 2017 2 次提交
  11. 07 9月, 2017 2 次提交
  12. 05 9月, 2017 1 次提交
  13. 04 9月, 2017 1 次提交
  14. 21 4月, 2017 2 次提交
  15. 08 2月, 2017 1 次提交
  16. 27 1月, 2017 1 次提交
    • M
      armv7m: Fix reads of CONTROL register bit 1 · abc24d86
      Michael Davidsaver 提交于
      The v7m CONTROL register bit 1 is SPSEL, which indicates
      the stack being used. We were storing this information
      not in v7m.control but in the separate v7m.other_sp
      structure field. Unfortunately, the code handling reads
      of the CONTROL register didn't take account of this, and
      so if SPSEL was updated by an exception entry or exit then
      a subsequent guest read of CONTROL would get the wrong value.
      
      Using a separate structure field doesn't really gain us
      anything in efficiency, so drop this unnecessary complexity
      in favour of simply storing all the bits in v7m.control.
      
      This is a migration compatibility break for M profile
      CPUs only.
      Signed-off-by: NMichael Davidsaver <mdavidsaver@gmail.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1484937883-1068-6-git-send-email-peter.maydell@linaro.org
      [PMM: rewrote commit message;
       use deposit32(); use FIELD to define constants for
       masking and shifting of CONTROL register fields
      ]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      abc24d86
  17. 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
  18. 26 10月, 2016 1 次提交
  19. 12 7月, 2016 1 次提交
  20. 17 6月, 2016 1 次提交
  21. 06 6月, 2016 1 次提交
  22. 19 5月, 2016 1 次提交
  23. 12 5月, 2016 1 次提交
    • P
      target-arm: Split data abort syndrome generator · 094d028a
      Peter Maydell 提交于
      Split the data abort syndrome generator into two versions:
      One with a valid Instruction Specific Syndrome (ISS) and another without.
      
      The following new flags are supported by the syndrome generator
      with ISS:
      * isv - Instruction syndrome valid
      * sas - Syndrome access size
      * sse - Syndrome sign extend
      * srt - Syndrome register transfer
      * sf  - Sixty-Four bit register width
      * ar  - Acquire/Release
      
      These flags are not yet used, so this patch has no functional change
      except that we will now correctly set the IL bit in data abort
      syndromes without ISS information.
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Message-id: 1461931684-1867-5-git-send-email-edgar.iglesias@gmail.com>
      [PMM: squashed in with patch which was just adding the IL bit]
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      094d028a
  24. 18 2月, 2016 1 次提交
  25. 11 2月, 2016 2 次提交
  26. 15 1月, 2016 1 次提交
  27. 17 12月, 2015 1 次提交
  28. 03 11月, 2015 1 次提交
  29. 27 10月, 2015 2 次提交
  30. 07 9月, 2015 1 次提交
  31. 16 6月, 2015 1 次提交