1. 12 10月, 2017 1 次提交
    • T
      disas: Always initialize read_memory_inner_func properly · eb584b40
      Thomas Huth 提交于
      I've recently seen this with valgrind while running the HMP tester:
      
      ==22373== Conditional jump or move depends on uninitialised value(s)
      ==22373==    at 0x4A41FD: arm_disas_set_info (cpu.c:504)
      ==22373==    by 0x3867A7: monitor_disas (disas.c:390)
      ==22373==    by 0x38E80E: memory_dump (monitor.c:1339)
      ==22373==    by 0x38FA43: handle_hmp_command (monitor.c:3123)
      ==22373==    by 0x38FB9E: qmp_human_monitor_command (monitor.c:613)
      ==22373==    by 0x4E3124: qmp_marshal_human_monitor_command (qmp-marshal.c:1736)
      ==22373==    by 0x769678: do_qmp_dispatch (qmp-dispatch.c:104)
      ==22373==    by 0x769678: qmp_dispatch (qmp-dispatch.c:131)
      ==22373==    by 0x38B734: handle_qmp_command (monitor.c:3853)
      ==22373==    by 0x76ED07: json_message_process_token (json-streamer.c:105)
      ==22373==    by 0x78D40A: json_lexer_feed_char (json-lexer.c:323)
      ==22373==    by 0x78D4CD: json_lexer_feed (json-lexer.c:373)
      ==22373==    by 0x38A08D: monitor_qmp_read (monitor.c:3895)
      
      And indeed, in monitor_disas, the read_memory_inner_func variable was
      not initialized, but arm_disas_set_info() expects this to be NULL
      or a valid pointer. Let's properly set this to NULL in the
      INIT_DISASSEMBLE_INFO to fix it in all functions that use the
      disassemble_info struct.
      
      Fixes: f7478a92 ("Fix Thumb-1 BE32 execution")
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1506524313-20037-1-git-send-email-thuth@redhat.com>
      eb584b40
  2. 06 9月, 2017 1 次提交
  3. 08 2月, 2017 1 次提交
    • 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
  4. 23 1月, 2017 1 次提交
  5. 15 9月, 2016 1 次提交
    • T
      Remove remainders of HPPA backend · d41f3c3c
      Thomas Huth 提交于
      The HPPA backend has been removed by the following commit:
      
          802b5081
          tcg-hppa: Remove tcg backend
      
      But some small pieces of the HPPA backend still survived until
      today. Since we also do not have support for a HPPA target in
      QEMU, we can nowadays safely remove the remaining HPPA parts
      (like the disassembler code, or the detection of HPPA in the
      configure script).
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      d41f3c3c
  6. 05 2月, 2016 1 次提交
    • P
      all: Clean up includes · d38ea87a
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org
      d38ea87a
  7. 22 10月, 2015 8 次提交
  8. 25 9月, 2015 1 次提交
  9. 15 8月, 2015 1 次提交
  10. 09 7月, 2015 5 次提交
  11. 22 6月, 2015 1 次提交
    • P
      disas: Remove uses of CPU env · d49190c4
      Peter Crosthwaite 提交于
      disas does not need to access the CPU env for any reason. Change the
      APIs to accept CPU pointers instead. Small change pattern needs to be
      applied to all target translate.c. This brings us closer to making
      disas.o a common-obj and less architecture specific in general.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Acked-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d49190c4
  12. 16 6月, 2014 2 次提交
  13. 08 2月, 2014 1 次提交
    • C
      disas: Implement disassembly output for A64 · 999b53ec
      Claudio Fontana 提交于
      Use libvixl to implement disassembly output in debug
      logs for A64, for use with both AArch64 hosts and targets.
      Signed-off-by: NClaudio Fontana <claudio.fontana@linaro.org>
      [PMM:
       * added support for target disassembly
       * switched to custom QEMUDisassembler so the output format
         matches what QEMU expects
       * make sure we correctly fall back to "just print hex"
         if we didn't build the AArch64 disassembler because of
         lack of a C++ compiler
       * rename from 'aarch64' to 'arm-a64' because this is a
         disassembler for the A64 instruction set
       * merge aarch64.c and aarch64-cxx.cc into one C++ file
       * simplify the aarch64.c<->aarch64-cxx.cc interface]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      999b53ec
  14. 24 8月, 2013 1 次提交
  15. 23 7月, 2013 1 次提交
  16. 27 4月, 2013 1 次提交
  17. 16 4月, 2013 1 次提交
  18. 23 3月, 2013 1 次提交
  19. 19 12月, 2012 2 次提交
  20. 10 11月, 2012 1 次提交
  21. 22 9月, 2012 1 次提交
  22. 14 7月, 2012 1 次提交
    • P
      disas: Fix printing of addresses in disassembly · 636bd289
      Peter Maydell 提交于
      In our disassembly code, the bfd_vma type is always 64 bits,
      even if the target's virtual address width is only 32 bits. This
      means that when we print out addresses we need to truncate them
      to 32 bits, to avoid odd output which has incorrectly sign-extended
      a value to 64 bits, for instance this ARM example:
          0x80479a60:  e59f4088     ldr  r4, [pc, #136]  ; 0xffffffff80479a4f
      
      (It would also be possible to truncate before passing the address
      to info->print_address_func(), but truncating in the final print
      function is the same approach that binutils takes to this problem.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      636bd289
  23. 14 5月, 2012 1 次提交
    • J
      fix some common typos · a31f0531
      Jim Meyering 提交于
      These were identified using: http://github.com/lyda/misspell-check
      and run like this to create a bourne shell script using GNU sed's
      -i option:
      
      git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \
      -pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'
      
      Manually eliding the FP, "rela->real" and resolving "addres" to
      address (not "adders") we get this:
      
        sed -i '450s!thru!through!' Changelog
        sed -i '260s!neccessary!necessary!' coroutine-sigaltstack.c
        sed -i '54s!miniscule!minuscule!' disas.c
        sed -i '1094s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '1095s!thru!through!' hw/usb/hcd-ehci.c
        sed -i '21s!unecessary!unnecessary!' qapi-schema-guest.json
        sed -i '307s!explictly!explicitly!' qemu-ga.c
        sed -i '490s!preceeding!preceding!' qga/commands-posix.c
        sed -i '792s!addres!address!' qga/commands-posix.c
        sed -i '6s!beeing!being!' tests/tcg/test-mmap.c
      
      Also, manually fix "arithmentic", spotted by Peter Maydell:
      
        sed -i 's!arithmentic!arithmetic!' coroutine-sigaltstack.c
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      a31f0531
  24. 16 4月, 2012 1 次提交
  25. 07 4月, 2012 1 次提交
    • P
      Userspace ARM BE8 support · d8fd2954
      Paul Brook 提交于
      Add support for ARM BE8 userspace binaries.
      i.e. big-endian data and little-endian code.
      In principle LE8 mode is also possible, but AFAIK has never actually
      been implemented/used.
      
      System emulation doesn't have any useable big-endian board models,
      but should in principle work once you fix that.
      Dynamic endianness switching requires messing with data accesses,
      preferably with TCG cooperation, and is orthogonal to BE8 support.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      [PMM: various changes, mostly as per my suggestions in code review:
       * rebase
       * use EF_ defines rather than hardcoded constants
       * make bswap_code a bool for future VMSTATE macro compatibility
       * update comment in cpu.h about TB flags bit field usage
       * factor out load-code-and-swap into arm_ld*_code functions and
         get_user_code* macros
       * fix stray trailing space at end of line
       * added braces in disas.c to satisfy checkpatch
      ]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      d8fd2954
  26. 02 4月, 2012 1 次提交
  27. 15 3月, 2012 1 次提交