1. 30 9月, 2014 1 次提交
  2. 05 3月, 2014 1 次提交
    • A
      elf-loader: add more return codes · 18674b26
      Alexey Kardashevskiy 提交于
      The existing load_elf() just returns -1 if it fails to load ELF. However
      it could be smarter than this and tell more about the failure such as
      wrong endianness or incompatible platform.
      
      This adds additional return codes for wrong architecture, wrong
      endianness and if the image is not ELF at all.
      
      This adds a load_elf_strerror() helper to convert return codes into
      string messages.
      
      This fixes handling of what load_elf() returns for s390x, other
      callers just check the return value for <0 and this remains unchanged.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      18674b26
  3. 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
  4. 09 3月, 2013 1 次提交
    • F
      Save memory allocation in the elf loader · d60fa42e
      Fabien Chouteau 提交于
      The current elf loader uses too much memory. For example, I have a
      executable with a bss section of 400 MB and I set the ram size to 512
      MB. Qemu uses about 780MB of RAM (which is fine), but there's a peak at
      1.6 GB during initialization (this is not fine).
      
      This patch fixes two things:
       1) do not allocate each elf program twice.
       2) do not allocate memory for areas that are only zeros.
      
      For this we need a new field in Rom: "datasize" which is the size of the
      allocated data. If datasize is less than romsize, it means that the area
      from datasize to romsize is filled with zeros.
      Signed-off-by: NFabien Chouteau <chouteau@adacore.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d60fa42e
  5. 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
  6. 07 9月, 2012 1 次提交
  7. 11 1月, 2012 1 次提交
  8. 21 8月, 2011 1 次提交
  9. 10 9月, 2010 1 次提交
  10. 24 5月, 2010 1 次提交
  11. 16 3月, 2010 1 次提交
    • A
      load_elf: replace the address addend by a translation function · 409dbce5
      Aurelien Jarno 提交于
      A few machines need to translate the ELF header addresses into physical
      addresses. Currently the only possibility is to add a value to the
      addresses.
      
      This patch replaces the addend argument by and a translation function
      and an opaque passed to the function. A NULL function does not translate
      the address.
      
      The patch also convert all machines that have an addend, simplify the
      PowerPC kernel loading and fix the MIPS kernel loading using this new
      feature. Other machines may benefit from this feature.
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      409dbce5
  12. 03 1月, 2010 1 次提交
  13. 07 10月, 2009 1 次提交
    • G
      Reorganize option rom (+linux kernel) loading. · 45a50b16
      Gerd Hoffmann 提交于
      This patch adds infrastructure to maintain memory regions which must be
      restored on reset.  That includes roms (vga bios and option roms on pc),
      but is also used when loading linux kernels directly.  Features:
      
        - loading files is supported.
        - passing blobs is supported.
        - target address range is supported (for optionrom area).
        - fixed target memory address is supported (linux kernel).
      
      New in v2:
        - writes to ROM are done only at initial boot.
        - also handle aout and uimage loaders.
        - drop unused fread_targphys() function.
      
      The final memory layout is created once all memory regions are
      registered.  The option roms get addresses assigned and the
      registered regions are checked against overlaps.  Finally all data
      is copyed to the guest memory.
      
      Advantages:
      
        (1) Filling memory on initial boot and on reset takes the same
            code path, making reset more robust.
        (2) The need to keep track of the option rom load address is gone.
        (3) Due to (2) option roms can be loaded outside pc_init().  This
            allows to move the pxe rom loading into the nic drivers for
            example.
      
      Additional bonus:  There is a 'info roms' monitor command now.
      
      The patch also switches over pc.c and removes the
      option_rom_setup_reset() and load_option_rom() functions.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      45a50b16
  14. 02 10月, 2009 2 次提交
  15. 20 9月, 2009 1 次提交
    • B
      Compile loader only once · ca20cf32
      Blue Swirl 提交于
      Callers must pass ELF machine, byte swapping and symbol LSB clearing
      information to ELF loader. A.out loader needs page size information, pass
      that too as a parameter.
      
      Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw.
      
      Adjust callers. Also use target_phys_addr_t instead of target_ulong for
      addresses: loader addresses aren't virtual.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      ca20cf32
  16. 11 8月, 2009 1 次提交
  17. 01 8月, 2009 1 次提交
  18. 05 6月, 2009 1 次提交
  19. 14 3月, 2009 1 次提交
    • B
      Make the ELF loader aware of backwards compatibility · 7f70c937
      blueswir1 提交于
      Most 64 bit architectures I'm aware of support running 32 bit code
      of the same architecture as well.
      
      So x86_64 can run i386 code easily and ppc64 can run ppc code.
      
      Unfortunately, the current checks are pretty strict. So you can only
      load e.g. an x86_64 elf binary on qemu-system-x86_64, but no i386 one.
      
      This can get really annoying. I first encountered this issue with
      my multiboot patch, where qemu-system-x86_64 was unable to load an
      i386 elf binary because the elf loader rejected it.
      
      The same thing happened again on PPC64 now. The firmware we're loading
      is a PPC32 elf binary, as it's shared with PPC32. But the platform is
      PPC64.
      
      Right now there is a hack for this in the ppc cpu.h definition, that
      simply sets the type to PPC32 in system emulation mode. While that
      works fine for the firmware, it's no good if you also want to load a
      PPC64 kernel with -kernel.
      
      So in order to solve this mess, I figured the easiest way is to make
      the elf loader aware of platforms that are backwards compatible. For
      now I was only sure that x86_64 does i386 and ppc64 does ppc32, but
      maybe there are other combinations too.
      
      This patch is a prerequisite for having a working -kernel option on
      PPC64.
      Signed-off-by: NAlexander Graf <alex@csgraf.de>
      
      
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6855 c046a42c-6fe2-441c-8c8c-71466251a162
      7f70c937
  20. 23 10月, 2008 1 次提交
  21. 22 10月, 2008 1 次提交
  22. 18 11月, 2007 1 次提交
  23. 18 10月, 2007 1 次提交
  24. 26 9月, 2007 1 次提交
  25. 25 9月, 2007 1 次提交
  26. 17 9月, 2007 2 次提交
  27. 02 4月, 2007 1 次提交
  28. 23 12月, 2006 2 次提交
  29. 03 5月, 2006 1 次提交
  30. 27 4月, 2006 1 次提交
  31. 24 4月, 2006 1 次提交