1. 02 3月, 2018 1 次提交
  2. 09 2月, 2018 2 次提交
  3. 07 2月, 2018 1 次提交
    • A
      hw/arm: Replace fprintf(stderr, "*\n" with error_report() · c0dbca36
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      
      The 'qemu: ' prefix was manually removed from the hw/arm/boot.c file.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: qemu-arm@nongnu.org
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      
      Also trim trailing punctuation from error messages.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-3-armbru@redhat.com>
      c0dbca36
  4. 21 4月, 2017 1 次提交
  5. 28 11月, 2016 1 次提交
  6. 18 10月, 2016 1 次提交
  7. 12 5月, 2016 1 次提交
  8. 21 4月, 2016 1 次提交
  9. 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
  10. 04 3月, 2016 2 次提交
    • P
      arm: boot: Support big-endian elfs · 9776f636
      Peter Crosthwaite 提交于
      Support ARM big-endian ELF files in system-mode emulation. When loading
      an elf, determine the endianness mode expected by the elf, and set the
      relevant CPU state accordingly.
      
      With this, big-endian modes are now fully supported via system-mode LE,
      so there is no need to restrict the elf loading to the TARGET
      endianness so the ifdeffery on TARGET_WORDS_BIGENDIAN goes away.
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      [PMM: fix typo in comments]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9776f636
    • P
      loader: Add data swap option to load-elf · 7ef295ea
      Peter Crosthwaite 提交于
      Some CPUs are of an opposite data-endianness to other components in the
      system. Sometimes elfs have the data sections layed out with this CPU
      data-endianness accounting for when loaded via the CPU, so byte swaps
      (relative to other system components) will occur.
      
      The leading example, is ARM's BE32 mode, which is is basically LE with
      address manipulation on half-word and byte accesses to access the
      hw/byte reversed address. This means that word data is invariant
      across LE and BE32. This also means that instructions are still LE.
      The expectation is that the elf will be loaded via the CPU in this
      endianness scheme, which means the data in the elf is reversed at
      compile time.
      
      As QEMU loads via the system memory directly, rather than the CPU, we
      need a mechanism to reverse elf data endianness to implement this
      possibility.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7ef295ea
  11. 20 2月, 2016 1 次提交
  12. 03 2月, 2016 2 次提交
  13. 19 1月, 2016 1 次提交
  14. 10 11月, 2015 1 次提交
  15. 03 11月, 2015 2 次提交
  16. 09 9月, 2015 1 次提交
  17. 16 7月, 2015 1 次提交
    • A
      hw/arm/boot: Increase fdt alignment · 76e2aef3
      Alexander Graf 提交于
      The Linux kernel on aarch64 creates a page table entry at early bootup
      that spans the 2MB range on memory spanning the fdt start address:
      
        [ ALIGN_DOWN(fdt, 2MB) ... ALIGN_DOWN(fdt, 2MB) + 2MB ]
      
      This means that when our current 4k alignment happens to fall at the end
      of the aligned region, Linux tries to access memory that is not mapped.
      
      The easy fix is to instead increase the alignment to 2MB, making Linux's
      logic always succeed.
      
      We leave the existing 4k alignment for 32bit kernels to not cause any
      regressions due to space constraints.
      Reported-by: NAndreas Schwab <schwab@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      76e2aef3
  18. 09 7月, 2015 1 次提交
  19. 16 6月, 2015 1 次提交
  20. 02 6月, 2015 1 次提交
  21. 26 4月, 2015 1 次提交
    • P
      Switch non-CPU callers from ld/st*_phys to address_space_ld/st* · 42874d3a
      Peter Maydell 提交于
      Switch all the uses of ld/st*_phys to address_space_ld/st*,
      except for those cases where the address space is the CPU's
      (ie cs->as). This was done with the following script which
      generates a Coccinelle patch.
      
      A few over-80-columns lines in the result were rewrapped by
      hand where Coccinelle failed to do the wrapping automatically,
      as well as one location where it didn't put a line-continuation
      '\' when wrapping lines on a change made to a match inside
      a macro definition.
      
      ===begin===
      #!/bin/sh -e
      # Usage:
      # ./ldst-phys.spatch.sh > ldst-phys.spatch
      # spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/        /g' > out.patch
      # patch -p1 < out.patch
      
      for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do
      cat <<EOF
      @ cpu_matches_ld_${FN} @
      expression E1,E2;
      identifier as;
      @@
      
      ld${FN}_phys(E1->as,E2)
      
      @ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @
      expression E1,E2;
      @@
      
      -ld${FN}_phys(E1,E2)
      +address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      
      for FN in b w_le w_be l_le l_be q_le q_be w l q; do
      cat <<EOF
      @ cpu_matches_st_${FN} @
      expression E1,E2,E3;
      identifier as;
      @@
      
      st${FN}_phys(E1->as,E2,E3)
      
      @ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @
      expression E1,E2,E3;
      @@
      
      -st${FN}_phys(E1,E2,E3)
      +address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      ===endit===
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      42874d3a
  22. 05 2月, 2015 1 次提交
  23. 23 12月, 2014 2 次提交
    • L
      hw/arm: pass pristine kernel image to guest firmware over fw_cfg · 07abe45c
      Laszlo Ersek 提交于
      Introduce the new boolean field "arm_boot_info.firmware_loaded". When this
      field is set, it means that the portion of guest DRAM that the VCPU
      normally starts to execute, or the pflash chip that the VCPU normally
      starts to execute, has been populated by board-specific code with
      full-fledged guest firmware code, before the board calls
      arm_load_kernel().
      
      Simultaneously, "arm_boot_info.firmware_loaded" guarantees that the board
      code has set up the global firmware config instance, for arm_load_kernel()
      to find with fw_cfg_find().
      
      Guest kernel (-kernel) and guest firmware (-bios, -pflash) has always been
      possible to specify independently on the command line. The following cases
      should be considered:
      
      nr  -bios    -pflash  -kernel  description
                   unit#0
      --  -------  -------  -------  -------------------------------------------
      1   present  present  absent   Board code rejects this case, -bios and
          present  present  present  -pflash unit#0 are exclusive. Left intact
                                     by this patch.
      
      2   absent   absent   present  Traditional kernel loading, with qemu's
                                     minimal board firmware. Left intact by this
                                     patch.
      
      3   absent   present  absent   Preexistent case for booting guest firmware
          present  absent   absent   loaded with -bios or -pflash. Left intact
                                     by this patch.
      
      4   absent   absent   absent   Preexistent case for not loading any
                                     firmware or kernel up-front. Left intact by
                                     this patch.
      
      5   present  absent   present  New case introduced by this patch: kernel
          absent   present  present  image is passed to externally loaded
                                     firmware in unmodified form, using fw_cfg.
      
      An easy way to see that this patch doesn't interfere with existing cases
      is to realize that "info->firmware_loaded" is constant zero at this point.
      Which makes the "outer" condition unchanged, and the "inner" condition
      (with the fw_cfg-related code) dead.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-11-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      07abe45c
    • G
      target-arm: Add arm_boot_info secure_boot control · c8e829b7
      Greg Bellows 提交于
      Adds the secure_boot boolean field to the arm_boot_info descriptor.  This
      fields is used to indicate whether Linux should boot into secure or non-secure
      state if the ARM EL3 feature is enabled.  The default is to leave the CPU in an
      unaltered reset state.  On EL3 enabled systems, the reset state is secure and
      can be overridden by setting the added field to false.
      Signed-off-by: NGreg Bellows <greg.bellows@linaro.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1418684992-8996-11-git-send-email-greg.bellows@linaro.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c8e829b7
  24. 11 12月, 2014 1 次提交
  25. 03 11月, 2014 1 次提交
    • M
      hw/core/loader: implement address translation in uimage loader · 25bda50a
      Max Filippov 提交于
      Such address translation is needed when load address recorded in uImage
      is a virtual address. When the actual load address is requested, return
      untranslated address: user that needs the translated address can always
      apply translation function to it and those that need it untranslated
      don't need to do the inverse translation.
      
      Add translation function pointer and its parameter to uimage_load
      prototype. Update all existing users.
      
      No user-visible functional changes.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      25bda50a
  26. 24 10月, 2014 1 次提交
  27. 12 9月, 2014 4 次提交
  28. 20 8月, 2014 1 次提交
  29. 04 8月, 2014 1 次提交
  30. 25 3月, 2014 1 次提交
  31. 11 2月, 2014 1 次提交
  32. 31 1月, 2014 1 次提交