1. 14 7月, 2016 1 次提交
  2. 08 4月, 2016 1 次提交
    • G
      Sort the fw_cfg file list · bab47d9a
      Gerd Hoffmann 提交于
      Entries are inserted in filename order instead of being
      appended to the end in case sorting is enabled.
      
      This will avoid any future issues of moving the file creation
      around, it doesn't matter what order they are created now,
      the will always be in filename order.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      
      Added machine type handling for compatibility.  This was
      a fairly complex change, this will preserve the order of fw_cfg
      for older versions no matter what order the firmware files
      actually come in.  A list is kept of the correct legacy order
      and the entries will be inserted based upon their order in
      the list.  Except that some entries are ordered (in a specific
      area of the list) based upon what order they appear on the
      command line.  Special handling is added for those entries.
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      bab47d9a
  3. 23 3月, 2016 2 次提交
  4. 08 3月, 2016 1 次提交
  5. 23 2月, 2016 1 次提交
    • P
      include: Clean up includes · 90ce6e26
      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.
      
      NB: If this commit breaks compilation for your out-of-tree
      patchseries or fork, then you need to make sure you add
      #include "qemu/osdep.h" to any new .c files that you have.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      90ce6e26
  6. 15 12月, 2015 3 次提交
    • G
      fw_cfg: remove offset argument from callback prototype · 3f8752b4
      Gabriel L. Somlo 提交于
      Read callbacks are now only invoked at item selection, before any
      data is read. As such, the value of the offset argument passed to
      the callback will always be 0. Also, the two callback instances
      currently in use both leave their offset argument unused.
      
      This patch removes the offset argument from the fw_cfg read callback
      prototype, and from the currently available instances. The unused
      (write) callback prototype is also removed (write support was removed
      earlier, in commit 023e3148).
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Marc Marí <markmb@redhat.com>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1446733972-1602-4-git-send-email-somlo@cmu.edu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3f8752b4
    • G
      fw_cfg: amend callback behavior spec to once per select · 3bef7e8a
      Gabriel L. Somlo 提交于
      Currently, the fw_cfg internal API specifies that if an item was set up
      with a read callback, the callback must be run each time a byte is read
      from the item. This behavior is both wasteful (most items do not have a
      read callback set), and impractical for bulk transfers (e.g., DMA read).
      
      At the time of this writing, the only items configured with a callback
      are "/etc/table-loader", "/etc/acpi/tables", and "/etc/acpi/rsdp". They
      all share the same callback functions: virt_acpi_build_update() on ARM
      (in hw/arm/virt-acpi-build.c), and acpi_build_update() on i386 (in
      hw/i386/acpi.c). Both of these callbacks are one-shot (i.e. they return
      without doing anything at all after the first time they are invoked with
      a given build_state; since build_state is also shared across all three
      items mentioned above, the callback only ever runs *once*, the first
      time either of the listed items is read).
      
      This patch amends the specification for fw_cfg_add_file_callback() to
      state that any available read callback will only be invoked once each
      time the item is selected. This change has no practical effect on the
      current behavior of QEMU, and it enables us to significantly optimize
      the behavior of fw_cfg reads during guest firmware setup, eliminating
      a large amount of redundant callback checks and invocations.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Marc Marí <markmb@redhat.com>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1446733972-1602-3-git-send-email-somlo@cmu.edu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3bef7e8a
    • G
      fw_cfg: move internal function call docs to header file · 9c4a5c55
      Gabriel L. Somlo 提交于
      Move documentation for fw_cfg functions internal to qemufrom
      docs/specs/fw_cfg.txt to the fw_cfg.h header file, next to
      their prototype declarations, formatted as doc-comments.
      
      NOTE: Documentation for fw_cfg_add_callback() is completely
      dropped by this patch, as that function has been eliminated
      by commit 023e3148.
      Suggested-by: NPeter Maydell <peter.maydell@linaro.org>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Marc Marí <markmb@redhat.com>
      Cc: Jordan Justen <jordan.l.justen@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1446733972-1602-2-git-send-email-somlo@cmu.edu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9c4a5c55
  7. 19 10月, 2015 1 次提交
  8. 10 6月, 2015 2 次提交
  9. 23 12月, 2014 3 次提交
    • L
      fw_cfg_mem: expose the "data_width" property with fw_cfg_init_mem_wide() · 6c87e3d5
      Laszlo Ersek 提交于
      We rebase fw_cfg_init_mem() to the new function for compatibility with
      current callers.
      
      The behavior of the (big endian) multi-byte data reads is best shown
      with a qtest session.  Here, we are reading the first six bytes of
      the UUID
      
          $ arm-softmmu/qemu-system-arm -M virt -machine accel=qtest \
               -qtest stdio -uuid 4600cb32-38ec-4b2f-8acb-81c6ea54f2d8
      >>> writew 0x9020008 0x0200
      <<< OK
      >>> readl 0x9020000
      <<< OK 0x000000004600cb32
      
      Remember this is big endian.  On big endian machines, it is stored
      directly as 0x46 0x00 0xcb 0x32.
      
      On a little endian machine, we have to first swap it, so that it becomes
      0x32cb0046.  When written to memory, it becomes 0x46 0x00 0xcb 0x32
      again.
      
      Reading byte-by-byte works too, of course:
      
      >>> readb 0x9020000
      <<< OK 0x0000000000000038
      >>> readb 0x9020000
      <<< OK 0x00000000000000ec
      
      Here only a single byte is read at a time, so they are read in order
      similar to the 1-byte data port that is already in PPC and SPARC
      machines.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-8-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6c87e3d5
    • L
      fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem() · 66708822
      Laszlo Ersek 提交于
      This allows us to drop the fw_cfg_init() shim and to enforce the possible
      mappings at compile time.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-3-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      66708822
    • L
      fw_cfg: hard separation between the MMIO and I/O port mappings · 5712db6a
      Laszlo Ersek 提交于
      We are going to introduce a wide data register for fw_cfg, but only for
      the MMIO mapped device. The wide data register will also require the
      tightening of endiannesses.
      
      However we don't want to touch the I/O port mapped fw_cfg device at all.
      
      Currently QEMU provides a single fw_cfg device type that can handle both
      I/O port and MMIO mapping. This flexibility is not actually exploited by
      any board in the tree, but it renders restricting the above changes to
      MMIO very hard.
      
      Therefore, let's derive two classes from TYPE_FW_CFG: TYPE_FW_CFG_IO and
      TYPE_FW_CFG_MEM.
      
      TYPE_FW_CFG_IO incorporates the base I/O port and the related combined
      MemoryRegion. (NB: all boards in the tree that use the I/O port mapped
      flavor opt for the combined mapping; that is, when the data port overlays
      the high address byte of the selector port. Therefore we can drop the
      capability to map those I/O ports separately.)
      
      TYPE_FW_CFG_MEM incorporates the base addresses for the MMIO selector and
      data registers, and their respective MemoryRegions.
      
      The "realize" and "props" class members are specific to each new derived
      class, and become unused for the base class. The base class retains the
      "reset" member and the "vmsd" member, because the reset functionality and
      the set of migrated data are not specific to the mapping.
      
      The new functions fw_cfg_init_io() and fw_cfg_init_mem() expose the
      possible mappings in separation. For now fw_cfg_init() is retained as a
      compatibility shim that enforces the above assumptions.
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1419250305-31062-2-git-send-email-pbonzini@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      5712db6a
  10. 15 10月, 2014 1 次提交
  11. 14 10月, 2013 2 次提交
  12. 02 6月, 2013 2 次提交
  13. 30 4月, 2013 1 次提交
  14. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  15. 19 1月, 2013 3 次提交
  16. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  17. 12 12月, 2010 1 次提交
  18. 07 2月, 2010 1 次提交
  19. 19 12月, 2009 2 次提交
  20. 18 11月, 2009 3 次提交
  21. 02 10月, 2009 2 次提交
  22. 28 7月, 2009 1 次提交
  23. 16 7月, 2009 1 次提交
  24. 22 4月, 2009 1 次提交
  25. 08 3月, 2009 1 次提交
  26. 19 9月, 2008 1 次提交