• 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
Name
Last commit
Last update
..
keymaps Loading commit data...
optionrom Loading commit data...
s390-ccw Loading commit data...
spapr-rtas Loading commit data...
Makefile Loading commit data...
QEMU,cgthree.bin Loading commit data...
QEMU,tcx.bin Loading commit data...
README Loading commit data...
acpi-dsdt.aml Loading commit data...
bamboo.dtb Loading commit data...
bamboo.dts Loading commit data...
bios-256k.bin Loading commit data...
bios.bin Loading commit data...
efi-e1000.rom Loading commit data...
efi-eepro100.rom Loading commit data...
efi-ne2k_pci.rom Loading commit data...
efi-pcnet.rom Loading commit data...
efi-rtl8139.rom Loading commit data...
efi-virtio.rom Loading commit data...
kvmvapic.bin Loading commit data...
linuxboot.bin Loading commit data...
multiboot.bin Loading commit data...
openbios-ppc Loading commit data...
openbios-sparc32 Loading commit data...
openbios-sparc64 Loading commit data...
palcode-clipper Loading commit data...
petalogix-ml605.dtb Loading commit data...
petalogix-s3adsp1800.dtb Loading commit data...
ppc_rom.bin Loading commit data...
pxe-e1000.rom Loading commit data...
pxe-eepro100.rom Loading commit data...
pxe-ne2k_pci.rom Loading commit data...
pxe-pcnet.rom Loading commit data...
pxe-rtl8139.rom Loading commit data...
pxe-virtio.rom Loading commit data...
q35-acpi-dsdt.aml Loading commit data...
qemu-icon.bmp Loading commit data...
qemu-nsis.bmp Loading commit data...
qemu-nsis.ico Loading commit data...
qemu_logo.svg Loading commit data...
qemu_logo_no_text.svg Loading commit data...
s390-ccw.img Loading commit data...
s390-zipl.rom Loading commit data...
sgabios.bin Loading commit data...
slof.bin Loading commit data...
spapr-rtas.bin Loading commit data...
u-boot.e500 Loading commit data...
vgabios-cirrus.bin Loading commit data...
vgabios-qxl.bin Loading commit data...
vgabios-stdvga.bin Loading commit data...
vgabios-vmware.bin Loading commit data...
vgabios.bin Loading commit data...