]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/e500.c
PPC: e500: Fix duplicate kernel load and device tree overlap
authorDavid Engraf <david.engraf@sysgo.com>
Fri, 2 Mar 2018 11:20:13 +0000 (12:20 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 6 Mar 2018 02:16:29 +0000 (13:16 +1100)
commit8d622594201286ddbb9e2dbf32a9e65c060ed4ed
tree0fff1795b918527da2796f1a2fd2f4befeff9865
parent90ee4e01a1cddcb56bd65f10dd80aad7f86b5829
PPC: e500: Fix duplicate kernel load and device tree overlap

This patch fixes an incorrect behavior when the -kernel argument has been
specified without -bios. In this case the kernel was loaded twice. At address
32M as a raw image and afterwards by load_elf/load_uimage at the
corresponding load address. In this case the region for the device tree and
the raw kernel image may overlap.

The patch fixes the behavior by loading the kernel image once with
load_elf/load_uimage and skips loading the raw image.

When here do not use bios_name/size for the kernel and use a more generic
name called payload_name/size.

New in v3: dtb must be stored between kernel and initrd because Linux can
           handle the dtb only within the first 64MB. Add a comment to
           clarify the behavior.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/e500.c