Skip to content
Snippets Groups Projects
  1. Nov 02, 2021
  2. Dec 15, 2020
  3. Sep 01, 2020
  4. Aug 21, 2020
  5. Mar 16, 2020
  6. Feb 05, 2019
  7. Aug 23, 2018
  8. Jun 07, 2017
  9. Oct 06, 2016
    • Peter Maydell's avatar
      rules.mak: quiet-command: Split command name and args to print · 0bdb12c7
      Peter Maydell authored
      
      The quiet-command make rule currently takes two arguments:
      the command and arguments to run, and a string to print if
      the V flag is not set (ie we are not being verbose).
      By convention, the string printed is of the form
      "  NAME   some args". Unfortunately to get nicely lined up
      output all the strings have to agree about what column the
      arguments should start in, which means that if we add a
      new quiet-command usage which wants a slightly longer CMD
      name then we either put up with misalignment or change
      every quiet-command string.
      
      Split the quiet-mode string into two, the "NAME" and
      the "same args" part, and use printf(1) to format the
      string automatically. This means we only need to change
      one place if we want to support a longer maximum name.
      
      In particular, we can now print 7-character names lined
      up properly (they are needed for the OSX "SETTOOL" invocation).
      
      Change all the uses of quiet-command to the new syntax.
      (Any which are missed or inadvertently reintroduced
      via later merges will result in slightly misformatted
      quiet output rather than disaster.)
      
      A few places in the pc-bios/ makefiles are updated to use
      "BUILD", "SIGN" and "STRIP" rather than "Building",
      "Signing" and "Stripping" for consistency and to keep them
      below 7 characters. Module .mo links now print "LD" rather
      than the nonstandard "LD -r".
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Message-id: 1475598441-27908-1-git-send-email-peter.maydell@linaro.org
      0bdb12c7
  10. Sep 13, 2016
  11. Aug 30, 2016
  12. Aug 15, 2016
    • Peter Maydell's avatar
      pc-bios/optionrom: Fix OpenBSD build with better detection of linker emulation · e57218b6
      Peter Maydell authored
      
      The various host OSes are irritatingly variable about the name
      of the linker emulation we need to pass to ld's -m option to
      build the i386 option ROMs. Instead of doing this via a
      CONFIG ifdef, check in configure whether any of the emulation
      names we know about will work and pass the right answer through
      to the makefile. If we can't find one, we fall back to not trying
      to build the option ROMs, in the same way we would for a non-x86
      host platform.
      
      This is in particular necessary to unbreak the build on OpenBSD,
      since it wants a different answer to FreeBSD and we don't have
      an existing CONFIG_ variable that distinguishes the two.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarSean Bruno <sbruno@freebsd.org>
      Message-id: 1470672688-6754-1-git-send-email-peter.maydell@linaro.org
      e57218b6
  13. Aug 09, 2016
    • Paolo Bonzini's avatar
      optionrom: fix compilation with mingw docker target · 9d4cd7b4
      Paolo Bonzini authored
      
      Two fixes are needed.  First, mingw does not have -D_FORTIFY_SOURCE,
      hence --enable-debug disables optimization.  This is not acceptable
      for ROMs, which should override CFLAGS to force inclusion of -O2.
      
      Second, PE stores global constructors and destructors using the
      following linker script snippet:
      
           ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
      			LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);
           ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
      			LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);
      
      The LONG directives cause the .img files to be 16 bytes too large;
      the recently added check to signrom.py catches this.  To fix this,
      replace -T and -e options with a linker script.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9d4cd7b4
    • Paolo Bonzini's avatar
      optionrom: add -fno-stack-protector · b0e8f5ca
      Paolo Bonzini authored
      
      This is required by OpenBSD.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b0e8f5ca
    • Marc-André Lureau's avatar
      build-sys: fix building with make CFLAGS=.. argument · a9c87304
      Marc-André Lureau authored
      
      When calling make with a CFLAGS=.. argument, the -g/-O filter is not
      applied, which may result with build failure with ASAN for example. It
      could be solved with an 'override' directive on CFLAGS, but that would
      actually prevent setting different CFLAGS manually.
      
      Instead, filter the CFLAGS argument from the top-level Makefile (so
      you could still call make with a different CFLAGS argument on a
      rom/Makefile manually)
      
      Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20160805082421.21994-2-marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a9c87304
    • Paolo Bonzini's avatar
      linuxboot_dma: avoid guest ABI breakage on gcc vs. clang compilation · 7f256924
      Paolo Bonzini authored
      
      Recent GCC compiles linuxboot_dma.c to 921 bytes, while CentOS 6 needs
      1029 and clang needs 1527.  Because the size of the ROM, rounded to the
      next 512 bytes, must match, this causes the API to break between a <1K
      ROM and one that is bigger.
      
      We want to make the ROM 1.5 KB in size, but it's better to make clang
      produce leaner ROMs, because currently it is worryingly close to the limit.
      To fix this prevent clang's happy inlining (which -Os cannot prevent).
      This only requires adding a noinline attribute.
      
      Second, the patch makes sure that the ROM has enough padding to prevent
      ABI breakage on different compilers.  The size is now hardcoded in the file
      that is passed to signrom.py, as was the case before commit 6f71b779
      ("scripts/signrom.py: Allow option ROM checksum script to write the size
      header.", 2016-05-23); signrom.py however will still pad the input to
      the requested size.  This ensures that the padding goes beyond the
      next multiple of 512 if necessary, and also avoids the need for
      -fno-toplevel-reorder which clang doesn't support.  signrom.py can then
      error out if the requested size is too small for the actual size of the
      compiled ROM.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7f256924
  14. Jul 29, 2016
  15. Jul 14, 2016
  16. Jul 10, 2016
  17. Mar 22, 2016
  18. Dec 15, 2014
    • Paolo Bonzini's avatar
      linuxboot: fix loading old kernels · 269e2358
      Paolo Bonzini authored
      
      Old kernels that used high memory only allowed the initrd to be in the
      first 896MB of memory.  If you load the initrd above, they complain
      that "initrd extends beyond end of memory".
      
      In order to fix this, while not breaking machines with small amounts
      of memory fixed by cdebec5e (linuxboot: compute initrd loading address,
      2014-10-06), we need to distinguish two cases.  If pc.c placed the
      initrd at end of memory, use the new algorithm based on the e801
      memory map.  If instead pc.c placed the initrd at the maximum address
      specified by the bzImage, leave it there.
      
      The only interesting part is that the low-memory info block is now
      loaded very early, in real mode, and thus the 32-bit address has
      to be converted into a real mode segment.  The initrd address is
      also patched in the info block before entering real mode, it is
      simpler that way.
      
      This fixes booting the RHEL4.8 32-bit installation image with 1GB
      of RAM.
      
      Cc: qemu-stable@nongnu.org
      Cc: mst@redhat.com
      Cc: jsnow@redhat.com
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      269e2358
  19. Oct 09, 2014
    • Paolo Bonzini's avatar
      linuxboot: compute initrd loading address · cdebec5e
      Paolo Bonzini authored
      
      Even though hw/i386/pc.c tries to compute a valid loading address for the
      initrd, close to the top of RAM, this does not take into account other
      data that is malloced into that memory by SeaBIOS.
      
      Luckily we can easily look at the memory map to find out how much memory is
      used up there.  This patch places the initrd in the first four gigabytes,
      below the first hole (as returned by INT 15h, AX=e801h).
      
      Without this patch:
      [    0.000000] init_memory_mapping: [mem 0x07000000-0x07fdffff]
      [    0.000000] RAMDISK: [mem 0x0710a000-0x07fd7fff]
      
      With this patch:
      [    0.000000] init_memory_mapping: [mem 0x07000000-0x07fdffff]
      [    0.000000] RAMDISK: [mem 0x07112000-0x07fdffff]
      
      So linuxboot is able to use the 64k that were added as padding for
      QEMU <= 2.1.
      
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cdebec5e
  20. Feb 17, 2014
    • Brad Smith's avatar
      Fix QEMU build on OpenBSD on x86 archs · 46eef33b
      Brad Smith authored
      
      This resolves the build issue with building the ROMs on OpenBSD on x86 archs.
      As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus the
      whole OS/packages and so forth. The ROMs need to have PIE disabled.
      Check in configure whether the compiler supports the flags for disabling
      PIE, and if it does then use them for building the ROMs. This fixes the
      following buildbot failure:
      
      >From the OpenBSD buildbots..
        Building optionrom/multiboot.img
      ld: multiboot.o: relocation R_X86_64_16 can not be used when making a shared object; recompile with -fPIC
      
      Signed-off by: Brad Smith <brad@comstyle.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      46eef33b
  21. Jun 28, 2013
    • Kevin Wolf's avatar
      multiboot: Calculate upper_mem in the ROM · 26a8ec07
      Kevin Wolf authored
      
      The upper_mem field of the Multiboot information struct doesn't really
      contain the RAM size - 1 MB like we used to calculate it, but only the
      memory from 1 MB up to the first (upper) memory hole.
      
      In order to correctly retrieve this information, the multiboot ROM now
      looks at the mmap it creates anyway and tries to find the size of
      contiguous usable memory from 1 MB.
      
      Drop the multiboot.c definition of lower_mem and upper_mem because both
      are queried at runtime now.
      
      Signed-off-by: default avatarKevin Wolf <mail@kevin-wolf.de>
      Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Message-id: 1372018066-21822-3-git-send-email-mail@kevin-wolf.de
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      26a8ec07
    • Kevin Wolf's avatar
      multiboot: Don't forget last mmap entry · 390fb6b4
      Kevin Wolf authored
      
      When the BIOS returns ebx = 0, the current entry is still valid and
      needs to be included in the Multiboot memory map.
      
      Fixing this meant that using bx as the entry index doesn't work any
      more because it's 0 on the last entry (and it was SeaBIOS-specific
      anyway), so the whole loop had to change a bit and should be more
      generic as a result (ebx can be an arbitrary continuation number now,
      and the entry size returned by the BIOS is used instead of hard-coding
      20 bytes).
      
      Signed-off-by: default avatarKevin Wolf <mail@kevin-wolf.de>
      Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      Message-id: 1372018066-21822-2-git-send-email-mail@kevin-wolf.de
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      390fb6b4
  22. Apr 08, 2013
    • Paolo Bonzini's avatar
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini authored
      
      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: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  23. Nov 30, 2012
  24. Apr 16, 2012
  25. Feb 18, 2012
  26. Feb 01, 2012
  27. Dec 14, 2011
  28. Mar 22, 2011
Loading