qemu/pc-bios/optionrom
Paolo Bonzini cdebec5e40 linuxboot: compute initrd loading address
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: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-09 15:36:15 +02:00
..
kvmvapic.S
linuxboot.S linuxboot: compute initrd loading address 2014-10-09 15:36:15 +02:00
Makefile Fix QEMU build on OpenBSD on x86 archs 2014-02-17 11:44:00 +00:00
multiboot.S multiboot: Calculate upper_mem in the ROM 2013-06-28 14:01:52 -05:00
optionrom.h linuxboot: compute initrd loading address 2014-10-09 15:36:15 +02:00