From cdebec5e40bd0af82da0659f37af85ee2aa2c9d1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 6 Oct 2014 16:49:57 +0200 Subject: 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 Signed-off-by: Paolo Bonzini --- pc-bios/linuxboot.bin | Bin 1024 -> 1024 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'pc-bios/linuxboot.bin') diff --git a/pc-bios/linuxboot.bin b/pc-bios/linuxboot.bin index e7c36694f9..130103fb73 100644 Binary files a/pc-bios/linuxboot.bin and b/pc-bios/linuxboot.bin differ -- cgit v1.2.1