1. 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
  2. 17 1月, 2013 1 次提交
  3. 19 12月, 2012 4 次提交
  4. 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
  5. 24 6月, 2012 1 次提交
  6. 22 5月, 2012 1 次提交
  7. 21 1月, 2012 1 次提交
  8. 20 12月, 2011 1 次提交
  9. 19 11月, 2011 1 次提交
  10. 16 9月, 2011 1 次提交
  11. 21 8月, 2011 1 次提交
  12. 13 1月, 2011 1 次提交
  13. 12 12月, 2010 2 次提交
  14. 31 7月, 2010 1 次提交
  15. 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
  16. 14 2月, 2010 1 次提交
  17. 12 1月, 2010 2 次提交
  18. 25 12月, 2009 1 次提交
  19. 24 12月, 2009 1 次提交
  20. 20 12月, 2009 2 次提交
  21. 19 12月, 2009 4 次提交
  22. 18 11月, 2009 1 次提交
  23. 12 11月, 2009 1 次提交
  24. 07 11月, 2009 1 次提交
  25. 30 10月, 2009 2 次提交
  26. 12 10月, 2009 2 次提交
    • G
      rom loader: also try filename as-is. · b96bf493
      Gerd Hoffmann 提交于
      In case qemu_find_file fails try to open the file as-is.
      
      Patchworks-ID: 35263
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b96bf493
    • G
      rom loader: fix sparc -kernel boot. · 3c178e72
      Gerd Hoffmann 提交于
      Changes:
      (1) register pstrcpy_targphys() in rom list, it is used for kernel
      command lines by a number of architectures.
      (2) add rom_ptr() function to get a pointer for applying changes
      to loaded images.  Needed for example to tell the linux kernel
      where it finds the initrd image by updating the header.
      (3) make sparc use rom_ptr for initrd setup.
      
      booting sparc-test works now, and 'info roms' shows this:
      
      (qemu) info roms
      addr=0000000000000000 size=0x2a3828 mem=ram name="phdr #0: vmlinux-2.6.11+tcx"
      addr=00000000007ff000 size=0x00000e mem=ram name="cmdline"
      addr=0000000000800000 size=0x400000 mem=ram name="/root/qemu-test/sparc-test/linux.img"
      addr=0000000070000000 size=0x0e4000 mem=rom name="phdr #0: /home/kraxel/projects/qemu/build-zfull/pc-bios/openbios-sparc32"
      
      reboot via 'system_reset' works too.
      
      Patchworks-ID: 35262
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3c178e72
  27. 10 10月, 2009 1 次提交
  28. 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
  29. 02 10月, 2009 1 次提交