Skip to content
Snippets Groups Projects
  1. 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
  2. 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
  3. Mar 22, 2011
  4. Nov 17, 2009
Loading